From 7a0f997f708b3cc666d43c8657e62e8d2c674fe6 Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Sun, 20 Sep 2026 02:43:23 -0400 Subject: [PATCH] feat(base): production, modules, adjacency auras, compounds, and crew speed Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/app/(frontend)/logistics/base/actions.ts | 72 + src/app/(frontend)/logistics/map/actions.ts | 25 +- .../logistics/structures/[id]/detail-data.ts | 107 +- .../logistics/structures/[id]/page.tsx | 137 +- .../logistics/structures/actions.ts | 9 +- src/app/api/map-features/route.ts | 30 +- src/collections/game/GameStructures.ts | 47 +- src/collections/game/LaborClassifications.ts | 11 + src/collections/game/auraFields.ts | 46 + src/collections/game/moduleFields.ts | 131 + src/collections/game/productionFields.ts | 45 + src/collections/logistics/Structures.ts | 25 + .../baseManagement/ConstructionPanel.tsx | 33 +- .../baseManagement/ProductionPanel.tsx | 148 + .../frontend/baseManagement/SlotsPanel.tsx | 151 + src/components/frontend/map/MapClient.tsx | 28 +- .../frontend/map/PlacementDialog.tsx | 40 + .../frontend/map/StructureDetailDrawer.tsx | 38 +- .../frontend/storage/StructureCard.tsx | 13 +- src/lib/base/adjacency.ts | 47 + src/lib/base/constructionSpeed.ts | 166 + src/lib/base/modules.ts | 224 + src/lib/base/production.ts | 348 + src/lib/base/productionDefaults.ts | 20 + src/lib/base/staffing.ts | 3 + src/lib/map/compounds.ts | 38 + ...20260918_052751_add_production_system.json | 28612 +++++++++++++++ .../20260918_052751_add_production_system.ts | 84 + ...8_054722_add_labor_construction_speed.json | 28626 +++++++++++++++ ...918_054722_add_labor_construction_speed.ts | 13 + .../20260918_061857_add_module_slots.json | 29041 +++++++++++++++ .../20260918_061857_add_module_slots.ts | 66 + .../20260918_064326_add_compound_parent.json | 29075 +++++++++++++++ .../20260918_064326_add_compound_parent.ts | 16 + .../20260918_070328_add_blueprint_aura.json | 29103 ++++++++++++++++ .../20260918_070328_add_blueprint_aura.ts | 17 + tests/int/adjacency.int.spec.ts | 303 + tests/int/construction-speed.int.spec.ts | 364 + tests/int/modules.int.spec.ts | 350 + tests/int/production.int.spec.ts | 327 + 40 files changed, 147944 insertions(+), 35 deletions(-) create mode 100644 src/collections/game/auraFields.ts create mode 100644 src/collections/game/moduleFields.ts create mode 100644 src/collections/game/productionFields.ts create mode 100644 src/components/frontend/baseManagement/ProductionPanel.tsx create mode 100644 src/components/frontend/baseManagement/SlotsPanel.tsx create mode 100644 src/lib/base/adjacency.ts create mode 100644 src/lib/base/constructionSpeed.ts create mode 100644 src/lib/base/modules.ts create mode 100644 src/lib/base/production.ts create mode 100644 src/lib/base/productionDefaults.ts create mode 100644 src/lib/map/compounds.ts create mode 100644 src/migrations/20260918_052751_add_production_system.json create mode 100644 src/migrations/20260918_052751_add_production_system.ts create mode 100644 src/migrations/20260918_054722_add_labor_construction_speed.json create mode 100644 src/migrations/20260918_054722_add_labor_construction_speed.ts create mode 100644 src/migrations/20260918_061857_add_module_slots.json create mode 100644 src/migrations/20260918_061857_add_module_slots.ts create mode 100644 src/migrations/20260918_064326_add_compound_parent.json create mode 100644 src/migrations/20260918_064326_add_compound_parent.ts create mode 100644 src/migrations/20260918_070328_add_blueprint_aura.json create mode 100644 src/migrations/20260918_070328_add_blueprint_aura.ts create mode 100644 tests/int/adjacency.int.spec.ts create mode 100644 tests/int/construction-speed.int.spec.ts create mode 100644 tests/int/modules.int.spec.ts create mode 100644 tests/int/production.int.spec.ts diff --git a/src/app/(frontend)/logistics/base/actions.ts b/src/app/(frontend)/logistics/base/actions.ts index b2ddda6..e833555 100644 --- a/src/app/(frontend)/logistics/base/actions.ts +++ b/src/app/(frontend)/logistics/base/actions.ts @@ -9,6 +9,12 @@ import { setLaborHeadcount as setLaborHeadcountAssignment, upgradeStructure as upgradeStructureService, } from "@/lib/base"; +import { + installModule as installModuleService, + uninstallModule as uninstallModuleService, +} from "@/lib/base/modules"; +import { emitGameEvent } from "@/utils/event-log/emit"; +import { EventTypes } from "@/utils/event-log/eventTypes"; import { hasLogisticsQualification } from "@/utils/access-control/hasLogisticsQualification"; import { hasPermission } from "@/utils/access-control/hasPermission"; import { isPayloadUser } from "@/utils/access-control/isPayloadUser"; @@ -81,6 +87,72 @@ export async function fireStaff(staffingId: number): Promise> } } +export async function toggleProduction( + gameStructureId: number, + paused: boolean, +): Promise> { + try { + const { payload, user } = await authenticate(); + if (!(await hasLogisticsQualification(payload, user))) { + return { success: false, error: "Insufficient permissions." }; + } + const structure = await payload.findByID({ + collection: "game-structures", + id: gameStructureId, + depth: 0, + overrideAccess: true, + }); + await payload.update({ + collection: "game-structures", + id: gameStructureId, + data: { productionPaused: paused }, + overrideAccess: true, + }); + await emitGameEvent(payload, { + type: EventTypes.ProductionToggled, + message: `${structure.name} production ${paused ? "paused" : "resumed"} by ${user.username ?? "logistics"}`, + structure: gameStructureId, + targetCollection: "game-structures", + targetId: gameStructureId, + }); + return { success: true, data: { paused } }; + } catch (error) { + return actionError(error); + } +} + +export async function installModule( + gameStructureId: number, + moduleName: string, +): Promise> { + try { + const { payload, user } = await authenticate(); + if (!(await hasLogisticsQualification(payload, user))) { + return { success: false, error: "Insufficient permissions." }; + } + const installed = await installModuleService(payload, gameStructureId, moduleName); + return { success: true, data: { installed } }; + } catch (error) { + return actionError(error); + } +} + +export async function uninstallModule( + gameStructureId: number, + moduleName: string, +): Promise> { + try { + const { payload, user } = await authenticate(); + if (!(await hasLogisticsQualification(payload, user))) { + return { success: false, error: "Insufficient permissions." }; + } + const installed = await uninstallModuleService(payload, gameStructureId, moduleName); + return { success: true, data: { installed } }; + } catch (error) { + return actionError(error); + } +} + export async function setLaborHeadcount( structureId: number, classificationId: number, diff --git a/src/app/(frontend)/logistics/map/actions.ts b/src/app/(frontend)/logistics/map/actions.ts index fe6ce4c..1676446 100644 --- a/src/app/(frontend)/logistics/map/actions.ts +++ b/src/app/(frontend)/logistics/map/actions.ts @@ -46,6 +46,7 @@ export async function placeStructure(params: { blueprintId: number; name: string; factionId?: number | null; + parentStructureId?: number | null; x: number; y: number; }): Promise { @@ -101,6 +102,27 @@ export async function placeStructure(params: { } } + let parentStructureId: number | null = null; + if (params.parentStructureId != null) { + const hub = await payload + .findByID({ + collection: "game-structures", + id: params.parentStructureId, + depth: 0, + }) + .catch(() => null); + if (!hub) { + return { success: false, error: "Compound hub not found." }; + } + if ((hub as unknown as GameStructure).map !== mapId) { + return { success: false, error: "The compound hub is on a different map." }; + } + if ((hub as unknown as GameStructure).parentStructure != null) { + return { success: false, error: "Compound hubs cannot themselves be compound children." }; + } + parentStructureId = hub.id; + } + const [zonesRes, nodesRes, structuresRes] = await Promise.all([ payload.find({ collection: "map-zones", @@ -184,6 +206,7 @@ export async function placeStructure(params: { map: mapId, coordinates: point, constructionStatus: "awaiting_materials", + parentStructure: parentStructureId, }, }); @@ -240,7 +263,7 @@ export interface MapZoneInput { mapId: number; name?: string | null; description?: string | null; - type: "water" | "land" | "territory" | "border"; + type: "water" | "land" | "territory" | "border" | "other"; resourceIds?: number[]; fillColor?: string | null; strokeColor?: string | null; diff --git a/src/app/(frontend)/logistics/structures/[id]/detail-data.ts b/src/app/(frontend)/logistics/structures/[id]/detail-data.ts index 450a070..219e558 100644 --- a/src/app/(frontend)/logistics/structures/[id]/detail-data.ts +++ b/src/app/(frontend)/logistics/structures/[id]/detail-data.ts @@ -1,12 +1,10 @@ import { getPayload, type Payload } from "payload"; import type { Faction, GameStructure, Structure } from "@/payload-types"; import { convertLexicalToPlaintext } from "@payloadcms/richtext-lexical/plaintext"; -import { - calculateStoredMass, - calculateUtilization, - getGridSlots, -} from "@/lib/logistics"; +import { calculateStoredMass, calculateUtilization, getGridSlots } from "@/lib/logistics"; import type { LaborClassificationOption, StructureStaffingOption } from "@/lib/base"; +import { effectiveCrew } from "@/lib/base/constructionSpeed"; +import { installedModuleEffects } from "@/lib/base/modules"; import { currencyConfigFromGameRules } from "@/lib/banking"; import { hasLogisticsQualification } from "@/utils/access-control/hasLogisticsQualification"; import { isSuperuser } from "@/utils/access-control/hasPermission"; @@ -22,11 +20,29 @@ export interface StructureDetailData { gridSlots: number | null; totalValue: number; constructionMaterials: { name: string; required: number; delivered: number }[]; + constructionCrew: { required: number; effective: number }; }; upgrade: { targetName: string; materials: { name: string; needed: number; have: number }[]; } | null; + production: { + paused: boolean; + stallReason: string | null; + inputs: { name: string; amountPerHour: number }[]; + outputs: { name: string; amountPerHour: number }[]; + }; + modules: { + slots: number; + installed: { name: string; installedAt: string | null }[]; + options: { + name: string; + category: string; + description: string | null; + effects: { type: string; value: number }[]; + materials: { name: string; amount: number }[]; + }[]; + }; staffing: { structureStaffing: StructureStaffingOption; staff: { @@ -76,8 +92,16 @@ export async function fetchStructureDetail( const structureType = structure.type; const storedResources = structure.storedResources ?? []; const currentMass = calculateStoredMass(storedResources); - const utilization = calculateUtilization(structureType, storedResources); - const gridSlots = getGridSlots(structureType); + const moduleEffects = installedModuleEffects( + structureType, + (structure.installedModules ?? []).map((entry) => entry.name), + ); + const utilization = calculateUtilization( + structureType, + storedResources, + moduleEffects.capacityMass, + ); + const gridSlots = getGridSlots(structureType, moduleEffects.storageSlots); const description = structureType.description ? convertLexicalToPlaintext({ data: structureType.description }) : null; @@ -194,6 +218,9 @@ export async function fetchStructureDetail( limit: 100, depth: 0, }); + const buildEfficiencyById = new Map( + classificationsRes.docs.map((doc) => [doc.id, doc.buildEfficiency ?? 1]), + ); const classifications: LaborClassificationOption[] = classificationsRes.docs.map((doc) => ({ id: doc.id, name: doc.name, @@ -274,13 +301,77 @@ export async function fetchStructureDetail( }; }); + const constructionCrew = { + required: structureType.constructionCrewRequired ?? 0, + effective: effectiveCrew( + staff + .filter( + (member) => member.positionType === "labor" && member.laborClassificationId !== null, + ) + .map((member) => ({ + classificationId: member.laborClassificationId as number, + headcount: member.headcount, + efficiency: buildEfficiencyById.get(member.laborClassificationId as number) ?? 1, + })), + ), + }; + + const recipeLine = (line: { + resource: number | { id: number; name: string }; + amountPerHour?: number | null; + }): { name: string; amountPerHour: number } => { + const resource = line.resource; + const name = + typeof resource === "object" && resource !== null ? resource.name : `Resource #${resource}`; + return { name, amountPerHour: line.amountPerHour ?? 0 }; + }; + const production = { + paused: Boolean(structure.productionPaused), + stallReason: structure.productionStallReason ?? null, + inputs: (structure.productionInputs ?? []).map(recipeLine), + outputs: (structure.productionOutputs ?? []).map(recipeLine), + }; + + const modules = { + slots: structureType.moduleSlots ?? 0, + installed: (structure.installedModules ?? []).map((entry) => ({ + name: entry.name, + installedAt: entry.installedAt ?? null, + })), + options: (structureType.moduleOptions ?? []).map((option) => ({ + name: option.name, + category: option.category, + description: option.description ?? null, + effects: (option.effects ?? []).map((effect) => ({ + type: effect.type ?? "", + value: effect.value ?? 0, + })), + materials: (option.materials ?? []).map((material) => ({ + name: + typeof material.resource === "object" && material.resource !== null + ? material.resource.name + : `Resource #${material.resource}`, + amount: Math.ceil(material.amount ?? 0), + })), + })), + }; + return { structure, blueprint: structureType, description, imageUrl, - derived: { currentMass, utilization, gridSlots, totalValue, constructionMaterials }, + derived: { + currentMass, + utilization, + gridSlots, + totalValue, + constructionMaterials, + constructionCrew, + }, upgrade, + production, + modules, staffing: { structureStaffing, staff, diff --git a/src/app/(frontend)/logistics/structures/[id]/page.tsx b/src/app/(frontend)/logistics/structures/[id]/page.tsx index f16d213..f2e39cc 100644 --- a/src/app/(frontend)/logistics/structures/[id]/page.tsx +++ b/src/app/(frontend)/logistics/structures/[id]/page.tsx @@ -10,6 +10,8 @@ import { StorageRules } from "@/components/frontend/storage/StorageRules"; import { StructureStorageView } from "@/components/frontend/storage/StructureStorageView"; import { StaffRoster } from "@/components/frontend/baseManagement/StaffRoster"; import { UpgradeCard } from "@/components/frontend/baseManagement/UpgradeCard"; +import { ProductionPanel } from "@/components/frontend/baseManagement/ProductionPanel"; +import { SlotsPanel } from "@/components/frontend/baseManagement/SlotsPanel"; import { ConstructionPanel } from "@/components/frontend/baseManagement/ConstructionPanel"; import { calculateStoredMass, @@ -20,6 +22,8 @@ import { } from "@/lib/logistics"; import { pluralize } from "@/lib/utils"; import type { LaborClassificationOption, StructureStaffingOption } from "@/lib/base"; +import { effectiveCrew } from "@/lib/base/constructionSpeed"; +import { installedModuleEffects } from "@/lib/base/modules"; import { currencyConfigFromGameRules } from "@/lib/banking"; import { hasLogisticsQualification } from "@/utils/access-control/hasLogisticsQualification"; import { isSuperuser } from "@/utils/access-control/hasPermission"; @@ -71,9 +75,33 @@ export default async function StructureDetailPage({ params }: StructureDetailPag const structureType = structure.type; const storedResources = structure.storedResources ?? []; + const compoundHub = + typeof structure.parentStructure === "object" && structure.parentStructure !== null + ? structure.parentStructure + : null; + const compoundChildren = ( + await payload.find({ + collection: "game-structures", + where: { parentStructure: { equals: structure.id } }, + limit: 50, + depth: 0, + }) + ).docs.map((doc) => ({ + id: doc.id, + name: doc.name, + constructionStatus: doc.constructionStatus ?? "complete", + })); const currentMass = calculateStoredMass(storedResources); - const utilization = calculateUtilization(structureType, storedResources); - const gridSlots = getGridSlots(structureType); + const moduleEffects = installedModuleEffects( + structureType, + (structure.installedModules ?? []).map((entry) => entry.name), + ); + const utilization = calculateUtilization( + structureType, + storedResources, + moduleEffects.capacityMass, + ); + const gridSlots = getGridSlots(structureType, moduleEffects.storageSlots); const functionLabel = getFunctionTypeLabel(structureType.functionType); const description = structureType.description ? convertLexicalToPlaintext({ data: structureType.description }) @@ -193,6 +221,9 @@ export default async function StructureDetailPage({ params }: StructureDetailPag limit: 100, depth: 0, }); + const buildEfficiencyById = new Map( + classificationsRes.docs.map((doc) => [doc.id, doc.buildEfficiency ?? 1]), + ); const classifications: LaborClassificationOption[] = classificationsRes.docs.map((doc) => ({ id: doc.id, name: doc.name, @@ -200,6 +231,20 @@ export default async function StructureDetailPage({ params }: StructureDetailPag defaultUnitSalary: doc.defaultUnitSalary ?? null, availableHeadcount: doc.availableHeadcount ?? 0, })); + const constructionCrew = { + required: structureType.constructionCrewRequired ?? 0, + effective: effectiveCrew( + staff + .filter( + (member) => member.positionType === "labor" && member.laborClassificationId !== null, + ) + .map((member) => ({ + classificationId: member.laborClassificationId as number, + headcount: member.headcount, + efficiency: buildEfficiencyById.get(member.laborClassificationId as number) ?? 1, + })), + ), + }; const rules = await payload.findGlobal({ slug: "game-rules", @@ -434,6 +479,45 @@ export default async function StructureDetailPage({ params }: StructureDetailPag )} + {(compoundHub || compoundChildren.length > 0) && ( +
+

Compound

+ {compoundHub && ( +

+ Part of{" "} + + {compoundHub.name} + + {"; storage pools into the hub while this building is operational."} +

+ )} + {compoundChildren.length > 0 && ( +
+ + {compoundChildren.length} child building{compoundChildren.length === 1 ? "" : "s"} + +
+ {compoundChildren.map((child) => ( + + {child.name} + + {child.constructionStatus.replace(/_/g, " ")} + + + ))} +
+
+ )} +
+ )} + + + ({ + name: + typeof line.resource === "object" && line.resource !== null + ? line.resource.name + : `Resource #${line.resource}`, + amountPerHour: line.amountPerHour ?? 0, + }))} + outputs={(structure.productionOutputs ?? []).map((line) => ({ + name: + typeof line.resource === "object" && line.resource !== null + ? line.resource.name + : `Resource #${line.resource}`, + amountPerHour: line.amountPerHour ?? 0, + }))} + canManage={canManage} + /> + + ({ + name: entry.name, + installedAt: entry.installedAt ?? null, + }))} + options={(structureType.moduleOptions ?? []).map((option) => ({ + name: option.name, + category: option.category, + description: option.description ?? null, + effects: (option.effects ?? []).map((effect) => ({ + type: effect.type ?? "", + value: effect.value ?? 0, + })), + materials: (option.materials ?? []).map((material) => ({ + name: + typeof material.resource === "object" && material.resource !== null + ? material.resource.name + : `Resource #${material.resource}`, + amount: Math.ceil(material.amount ?? 0), + })), + }))} + canManage={canManage} /> maxMass) { return { @@ -511,7 +512,7 @@ export async function transferResource( // Check destination capacity const destMass = calculateMass(toStructure.storedResources); const addedMass = (resource.massPerUnit ?? 0) * amount; - const destMaxMass = toStructure.type.maxCapacityMass; + const destMaxMass = effectiveMaxMass(toStructure.type, toStructure.installedModules); if (destMaxMass && destMass + addedMass > destMaxMass) { return { @@ -620,7 +621,7 @@ export async function placeResourceOnGrid( const currentMass = calculateMass(structure.storedResources); const addedMass = (resource.massPerUnit ?? 0) * amount; - const maxMass = structureType.maxCapacityMass; + const maxMass = effectiveMaxMass(structureType, structure.installedModules); if (maxMass && currentMass + addedMass > maxMass) { return { success: false, diff --git a/src/app/api/map-features/route.ts b/src/app/api/map-features/route.ts index c347b3c..fb0418d 100644 --- a/src/app/api/map-features/route.ts +++ b/src/app/api/map-features/route.ts @@ -2,6 +2,12 @@ import { NextRequest, NextResponse } from "next/server"; import config from "@payload-config"; import { getPayload } from "payload"; import type { GameStructure, Map as MapDoc, Shipment } from "@/payload-types"; +import { effectiveMaxMass } from "@/lib/base/modules"; +import { + aggregateCompoundStorage, + compoundParentId, + isOperationalMember, +} from "@/lib/map/compounds"; import { isPointArray, type MapPoint } from "@/lib/map/points"; import type { MapFeaturesResponse, StructureFeature } from "@/lib/map/types"; @@ -132,9 +138,11 @@ export async function GET(req: NextRequest) { constructionCompletesAt: structure.constructionCompletesAt ?? null, constructionDurationMinutes: blueprint?.constructionDurationMinutes ?? null, storageUsedKg, - storageCapacityKg: blueprint?.maxCapacityMass ?? null, + storageCapacityKg: blueprint ? effectiveMaxMass(blueprint, structure.installedModules) : null, labelVisible: structure.labelVisible ?? null, labelPriority: structure.labelPriority ?? null, + parentId: compoundParentId(structure), + compoundChildren: 0, blueprintId: blueprint?.id ?? null, blueprintName: blueprint?.name ?? null, blueprintTerrain: (blueprint?.terrainType as "land" | "water" | undefined) ?? null, @@ -160,6 +168,26 @@ export async function GET(req: NextRequest) { }); } + // Compound pooling: children fold their storage into the hub feature and lose + // their own map labels; the hub carries the compound label and ribbon totals. + const featuresById = new Map(structures.map((feature) => [feature.id, feature])); + const childrenByHub = new Map(); + for (const feature of structures) { + if (feature.parentId === null) continue; + feature.labelVisible = false; + const siblings = childrenByHub.get(feature.parentId) ?? []; + siblings.push(feature); + childrenByHub.set(feature.parentId, siblings); + } + for (const [hubId, children] of childrenByHub) { + const hub = featuresById.get(hubId); + if (!hub) continue; + const totals = aggregateCompoundStorage(hub, children); + hub.storageUsedKg = totals.storageUsedKg; + hub.storageCapacityKg = totals.storageCapacityKg; + hub.compoundChildren = children.length; + } + const relEntries = (value: unknown): { id: number; name: string }[] => (Array.isArray(value) ? value : []).map((entry) => typeof entry === "object" && entry !== null && "id" in entry diff --git a/src/collections/game/GameStructures.ts b/src/collections/game/GameStructures.ts index 0c9fd92..0215e14 100644 --- a/src/collections/game/GameStructures.ts +++ b/src/collections/game/GameStructures.ts @@ -3,6 +3,9 @@ import { requirePermission } from "@/utils/access-control/hasPermission"; import { emitGameEvent } from "@/utils/event-log/emit"; import { staffingDefaultsFromBlueprint } from "@/lib/base/staffingDefaults"; import { createStaffingFields } from "./staffingFields"; +import { createProductionFields } from "./productionFields"; +import { createModuleFields } from "./moduleFields"; +import { productionDefaultsFromBlueprint } from "@/lib/base/productionDefaults"; export const GameStructures: CollectionConfig = { slug: "game-structures", @@ -28,6 +31,7 @@ export const GameStructures: CollectionConfig = { overrideAccess: true, }); const defaults = staffingDefaultsFromBlueprint(blueprint); + const productionDefaults = productionDefaultsFromBlueprint(blueprint); return { ...data, @@ -35,6 +39,12 @@ export const GameStructures: CollectionConfig = { ? { laborRequirements: defaults.laborRequirements } : {}), ...(data.staffPositions === undefined ? { staffPositions: defaults.staffPositions } : {}), + ...(data.productionInputs === undefined + ? { productionInputs: productionDefaults.productionInputs } + : {}), + ...(data.productionOutputs === undefined + ? { productionOutputs: productionDefaults.productionOutputs } + : {}), ...(data.maintenanceCost === undefined ? { maintenanceCost: defaults.maintenanceCost } : {}), @@ -127,7 +137,8 @@ export const GameStructures: CollectionConfig = { type: "date", label: "Construction Started At", admin: { - description: "When construction began (materials consumed). Empty while awaiting materials.", + description: + "When construction began (materials consumed). Empty while awaiting materials.", }, }, { @@ -139,6 +150,30 @@ export const GameStructures: CollectionConfig = { }, }, ...createStaffingFields("instance"), + ...createProductionFields("instance"), + ...createModuleFields("instance"), + { + name: "productionPaused", + type: "checkbox", + defaultValue: false, + admin: { + description: "When checked the structure stops producing until unchecked.", + }, + }, + { + name: "lastProductionAt", + type: "date", + admin: { readOnly: true, description: "Last game tick that ran this structure's recipe." }, + }, + { + name: "productionStallReason", + type: "text", + admin: { + readOnly: true, + description: + "Why production is not running: no_labor, missing_inputs, storage_full. Empty = running.", + }, + }, { label: "Geolocation", type: "group", @@ -174,6 +209,16 @@ export const GameStructures: CollectionConfig = { "Label priority for clustering (0-100). Higher wins when structures overlap at low zoom; ties break by stored mass.", }, }, + { + name: "parentStructure", + type: "relationship", + relationTo: "game-structures", + label: "Compound Hub", + admin: { + description: + "Set when this building is part of a compound: its storage pools into the hub, which carries the compound's map label and ribbon.", + }, + }, { name: "storedResources", type: "array", diff --git a/src/collections/game/LaborClassifications.ts b/src/collections/game/LaborClassifications.ts index 4ae9c90..c687810 100644 --- a/src/collections/game/LaborClassifications.ts +++ b/src/collections/game/LaborClassifications.ts @@ -52,6 +52,17 @@ export const LaborClassifications: CollectionConfig = { type: "textarea", label: "Description", }, + { + name: "buildEfficiency", + type: "number", + min: 0, + defaultValue: 1, + label: "Build efficiency", + admin: { + description: + "Construction speed this trade contributes per worker while building structures (1 = a full worker).", + }, + }, { name: "availableHeadcount", type: "number", diff --git a/src/collections/game/auraFields.ts b/src/collections/game/auraFields.ts new file mode 100644 index 0000000..d95ed50 --- /dev/null +++ b/src/collections/game/auraFields.ts @@ -0,0 +1,46 @@ +import type { Field } from "payload"; + +export const AURA_EFFECT_TYPES = ["production_multiplier", "capacity_mass"] as const; + +/** + * Blueprint adjacency aura: structures of this type project one effect onto + * operational structures within range (meters). Instances read the aura live + * from their blueprint; no instance fields. + */ +export function createAuraFields(): Field[] { + return [ + { + name: "aura", + type: "group", + label: "Adjacency Aura", + admin: { + description: "Projected onto nearby operational structures (neighbors only, not itself).", + }, + fields: [ + { + name: "effectType", + type: "select", + options: [...AURA_EFFECT_TYPES], + label: "Aura Effect", + admin: { + description: + "production_multiplier: boosts the neighbor's production output (value 0.25 = +25%). capacity_mass: raises the neighbor's storage capacity (value in kg).", + }, + }, + { + name: "value", + type: "number", + min: 0, + label: "Aura Value", + }, + { + name: "rangeMeters", + type: "number", + min: 0, + defaultValue: 0, + label: "Aura Range (meters)", + }, + ], + }, + ]; +} diff --git a/src/collections/game/moduleFields.ts b/src/collections/game/moduleFields.ts new file mode 100644 index 0000000..17de435 --- /dev/null +++ b/src/collections/game/moduleFields.ts @@ -0,0 +1,131 @@ +import type { Field } from "payload"; + +type ModuleFieldContext = "defaults" | "instance"; + +export const MODULE_CATEGORIES = ["production", "logistics", "defense", "utility"] as const; + +export const MODULE_EFFECT_TYPES = [ + "capacity_mass", + "production_multiplier", + "storage_slots", +] as const; + +/** + * Module system fields. Blueprints declare their slot count and the catalog of + * installable modules (with effects and install costs). Instances only record + * which catalog entries are installed; slots and effects always read live from + * the blueprint, and installation is driven by the module server actions + * because it consumes stored materials. + */ +export function createModuleFields(context: ModuleFieldContext): Field[] { + const defaults = context === "defaults"; + + if (defaults) { + return [ + { + name: "moduleSlots", + type: "number", + min: 0, + defaultValue: 0, + label: "Module Slots", + admin: { + description: + "How many modules can be installed in structures of this type. 0 = no module support.", + }, + }, + { + name: "moduleOptions", + type: "array", + label: "Module Options", + admin: { + description: "Modules that can be installed into structures of this type.", + }, + fields: [ + { + name: "name", + type: "text", + required: true, + }, + { + name: "category", + type: "select", + options: [...MODULE_CATEGORIES], + defaultValue: "utility", + required: true, + }, + { + name: "description", + type: "textarea", + }, + { + name: "effects", + type: "array", + required: true, + fields: [ + { + name: "type", + type: "select", + options: [...MODULE_EFFECT_TYPES], + required: true, + }, + { + name: "value", + type: "number", + required: true, + admin: { + description: + "capacity_mass: extra kg of storage. storage_slots: extra grid slots. production_multiplier: output boost as a fraction (0.25 = +25%).", + }, + }, + ], + }, + { + name: "materials", + type: "array", + required: true, + fields: [ + { + name: "resource", + type: "relationship", + relationTo: "resources", + required: true, + }, + { + name: "amount", + type: "number", + min: 1, + required: true, + }, + ], + }, + ], + }, + ]; + } + + return [ + { + name: "installedModules", + type: "array", + label: "Installed Modules", + admin: { + readOnly: true, + description: "Managed by the install/uninstall module actions.", + }, + fields: [ + { + name: "name", + type: "text", + required: true, + }, + { + name: "installedAt", + type: "date", + admin: { + readOnly: true, + }, + }, + ], + }, + ]; +} diff --git a/src/collections/game/productionFields.ts b/src/collections/game/productionFields.ts new file mode 100644 index 0000000..f445deb --- /dev/null +++ b/src/collections/game/productionFields.ts @@ -0,0 +1,45 @@ +import type { Field } from "payload"; + +type ProductionFieldContext = "instance" | "defaults"; + +/** + * Production recipe fields: blueprint arrays are the defaults copied into + * newly created game-structures; instances carry the same arrays (editable by + * managers) plus runtime controls. + */ +export function createProductionFields(context: ProductionFieldContext): Field[] { + const defaults = context === "defaults"; + const recipeField = (name: "productionInputs" | "productionOutputs", label: string): Field => ({ + name, + type: "array", + label, + admin: { + description: defaults + ? "Default recipe copied into newly created game-structures of this type. Empty = no recipe." + : undefined, + }, + fields: [ + { + name: "resource", + type: "relationship", + relationTo: "resources", + required: true, + }, + { + name: "amountPerHour", + type: "number", + min: 0, + defaultValue: 0, + required: true, + admin: { + description: "Units processed per real hour while running and staffed.", + }, + }, + ], + }); + + return [ + recipeField("productionInputs", "Production Inputs"), + recipeField("productionOutputs", "Production Outputs"), + ]; +} diff --git a/src/collections/logistics/Structures.ts b/src/collections/logistics/Structures.ts index ce42178..5e65549 100644 --- a/src/collections/logistics/Structures.ts +++ b/src/collections/logistics/Structures.ts @@ -3,6 +3,9 @@ import { isDeveloper } from "@/utils/access-control/isRole"; import type { Resource } from "@/payload-types"; import { emitGameEvent } from "@/utils/event-log/emit"; import { createStaffingFields } from "@/collections/game/staffingFields"; +import { createProductionFields } from "@/collections/game/productionFields"; +import { createModuleFields } from "@/collections/game/moduleFields"; +import { createAuraFields } from "@/collections/game/auraFields"; export const Structures: CollectionConfig = { slug: "structures", @@ -359,6 +362,17 @@ export const Structures: CollectionConfig = { "How many real minutes it takes to complete construction of this structure after materials are delivered and building starts.", }, }, + { + name: "constructionCrewRequired", + type: "number", + min: 0, + defaultValue: 0, + label: "Construction Crew Required", + admin: { + description: + "Effective crew needed for the listed build time. 0 builds at full speed with no labor. Understaffed sites build proportionally slower.", + }, + }, { name: "requiredTech", type: "relationship", @@ -498,6 +512,17 @@ export const Structures: CollectionConfig = { type: "group", fields: createStaffingFields("defaults"), }, + { + label: "Production Recipe Defaults", + type: "group", + fields: createProductionFields("defaults"), + }, + { + label: "Modules", + type: "group", + fields: createModuleFields("defaults"), + }, + ...createAuraFields(), { label: "Production & Function", diff --git a/src/components/frontend/baseManagement/ConstructionPanel.tsx b/src/components/frontend/baseManagement/ConstructionPanel.tsx index 946e60f..9b64f2f 100644 --- a/src/components/frontend/baseManagement/ConstructionPanel.tsx +++ b/src/components/frontend/baseManagement/ConstructionPanel.tsx @@ -15,6 +15,7 @@ interface ConstructionPanelProps { completesAt: string | null; durationMinutes: number | null; materials: ConstructionMaterial[]; + crew?: { required: number; effective: number } | null; } const STATUS_LABELS: Record = { @@ -48,6 +49,7 @@ export function ConstructionPanel({ completesAt, durationMinutes, materials, + crew, }: ConstructionPanelProps) { const [nowMs, setNowMs] = useState(() => Date.now()); @@ -62,6 +64,30 @@ export function ConstructionPanel({ const allDelivered = materials.every((material) => material.delivered >= material.required); const pct = status === "building" ? progressPct(startedAt, completesAt, nowMs) : 0; + const crewRequired = crew?.required ?? 0; + const crewEffective = crew?.effective ?? 0; + const crewFactor = crewRequired > 0 ? Math.min(1, crewEffective / crewRequired) : 1; + const crewLine = + crewRequired > 0 + ? crewEffective <= 0 + ? { + text: + status === "building" + ? "No crew assigned: construction is crawling at minimum speed." + : "No crew assigned: construction cannot start once materials arrive.", + className: "text-amber-300", + } + : crewFactor < 1 + ? { + text: `Crew ${crewEffective.toLocaleString()} / ${crewRequired.toLocaleString()}: understaffed, building at ${Math.round(crewFactor * 100)}% speed.`, + className: "text-amber-300", + } + : { + text: `Crew ${crewEffective.toLocaleString()} / ${crewRequired.toLocaleString()}: full build speed.`, + className: "text-emerald-400", + } + : null; + return (
@@ -82,10 +108,7 @@ export function ConstructionPanel({ {pct}%
-
+
@@ -100,6 +123,8 @@ export function ConstructionPanel({

)} + {crewLine &&

{crewLine.text}

} +
{materials.map((material) => { const met = material.delivered >= material.required; diff --git a/src/components/frontend/baseManagement/ProductionPanel.tsx b/src/components/frontend/baseManagement/ProductionPanel.tsx new file mode 100644 index 0000000..61a0206 --- /dev/null +++ b/src/components/frontend/baseManagement/ProductionPanel.tsx @@ -0,0 +1,148 @@ +"use client"; + +import { useState } from "react"; +import { useRouter } from "next/navigation"; +import { toast } from "sonner"; +import { Pause, Play } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { Item, ItemContent, ItemDescription, ItemTitle } from "@/components/ui/item"; +import { useGameTick } from "@/hooks/useGameTick"; +import { toggleProduction } from "@/app/(frontend)/logistics/base/actions"; + +export interface ProductionRecipeLine { + readonly name: string; + readonly amountPerHour: number; +} + +export interface ProductionPanelProps { + readonly gameStructureId: number; + readonly complete: boolean; + readonly paused: boolean; + readonly stallReason: string | null; + readonly inputs: readonly ProductionRecipeLine[]; + readonly outputs: readonly ProductionRecipeLine[]; + readonly canManage: boolean; +} + +const STALL_LABELS: Record = { + no_labor: "No active labor crew", + missing_inputs: "Missing input materials", + storage_full: "Storage is full", +}; + +export function ProductionPanel({ + gameStructureId, + complete, + paused, + stallReason, + inputs, + outputs, + canManage, +}: ProductionPanelProps) { + const router = useRouter(); + const [loading, setLoading] = useState(false); + useGameTick(() => router.refresh()); + + if (!complete) return null; + if (inputs.length === 0 && outputs.length === 0) return null; + + const toggle = async () => { + setLoading(true); + try { + const result = await toggleProduction(gameStructureId, !paused); + if (result.success) { + toast.success(!paused ? "Production resumed." : "Production paused."); + router.refresh(); + } else { + toast.error(result.error ?? "Could not change production."); + } + } finally { + setLoading(false); + } + }; + + const statusText = paused + ? "Paused" + : stallReason + ? (STALL_LABELS[stallReason] ?? stallReason) + : "Running"; + + return ( + + +
+
+ + Production + + {statusText} + + + + Runs per game tick while staffed; outputs land in void storage. + +
+ {canManage && ( + + )} +
+ + {stallReason === "missing_inputs" && ( +

+ Deliver the input materials below to resume the recipe. +

+ )} + +
+
+

+ Inputs / hour +

+ {inputs.length === 0 ? ( +

None

+ ) : ( +
    + {inputs.map((line) => ( +
  • + {line.amountPerHour.toLocaleString()} {line.name} +
  • + ))} +
+ )} +
+
+

+ Outputs / hour +

+ {outputs.length === 0 ? ( +

None

+ ) : ( +
    + {outputs.map((line) => ( +
  • + {line.amountPerHour.toLocaleString()} {line.name} +
  • + ))} +
+ )} +
+
+
+
+ ); +} diff --git a/src/components/frontend/baseManagement/SlotsPanel.tsx b/src/components/frontend/baseManagement/SlotsPanel.tsx new file mode 100644 index 0000000..4fdb0a7 --- /dev/null +++ b/src/components/frontend/baseManagement/SlotsPanel.tsx @@ -0,0 +1,151 @@ +"use client"; + +import { useState } from "react"; +import { useRouter } from "next/navigation"; +import { toast } from "sonner"; +import { Blocks, Plus, X } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { Badge } from "@/components/ui/badge"; +import { Item, ItemContent, ItemDescription, ItemTitle } from "@/components/ui/item"; +import { useGameTick } from "@/hooks/useGameTick"; +import { installModule, uninstallModule } from "@/app/(frontend)/logistics/base/actions"; + +export interface ModuleEffectLine { + readonly type: string; + readonly value: number; +} + +export interface ModuleOptionLine { + readonly name: string; + readonly category: string; + readonly description: string | null; + readonly effects: readonly ModuleEffectLine[]; + readonly materials: readonly { name: string; amount: number }[]; +} + +export interface SlotsPanelProps { + readonly gameStructureId: number; + readonly slots: number; + readonly installed: readonly { name: string; installedAt: string | null }[]; + readonly options: readonly ModuleOptionLine[]; + readonly canManage: boolean; +} + +const EFFECT_LABELS: Record string> = { + capacity_mass: (value) => `+${value.toLocaleString()} kg storage`, + storage_slots: (value) => `+${value} grid slots`, + production_multiplier: (value) => `+${Math.round(value * 100)}% production`, +}; + +function effectLabel(effect: ModuleEffectLine): string { + const formatter = EFFECT_LABELS[effect.type]; + return formatter ? formatter(effect.value) : `${effect.type} ${effect.value}`; +} + +export function SlotsPanel({ + gameStructureId, + slots, + installed, + options, + canManage, +}: SlotsPanelProps) { + const router = useRouter(); + const [loading, setLoading] = useState(null); + useGameTick(() => router.refresh()); + + if (slots <= 0 && options.length === 0 && installed.length === 0) return null; + + const run = async (action: typeof installModule, moduleName: string, successMessage: string) => { + setLoading(moduleName); + try { + const result = await action(gameStructureId, moduleName); + if (result.success) { + toast.success(successMessage); + router.refresh(); + } else { + toast.error(result.error ?? "Could not change modules."); + } + } finally { + setLoading(null); + } + }; + + const installedNames = new Set(installed.map((entry) => entry.name)); + const available = slots - installed.length; + + return ( + + +
+ + + Modules + + 0 ? "text-muted-foreground" : "text-amber-400"}`} + > + {installed.length} / {slots} slots + +
+ + {installed.length > 0 && ( +
+ {installed.map((entry) => ( + + {entry.name} + {canManage && ( + + )} + + ))} +
+ )} + + {canManage && available > 0 && options.length > 0 && ( +
+ {options + .filter((option) => !installedNames.has(option.name)) + .map((option) => ( +
+
+

{option.name}

+

+ {option.effects.map(effectLabel).join(", ") || "No effects"} + {option.materials.length > 0 && + ` | needs ${option.materials + .map((material) => `${material.amount} ${material.name}`) + .join(", ")}`} +

+
+ +
+ ))} +
+ )} + + {slots > 0 && installed.length === 0 && options.length === 0 && ( + No modules are defined for this structure type. + )} +
+
+ ); +} diff --git a/src/components/frontend/map/MapClient.tsx b/src/components/frontend/map/MapClient.tsx index daa6145..a356f99 100644 --- a/src/components/frontend/map/MapClient.tsx +++ b/src/components/frontend/map/MapClient.tsx @@ -29,7 +29,13 @@ import { SelectValue, } from "@/components/ui/select"; import { useGameTick } from "@/hooks/useGameTick"; -import { distanceSquared, interpolateAlong, polylineLength, type MapPoint } from "@/lib/map/points"; +import { + distanceSquared, + interpolateAlong, + zoneLabelPoint, + polylineLength, + type MapPoint, +} from "@/lib/map/points"; import { findSnap, segmentMidpoints, @@ -75,11 +81,15 @@ const STRUCTURE_STATUS: Record = { // Layer styling is hoisted to module constants: react-leaflet re-applies // pathOptions by reference, and a fresh object literal every render forces a // canvas redraw that glitches mid-zoom-animation. -const ZONE_PATH_OPTIONS: Record<"water" | "land" | "territory" | "border", L.PathOptions> = { +const ZONE_PATH_OPTIONS: Record< + "water" | "land" | "territory" | "border" | "other", + L.PathOptions +> = { water: { color: "#38bdf8", fillColor: "#38bdf8", fillOpacity: 0.25, weight: 1 }, land: { color: "#4ade80", fillColor: "#4ade80", fillOpacity: 0.08, weight: 1 }, territory: { color: "#fbbf24", fillColor: "#fbbf24", fillOpacity: 0.1, weight: 1 }, border: { color: "#a78bfa", fillColor: "#a78bfa", fillOpacity: 0.06, weight: 1 }, + other: { color: "#94a3b8", fillColor: "#94a3b8", fillOpacity: 0.08, weight: 1 }, }; const ROAD_PATH_OPTIONS: Record = { @@ -705,6 +715,14 @@ function StructurePopup({ ? `${Math.round(structure.storageUsedKg).toLocaleString()} / ${structure.storageCapacityKg.toLocaleString()} kg` : `${Math.round(structure.storageUsedKg).toLocaleString()} kg`, }, + ...(building || !(structure.compoundChildren != null && structure.compoundChildren > 0) + ? [] + : [ + { + label: "Compound", + value: `${structure.compoundChildren} building${structure.compoundChildren === 1 ? "" : "s"}`, + }, + ]), ]} />
@@ -872,6 +890,8 @@ const StructureLayer = memo(function StructureLayer({ ribbonMeta = first ? `Needs ${first.resourceName} x${first.amount ?? 0}${structure.materials.length > 1 ? ` +${structure.materials.length - 1}` : ""}` : "Awaiting materials"; + } else if ((structure.compoundChildren ?? 0) > 0) { + ribbonMeta = `Compound: ${structure.compoundChildren} building${structure.compoundChildren === 1 ? "" : "s"}`; } else { ribbonMeta = structure.blueprintName ?? "Structure"; } @@ -1487,7 +1507,7 @@ export function MapClient({ maps, canEdit, canPlace }: MapClientProps) { zone.name && zone.labelVisible !== false ? ( @@ -1621,7 +1641,7 @@ export function MapClient({ maps, canEdit, canPlace }: MapClientProps) { (""); const [name, setName] = useState(""); const [factionId, setFactionId] = useState("none"); + const [parentStructureId, setParentStructureId] = useState("none"); const [submitting, setSubmitting] = useState(false); + // Compound hubs: operational top-level structures only (children cannot be hubs). + const hubOptions = useMemo( + () => + structures + .filter( + (structure) => + (structure.constructionStatus ?? "complete") === "complete" && + structure.parentId === null, + ) + .map((structure) => ({ id: structure.id, name: structure.name })), + [structures], + ); + useEffect(() => { if (!open) return; let cancelled = false; @@ -196,6 +210,7 @@ export function PlacementDialog({ setBlueprintId(""); setName(""); setFactionId("none"); + setParentStructureId("none"); }; const submit = async () => { @@ -207,6 +222,7 @@ export function PlacementDialog({ blueprintId: blueprint.id, name, factionId: factionId === "none" ? null : Number(factionId), + parentStructureId: parentStructureId === "none" ? null : Number(parentStructureId), x: point[0], y: point[1], }); @@ -287,6 +303,30 @@ export function PlacementDialog({ />
+ {hubOptions.length > 0 && ( +
+ + ({ + value: String(hub.id), + label: hub.name, + })), + ]} + /> +

+ Child buildings pool their storage into the hub once operational; the hub carries + the compound's map label. +

+
+ )} + {blueprint && (
diff --git a/src/components/frontend/map/StructureDetailDrawer.tsx b/src/components/frontend/map/StructureDetailDrawer.tsx index f9384c0..2b4e155 100644 --- a/src/components/frontend/map/StructureDetailDrawer.tsx +++ b/src/components/frontend/map/StructureDetailDrawer.tsx @@ -10,15 +10,12 @@ import { StructureStorageView } from "@/components/frontend/storage/StructureSto import { StaffRoster } from "@/components/frontend/baseManagement/StaffRoster"; import { UpgradeCard } from "@/components/frontend/baseManagement/UpgradeCard"; import { ConstructionPanel } from "@/components/frontend/baseManagement/ConstructionPanel"; +import { ProductionPanel } from "@/components/frontend/baseManagement/ProductionPanel"; +import { SlotsPanel } from "@/components/frontend/baseManagement/SlotsPanel"; import { getStructureDetail } from "@/app/(frontend)/logistics/structures/[id]/detail"; import type { StructureDetailData } from "@/app/(frontend)/logistics/structures/[id]/detail-data"; import { useGameTick } from "@/hooks/useGameTick"; -import { - BoxIcon, - CoinsIcon, - MapPinIcon, - WrenchIcon, -} from "lucide-react"; +import { BoxIcon, CoinsIcon, MapPinIcon, WrenchIcon } from "lucide-react"; import { Item, ItemContent, @@ -92,7 +89,11 @@ export function StructureDetailDrawer({
{data.imageUrl && (
- {structure.name} + {structure.name}
)} @@ -145,7 +146,9 @@ export function StructureDetailDrawer({
- {data.derived.totalValue.toLocaleString()} + + {data.derived.totalValue.toLocaleString()} + base value
@@ -213,6 +216,25 @@ export function StructureDetailDrawer({ completesAt={structure.constructionCompletesAt ?? null} durationMinutes={blueprint.constructionDurationMinutes ?? null} materials={data.derived.constructionMaterials} + crew={data.derived.constructionCrew} + /> + + + + entry.name), + ); + const utilization = calculateUtilization( + structureType, + storedResources, + moduleEffects.capacityMass, + ); const resourceCount = getResourceCount(storedResources); - const gridSlots = getGridSlots(structureType); + const gridSlots = getGridSlots(structureType, moduleEffects.storageSlots); const functionLabel = getFunctionTypeLabel(structureType.functionType); return ( diff --git a/src/lib/base/adjacency.ts b/src/lib/base/adjacency.ts new file mode 100644 index 0000000..1488f55 --- /dev/null +++ b/src/lib/base/adjacency.ts @@ -0,0 +1,47 @@ +import type { MapPoint } from "@/lib/map/points"; +import { pointDistance } from "@/lib/map/points"; + +export interface AuraSourceLike { + id: number; + coordinates?: MapPoint | null; + constructionStatus?: string | null; + blueprint?: { + aura?: { + effectType?: string | null; + value?: number | null; + rangeMeters?: number | null; + } | null; + } | null; +} + +export interface AdjacencyBonus { + productionMultiplier: number; + capacityMass: number; +} + +/** + * Sums the adjacency auras projected onto a site: operational neighbors only + * (building/awaiting sites project nothing), each source counts once, a source + * never buffs itself, and only sources whose blueprint declares an aura with a + * positive value and range inside the distance contribute. + */ +export function auraBonusAt( + target: { id: number; coordinates?: MapPoint | null }, + sources: AuraSourceLike[], +): AdjacencyBonus { + const bonus: AdjacencyBonus = { productionMultiplier: 0, capacityMass: 0 }; + if (!target.coordinates) return bonus; + for (const source of sources) { + if (source.id === target.id) continue; + if ((source.constructionStatus ?? "complete") !== "complete") continue; + const aura = source.blueprint?.aura; + if (!aura || !aura.effectType) continue; + const value = aura.value ?? 0; + const range = aura.rangeMeters ?? 0; + if (value <= 0 || range <= 0 || !source.coordinates) continue; + if (pointDistance(target.coordinates, source.coordinates) > range) continue; + if (aura.effectType === "production_multiplier") bonus.productionMultiplier += value; + else if (aura.effectType === "capacity_mass") bonus.capacityMass += value; + } + return bonus; +} diff --git a/src/lib/base/constructionSpeed.ts b/src/lib/base/constructionSpeed.ts new file mode 100644 index 0000000..896878b --- /dev/null +++ b/src/lib/base/constructionSpeed.ts @@ -0,0 +1,166 @@ +import type { Payload } from "payload"; + +export interface ConstructionCrewRow { + readonly classificationId: number; + readonly headcount: number; + readonly efficiency: number; +} + +/** + * A stripped site still crawls along at this fraction of full speed instead of + * freezing: the timestamp model has no paused state, and an unbounded build + * would never finish. + */ +export const MIN_BUILD_SPEED_FACTOR = 0.25; + +export function effectiveCrew(rows: ConstructionCrewRow[]): number { + return rows.reduce((total, row) => total + row.headcount * row.efficiency, 0); +} + +/** + * 1 when the blueprint needs no crew; otherwise the staffed fraction of the + * required crew, clamped to full speed (extra crew never over-drives a build). + */ +export function buildSpeedFactor(rows: ConstructionCrewRow[], crewRequired: number): number { + const required = Math.max(0, crewRequired); + if (required === 0) return 1; + const effective = effectiveCrew(rows); + if (effective <= 0) return 0; + return Math.min(1, effective / required); +} + +export function durationMinutesFor(baseMinutes: number, factor: number): number { + const floored = Math.max(factor, MIN_BUILD_SPEED_FACTOR); + return Math.max(1, Math.ceil(baseMinutes / floored)); +} + +export interface RecomputeInput { + readonly startedAt: string | Date | null | undefined; + readonly completesAt: string | Date | null | undefined; + readonly baseMinutes: number; + readonly oldFactor: number; + readonly newFactor: number; + readonly now: Date; +} + +/** + * Re-derives constructionCompletesAt for a building site after a crew change, + * preserving the fraction of work already finished. Work-left is expressed in + * full-speed minutes (wall minutes x old factor), then re-priced at the new + * factor. Returns null when the site has no valid window or is already due. + */ +export function recomputeCompletesAt(input: RecomputeInput): string | null { + const start = input.startedAt ? new Date(input.startedAt).getTime() : NaN; + const end = input.completesAt ? new Date(input.completesAt).getTime() : NaN; + if (!Number.isFinite(start) || !Number.isFinite(end) || end <= start) return null; + if (input.now.getTime() >= end) return null; + const oldFloored = Math.max(input.oldFactor, MIN_BUILD_SPEED_FACTOR); + const newFloored = Math.max(input.newFactor, MIN_BUILD_SPEED_FACTOR); + const remainingBaseMinutes = ((end - input.now.getTime()) / 60000) * oldFloored; + return new Date(input.now.getTime() + (remainingBaseMinutes / newFloored) * 60000).toISOString(); +} + +export async function siteCrewRows( + payload: Payload, + structureId: number, +): Promise { + const rows = await payload.find({ + collection: "npc-staffing", + where: { + and: [ + { structure: { equals: structureId } }, + { positionType: { equals: "labor" } }, + { status: { equals: "active" } }, + ], + }, + depth: 1, + limit: 100, + overrideAccess: true, + }); + return rows.docs.flatMap((row) => { + const rel = row.laborClassification; + if (rel === null || rel === undefined) return []; + const classification = typeof rel === "object" ? rel : null; + return [ + { + classificationId: typeof rel === "object" ? rel.id : rel, + headcount: row.headcount ?? 0, + efficiency: classification?.buildEfficiency ?? 1, + }, + ]; + }); +} + +/** + * Rate recompute after a labor headcount change at a building site. Reads the + * post-change crew, back-derives the pre-change factor from the old headcount + * of the affected classification, and re-prices the remaining work. No-op for + * sites that are not building or whose blueprints need no crew. + */ +export async function applyCrewRateChange( + payload: Payload, + siteId: number, + changedClassificationId: number, + oldHeadcount: number, + now: Date = new Date(), +): Promise { + const doc = await payload.findByID({ + collection: "game-structures", + id: siteId, + depth: 2, + overrideAccess: true, + }); + if (doc.constructionStatus !== "building") return; + const blueprint = typeof doc.type === "object" && doc.type !== null ? doc.type : null; + if (!blueprint) return; + const crewRequired = Math.max(0, blueprint.constructionCrewRequired ?? 0); + if (crewRequired <= 0) return; + + const rows = await siteCrewRows(payload, siteId); + const newFactor = buildSpeedFactor(rows, crewRequired); + // A full release terminates the staffing row before this runs, so the + // pre-change row may be gone: rebuild it from the classification record. + const changedRow = rows.find((row) => row.classificationId === changedClassificationId); + let oldRows: ConstructionCrewRow[]; + if (changedRow) { + oldRows = rows.map((row) => + row.classificationId === changedClassificationId ? { ...row, headcount: oldHeadcount } : row, + ); + } else { + const classification = await payload + .findByID({ + collection: "labor-classifications", + id: changedClassificationId, + depth: 0, + overrideAccess: true, + }) + .catch(() => null); + oldRows = [ + ...rows, + { + classificationId: changedClassificationId, + headcount: oldHeadcount, + efficiency: classification?.buildEfficiency ?? 1, + }, + ]; + } + const oldFactor = buildSpeedFactor(oldRows, crewRequired); + if (oldFactor === newFactor) return; + + const nextCompletesAt = recomputeCompletesAt({ + startedAt: doc.constructionStartedAt, + completesAt: doc.constructionCompletesAt, + baseMinutes: blueprint.constructionDurationMinutes ?? 0, + oldFactor, + newFactor, + now, + }); + if (!nextCompletesAt) return; + + await payload.update({ + collection: "game-structures", + id: siteId, + data: { constructionCompletesAt: nextCompletesAt }, + overrideAccess: true, + }); +} diff --git a/src/lib/base/modules.ts b/src/lib/base/modules.ts new file mode 100644 index 0000000..19a41c3 --- /dev/null +++ b/src/lib/base/modules.ts @@ -0,0 +1,224 @@ +import type { Payload } from "payload"; +import type { GameStructure, Structure } from "@/payload-types"; +import { emitGameEvent } from "@/utils/event-log/emit"; +import { EventTypes } from "@/utils/event-log/eventTypes"; +import { consumeStorage, relationshipId, storedAmount } from "./storage"; + +type StorageEntry = NonNullable[number]; +type VoidEntry = NonNullable[number]; + +export interface ModuleEffectLike { + type?: string | null; + value?: number | null; +} + +export interface ModuleOptionLike { + name?: string | null; + effects?: ModuleEffectLike[] | null; + materials?: + { resource: number | { id: number } | null | undefined; amount?: number | null }[] | null; +} + +export interface BlueprintModulesLike { + moduleSlots?: number | null; + moduleOptions?: ModuleOptionLike[] | null; +} + +export interface ModuleEffects { + capacityMass: number; + productionMultiplier: number; + storageSlots: number; +} + +export interface InstalledModuleLike { + name: string; + installedAt: string | null; +} + +/** Aggregates the effects of a site's installed modules against its blueprint catalog. */ +export function installedModuleEffects( + blueprint: BlueprintModulesLike, + installedNames: string[], +): ModuleEffects { + const effects: ModuleEffects = { + capacityMass: 0, + productionMultiplier: 0, + storageSlots: 0, + }; + for (const name of installedNames) { + const option = (blueprint.moduleOptions ?? []).find((candidate) => candidate.name === name); + if (!option) continue; + for (const effect of option.effects ?? []) { + const value = effect.value ?? 0; + if (effect.type === "capacity_mass") effects.capacityMass += value; + else if (effect.type === "production_multiplier") effects.productionMultiplier += value; + else if (effect.type === "storage_slots") effects.storageSlots += Math.floor(value); + } + } + return effects; +} + +/** Mass capacity with module bonus applied; null stays null (uncapped). */ +export function effectiveCapacityMass( + base: number | null | undefined, + bonus: number, +): number | null { + if (base === null || base === undefined || base <= 0) return null; + return Math.max(0, base + bonus); +} + +/** Mass cap for an instance: blueprint capacity plus its installed capacity_mass modules. */ +export function effectiveMaxMass( + blueprint: BlueprintModulesLike & { maxCapacityMass?: number | null }, + installedModules: { name: string }[] | null | undefined, +): number | null { + const effects = installedModuleEffects( + blueprint, + (installedModules ?? []).map((entry) => entry.name), + ); + return effectiveCapacityMass(blueprint.maxCapacityMass, effects.capacityMass); +} + +export function findModuleOption( + blueprint: BlueprintModulesLike, + moduleName: string, +): ModuleOptionLike | null { + return (blueprint.moduleOptions ?? []).find((option) => option.name === moduleName) ?? null; +} + +function moduleMaterialShortfalls( + option: ModuleOptionLike, + storedResources: StorageEntry[], + voidStorage: VoidEntry[], +): string[] { + const shortages: string[] = []; + for (const material of option.materials ?? []) { + const resourceId = relationshipId(material.resource); + const needed = Math.ceil(material.amount ?? 0); + if (resourceId === null || needed <= 0) continue; + const available = + storedAmount(storedResources, resourceId) + storedAmount(voidStorage, resourceId); + if (available < needed) { + shortages.push(`resource #${resourceId} (have ${available}, need ${needed})`); + } + } + return shortages; +} + +function consumeModuleMaterials( + option: ModuleOptionLike, + storedResources: StorageEntry[], + voidStorage: VoidEntry[], +): { storedResources: StorageEntry[]; voidStorage: VoidEntry[] } { + let stored = [...storedResources]; + let voidEntries = [...voidStorage]; + for (const material of option.materials ?? []) { + const resourceId = relationshipId(material.resource); + const needed = Math.ceil(material.amount ?? 0); + if (resourceId === null || needed <= 0) continue; + const fromStored = consumeStorage(stored, resourceId, needed); + stored = fromStored.entries; + if (fromStored.remaining > 0) { + voidEntries = consumeStorage(voidEntries, resourceId, fromStored.remaining).entries; + } + } + return { storedResources: stored, voidStorage: voidEntries }; +} + +export async function installModule( + payload: Payload, + structureId: number, + moduleName: string, +): Promise { + const doc = await payload.findByID({ + collection: "game-structures", + id: structureId, + depth: 2, + overrideAccess: true, + }); + if (doc.constructionStatus !== "complete") { + throw new Error("Modules can only be installed in operational structures."); + } + const blueprint = + typeof doc.type === "object" && doc.type !== null ? (doc.type as Structure) : null; + if (!blueprint) throw new Error("This structure has no blueprint."); + + const installed = (doc.installedModules ?? []) as InstalledModuleLike[]; + if (installed.some((entry) => entry.name === moduleName)) { + throw new Error("That module is already installed."); + } + const slots = blueprint.moduleSlots ?? 0; + if (installed.length >= slots) { + throw new Error(`All ${slots} module slot(s) are already in use.`); + } + const option = findModuleOption(blueprint, moduleName); + if (!option) throw new Error("Unknown module for this structure type."); + + const storedResources = (doc.storedResources ?? []) as StorageEntry[]; + const voidStorage = (doc.voidStorage ?? []) as VoidEntry[]; + const shortages = moduleMaterialShortfalls(option, storedResources, voidStorage); + if (shortages.length > 0) { + throw new Error(`Missing module materials: ${shortages.join(", ")}.`); + } + const consumed = consumeModuleMaterials(option, storedResources, voidStorage); + const installedAt = new Date().toISOString(); + const updated = [...installed, { name: moduleName, installedAt }]; + + await payload.update({ + collection: "game-structures", + id: structureId, + data: { + installedModules: updated, + storedResources: consumed.storedResources, + voidStorage: consumed.voidStorage, + }, + overrideAccess: true, + }); + + await emitGameEvent(payload, { + type: EventTypes.StructureModuleInstall, + message: `${doc.name} installed the ${moduleName} module`, + structure: structureId, + targetCollection: "game-structures", + targetId: structureId, + data: { module: moduleName }, + }); + return updated; +} + +export async function uninstallModule( + payload: Payload, + structureId: number, + moduleName: string, +): Promise { + const doc = await payload.findByID({ + collection: "game-structures", + id: structureId, + depth: 0, + overrideAccess: true, + }); + const installed = ((doc.installedModules ?? []) as InstalledModuleLike[]).filter( + (entry) => entry.name !== moduleName, + ); + const before = (doc.installedModules ?? []) as InstalledModuleLike[]; + if (installed.length === before.length) { + throw new Error("That module is not installed."); + } + + await payload.update({ + collection: "game-structures", + id: structureId, + data: { installedModules: installed }, + overrideAccess: true, + }); + + await emitGameEvent(payload, { + type: EventTypes.StructureModuleUninstall, + message: `${doc.name} uninstalled the ${moduleName} module (materials not refunded)`, + structure: structureId, + targetCollection: "game-structures", + targetId: structureId, + data: { module: moduleName }, + }); + return installed; +} diff --git a/src/lib/base/production.ts b/src/lib/base/production.ts new file mode 100644 index 0000000..1b473da --- /dev/null +++ b/src/lib/base/production.ts @@ -0,0 +1,348 @@ +import type { Payload } from "payload"; +import type { GameStructure, Resource, Structure } from "@/payload-types"; +import { EventTypes } from "@/utils/event-log/eventTypes"; +import { emitGameEvent } from "@/utils/event-log/emit"; +import { consumeStorage, relationshipId, storedAmount } from "./storage"; +import { effectiveCapacityMass, installedModuleEffects } from "./modules"; +import { auraBonusAt, type AuraSourceLike } from "./adjacency"; +import type { MapPoint } from "@/lib/map/points"; + +type PayloadType = Awaited>; + +export interface ProductionLog { + info?: (message: string) => void; + error?: (message: string) => void; +} + +export interface ProductionTickResult { + processed: number; + produced: number; + stalled: number; +} + +type ProductionLine = { resource: number | Resource; amountPerHour?: number | null }; +type StorageEntry = NonNullable[number]; +type VoidEntry = NonNullable[number]; + +/** Cap on accumulated production time so a long outage cannot dump a mountain at once. */ +const MAX_DELTA_HOURS = 8; + +async function structureBlueprint( + payload: PayloadType, + structure: GameStructure, +): Promise { + const reference = structure.type; + if (typeof reference === "object" && reference !== null) return reference as Structure; + if (typeof reference !== "number") return null; + return payload.findByID({ + collection: "structures", + id: reference, + depth: 1, + overrideAccess: true, + }); +} + +function capacityKg(blueprint: Structure | null): number | null { + const capacity = blueprint?.maxCapacityMass; + return capacity != null && capacity > 0 ? capacity : null; +} + +function storedMass( + storedResources: StorageEntry[], + voidStorage: VoidEntry[], + resourceById: Map, +): number { + const massOf = (entry: { resource: number | Resource; amount?: number | null }): number => { + const id = relationshipId(entry.resource); + return (resourceById.get(id ?? -1)?.massPerUnit ?? 0) * (entry.amount ?? 0); + }; + return ( + storedResources.reduce((total, entry) => total + massOf(entry), 0) + + voidStorage.reduce((total, entry) => total + massOf(entry), 0) + ); +} + +function mergeIntoVoid(voidStorage: VoidEntry[], resourceId: number, amount: number): VoidEntry[] { + if (amount <= 0) return voidStorage; + const existing = voidStorage.find((entry) => relationshipId(entry.resource) === resourceId); + if (existing) { + return voidStorage.map((entry) => + entry === existing ? { ...entry, amount: (entry.amount ?? 0) + amount } : entry, + ); + } + return [...voidStorage, { resource: resourceId, amount, gridX: 0, gridY: 0 }]; +} + +async function hasActiveLabor(payload: PayloadType, structureId: number): Promise { + const rows = await payload.find({ + collection: "npc-staffing", + where: { + and: [ + { structure: { equals: structureId } }, + { status: { equals: "active" } }, + { headcount: { greater_than: 0 } }, + ], + }, + limit: 1, + depth: 0, + overrideAccess: true, + }); + return rows.docs.length > 0; +} + +/** + * Runs every complete, unpaused structure's production recipe for the time + * elapsed since its lastProductionAt: consumes inputs from storage, pushes + * outputs into void storage, and stalls with a surfaced reason on missing + * labor, missing inputs, or a full store. Stalled time produces nothing (the + * clock always advances), and the first tick after completion only primes the + * clock so no output exists before a full interval has passed. + */ +export async function processProductionTick( + payload: PayloadType, + log?: ProductionLog, + now: Date = new Date(), + siteIds?: number[], +): Promise { + const result: ProductionTickResult = { processed: 0, produced: 0, stalled: 0 }; + const nowIso = now.toISOString(); + + const sites = await payload.find({ + collection: "game-structures", + where: { + and: [ + { constructionStatus: { equals: "complete" } }, + ...(siteIds && siteIds.length > 0 ? [{ id: { in: siteIds } }] : []), + ], + }, + limit: 1000, + depth: 2, + overrideAccess: true, + }); + + // Aura sources must be unscoped even when siteIds scopes the sweep: + // neighbors outside the scope still project their auras inward. + const auraSourceDocs = + siteIds && siteIds.length > 0 + ? ( + await payload.find({ + collection: "game-structures", + where: { constructionStatus: { equals: "complete" } }, + depth: 1, + limit: 1000, + overrideAccess: true, + }) + ).docs + : sites.docs; + const auraSources: AuraSourceLike[] = auraSourceDocs.map((doc) => { + const structure = doc as unknown as GameStructure; + return { + id: structure.id, + coordinates: (structure.coordinates ?? null) as MapPoint | null, + constructionStatus: structure.constructionStatus ?? "complete", + blueprint: typeof structure.type === "object" ? structure.type : null, + }; + }); + + for (const doc of sites.docs) { + const structure = doc as unknown as GameStructure; + try { + if (structure.productionPaused) continue; + const outputs = (structure.productionOutputs ?? []) as ProductionLine[]; + if (outputs.length === 0) continue; + const inputs = (structure.productionInputs ?? []) as ProductionLine[]; + + const last = structure.lastProductionAt + ? new Date(structure.lastProductionAt).getTime() + : NaN; + if (!Number.isFinite(last)) { + await payload.update({ + collection: "game-structures", + id: structure.id, + data: { lastProductionAt: nowIso }, + overrideAccess: true, + }); + continue; + } + const deltaHours = Math.max(0, Math.min(MAX_DELTA_HOURS, (now.getTime() - last) / 3_600_000)); + if (deltaHours <= 0) continue; + result.processed++; + + if (!(await hasActiveLabor(payload, structure.id))) { + await stall(payload, structure, "no_labor", nowIso); + result.stalled++; + continue; + } + + let storedResources: StorageEntry[] = [...(structure.storedResources ?? [])]; + let voidStorage: VoidEntry[] = [...(structure.voidStorage ?? [])]; + + const shortages: string[] = []; + for (const line of inputs) { + const resourceId = relationshipId(line.resource); + if (resourceId === null) continue; + const needed = Math.max(0, (line.amountPerHour ?? 0) * deltaHours); + if (needed <= 0) continue; + const available = + storedAmount(storedResources, resourceId) + storedAmount(voidStorage, resourceId); + if (available < needed) { + const name = + typeof line.resource === "object" ? line.resource.name : `Resource #${line.resource}`; + shortages.push(`${name} (need ${needed}, have ${available})`); + } + } + if (shortages.length > 0) { + await stall(payload, structure, "missing_inputs", nowIso, shortages.join(", ")); + result.stalled++; + continue; + } + + const resourceIds = new Set(); + for (const line of [...inputs, ...outputs]) { + const id = relationshipId(line.resource); + if (id !== null) resourceIds.add(id); + } + const resourceById = new Map(); + for (const id of resourceIds) { + const resource = await payload.findByID({ + collection: "resources", + id, + depth: 0, + overrideAccess: true, + }); + resourceById.set(id, resource as unknown as Resource); + } + + let producedLines = outputs + .map((line) => ({ + resourceId: relationshipId(line.resource), + amount: Math.max(0, (line.amountPerHour ?? 0) * deltaHours), + })) + .filter( + (line): line is { resourceId: number; amount: number } => + line.resourceId !== null && line.amount > 0, + ); + if (producedLines.length === 0) { + await payload.update({ + collection: "game-structures", + id: structure.id, + data: { lastProductionAt: nowIso, productionStallReason: null }, + overrideAccess: true, + }); + continue; + } + + const blueprint = await structureBlueprint(payload, structure); + const moduleEffects = installedModuleEffects( + blueprint ?? {}, + ((structure.installedModules ?? []) as { name: string }[]).map((entry) => entry.name), + ); + const adjacency = auraBonusAt( + { id: structure.id, coordinates: (structure.coordinates ?? null) as MapPoint | null }, + auraSources, + ); + const outputBoost = 1 + moduleEffects.productionMultiplier + adjacency.productionMultiplier; + if (outputBoost > 1) { + producedLines = producedLines.map((line) => ({ + ...line, + amount: line.amount * outputBoost, + })); + } + + const capacity = effectiveCapacityMass( + capacityKg(blueprint), + moduleEffects.capacityMass + adjacency.capacityMass, + ); + if (capacity !== null) { + const free = capacity - storedMass(storedResources, voidStorage, resourceById); + if (free <= 0) { + await stall(payload, structure, "storage_full", nowIso); + result.stalled++; + continue; + } + const incomingMass = producedLines.reduce( + (total, line) => + total + (resourceById.get(line.resourceId)?.massPerUnit ?? 0) * line.amount, + 0, + ); + if (incomingMass > free) { + const scale = free / incomingMass; + producedLines = producedLines.map((line) => ({ ...line, amount: line.amount * scale })); + } + } + + for (const line of inputs) { + const resourceId = relationshipId(line.resource); + if (resourceId === null) continue; + const needed = Math.max(0, (line.amountPerHour ?? 0) * deltaHours); + if (needed <= 0) continue; + const fromGrid = consumeStorage(storedResources, resourceId, needed); + storedResources = fromGrid.entries; + voidStorage = consumeStorage(voidStorage, resourceId, fromGrid.remaining).entries; + } + + for (const line of producedLines) { + voidStorage = mergeIntoVoid(voidStorage, line.resourceId, line.amount); + } + + await payload.update({ + collection: "game-structures", + id: structure.id, + data: { + storedResources, + voidStorage, + lastProductionAt: nowIso, + productionStallReason: null, + }, + overrideAccess: true, + }); + + const summary = producedLines + .map( + (line) => `${Math.round(line.amount)} ${resourceById.get(line.resourceId)?.name ?? ""}`, + ) + .join(", "); + await emitGameEvent(payload, { + type: EventTypes.ProductionOutput, + message: `${structure.name} produced ${summary}`, + structure: structure.id, + targetCollection: "game-structures", + targetId: structure.id, + data: { deltaHours, lines: producedLines }, + }); + result.produced++; + } catch (error) { + log?.error?.( + `Production tick failed for structure #${structure.id}: ${ + error instanceof Error ? error.message : String(error) + }`, + ); + } + } + + return result; +} + +async function stall( + payload: PayloadType, + structure: GameStructure, + reason: string, + nowIso: string, + detail?: string, +): Promise { + await payload.update({ + collection: "game-structures", + id: structure.id, + data: { productionStallReason: reason, lastProductionAt: nowIso }, + overrideAccess: true, + }); + if ((structure.productionStallReason ?? null) !== reason) { + await emitGameEvent(payload, { + type: EventTypes.ProductionPaused, + message: `${structure.name} production paused: ${reason}${detail ? ` (${detail})` : ""}`, + structure: structure.id, + targetCollection: "game-structures", + targetId: structure.id, + }); + } +} diff --git a/src/lib/base/productionDefaults.ts b/src/lib/base/productionDefaults.ts new file mode 100644 index 0000000..db90c4b --- /dev/null +++ b/src/lib/base/productionDefaults.ts @@ -0,0 +1,20 @@ +import type { Structure } from "@/payload-types"; + +export type ProductionDefaults = { + readonly productionInputs: NonNullable; + readonly productionOutputs: NonNullable; +}; + +export function productionDefaultsFromBlueprint(blueprint: Structure): ProductionDefaults { + return { + productionInputs: (blueprint.productionInputs ?? []).map((input) => ({ + resource: + typeof input.resource === "object" ? input.resource.id : input.resource, + amountPerHour: input.amountPerHour ?? 0, + })), + productionOutputs: (blueprint.productionOutputs ?? []).map((output) => ({ + resource: typeof output.resource === "object" ? output.resource.id : output.resource, + amountPerHour: output.amountPerHour ?? 0, + })), + }; +} diff --git a/src/lib/base/staffing.ts b/src/lib/base/staffing.ts index 0ea3a05..41fb382 100644 --- a/src/lib/base/staffing.ts +++ b/src/lib/base/staffing.ts @@ -3,6 +3,7 @@ import type { NpcStaffing } from "@/payload-types"; import { emitGameEvent } from "@/utils/event-log/emit"; import { EventTypes } from "@/utils/event-log/eventTypes"; import { relationshipId } from "./storage"; +import { applyCrewRateChange } from "./constructionSpeed"; import type { HireStaffInput, SetLaborHeadcountInput } from "./types"; export async function assertStaffHiringEnabled(payload: Payload): Promise { @@ -226,6 +227,7 @@ export async function setLaborHeadcount( targetCollection: "npc-staffing", targetId: staffing.id, }); + await applyCrewRateChange(payload, structure.id, classification.id, currentHeadcount); } return { id: null }; } @@ -272,6 +274,7 @@ export async function setLaborHeadcount( unitSalary, }, }); + await applyCrewRateChange(payload, structure.id, classification.id, currentHeadcount); return { id: updated.id }; } diff --git a/src/lib/map/compounds.ts b/src/lib/map/compounds.ts new file mode 100644 index 0000000..fb7b328 --- /dev/null +++ b/src/lib/map/compounds.ts @@ -0,0 +1,38 @@ +export interface CompoundMemberLike { + id: number; + parentStructure?: number | { id: number } | null; + constructionStatus?: string | null; + storageUsedKg?: number | null; + storageCapacityKg?: number | null; +} + +export function compoundParentId(member: CompoundMemberLike): number | null { + const parent = member.parentStructure; + if (parent === null || parent === undefined) return null; + return typeof parent === "object" ? parent.id : parent; +} + +export function isOperationalMember(member: CompoundMemberLike): boolean { + return (member.constructionStatus ?? "complete") === "complete"; +} + +/** + * Compound storage pooling: the hub's totals cover itself plus its operational + * children. Building or awaiting-materials children contribute nothing yet. An + * uncapped member (null capacity) makes the whole compound uncapped. + */ +export function aggregateCompoundStorage( + hub: CompoundMemberLike, + children: CompoundMemberLike[], +): { storageUsedKg: number; storageCapacityKg: number | null } { + let used = hub.storageUsedKg ?? 0; + let capacity: number | null = hub.storageCapacityKg ?? null; + for (const child of children) { + if (!isOperationalMember(child)) continue; + used += child.storageUsedKg ?? 0; + const childCap = child.storageCapacityKg; + if (childCap === null || childCap === undefined) capacity = null; + else if (capacity !== null) capacity += childCap; + } + return { storageUsedKg: used, storageCapacityKg: capacity }; +} diff --git a/src/migrations/20260918_052751_add_production_system.json b/src/migrations/20260918_052751_add_production_system.json new file mode 100644 index 0000000..6cc541f --- /dev/null +++ b/src/migrations/20260918_052751_add_production_system.json @@ -0,0 +1,28612 @@ +{ + "version": "7", + "dialect": "postgresql", + "tables": { + "public.media": { + "name": "media", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "media_updated_at_idx": { + "name": "media_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_created_at_idx": { + "name": "media_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_filename_idx": { + "name": "media_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_hard_resources": { + "name": "game_hard_resources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_hard_resources_name_idx": { + "name": "game_hard_resources_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_hard_resources_updated_at_idx": { + "name": "game_hard_resources_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_hard_resources_created_at_idx": { + "name": "game_hard_resources_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_labor_requirements": { + "name": "game_structures_labor_requirements", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "classification_id": { + "name": "classification_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "required_headcount": { + "name": "required_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_headcount": { + "name": "max_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_labor_requirements_order_idx": { + "name": "game_structures_labor_requirements_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_labor_requirements_parent_id_idx": { + "name": "game_structures_labor_requirements_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_labor_requirements_classification_idx": { + "name": "game_structures_labor_requirements_classification_idx", + "columns": [ + { + "expression": "classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_labor_requirements_classification_id_labor_classifications_id_fk": { + "name": "game_structures_labor_requirements_classification_id_labor_classifications_id_fk", + "tableFrom": "game_structures_labor_requirements", + "tableTo": "labor_classifications", + "columnsFrom": [ + "classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_labor_requirements_parent_id_fk": { + "name": "game_structures_labor_requirements_parent_id_fk", + "tableFrom": "game_structures_labor_requirements", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_staff_positions": { + "name": "game_structures_staff_positions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_game_structures_staff_positions_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "max": { + "name": "max", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_staff_positions_order_idx": { + "name": "game_structures_staff_positions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_staff_positions_parent_id_idx": { + "name": "game_structures_staff_positions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_staff_positions_parent_id_fk": { + "name": "game_structures_staff_positions_parent_id_fk", + "tableFrom": "game_structures_staff_positions", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_production_inputs": { + "name": "game_structures_production_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "game_structures_production_inputs_order_idx": { + "name": "game_structures_production_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_inputs_parent_id_idx": { + "name": "game_structures_production_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_inputs_resource_idx": { + "name": "game_structures_production_inputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_production_inputs_resource_id_resources_id_fk": { + "name": "game_structures_production_inputs_resource_id_resources_id_fk", + "tableFrom": "game_structures_production_inputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_production_inputs_parent_id_fk": { + "name": "game_structures_production_inputs_parent_id_fk", + "tableFrom": "game_structures_production_inputs", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_production_outputs": { + "name": "game_structures_production_outputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "game_structures_production_outputs_order_idx": { + "name": "game_structures_production_outputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_outputs_parent_id_idx": { + "name": "game_structures_production_outputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_outputs_resource_idx": { + "name": "game_structures_production_outputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_production_outputs_resource_id_resources_id_fk": { + "name": "game_structures_production_outputs_resource_id_resources_id_fk", + "tableFrom": "game_structures_production_outputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_production_outputs_parent_id_fk": { + "name": "game_structures_production_outputs_parent_id_fk", + "tableFrom": "game_structures_production_outputs", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_stored_resources": { + "name": "game_structures_stored_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_structures_stored_resources_order_idx": { + "name": "game_structures_stored_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_stored_resources_parent_id_idx": { + "name": "game_structures_stored_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_stored_resources_resource_idx": { + "name": "game_structures_stored_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_stored_resources_resource_id_resources_id_fk": { + "name": "game_structures_stored_resources_resource_id_resources_id_fk", + "tableFrom": "game_structures_stored_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_stored_resources_parent_id_fk": { + "name": "game_structures_stored_resources_parent_id_fk", + "tableFrom": "game_structures_stored_resources", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_void_storage": { + "name": "game_structures_void_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_structures_void_storage_order_idx": { + "name": "game_structures_void_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_void_storage_parent_id_idx": { + "name": "game_structures_void_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_void_storage_resource_idx": { + "name": "game_structures_void_storage_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_void_storage_resource_id_resources_id_fk": { + "name": "game_structures_void_storage_resource_id_resources_id_fk", + "tableFrom": "game_structures_void_storage", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_void_storage_parent_id_fk": { + "name": "game_structures_void_storage_parent_id_fk", + "tableFrom": "game_structures_void_storage", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures": { + "name": "game_structures", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type_id": { + "name": "type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "construction_status": { + "name": "construction_status", + "type": "enum_game_structures_construction_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'complete'" + }, + "construction_started_at": { + "name": "construction_started_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "construction_completes_at": { + "name": "construction_completes_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "maintenance_cost": { + "name": "maintenance_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "production_paused": { + "name": "production_paused", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "last_production_at": { + "name": "last_production_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "production_stall_reason": { + "name": "production_stall_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "coordinates": { + "name": "coordinates", + "type": "geometry(Point)", + "primaryKey": false, + "notNull": false + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "label_priority": { + "name": "label_priority", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_structures_type_idx": { + "name": "game_structures_type_idx", + "columns": [ + { + "expression": "type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_faction_idx": { + "name": "game_structures_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_map_idx": { + "name": "game_structures_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_updated_at_idx": { + "name": "game_structures_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_created_at_idx": { + "name": "game_structures_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_type_id_structures_id_fk": { + "name": "game_structures_type_id_structures_id_fk", + "tableFrom": "game_structures", + "tableTo": "structures", + "columnsFrom": [ + "type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_faction_id_factions_id_fk": { + "name": "game_structures_faction_id_factions_id_fk", + "tableFrom": "game_structures", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_map_id_maps_id_fk": { + "name": "game_structures_map_id_maps_id_fk", + "tableFrom": "game_structures", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles_stored_resources": { + "name": "game_vehicles_stored_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_vehicles_stored_resources_order_idx": { + "name": "game_vehicles_stored_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_stored_resources_parent_id_idx": { + "name": "game_vehicles_stored_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_stored_resources_resource_idx": { + "name": "game_vehicles_stored_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_stored_resources_resource_id_resources_id_fk": { + "name": "game_vehicles_stored_resources_resource_id_resources_id_fk", + "tableFrom": "game_vehicles_stored_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_stored_resources_parent_id_fk": { + "name": "game_vehicles_stored_resources_parent_id_fk", + "tableFrom": "game_vehicles_stored_resources", + "tableTo": "game_vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles_void_storage": { + "name": "game_vehicles_void_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_vehicles_void_storage_order_idx": { + "name": "game_vehicles_void_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_void_storage_parent_id_idx": { + "name": "game_vehicles_void_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_void_storage_resource_idx": { + "name": "game_vehicles_void_storage_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_void_storage_resource_id_resources_id_fk": { + "name": "game_vehicles_void_storage_resource_id_resources_id_fk", + "tableFrom": "game_vehicles_void_storage", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_void_storage_parent_id_fk": { + "name": "game_vehicles_void_storage_parent_id_fk", + "tableFrom": "game_vehicles_void_storage", + "tableTo": "game_vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles": { + "name": "game_vehicles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type_id": { + "name": "type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "deployed_at_id": { + "name": "deployed_at_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_game_vehicles_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'idle'" + }, + "current_fuel": { + "name": "current_fuel", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "current_health": { + "name": "current_health", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_vehicles_type_idx": { + "name": "game_vehicles_type_idx", + "columns": [ + { + "expression": "type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_deployed_at_idx": { + "name": "game_vehicles_deployed_at_idx", + "columns": [ + { + "expression": "deployed_at_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_faction_idx": { + "name": "game_vehicles_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_updated_at_idx": { + "name": "game_vehicles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_created_at_idx": { + "name": "game_vehicles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_type_id_vehicles_id_fk": { + "name": "game_vehicles_type_id_vehicles_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "vehicles", + "columnsFrom": [ + "type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_deployed_at_id_game_structures_id_fk": { + "name": "game_vehicles_deployed_at_id_game_structures_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "game_structures", + "columnsFrom": [ + "deployed_at_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_faction_id_factions_id_fk": { + "name": "game_vehicles_faction_id_factions_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_npcs": { + "name": "game_npcs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occupation": { + "name": "occupation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "location_id": { + "name": "location_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bio": { + "name": "bio", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "is_generated": { + "name": "is_generated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "is_in_game": { + "name": "is_in_game", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "vendor_enabled": { + "name": "vendor_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vendor_price_modifier": { + "name": "vendor_price_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_npcs_location_idx": { + "name": "game_npcs_location_idx", + "columns": [ + { + "expression": "location_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_faction_idx": { + "name": "game_npcs_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_updated_at_idx": { + "name": "game_npcs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_created_at_idx": { + "name": "game_npcs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_npcs_location_id_game_structures_id_fk": { + "name": "game_npcs_location_id_game_structures_id_fk", + "tableFrom": "game_npcs", + "tableTo": "game_structures", + "columnsFrom": [ + "location_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_npcs_faction_id_factions_id_fk": { + "name": "game_npcs_faction_id_factions_id_fk", + "tableFrom": "game_npcs", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_npcs_rels": { + "name": "game_npcs_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_npcs_rels_order_idx": { + "name": "game_npcs_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_parent_idx": { + "name": "game_npcs_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_path_idx": { + "name": "game_npcs_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_assets_id_idx": { + "name": "game_npcs_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_npcs_rels_parent_fk": { + "name": "game_npcs_rels_parent_fk", + "tableFrom": "game_npcs_rels", + "tableTo": "game_npcs", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "game_npcs_rels_assets_fk": { + "name": "game_npcs_rels_assets_fk", + "tableFrom": "game_npcs_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.npc_staffing": { + "name": "npc_staffing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "npc_id": { + "name": "npc_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_npc_staffing_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'labor'" + }, + "position_title": { + "name": "position_title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "headcount": { + "name": "headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "labor_classification_id": { + "name": "labor_classification_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "salary": { + "name": "salary", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_npc_staffing_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'active'" + }, + "hired_at": { + "name": "hired_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "terminated_at": { + "name": "terminated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "npc_staffing_npc_idx": { + "name": "npc_staffing_npc_idx", + "columns": [ + { + "expression": "npc_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_structure_idx": { + "name": "npc_staffing_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_labor_classification_idx": { + "name": "npc_staffing_labor_classification_idx", + "columns": [ + { + "expression": "labor_classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_updated_at_idx": { + "name": "npc_staffing_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_created_at_idx": { + "name": "npc_staffing_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "npc_staffing_npc_id_game_npcs_id_fk": { + "name": "npc_staffing_npc_id_game_npcs_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "game_npcs", + "columnsFrom": [ + "npc_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "npc_staffing_structure_id_game_structures_id_fk": { + "name": "npc_staffing_structure_id_game_structures_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "game_structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "npc_staffing_labor_classification_id_labor_classifications_id_fk": { + "name": "npc_staffing_labor_classification_id_labor_classifications_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "labor_classifications", + "columnsFrom": [ + "labor_classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labor_classifications": { + "name": "labor_classifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "default_unit_salary": { + "name": "default_unit_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "available_headcount": { + "name": "available_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "labor_classifications_name_idx": { + "name": "labor_classifications_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_key_idx": { + "name": "labor_classifications_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_updated_at_idx": { + "name": "labor_classifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_created_at_idx": { + "name": "labor_classifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_event_logs": { + "name": "game_event_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "system": { + "name": "system", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "actor_id": { + "name": "actor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "target_collection": { + "name": "target_collection", + "type": "enum_game_event_logs_target_collection", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "target_id": { + "name": "target_id", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_event_logs_type_idx": { + "name": "game_event_logs_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_actor_idx": { + "name": "game_event_logs_actor_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_structure_idx": { + "name": "game_event_logs_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_updated_at_idx": { + "name": "game_event_logs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_created_at_idx": { + "name": "game_event_logs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_event_logs_actor_id_users_id_fk": { + "name": "game_event_logs_actor_id_users_id_fk", + "tableFrom": "game_event_logs", + "tableTo": "users", + "columnsFrom": [ + "actor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_event_logs_structure_id_game_structures_id_fk": { + "name": "game_event_logs_structure_id_game_structures_id_fk", + "tableFrom": "game_event_logs", + "tableTo": "game_structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_roles": { + "name": "users_roles", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_roles_order_idx": { + "name": "users_roles_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_roles_parent_idx": { + "name": "users_roles_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_roles_parent_fk": { + "name": "users_roles_parent_fk", + "tableFrom": "users_roles", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_preferences_notifications_muted_types": { + "name": "users_preferences_notifications_muted_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_preferences_notifications_muted_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_preferences_notifications_muted_types_order_idx": { + "name": "users_preferences_notifications_muted_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_preferences_notifications_muted_types_parent_idx": { + "name": "users_preferences_notifications_muted_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_preferences_notifications_muted_types_parent_fk": { + "name": "users_preferences_notifications_muted_types_parent_fk", + "tableFrom": "users_preferences_notifications_muted_types", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_preferences_discord_muted_types": { + "name": "users_preferences_discord_muted_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_preferences_discord_muted_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_preferences_discord_muted_types_order_idx": { + "name": "users_preferences_discord_muted_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_preferences_discord_muted_types_parent_idx": { + "name": "users_preferences_discord_muted_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_preferences_discord_muted_types_parent_fk": { + "name": "users_preferences_discord_muted_types_parent_fk", + "tableFrom": "users_preferences_discord_muted_types", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_sessions": { + "name": "users_sessions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "users_sessions_order_idx": { + "name": "users_sessions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_sessions_parent_id_idx": { + "name": "users_sessions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_sessions_parent_id_fk": { + "name": "users_sessions_parent_id_fk", + "tableFrom": "users_sessions", + "tableTo": "users", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "discord_username": { + "name": "discord_username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "discord_id": { + "name": "discord_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "payload_display_name": { + "name": "payload_display_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "steam_id": { + "name": "steam_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "preferences_notifications_muted_all": { + "name": "preferences_notifications_muted_all", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_show_callsign": { + "name": "preferences_display_show_callsign", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_lead_or_actual": { + "name": "preferences_display_lead_or_actual", + "type": "enum_users_preferences_display_lead_or_actual", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'lead'" + }, + "preferences_display_show_version_overlay": { + "name": "preferences_display_show_version_overlay", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "preferences_display_xp_display_mini": { + "name": "preferences_display_xp_display_mini", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_show_background_texture": { + "name": "preferences_display_show_background_texture", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "preferences_discord_enabled": { + "name": "preferences_discord_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_dashboard_layout": { + "name": "preferences_dashboard_layout", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "reset_password_token": { + "name": "reset_password_token", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reset_password_expiration": { + "name": "reset_password_expiration", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "salt": { + "name": "salt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hash": { + "name": "hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "login_attempts": { + "name": "login_attempts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lock_until": { + "name": "lock_until", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_discord_username_idx": { + "name": "users_discord_username_idx", + "columns": [ + { + "expression": "discord_username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_discord_id_idx": { + "name": "users_discord_id_idx", + "columns": [ + { + "expression": "discord_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_updated_at_idx": { + "name": "users_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_created_at_idx": { + "name": "users_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_username_idx": { + "name": "users_username_idx", + "columns": [ + { + "expression": "username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_rels": { + "name": "users_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_rels_order_idx": { + "name": "users_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_parent_idx": { + "name": "users_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_path_idx": { + "name": "users_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_roles_id_idx": { + "name": "users_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_rels_parent_fk": { + "name": "users_rels_parent_fk", + "tableFrom": "users_rels", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "users_rels_roles_fk": { + "name": "users_rels_roles_fk", + "tableFrom": "users_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles_permissions": { + "name": "roles_permissions", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_roles_permissions", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "roles_permissions_order_idx": { + "name": "roles_permissions_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_permissions_parent_idx": { + "name": "roles_permissions_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "roles_permissions_parent_fk": { + "name": "roles_permissions_parent_fk", + "tableFrom": "roles_permissions", + "tableTo": "roles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles": { + "name": "roles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "is_system": { + "name": "is_system", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "is_superuser": { + "name": "is_superuser", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "roles_name_idx": { + "name": "roles_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_slug_idx": { + "name": "roles_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_updated_at_idx": { + "name": "roles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_created_at_idx": { + "name": "roles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles_rels": { + "name": "roles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "roles_rels_order_idx": { + "name": "roles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_parent_idx": { + "name": "roles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_path_idx": { + "name": "roles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_roles_id_idx": { + "name": "roles_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "roles_rels_parent_fk": { + "name": "roles_rels_parent_fk", + "tableFrom": "roles_rels", + "tableTo": "roles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "roles_rels_roles_fk": { + "name": "roles_rels_roles_fk", + "tableFrom": "roles_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ranks": { + "name": "ranks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_order": { + "name": "_order", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "abbreviation": { + "name": "abbreviation", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "insignia_id": { + "name": "insignia_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "promotion_ceiling_id": { + "name": "promotion_ceiling_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ranks__order_idx": { + "name": "ranks__order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_name_idx": { + "name": "ranks_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_abbreviation_idx": { + "name": "ranks_abbreviation_idx", + "columns": [ + { + "expression": "abbreviation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_insignia_idx": { + "name": "ranks_insignia_idx", + "columns": [ + { + "expression": "insignia_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_promotion_ceiling_idx": { + "name": "ranks_promotion_ceiling_idx", + "columns": [ + { + "expression": "promotion_ceiling_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_updated_at_idx": { + "name": "ranks_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_created_at_idx": { + "name": "ranks_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ranks_insignia_id_media_id_fk": { + "name": "ranks_insignia_id_media_id_fk", + "tableFrom": "ranks", + "tableTo": "media", + "columnsFrom": [ + "insignia_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ranks_promotion_ceiling_id_ranks_id_fk": { + "name": "ranks_promotion_ceiling_id_ranks_id_fk", + "tableFrom": "ranks", + "tableTo": "ranks", + "columnsFrom": [ + "promotion_ceiling_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles_progression_awards": { + "name": "profiles_progression_awards", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "award_id": { + "name": "award_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "awarded_by_id": { + "name": "awarded_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "awarded_at": { + "name": "awarded_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "award_reason": { + "name": "award_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "upgraded_from_id": { + "name": "upgraded_from_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "upgraded_at": { + "name": "upgraded_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "profiles_progression_awards_order_idx": { + "name": "profiles_progression_awards_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_parent_id_idx": { + "name": "profiles_progression_awards_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_award_idx": { + "name": "profiles_progression_awards_award_idx", + "columns": [ + { + "expression": "award_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_awarded_by_idx": { + "name": "profiles_progression_awards_awarded_by_idx", + "columns": [ + { + "expression": "awarded_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_upgraded_from_idx": { + "name": "profiles_progression_awards_upgraded_from_idx", + "columns": [ + { + "expression": "upgraded_from_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_progression_awards_award_id_awards_id_fk": { + "name": "profiles_progression_awards_award_id_awards_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "awards", + "columnsFrom": [ + "award_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_awarded_by_id_profiles_id_fk": { + "name": "profiles_progression_awards_awarded_by_id_profiles_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "profiles", + "columnsFrom": [ + "awarded_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_upgraded_from_id_awards_id_fk": { + "name": "profiles_progression_awards_upgraded_from_id_awards_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "awards", + "columnsFrom": [ + "upgraded_from_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_parent_id_fk": { + "name": "profiles_progression_awards_parent_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "profiles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles": { + "name": "profiles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rank_id": { + "name": "rank_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "dossier_enlistment_date": { + "name": "dossier_enlistment_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "dossier_personal_excerpt": { + "name": "dossier_personal_excerpt", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "dossier_intel_excerpt": { + "name": "dossier_intel_excerpt", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "progression_scoreboard_infantry_kills": { + "name": "progression_scoreboard_infantry_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_vehicle_kills": { + "name": "progression_scoreboard_vehicle_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_armor_kills": { + "name": "progression_scoreboard_armor_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_air_kills": { + "name": "progression_scoreboard_air_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_deaths": { + "name": "progression_scoreboard_deaths", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_games_played": { + "name": "progression_minigames_flappy_bird_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_total_passes": { + "name": "progression_minigames_flappy_bird_total_passes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_best_score": { + "name": "progression_minigames_flappy_bird_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_xp_earned": { + "name": "progression_minigames_flappy_bird_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_games_played": { + "name": "progression_minigames_eod_minesweeper_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_wins": { + "name": "progression_minigames_eod_minesweeper_wins", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_losses": { + "name": "progression_minigames_eod_minesweeper_losses", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_score": { + "name": "progression_minigames_eod_minesweeper_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_xp_earned": { + "name": "progression_minigames_eod_minesweeper_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_training_time": { + "name": "progression_minigames_eod_minesweeper_best_training_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_perimeter_time": { + "name": "progression_minigames_eod_minesweeper_best_perimeter_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_supply_road_time": { + "name": "progression_minigames_eod_minesweeper_best_supply_road_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_training_flags": { + "name": "progression_minigames_eod_minesweeper_best_training_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_perimeter_flags": { + "name": "progression_minigames_eod_minesweeper_best_perimeter_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_supply_road_flags": { + "name": "progression_minigames_eod_minesweeper_best_supply_road_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_games_played": { + "name": "progression_minigames_radio_traffic_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_total_messages": { + "name": "progression_minigames_radio_traffic_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_incorrect_messages": { + "name": "progression_minigames_radio_traffic_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_score": { + "name": "progression_minigames_radio_traffic_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_accuracy": { + "name": "progression_minigames_radio_traffic_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_sprint_time_ms": { + "name": "progression_minigames_radio_traffic_best_sprint_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_games_played": { + "name": "progression_minigames_radio_traffic_sprint_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_total_messages": { + "name": "progression_minigames_radio_traffic_sprint_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_incorrect_messages": { + "name": "progression_minigames_radio_traffic_sprint_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_best_score": { + "name": "progression_minigames_radio_traffic_sprint_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_best_accuracy": { + "name": "progression_minigames_radio_traffic_sprint_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_games_played": { + "name": "progression_minigames_radio_traffic_watch_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_total_messages": { + "name": "progression_minigames_radio_traffic_watch_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_incorrect_messages": { + "name": "progression_minigames_radio_traffic_watch_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_best_score": { + "name": "progression_minigames_radio_traffic_watch_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_best_accuracy": { + "name": "progression_minigames_radio_traffic_watch_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_xp_earned": { + "name": "progression_minigames_radio_traffic_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_games_played": { + "name": "progression_minigames_aim_trainer_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_best_score": { + "name": "progression_minigames_aim_trainer_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_recruit_best_score": { + "name": "progression_minigames_aim_trainer_recruit_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_veteran_best_score": { + "name": "progression_minigames_aim_trainer_veteran_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_elite_best_score": { + "name": "progression_minigames_aim_trainer_elite_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_recruit_best_accuracy": { + "name": "progression_minigames_aim_trainer_recruit_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_veteran_best_accuracy": { + "name": "progression_minigames_aim_trainer_veteran_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_elite_best_accuracy": { + "name": "progression_minigames_aim_trainer_elite_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_xp_earned": { + "name": "progression_minigames_aim_trainer_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_games_played": { + "name": "progression_minigames_opord_recall_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_best_score": { + "name": "progression_minigames_opord_recall_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_best_accuracy": { + "name": "progression_minigames_opord_recall_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_recruit_best_score": { + "name": "progression_minigames_opord_recall_recruit_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_veteran_best_score": { + "name": "progression_minigames_opord_recall_veteran_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_elite_best_score": { + "name": "progression_minigames_opord_recall_elite_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_recruit_best_time_ms": { + "name": "progression_minigames_opord_recall_recruit_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_veteran_best_time_ms": { + "name": "progression_minigames_opord_recall_veteran_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_elite_best_time_ms": { + "name": "progression_minigames_opord_recall_elite_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_xp_earned": { + "name": "progression_minigames_opord_recall_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_games_played": { + "name": "progression_minigames_poker_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_wins": { + "name": "progression_minigames_poker_wins", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_second_places": { + "name": "progression_minigames_poker_second_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_third_places": { + "name": "progression_minigames_poker_third_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_fourth_places": { + "name": "progression_minigames_poker_fourth_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_hands_won": { + "name": "progression_minigames_poker_hands_won", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_best_score": { + "name": "progression_minigames_poker_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_xp_earned": { + "name": "progression_minigames_poker_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_games_played": { + "name": "progression_minigames_blackjack_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_rounds_won": { + "name": "progression_minigames_blackjack_rounds_won", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_blackjacks_hit": { + "name": "progression_minigames_blackjack_blackjacks_hit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_best_score": { + "name": "progression_minigames_blackjack_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_xp_earned": { + "name": "progression_minigames_blackjack_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_chip_bank": { + "name": "progression_chip_bank", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_chip_bank_refilled_at": { + "name": "progression_chip_bank_refilled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "progression_voiceover_xp_earned": { + "name": "progression_voiceover_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "profiles_user_idx": { + "name": "profiles_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rank_idx": { + "name": "profiles_rank_idx", + "columns": [ + { + "expression": "rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_updated_at_idx": { + "name": "profiles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_created_at_idx": { + "name": "profiles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_user_id_users_id_fk": { + "name": "profiles_user_id_users_id_fk", + "tableFrom": "profiles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_rank_id_ranks_id_fk": { + "name": "profiles_rank_id_ranks_id_fk", + "tableFrom": "profiles", + "tableTo": "ranks", + "columnsFrom": [ + "rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles_rels": { + "name": "profiles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "profiles_rels_order_idx": { + "name": "profiles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_parent_idx": { + "name": "profiles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_path_idx": { + "name": "profiles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_qualifications_id_idx": { + "name": "profiles_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_rels_parent_fk": { + "name": "profiles_rels_parent_fk", + "tableFrom": "profiles_rels", + "tableTo": "profiles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "profiles_rels_qualifications_fk": { + "name": "profiles_rels_qualifications_fk", + "tableFrom": "profiles_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards_grant_config_allowed_grantor_assignment_types": { + "name": "awards_grant_config_allowed_grantor_assignment_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_awards_grant_config_allowed_grantor_assignment_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "awards_grant_config_allowed_grantor_assignment_types_order_idx": { + "name": "awards_grant_config_allowed_grantor_assignment_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_grant_config_allowed_grantor_assignment_types_parent_idx": { + "name": "awards_grant_config_allowed_grantor_assignment_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_grant_config_allowed_grantor_assignment_types_parent_fk": { + "name": "awards_grant_config_allowed_grantor_assignment_types_parent_fk", + "tableFrom": "awards_grant_config_allowed_grantor_assignment_types", + "tableTo": "awards", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards": { + "name": "awards", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_awards_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'commendation'" + }, + "commendation_color": { + "name": "commendation_color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#92400e'" + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "experience_points": { + "name": "experience_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "ribbon_design": { + "name": "ribbon_design", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "background_image_id": { + "name": "background_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "medal_design": { + "name": "medal_design", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "advancement_series_key": { + "name": "advancement_series_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "advancement_tier": { + "name": "advancement_tier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "grant_config_max_grants_per_grantor": { + "name": "grant_config_max_grants_per_grantor", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "grant_config_recipient_scope": { + "name": "grant_config_recipient_scope", + "type": "enum_awards_grant_config_recipient_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'same_command'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "awards_name_idx": { + "name": "awards_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_image_idx": { + "name": "awards_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_background_image_idx": { + "name": "awards_background_image_idx", + "columns": [ + { + "expression": "background_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_updated_at_idx": { + "name": "awards_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_created_at_idx": { + "name": "awards_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_image_id_media_id_fk": { + "name": "awards_image_id_media_id_fk", + "tableFrom": "awards", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "awards_background_image_id_media_id_fk": { + "name": "awards_background_image_id_media_id_fk", + "tableFrom": "awards", + "tableTo": "media", + "columnsFrom": [ + "background_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards_rels": { + "name": "awards_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "awards_rels_order_idx": { + "name": "awards_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_parent_idx": { + "name": "awards_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_path_idx": { + "name": "awards_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_assignments_id_idx": { + "name": "awards_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_rels_parent_fk": { + "name": "awards_rels_parent_fk", + "tableFrom": "awards_rels", + "tableTo": "awards", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "awards_rels_assignments_fk": { + "name": "awards_rels_assignments_fk", + "tableFrom": "awards_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.qualifications": { + "name": "qualifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "qualifications_name_idx": { + "name": "qualifications_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_updated_at_idx": { + "name": "qualifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_created_at_idx": { + "name": "qualifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments": { + "name": "assignments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_assignments_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "callsign": { + "name": "callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "leader_id": { + "name": "leader_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assignments_leader_idx": { + "name": "assignments_leader_idx", + "columns": [ + { + "expression": "leader_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_updated_at_idx": { + "name": "assignments_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_created_at_idx": { + "name": "assignments_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_leader_id_users_id_fk": { + "name": "assignments_leader_id_users_id_fk", + "tableFrom": "assignments", + "tableTo": "users", + "columnsFrom": [ + "leader_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments_rels": { + "name": "assignments_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assignments_rels_order_idx": { + "name": "assignments_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_parent_idx": { + "name": "assignments_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_path_idx": { + "name": "assignments_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_assignments_id_idx": { + "name": "assignments_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_users_id_idx": { + "name": "assignments_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_rels_parent_fk": { + "name": "assignments_rels_parent_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_assignments_fk": { + "name": "assignments_rels_assignments_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_users_fk": { + "name": "assignments_rels_users_fk", + "tableFrom": "assignments_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignment_transfers": { + "name": "assignment_transfers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "requester_id": { + "name": "requester_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "from_assignment_id": { + "name": "from_assignment_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "to_assignment_id": { + "name": "to_assignment_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_assignment_transfers_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "escalation_reason": { + "name": "escalation_reason", + "type": "enum_assignment_transfers_escalation_reason", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_leader_decision": { + "name": "from_leader_decision", + "type": "enum_assignment_transfers_from_leader_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "to_leader_decision": { + "name": "to_leader_decision", + "type": "enum_assignment_transfers_to_leader_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "from_decision_by_id": { + "name": "from_decision_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_decision_by_id": { + "name": "to_decision_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "from_decided_at": { + "name": "from_decided_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "to_decided_at": { + "name": "to_decided_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "from_leader_snapshot_id": { + "name": "from_leader_snapshot_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_leader_snapshot_id": { + "name": "to_leader_snapshot_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rejection_reason": { + "name": "rejection_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "request_note": { + "name": "request_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "appeal_note": { + "name": "appeal_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "resolved_by_id": { + "name": "resolved_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resolution_note": { + "name": "resolution_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "resolved_at": { + "name": "resolved_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "discord_from_leader_message_id": { + "name": "discord_from_leader_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_to_leader_message_id": { + "name": "discord_to_leader_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_requester_message_id": { + "name": "discord_requester_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "source_notified_to_user_id_id": { + "name": "source_notified_to_user_id_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "destination_notified_to_user_id_id": { + "name": "destination_notified_to_user_id_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "discord_delivered_keys": { + "name": "discord_delivered_keys", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assignment_transfers_requester_idx": { + "name": "assignment_transfers_requester_idx", + "columns": [ + { + "expression": "requester_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_assignment_idx": { + "name": "assignment_transfers_from_assignment_idx", + "columns": [ + { + "expression": "from_assignment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_assignment_idx": { + "name": "assignment_transfers_to_assignment_idx", + "columns": [ + { + "expression": "to_assignment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_status_idx": { + "name": "assignment_transfers_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_decision_by_idx": { + "name": "assignment_transfers_from_decision_by_idx", + "columns": [ + { + "expression": "from_decision_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_decision_by_idx": { + "name": "assignment_transfers_to_decision_by_idx", + "columns": [ + { + "expression": "to_decision_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_leader_snapshot_idx": { + "name": "assignment_transfers_from_leader_snapshot_idx", + "columns": [ + { + "expression": "from_leader_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_leader_snapshot_idx": { + "name": "assignment_transfers_to_leader_snapshot_idx", + "columns": [ + { + "expression": "to_leader_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_resolved_by_idx": { + "name": "assignment_transfers_resolved_by_idx", + "columns": [ + { + "expression": "resolved_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_source_notified_to_user_id_idx": { + "name": "assignment_transfers_source_notified_to_user_id_idx", + "columns": [ + { + "expression": "source_notified_to_user_id_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_destination_notified_to_user_id_idx": { + "name": "assignment_transfers_destination_notified_to_user_id_idx", + "columns": [ + { + "expression": "destination_notified_to_user_id_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_updated_at_idx": { + "name": "assignment_transfers_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_created_at_idx": { + "name": "assignment_transfers_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignment_transfers_requester_id_users_id_fk": { + "name": "assignment_transfers_requester_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "requester_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_assignment_id_assignments_id_fk": { + "name": "assignment_transfers_from_assignment_id_assignments_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "assignments", + "columnsFrom": [ + "from_assignment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_assignment_id_assignments_id_fk": { + "name": "assignment_transfers_to_assignment_id_assignments_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "assignments", + "columnsFrom": [ + "to_assignment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_decision_by_id_users_id_fk": { + "name": "assignment_transfers_from_decision_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "from_decision_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_decision_by_id_users_id_fk": { + "name": "assignment_transfers_to_decision_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "to_decision_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_leader_snapshot_id_users_id_fk": { + "name": "assignment_transfers_from_leader_snapshot_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "from_leader_snapshot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_leader_snapshot_id_users_id_fk": { + "name": "assignment_transfers_to_leader_snapshot_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "to_leader_snapshot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_resolved_by_id_users_id_fk": { + "name": "assignment_transfers_resolved_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "resolved_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_source_notified_to_user_id_id_users_id_fk": { + "name": "assignment_transfers_source_notified_to_user_id_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "source_notified_to_user_id_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_destination_notified_to_user_id_id_users_id_fk": { + "name": "assignment_transfers_destination_notified_to_user_id_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "destination_notified_to_user_id_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.experience": { + "name": "experience", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "required_points": { + "name": "required_points", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "experience_name_idx": { + "name": "experience_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "experience_updated_at_idx": { + "name": "experience_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "experience_created_at_idx": { + "name": "experience_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_notifications": { + "name": "user_notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link": { + "name": "link", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "read": { + "name": "read", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "user_notifications_user_idx": { + "name": "user_notifications_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_read_idx": { + "name": "user_notifications_read_idx", + "columns": [ + { + "expression": "read", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_updated_at_idx": { + "name": "user_notifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_created_at_idx": { + "name": "user_notifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_notifications_user_id_users_id_fk": { + "name": "user_notifications_user_id_users_id_fk", + "tableFrom": "user_notifications", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.evaluations": { + "name": "evaluations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "rater_id": { + "name": "rater_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ratee_id": { + "name": "ratee_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "enum_evaluations_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "level": { + "name": "level", + "type": "enum_evaluations_level", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "comment": { + "name": "comment", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "evaluations_rater_idx": { + "name": "evaluations_rater_idx", + "columns": [ + { + "expression": "rater_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_ratee_idx": { + "name": "evaluations_ratee_idx", + "columns": [ + { + "expression": "ratee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_mission_idx": { + "name": "evaluations_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_updated_at_idx": { + "name": "evaluations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_created_at_idx": { + "name": "evaluations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "evaluations_rater_id_users_id_fk": { + "name": "evaluations_rater_id_users_id_fk", + "tableFrom": "evaluations", + "tableTo": "users", + "columnsFrom": [ + "rater_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "evaluations_ratee_id_users_id_fk": { + "name": "evaluations_ratee_id_users_id_fk", + "tableFrom": "evaluations", + "tableTo": "users", + "columnsFrom": [ + "ratee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "evaluations_mission_id_missions_id_fk": { + "name": "evaluations_mission_id_missions_id_fk", + "tableFrom": "evaluations", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ribbon_submissions_grantor_types": { + "name": "ribbon_submissions_grantor_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_ribbon_submissions_grantor_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "ribbon_submissions_grantor_types_order_idx": { + "name": "ribbon_submissions_grantor_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_grantor_types_parent_idx": { + "name": "ribbon_submissions_grantor_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ribbon_submissions_grantor_types_parent_fk": { + "name": "ribbon_submissions_grantor_types_parent_fk", + "tableFrom": "ribbon_submissions_grantor_types", + "tableTo": "ribbon_submissions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ribbon_submissions": { + "name": "ribbon_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "design": { + "name": "design", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_ribbon_submissions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "review_note": { + "name": "review_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reviewed_by_id": { + "name": "reviewed_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reviewed_at": { + "name": "reviewed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "award_id": { + "name": "award_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "award_xp": { + "name": "award_xp", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "recipient_scope": { + "name": "recipient_scope", + "type": "enum_ribbon_submissions_recipient_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'same_command'" + }, + "max_grants_per_grantor": { + "name": "max_grants_per_grantor", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ribbon_submissions_user_idx": { + "name": "ribbon_submissions_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_reviewed_by_idx": { + "name": "ribbon_submissions_reviewed_by_idx", + "columns": [ + { + "expression": "reviewed_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_award_idx": { + "name": "ribbon_submissions_award_idx", + "columns": [ + { + "expression": "award_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_updated_at_idx": { + "name": "ribbon_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_created_at_idx": { + "name": "ribbon_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ribbon_submissions_user_id_users_id_fk": { + "name": "ribbon_submissions_user_id_users_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ribbon_submissions_reviewed_by_id_users_id_fk": { + "name": "ribbon_submissions_reviewed_by_id_users_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "users", + "columnsFrom": [ + "reviewed_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ribbon_submissions_award_id_awards_id_fk": { + "name": "ribbon_submissions_award_id_awards_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "awards", + "columnsFrom": [ + "award_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_roles_provided_roles": { + "name": "missions_mission_roles_provided_roles", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "role_name": { + "name": "role_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "minimum_rank_id": { + "name": "minimum_rank_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_mission_roles_provided_roles_order_idx": { + "name": "missions_mission_roles_provided_roles_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_parent_id_idx": { + "name": "missions_mission_roles_provided_roles_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_minimum_rank_idx": { + "name": "missions_mission_roles_provided_roles_minimum_rank_idx", + "columns": [ + { + "expression": "minimum_rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk": { + "name": "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "ranks", + "columnsFrom": [ + "minimum_rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_mission_roles_provided_roles_parent_id_fk": { + "name": "missions_mission_roles_provided_roles_parent_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_briefing": { + "name": "missions_briefing", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "section_name": { + "name": "section_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "details": { + "name": "details", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_briefing_order_idx": { + "name": "missions_briefing_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_briefing_parent_id_idx": { + "name": "missions_briefing_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_briefing_parent_id_fk": { + "name": "missions_briefing_parent_id_fk", + "tableFrom": "missions_briefing", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_objectives": { + "name": "missions_mission_objectives", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "success_or_fail_conditions": { + "name": "success_or_fail_conditions", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "redacted": { + "name": "redacted", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "missions_mission_objectives_order_idx": { + "name": "missions_mission_objectives_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_objectives_parent_id_idx": { + "name": "missions_mission_objectives_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_objectives_parent_id_fk": { + "name": "missions_mission_objectives_parent_id_fk", + "tableFrom": "missions_mission_objectives", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_factions_involved": { + "name": "missions_factions_involved", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "threat_level": { + "name": "threat_level", + "type": "enum_missions_factions_involved_threat_level", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'hostile'" + } + }, + "indexes": { + "missions_factions_involved_order_idx": { + "name": "missions_factions_involved_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_factions_involved_parent_id_idx": { + "name": "missions_factions_involved_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_factions_involved_faction_idx": { + "name": "missions_factions_involved_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_factions_involved_faction_id_factions_id_fk": { + "name": "missions_factions_involved_faction_id_factions_id_fk", + "tableFrom": "missions_factions_involved", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_factions_involved_parent_id_fk": { + "name": "missions_factions_involved_parent_id_fk", + "tableFrom": "missions_factions_involved", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_insertion": { + "name": "missions_logistics_and_support_insertion", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_insertion", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_insertion_order_idx": { + "name": "missions_logistics_and_support_insertion_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_insertion_parent_idx": { + "name": "missions_logistics_and_support_insertion_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_insertion_parent_fk": { + "name": "missions_logistics_and_support_insertion_parent_fk", + "tableFrom": "missions_logistics_and_support_insertion", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_extraction": { + "name": "missions_logistics_and_support_extraction", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_extraction", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_extraction_order_idx": { + "name": "missions_logistics_and_support_extraction_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_extraction_parent_idx": { + "name": "missions_logistics_and_support_extraction_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_extraction_parent_fk": { + "name": "missions_logistics_and_support_extraction_parent_fk", + "tableFrom": "missions_logistics_and_support_extraction", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_assets_available": { + "name": "missions_logistics_and_support_assets_available", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_type": { + "name": "asset_type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "asset_count": { + "name": "asset_count", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "does_respawn": { + "name": "does_respawn", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_callsign": { + "name": "asset_callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_logistics_and_support_assets_available_order_idx": { + "name": "missions_logistics_and_support_assets_available_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_assets_available_parent_id_idx": { + "name": "missions_logistics_and_support_assets_available_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_assets_available_parent_id_fk": { + "name": "missions_logistics_and_support_assets_available_parent_id_fk", + "tableFrom": "missions_logistics_and_support_assets_available", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_comms_and_docs_frequencies": { + "name": "missions_comms_and_docs_frequencies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "frequency": { + "name": "frequency", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "channel": { + "name": "channel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "net_name": { + "name": "net_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "freq_usage": { + "name": "freq_usage", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_comms_and_docs_frequencies_order_idx": { + "name": "missions_comms_and_docs_frequencies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_comms_and_docs_frequencies_parent_id_idx": { + "name": "missions_comms_and_docs_frequencies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_comms_and_docs_frequencies_parent_id_fk": { + "name": "missions_comms_and_docs_frequencies_parent_id_fk", + "tableFrom": "missions_comms_and_docs_frequencies", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions": { + "name": "missions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "operation_type": { + "name": "operation_type", + "type": "enum_missions_operation_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "discord_message_id": { + "name": "discord_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_attendance_hash": { + "name": "discord_attendance_hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_attendance_sent_at": { + "name": "discord_attendance_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "discord_modlist_hash": { + "name": "discord_modlist_hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_cancelled_at": { + "name": "discord_cancelled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "evaluation_reminders_sent_at": { + "name": "evaluation_reminders_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "ready_reminder_web_sent_at": { + "name": "ready_reminder_web_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "ready_reminder_dm_sent_at": { + "name": "ready_reminder_dm_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "tickets_settled_at": { + "name": "tickets_settled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by_id": { + "name": "created_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "classification_map_id": { + "name": "classification_map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "classification_mission_type": { + "name": "classification_mission_type", + "type": "enum_missions_classification_mission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Zeus'" + }, + "classification_campaign_id": { + "name": "classification_campaign_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "classification_custom_scripts": { + "name": "classification_custom_scripts", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "classification_start_date_time": { + "name": "classification_start_date_time", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "classification_estimated_duration": { + "name": "classification_estimated_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 240 + }, + "ownership_and_status_status": { + "name": "ownership_and_status_status", + "type": "enum_missions_ownership_and_status_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Concept'" + }, + "ownership_and_status_visibility": { + "name": "ownership_and_status_visibility", + "type": "enum_missions_ownership_and_status_visibility", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'leadership'" + }, + "ownership_and_status_completed_at": { + "name": "ownership_and_status_completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "mission_roles_max_players": { + "name": "mission_roles_max_players", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 32 + }, + "mission_roles_notes": { + "name": "mission_roles_notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "civilian_presence": { + "name": "civilian_presence", + "type": "enum_missions_civilian_presence", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'None'" + }, + "game_details_server_details_server_ip": { + "name": "game_details_server_details_server_ip", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'arma.onyxsimple.com'" + }, + "game_details_server_details_server_port": { + "name": "game_details_server_details_server_port", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 2302 + }, + "game_details_server_details_server_password": { + "name": "game_details_server_details_server_password", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'ptf313'" + }, + "game_details_game_setup_mission_file_id": { + "name": "game_details_game_setup_mission_file_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_details_game_setup_required_mods_id": { + "name": "game_details_game_setup_required_mods_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "comms_and_docs_radio_plan": { + "name": "comms_and_docs_radio_plan", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "missions_code_name_idx": { + "name": "missions_code_name_idx", + "columns": [ + { + "expression": "code_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_created_by_idx": { + "name": "missions_created_by_idx", + "columns": [ + { + "expression": "created_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_cover_image_idx": { + "name": "missions_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_map_idx": { + "name": "missions_classification_classification_map_idx", + "columns": [ + { + "expression": "classification_map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_campaign_idx": { + "name": "missions_classification_classification_campaign_idx", + "columns": [ + { + "expression": "classification_campaign_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_setup_idx": { + "name": "missions_game_details_game_setup_game_details_game_setup_idx", + "columns": [ + { + "expression": "game_details_game_setup_mission_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_set_1_idx": { + "name": "missions_game_details_game_setup_game_details_game_set_1_idx", + "columns": [ + { + "expression": "game_details_game_setup_required_mods_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_updated_at_idx": { + "name": "missions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_created_at_idx": { + "name": "missions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_created_by_id_users_id_fk": { + "name": "missions_created_by_id_users_id_fk", + "tableFrom": "missions", + "tableTo": "users", + "columnsFrom": [ + "created_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_cover_image_id_media_id_fk": { + "name": "missions_cover_image_id_media_id_fk", + "tableFrom": "missions", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_classification_map_id_maps_id_fk": { + "name": "missions_classification_map_id_maps_id_fk", + "tableFrom": "missions", + "tableTo": "maps", + "columnsFrom": [ + "classification_map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_classification_campaign_id_campaigns_id_fk": { + "name": "missions_classification_campaign_id_campaigns_id_fk", + "tableFrom": "missions", + "tableTo": "campaigns", + "columnsFrom": [ + "classification_campaign_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_mission_file_id_mission_files_id_fk": { + "name": "missions_game_details_game_setup_mission_file_id_mission_files_id_fk", + "tableFrom": "missions", + "tableTo": "mission_files", + "columnsFrom": [ + "game_details_game_setup_mission_file_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk": { + "name": "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk", + "tableFrom": "missions", + "tableTo": "mod_lists", + "columnsFrom": [ + "game_details_game_setup_required_mods_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_rels": { + "name": "missions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_rels_order_idx": { + "name": "missions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_parent_idx": { + "name": "missions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_path_idx": { + "name": "missions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_users_id_idx": { + "name": "missions_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_qualifications_id_idx": { + "name": "missions_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_rels_parent_fk": { + "name": "missions_rels_parent_fk", + "tableFrom": "missions_rels", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_users_fk": { + "name": "missions_rels_users_fk", + "tableFrom": "missions_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_qualifications_fk": { + "name": "missions_rels_qualifications_fk", + "tableFrom": "missions_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mission_attendances": { + "name": "mission_attendances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "response": { + "name": "response", + "type": "enum_mission_attendances_response", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mission_attendances_mission_idx": { + "name": "mission_attendances_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_user_idx": { + "name": "mission_attendances_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_updated_at_idx": { + "name": "mission_attendances_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_created_at_idx": { + "name": "mission_attendances_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mission_attendances_mission_id_missions_id_fk": { + "name": "mission_attendances_mission_id_missions_id_fk", + "tableFrom": "mission_attendances", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "mission_attendances_user_id_users_id_fk": { + "name": "mission_attendances_user_id_users_id_fk", + "tableFrom": "mission_attendances", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.campaigns": { + "name": "campaigns", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'An Arma 3 campaign.'" + }, + "status": { + "name": "status", + "type": "enum_campaigns_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'concept'" + }, + "campaign_mode": { + "name": "campaign_mode", + "type": "enum_campaigns_campaign_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'custom'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "owner_id": { + "name": "owner_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "campaigns_name_idx": { + "name": "campaigns_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_cover_image_idx": { + "name": "campaigns_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_owner_idx": { + "name": "campaigns_owner_idx", + "columns": [ + { + "expression": "owner_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_updated_at_idx": { + "name": "campaigns_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_created_at_idx": { + "name": "campaigns_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "campaigns_cover_image_id_media_id_fk": { + "name": "campaigns_cover_image_id_media_id_fk", + "tableFrom": "campaigns", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "campaigns_owner_id_users_id_fk": { + "name": "campaigns_owner_id_users_id_fk", + "tableFrom": "campaigns", + "tableTo": "users", + "columnsFrom": [ + "owner_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions_relationships": { + "name": "factions_relationships", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "target_faction_id": { + "name": "target_faction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "factions_relationships_order_idx": { + "name": "factions_relationships_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_relationships_parent_id_idx": { + "name": "factions_relationships_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_relationships_target_faction_idx": { + "name": "factions_relationships_target_faction_idx", + "columns": [ + { + "expression": "target_faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_relationships_target_faction_id_factions_id_fk": { + "name": "factions_relationships_target_faction_id_factions_id_fk", + "tableFrom": "factions_relationships", + "tableTo": "factions", + "columnsFrom": [ + "target_faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "factions_relationships_parent_id_fk": { + "name": "factions_relationships_parent_id_fk", + "tableFrom": "factions_relationships", + "tableTo": "factions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions": { + "name": "factions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_factions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'minorFaction'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "reputation": { + "name": "reputation", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "playable_faction": { + "name": "playable_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "starting_faction": { + "name": "starting_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "factions_name_idx": { + "name": "factions_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_cover_image_idx": { + "name": "factions_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_updated_at_idx": { + "name": "factions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_created_at_idx": { + "name": "factions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_cover_image_id_media_id_fk": { + "name": "factions_cover_image_id_media_id_fk", + "tableFrom": "factions", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions_rels": { + "name": "factions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "factions_rels_order_idx": { + "name": "factions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_parent_idx": { + "name": "factions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_path_idx": { + "name": "factions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_campaigns_id_idx": { + "name": "factions_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_rels_parent_fk": { + "name": "factions_rels_parent_fk", + "tableFrom": "factions_rels", + "tableTo": "factions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "factions_rels_campaigns_fk": { + "name": "factions_rels_campaigns_fk", + "tableFrom": "factions_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_requirements_prerequisite_technologies": { + "name": "technologies_requirements_prerequisite_technologies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "technologies_requirements_prerequisite_technologies_order_idx": { + "name": "technologies_requirements_prerequisite_technologies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_requirements_prerequisite_technologies_parent_id_idx": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_requirements_prerequisite_technologies_parent_id_fk": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_fk", + "tableFrom": "technologies_requirements_prerequisite_technologies", + "tableTo": "technologies", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_research_costs_resources": { + "name": "technologies_research_costs_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + } + }, + "indexes": { + "technologies_research_costs_resources_order_idx": { + "name": "technologies_research_costs_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_research_costs_resources_parent_id_idx": { + "name": "technologies_research_costs_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_research_costs_resources_resource_idx": { + "name": "technologies_research_costs_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_research_costs_resources_resource_id_resources_id_fk": { + "name": "technologies_research_costs_resources_resource_id_resources_id_fk", + "tableFrom": "technologies_research_costs_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "technologies_research_costs_resources_parent_id_fk": { + "name": "technologies_research_costs_resources_parent_id_fk", + "tableFrom": "technologies_research_costs_resources", + "tableTo": "technologies", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies": { + "name": "technologies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_technologies_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "type": { + "name": "type", + "type": "enum_technologies_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'upgrade'" + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "research_costs_minimum_research_duration": { + "name": "research_costs_minimum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "research_costs_maximum_research_duration": { + "name": "research_costs_maximum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "technologies_updated_at_idx": { + "name": "technologies_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_created_at_idx": { + "name": "technologies_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_rels": { + "name": "technologies_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "technologies_rels_order_idx": { + "name": "technologies_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_parent_idx": { + "name": "technologies_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_path_idx": { + "name": "technologies_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_technologies_id_idx": { + "name": "technologies_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_rels_parent_fk": { + "name": "technologies_rels_parent_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "technologies_rels_technologies_fk": { + "name": "technologies_rels_technologies_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_skin_configuration_applies_to_asset_types": { + "name": "assets_skin_configuration_applies_to_asset_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_assets_skin_configuration_applies_to_asset_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "assets_skin_configuration_applies_to_asset_types_order_idx": { + "name": "assets_skin_configuration_applies_to_asset_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_skin_configuration_applies_to_asset_types_parent_idx": { + "name": "assets_skin_configuration_applies_to_asset_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_skin_configuration_applies_to_asset_types_parent_fk": { + "name": "assets_skin_configuration_applies_to_asset_types_parent_fk", + "tableFrom": "assets_skin_configuration_applies_to_asset_types", + "tableTo": "assets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_inputs": { + "name": "assets_crafting_crafting_data_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "lended": { + "name": "lended", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_inputs_order_idx": { + "name": "assets_crafting_crafting_data_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_inputs_parent_id_idx": { + "name": "assets_crafting_crafting_data_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_inputs_parent_id_fk": { + "name": "assets_crafting_crafting_data_inputs_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_inputs", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_byproducts": { + "name": "assets_crafting_crafting_data_byproducts", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_byproducts_order_idx": { + "name": "assets_crafting_crafting_data_byproducts_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_byproducts_parent_id_idx": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_byproducts_parent_id_fk": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_byproducts", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_assets_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "class_name": { + "name": "class_name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "asset_type": { + "name": "asset_type", + "type": "enum_assets_asset_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'weapon'" + }, + "weapon_configuration_slot_type": { + "name": "weapon_configuration_slot_type", + "type": "enum_assets_weapon_configuration_slot_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_generation": { + "name": "nightvision_configuration_nvg_generation", + "type": "enum_assets_nightvision_configuration_nvg_generation", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_has_thermals": { + "name": "nightvision_configuration_nvg_has_thermals", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "container_configuration_capacity_kg": { + "name": "container_configuration_capacity_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "container_configuration_weight_kg": { + "name": "container_configuration_weight_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_round_capacity": { + "name": "magazine_configuration_round_capacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_ammo_type": { + "name": "magazine_configuration_ammo_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_greenmag_compatible": { + "name": "magazine_configuration_greenmag_compatible", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_mod": { + "name": "asset_metadata_mod", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_thumbnail_id": { + "name": "asset_metadata_thumbnail_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_game_description": { + "name": "asset_metadata_game_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "market_trading_rarity": { + "name": "market_trading_rarity", + "type": "enum_assets_market_trading_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_buy_price": { + "name": "market_trading_perceived_value_base_buy_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_sell_price": { + "name": "market_trading_perceived_value_base_sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "economy_baseline_supply": { + "name": "economy_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "economy_baseline_demand": { + "name": "economy_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "economy_max_modifier": { + "name": "economy_max_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "crafting_craftable": { + "name": "crafting_craftable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_blueprint_required": { + "name": "crafting_blueprint_required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_technology_required_to_use": { + "name": "crafting_technology_required_to_use", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_crafting_data_crafting_time_per_unit": { + "name": "crafting_crafting_data_crafting_time_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "crafting_crafting_data_batch_size": { + "name": "crafting_crafting_data_batch_size", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_grid_width": { + "name": "storage_dimensions_grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_grid_height": { + "name": "storage_dimensions_grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_stackable": { + "name": "storage_dimensions_stackable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "storage_dimensions_max_stack_size": { + "name": "storage_dimensions_max_stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "storage_dimensions_rotatable": { + "name": "storage_dimensions_rotatable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "is_live": { + "name": "is_live", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assets_asset_metadata_asset_metadata_thumbnail_idx": { + "name": "assets_asset_metadata_asset_metadata_thumbnail_idx", + "columns": [ + { + "expression": "asset_metadata_thumbnail_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_updated_at_idx": { + "name": "assets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_created_at_idx": { + "name": "assets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_asset_metadata_thumbnail_id_media_id_fk": { + "name": "assets_asset_metadata_thumbnail_id_media_id_fk", + "tableFrom": "assets", + "tableTo": "media", + "columnsFrom": [ + "asset_metadata_thumbnail_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_rels": { + "name": "assets_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_rels_order_idx": { + "name": "assets_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_parent_idx": { + "name": "assets_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_path_idx": { + "name": "assets_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_assets_id_idx": { + "name": "assets_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_technologies_id_idx": { + "name": "assets_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_resources_id_idx": { + "name": "assets_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_structures_id_idx": { + "name": "assets_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_rels_parent_fk": { + "name": "assets_rels_parent_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_assets_fk": { + "name": "assets_rels_assets_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_technologies_fk": { + "name": "assets_rels_technologies_fk", + "tableFrom": "assets_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_resources_fk": { + "name": "assets_rels_resources_fk", + "tableFrom": "assets_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_structures_fk": { + "name": "assets_rels_structures_fk", + "tableFrom": "assets_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resources": { + "name": "resources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_resources_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "type": { + "name": "type", + "type": "enum_resources_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'physical'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "icon_id": { + "name": "icon_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "base_value": { + "name": "base_value", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "rarity": { + "name": "rarity", + "type": "enum_resources_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'common'" + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "economy_baseline_supply": { + "name": "economy_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "economy_baseline_demand": { + "name": "economy_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "economy_max_modifier": { + "name": "economy_max_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "unit_of_measure": { + "name": "unit_of_measure", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mass_per_unit": { + "name": "mass_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "stack_size": { + "name": "stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "grid_width": { + "name": "grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "grid_height": { + "name": "grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "stackable": { + "name": "stackable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "max_stack_size": { + "name": "max_stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "rotatable": { + "name": "rotatable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resources_icon_idx": { + "name": "resources_icon_idx", + "columns": [ + { + "expression": "icon_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_updated_at_idx": { + "name": "resources_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_created_at_idx": { + "name": "resources_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resources_icon_id_media_id_fk": { + "name": "resources_icon_id_media_id_fk", + "tableFrom": "resources", + "tableTo": "media", + "columnsFrom": [ + "icon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_category": { + "name": "vehicles_category", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_vehicles_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "vehicles_category_order_idx": { + "name": "vehicles_category_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_category_parent_idx": { + "name": "vehicles_category_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_category_parent_fk": { + "name": "vehicles_category_parent_fk", + "tableFrom": "vehicles_category", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_materials": { + "name": "vehicles_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_materials_order_idx": { + "name": "vehicles_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_parent_id_idx": { + "name": "vehicles_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_resource_idx": { + "name": "vehicles_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_materials_resource_id_resources_id_fk": { + "name": "vehicles_materials_resource_id_resources_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_materials_parent_id_fk": { + "name": "vehicles_materials_parent_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_scrap_returns": { + "name": "vehicles_scrap_returns", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "chance": { + "name": "chance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + } + }, + "indexes": { + "vehicles_scrap_returns_order_idx": { + "name": "vehicles_scrap_returns_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_parent_id_idx": { + "name": "vehicles_scrap_returns_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_resource_idx": { + "name": "vehicles_scrap_returns_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_scrap_returns_resource_id_resources_id_fk": { + "name": "vehicles_scrap_returns_resource_id_resources_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_scrap_returns_parent_id_fk": { + "name": "vehicles_scrap_returns_parent_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_upkeep_costs": { + "name": "vehicles_upkeep_costs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_upkeep_costs_order_idx": { + "name": "vehicles_upkeep_costs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_parent_id_idx": { + "name": "vehicles_upkeep_costs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_resource_idx": { + "name": "vehicles_upkeep_costs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_upkeep_costs_resource_id_resources_id_fk": { + "name": "vehicles_upkeep_costs_resource_id_resources_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_upkeep_costs_parent_id_fk": { + "name": "vehicles_upkeep_costs_parent_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_allowed_virtual_cargo": { + "name": "vehicles_allowed_virtual_cargo", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_allowed_virtual_cargo_order_idx": { + "name": "vehicles_allowed_virtual_cargo_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_allowed_virtual_cargo_parent_id_idx": { + "name": "vehicles_allowed_virtual_cargo_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_allowed_virtual_cargo_parent_id_fk": { + "name": "vehicles_allowed_virtual_cargo_parent_id_fk", + "tableFrom": "vehicles_allowed_virtual_cargo", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_pylons": { + "name": "vehicles_pylons", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "pylon_name": { + "name": "pylon_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pylon_type": { + "name": "pylon_type", + "type": "enum_vehicles_pylons_pylon_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'mountedWeapon'" + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "ammo_type_id": { + "name": "ammo_type_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_pylons_order_idx": { + "name": "vehicles_pylons_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_parent_id_idx": { + "name": "vehicles_pylons_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_ammo_type_idx": { + "name": "vehicles_pylons_ammo_type_idx", + "columns": [ + { + "expression": "ammo_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_pylons_ammo_type_id_assets_id_fk": { + "name": "vehicles_pylons_ammo_type_id_assets_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "assets", + "columnsFrom": [ + "ammo_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_pylons_parent_id_fk": { + "name": "vehicles_pylons_parent_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles": { + "name": "vehicles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "classname": { + "name": "classname", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "approval_status": { + "name": "approval_status", + "type": "enum_vehicles_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "fuel_fuel_type_id": { + "name": "fuel_fuel_type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "fuel_fuel_capacity": { + "name": "fuel_fuel_capacity", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_fuel_consumption_rate": { + "name": "fuel_fuel_consumption_rate", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "construction_time": { + "name": "construction_time", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "transport_mode": { + "name": "transport_mode", + "type": "enum_vehicles_transport_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'ground'" + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_mass": { + "name": "max_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "ace_cargo_slots": { + "name": "ace_cargo_slots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "armor_rating": { + "name": "armor_rating", + "type": "enum_vehicles_armor_rating", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_speed_on_road": { + "name": "max_speed_on_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_speed_off_road": { + "name": "max_speed_off_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_airspeed": { + "name": "max_airspeed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_knots": { + "name": "max_knots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "vehicles_image_idx": { + "name": "vehicles_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_fuel_fuel_fuel_type_idx": { + "name": "vehicles_fuel_fuel_fuel_type_idx", + "columns": [ + { + "expression": "fuel_fuel_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_updated_at_idx": { + "name": "vehicles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_created_at_idx": { + "name": "vehicles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_image_id_media_id_fk": { + "name": "vehicles_image_id_media_id_fk", + "tableFrom": "vehicles", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_fuel_fuel_type_id_resources_id_fk": { + "name": "vehicles_fuel_fuel_type_id_resources_id_fk", + "tableFrom": "vehicles", + "tableTo": "resources", + "columnsFrom": [ + "fuel_fuel_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_rels": { + "name": "vehicles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_rels_order_idx": { + "name": "vehicles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_parent_idx": { + "name": "vehicles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_path_idx": { + "name": "vehicles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_technologies_id_idx": { + "name": "vehicles_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_assets_id_idx": { + "name": "vehicles_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_vehicles_id_idx": { + "name": "vehicles_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_resources_id_idx": { + "name": "vehicles_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_rels_parent_fk": { + "name": "vehicles_rels_parent_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_technologies_fk": { + "name": "vehicles_rels_technologies_fk", + "tableFrom": "vehicles_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_assets_fk": { + "name": "vehicles_rels_assets_fk", + "tableFrom": "vehicles_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_vehicles_fk": { + "name": "vehicles_rels_vehicles_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_resources_fk": { + "name": "vehicles_rels_resources_fk", + "tableFrom": "vehicles_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_materials": { + "name": "structures_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_materials_order_idx": { + "name": "structures_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_parent_id_idx": { + "name": "structures_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_resource_idx": { + "name": "structures_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_materials_resource_id_resources_id_fk": { + "name": "structures_materials_resource_id_resources_id_fk", + "tableFrom": "structures_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_materials_parent_id_fk": { + "name": "structures_materials_parent_id_fk", + "tableFrom": "structures_materials", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_resources_in_range": { + "name": "structures_resources_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_resources_in_range_order_idx": { + "name": "structures_resources_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_parent_id_idx": { + "name": "structures_resources_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_resource_idx": { + "name": "structures_resources_in_range_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_resources_in_range_resource_id_resources_id_fk": { + "name": "structures_resources_in_range_resource_id_resources_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_resources_in_range_parent_id_fk": { + "name": "structures_resources_in_range_parent_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_structures_in_range": { + "name": "structures_structures_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_structures_in_range_order_idx": { + "name": "structures_structures_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_parent_id_idx": { + "name": "structures_structures_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_structure_idx": { + "name": "structures_structures_in_range_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_structures_in_range_structure_id_structures_id_fk": { + "name": "structures_structures_in_range_structure_id_structures_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_structures_in_range_parent_id_fk": { + "name": "structures_structures_in_range_parent_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_upkeep": { + "name": "structures_upkeep", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_upkeep_order_idx": { + "name": "structures_upkeep_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_parent_id_idx": { + "name": "structures_upkeep_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_resource_idx": { + "name": "structures_upkeep_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_upkeep_resource_id_resources_id_fk": { + "name": "structures_upkeep_resource_id_resources_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upkeep_parent_id_fk": { + "name": "structures_upkeep_parent_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_labor_requirements": { + "name": "structures_labor_requirements", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "classification_id": { + "name": "classification_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "required_headcount": { + "name": "required_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_headcount": { + "name": "max_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_labor_requirements_order_idx": { + "name": "structures_labor_requirements_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_labor_requirements_parent_id_idx": { + "name": "structures_labor_requirements_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_labor_requirements_classification_idx": { + "name": "structures_labor_requirements_classification_idx", + "columns": [ + { + "expression": "classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_labor_requirements_classification_id_labor_classifications_id_fk": { + "name": "structures_labor_requirements_classification_id_labor_classifications_id_fk", + "tableFrom": "structures_labor_requirements", + "tableTo": "labor_classifications", + "columnsFrom": [ + "classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_labor_requirements_parent_id_fk": { + "name": "structures_labor_requirements_parent_id_fk", + "tableFrom": "structures_labor_requirements", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_staff_positions": { + "name": "structures_staff_positions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_structures_staff_positions_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "max": { + "name": "max", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_staff_positions_order_idx": { + "name": "structures_staff_positions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_staff_positions_parent_id_idx": { + "name": "structures_staff_positions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_staff_positions_parent_id_fk": { + "name": "structures_staff_positions_parent_id_fk", + "tableFrom": "structures_staff_positions", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_production_inputs": { + "name": "structures_production_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "structures_production_inputs_order_idx": { + "name": "structures_production_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_inputs_parent_id_idx": { + "name": "structures_production_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_inputs_resource_idx": { + "name": "structures_production_inputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_production_inputs_resource_id_resources_id_fk": { + "name": "structures_production_inputs_resource_id_resources_id_fk", + "tableFrom": "structures_production_inputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_production_inputs_parent_id_fk": { + "name": "structures_production_inputs_parent_id_fk", + "tableFrom": "structures_production_inputs", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_production_outputs": { + "name": "structures_production_outputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "structures_production_outputs_order_idx": { + "name": "structures_production_outputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_outputs_parent_id_idx": { + "name": "structures_production_outputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_outputs_resource_idx": { + "name": "structures_production_outputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_production_outputs_resource_id_resources_id_fk": { + "name": "structures_production_outputs_resource_id_resources_id_fk", + "tableFrom": "structures_production_outputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_production_outputs_parent_id_fk": { + "name": "structures_production_outputs_parent_id_fk", + "tableFrom": "structures_production_outputs", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_auto_generated_resources": { + "name": "structures_auto_generated_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "min_amount": { + "name": "min_amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "max_amount": { + "name": "max_amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "min_frequency": { + "name": "min_frequency", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'1'" + }, + "max_frequency": { + "name": "max_frequency", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "produce_chance": { + "name": "produce_chance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + } + }, + "indexes": { + "structures_auto_generated_resources_order_idx": { + "name": "structures_auto_generated_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_parent_id_idx": { + "name": "structures_auto_generated_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_resource_idx": { + "name": "structures_auto_generated_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_auto_generated_resources_resource_id_resources_id_fk": { + "name": "structures_auto_generated_resources_resource_id_resources_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_auto_generated_resources_parent_id_fk": { + "name": "structures_auto_generated_resources_parent_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_allowed_storage": { + "name": "structures_allowed_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_allowed_storage_order_idx": { + "name": "structures_allowed_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_allowed_storage_parent_id_idx": { + "name": "structures_allowed_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_allowed_storage_parent_id_fk": { + "name": "structures_allowed_storage_parent_id_fk", + "tableFrom": "structures_allowed_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_prohibited_storage": { + "name": "structures_prohibited_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "structures_prohibited_storage_order_idx": { + "name": "structures_prohibited_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_prohibited_storage_parent_id_idx": { + "name": "structures_prohibited_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_prohibited_storage_parent_id_fk": { + "name": "structures_prohibited_storage_parent_id_fk", + "tableFrom": "structures_prohibited_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures": { + "name": "structures", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_structures_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "category": { + "name": "category", + "type": "enum_structures_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "construction_duration_minutes": { + "name": "construction_duration_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "requires_upgrade": { + "name": "requires_upgrade", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "upgrades_into_id": { + "name": "upgrades_into_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "upgrade_cost_multiplier": { + "name": "upgrade_cost_multiplier", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "terrain_type": { + "name": "terrain_type", + "type": "enum_structures_terrain_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "sell_price": { + "name": "sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "maintenance_cost": { + "name": "maintenance_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "function_type": { + "name": "function_type", + "type": "enum_structures_function_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_capacity_mass": { + "name": "max_capacity_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "restrict_to_allowed": { + "name": "restrict_to_allowed", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "x_size": { + "name": "x_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "y_size": { + "name": "y_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "repair_speed": { + "name": "repair_speed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "structures_image_idx": { + "name": "structures_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upgrades_into_idx": { + "name": "structures_upgrades_into_idx", + "columns": [ + { + "expression": "upgrades_into_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_updated_at_idx": { + "name": "structures_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_created_at_idx": { + "name": "structures_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_image_id_media_id_fk": { + "name": "structures_image_id_media_id_fk", + "tableFrom": "structures", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upgrades_into_id_structures_id_fk": { + "name": "structures_upgrades_into_id_structures_id_fk", + "tableFrom": "structures", + "tableTo": "structures", + "columnsFrom": [ + "upgrades_into_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_rels": { + "name": "structures_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_rels_order_idx": { + "name": "structures_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_parent_idx": { + "name": "structures_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_path_idx": { + "name": "structures_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_technologies_id_idx": { + "name": "structures_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_assets_id_idx": { + "name": "structures_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_vehicles_id_idx": { + "name": "structures_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_resources_id_idx": { + "name": "structures_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_rels_parent_fk": { + "name": "structures_rels_parent_fk", + "tableFrom": "structures_rels", + "tableTo": "structures", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_technologies_fk": { + "name": "structures_rels_technologies_fk", + "tableFrom": "structures_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_assets_fk": { + "name": "structures_rels_assets_fk", + "tableFrom": "structures_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_vehicles_fk": { + "name": "structures_rels_vehicles_fk", + "tableFrom": "structures_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_resources_fk": { + "name": "structures_rels_resources_fk", + "tableFrom": "structures_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments_cargo": { + "name": "shipments_cargo", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "shipments_cargo_order_idx": { + "name": "shipments_cargo_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_cargo_parent_id_idx": { + "name": "shipments_cargo_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_cargo_parent_id_fk": { + "name": "shipments_cargo_parent_id_fk", + "tableFrom": "shipments_cargo", + "tableTo": "shipments", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments": { + "name": "shipments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "origin_id": { + "name": "origin_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "destination_id": { + "name": "destination_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "route_path": { + "name": "route_path", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "transport_vehicle_id": { + "name": "transport_vehicle_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "distance": { + "name": "distance", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_cost": { + "name": "fuel_cost", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_consumed": { + "name": "fuel_consumed", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_shipments_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "dispatched_at": { + "name": "dispatched_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "estimated_arrival": { + "name": "estimated_arrival", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "auto_return": { + "name": "auto_return", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "created_by_id": { + "name": "created_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "shipments_origin_idx": { + "name": "shipments_origin_idx", + "columns": [ + { + "expression": "origin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_destination_idx": { + "name": "shipments_destination_idx", + "columns": [ + { + "expression": "destination_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_map_idx": { + "name": "shipments_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_transport_vehicle_idx": { + "name": "shipments_transport_vehicle_idx", + "columns": [ + { + "expression": "transport_vehicle_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_created_by_idx": { + "name": "shipments_created_by_idx", + "columns": [ + { + "expression": "created_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_updated_at_idx": { + "name": "shipments_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_created_at_idx": { + "name": "shipments_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_origin_id_game_structures_id_fk": { + "name": "shipments_origin_id_game_structures_id_fk", + "tableFrom": "shipments", + "tableTo": "game_structures", + "columnsFrom": [ + "origin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_destination_id_game_structures_id_fk": { + "name": "shipments_destination_id_game_structures_id_fk", + "tableFrom": "shipments", + "tableTo": "game_structures", + "columnsFrom": [ + "destination_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_map_id_maps_id_fk": { + "name": "shipments_map_id_maps_id_fk", + "tableFrom": "shipments", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_transport_vehicle_id_game_vehicles_id_fk": { + "name": "shipments_transport_vehicle_id_game_vehicles_id_fk", + "tableFrom": "shipments", + "tableTo": "game_vehicles", + "columnsFrom": [ + "transport_vehicle_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_created_by_id_users_id_fk": { + "name": "shipments_created_by_id_users_id_fk", + "tableFrom": "shipments", + "tableTo": "users", + "columnsFrom": [ + "created_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments_rels": { + "name": "shipments_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shipments_rels_order_idx": { + "name": "shipments_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_parent_idx": { + "name": "shipments_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_path_idx": { + "name": "shipments_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_resources_id_idx": { + "name": "shipments_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_assets_id_idx": { + "name": "shipments_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_vehicles_id_idx": { + "name": "shipments_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_rels_parent_fk": { + "name": "shipments_rels_parent_fk", + "tableFrom": "shipments_rels", + "tableTo": "shipments", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_resources_fk": { + "name": "shipments_rels_resources_fk", + "tableFrom": "shipments_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_assets_fk": { + "name": "shipments_rels_assets_fk", + "tableFrom": "shipments_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_vehicles_fk": { + "name": "shipments_rels_vehicles_fk", + "tableFrom": "shipments_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.bank_accounts": { + "name": "bank_accounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "account_type": { + "name": "account_type", + "type": "enum_bank_accounts_account_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'personal'" + }, + "owner_faction_id": { + "name": "owner_faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "currency_id": { + "name": "currency_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "balance": { + "name": "balance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_bank_accounts_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "bank_accounts_owner_faction_idx": { + "name": "bank_accounts_owner_faction_idx", + "columns": [ + { + "expression": "owner_faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_owner_user_idx": { + "name": "bank_accounts_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_currency_idx": { + "name": "bank_accounts_currency_idx", + "columns": [ + { + "expression": "currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_updated_at_idx": { + "name": "bank_accounts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "bank_accounts_owner_faction_id_factions_id_fk": { + "name": "bank_accounts_owner_faction_id_factions_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "factions", + "columnsFrom": [ + "owner_faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_accounts_owner_user_id_users_id_fk": { + "name": "bank_accounts_owner_user_id_users_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_accounts_currency_id_resources_id_fk": { + "name": "bank_accounts_currency_id_resources_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "resources", + "columnsFrom": [ + "currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.bank_transactions": { + "name": "bank_transactions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "transaction_number": { + "name": "transaction_number", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_bank_transactions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "from_account_id": { + "name": "from_account_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_account_id": { + "name": "to_account_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fee": { + "name": "fee", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "memo": { + "name": "memo", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "actor_id": { + "name": "actor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_bank_transactions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'completed'" + }, + "reference_id": { + "name": "reference_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "bank_transactions_transaction_number_idx": { + "name": "bank_transactions_transaction_number_idx", + "columns": [ + { + "expression": "transaction_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_from_account_idx": { + "name": "bank_transactions_from_account_idx", + "columns": [ + { + "expression": "from_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_to_account_idx": { + "name": "bank_transactions_to_account_idx", + "columns": [ + { + "expression": "to_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_actor_idx": { + "name": "bank_transactions_actor_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_reference_idx": { + "name": "bank_transactions_reference_idx", + "columns": [ + { + "expression": "reference_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_updated_at_idx": { + "name": "bank_transactions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_created_at_idx": { + "name": "bank_transactions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "bank_transactions_from_account_id_bank_accounts_id_fk": { + "name": "bank_transactions_from_account_id_bank_accounts_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_accounts", + "columnsFrom": [ + "from_account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_to_account_id_bank_accounts_id_fk": { + "name": "bank_transactions_to_account_id_bank_accounts_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_accounts", + "columnsFrom": [ + "to_account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_actor_id_users_id_fk": { + "name": "bank_transactions_actor_id_users_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "users", + "columnsFrom": [ + "actor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_reference_id_bank_transactions_id_fk": { + "name": "bank_transactions_reference_id_bank_transactions_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_transactions", + "columnsFrom": [ + "reference_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ledger_entries": { + "name": "ledger_entries", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "account_id": { + "name": "account_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "transaction_id": { + "name": "transaction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_ledger_entries_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "balance_after": { + "name": "balance_after", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "memo": { + "name": "memo", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ledger_entries_account_idx": { + "name": "ledger_entries_account_idx", + "columns": [ + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_transaction_idx": { + "name": "ledger_entries_transaction_idx", + "columns": [ + { + "expression": "transaction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_updated_at_idx": { + "name": "ledger_entries_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_created_at_idx": { + "name": "ledger_entries_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ledger_entries_account_id_bank_accounts_id_fk": { + "name": "ledger_entries_account_id_bank_accounts_id_fk", + "tableFrom": "ledger_entries", + "tableTo": "bank_accounts", + "columnsFrom": [ + "account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ledger_entries_transaction_id_bank_transactions_id_fk": { + "name": "ledger_entries_transaction_id_bank_transactions_id_fk", + "tableFrom": "ledger_entries", + "tableTo": "bank_transactions", + "columnsFrom": [ + "transaction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages_items_equipment_attachments": { + "name": "locker_storages_items_equipment_attachments", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "locker_storages_items_equipment_attachments_order_idx": { + "name": "locker_storages_items_equipment_attachments_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_attachments_parent_id_idx": { + "name": "locker_storages_items_equipment_attachments_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_attachments_asset_idx": { + "name": "locker_storages_items_equipment_attachments_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_items_equipment_attachments_asset_id_assets_id_fk": { + "name": "locker_storages_items_equipment_attachments_asset_id_assets_id_fk", + "tableFrom": "locker_storages_items_equipment_attachments", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_equipment_attachments_parent_id_fk": { + "name": "locker_storages_items_equipment_attachments_parent_id_fk", + "tableFrom": "locker_storages_items_equipment_attachments", + "tableTo": "locker_storages_items", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages_items": { + "name": "locker_storages_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "equipment_skin_id": { + "name": "equipment_skin_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "equipment_custom_name": { + "name": "equipment_custom_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "locker_storages_items_order_idx": { + "name": "locker_storages_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_parent_id_idx": { + "name": "locker_storages_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_asset_idx": { + "name": "locker_storages_items_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_equipment_skin_idx": { + "name": "locker_storages_items_equipment_equipment_skin_idx", + "columns": [ + { + "expression": "equipment_skin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_items_asset_id_assets_id_fk": { + "name": "locker_storages_items_asset_id_assets_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_equipment_skin_id_assets_id_fk": { + "name": "locker_storages_items_equipment_skin_id_assets_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "assets", + "columnsFrom": [ + "equipment_skin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_parent_id_fk": { + "name": "locker_storages_items_parent_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "locker_storages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages": { + "name": "locker_storages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Personal Locker'" + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "item_count": { + "name": "item_count", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "locker_storages_owner_user_idx": { + "name": "locker_storages_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_updated_at_idx": { + "name": "locker_storages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_created_at_idx": { + "name": "locker_storages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_owner_user_id_users_id_fk": { + "name": "locker_storages_owner_user_id_users_id_fk", + "tableFrom": "locker_storages", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.loadouts": { + "name": "loadouts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "equipped": { + "name": "equipped", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "slots_primary_id": { + "name": "slots_primary_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_secondary_id": { + "name": "slots_secondary_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_launcher_id": { + "name": "slots_launcher_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_uniform_id": { + "name": "slots_uniform_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_vest_id": { + "name": "slots_vest_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_backpack_id": { + "name": "slots_backpack_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_helmet_id": { + "name": "slots_helmet_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_facewear_id": { + "name": "slots_facewear_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_nvg_id": { + "name": "slots_nvg_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_radio_id": { + "name": "slots_radio_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_optic_id": { + "name": "slots_optic_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_muzzle_id": { + "name": "slots_muzzle_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_bipod_id": { + "name": "slots_bipod_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "loadouts_owner_user_idx": { + "name": "loadouts_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_primary_idx": { + "name": "loadouts_slots_slots_primary_idx", + "columns": [ + { + "expression": "slots_primary_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_secondary_idx": { + "name": "loadouts_slots_slots_secondary_idx", + "columns": [ + { + "expression": "slots_secondary_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_launcher_idx": { + "name": "loadouts_slots_slots_launcher_idx", + "columns": [ + { + "expression": "slots_launcher_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_uniform_idx": { + "name": "loadouts_slots_slots_uniform_idx", + "columns": [ + { + "expression": "slots_uniform_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_vest_idx": { + "name": "loadouts_slots_slots_vest_idx", + "columns": [ + { + "expression": "slots_vest_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_backpack_idx": { + "name": "loadouts_slots_slots_backpack_idx", + "columns": [ + { + "expression": "slots_backpack_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_helmet_idx": { + "name": "loadouts_slots_slots_helmet_idx", + "columns": [ + { + "expression": "slots_helmet_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_facewear_idx": { + "name": "loadouts_slots_slots_facewear_idx", + "columns": [ + { + "expression": "slots_facewear_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_nvg_idx": { + "name": "loadouts_slots_slots_nvg_idx", + "columns": [ + { + "expression": "slots_nvg_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_radio_idx": { + "name": "loadouts_slots_slots_radio_idx", + "columns": [ + { + "expression": "slots_radio_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_optic_idx": { + "name": "loadouts_slots_slots_optic_idx", + "columns": [ + { + "expression": "slots_optic_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_muzzle_idx": { + "name": "loadouts_slots_slots_muzzle_idx", + "columns": [ + { + "expression": "slots_muzzle_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_bipod_idx": { + "name": "loadouts_slots_slots_bipod_idx", + "columns": [ + { + "expression": "slots_bipod_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_updated_at_idx": { + "name": "loadouts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_created_at_idx": { + "name": "loadouts_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "loadouts_owner_user_id_users_id_fk": { + "name": "loadouts_owner_user_id_users_id_fk", + "tableFrom": "loadouts", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_primary_id_assets_id_fk": { + "name": "loadouts_slots_primary_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_primary_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_secondary_id_assets_id_fk": { + "name": "loadouts_slots_secondary_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_secondary_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_launcher_id_assets_id_fk": { + "name": "loadouts_slots_launcher_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_launcher_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_uniform_id_assets_id_fk": { + "name": "loadouts_slots_uniform_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_uniform_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_vest_id_assets_id_fk": { + "name": "loadouts_slots_vest_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_vest_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_backpack_id_assets_id_fk": { + "name": "loadouts_slots_backpack_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_backpack_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_helmet_id_assets_id_fk": { + "name": "loadouts_slots_helmet_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_helmet_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_facewear_id_assets_id_fk": { + "name": "loadouts_slots_facewear_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_facewear_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_nvg_id_assets_id_fk": { + "name": "loadouts_slots_nvg_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_nvg_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_radio_id_assets_id_fk": { + "name": "loadouts_slots_radio_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_radio_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_optic_id_assets_id_fk": { + "name": "loadouts_slots_optic_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_optic_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_muzzle_id_assets_id_fk": { + "name": "loadouts_slots_muzzle_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_muzzle_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_bipod_id_assets_id_fk": { + "name": "loadouts_slots_bipod_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_bipod_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_listings": { + "name": "market_listings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "seller_id": { + "name": "seller_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "npc_id": { + "name": "npc_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "price": { + "name": "price", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "desired_price": { + "name": "desired_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "min_price": { + "name": "min_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "currency_id": { + "name": "currency_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_market_listings_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "is_auto_generated": { + "name": "is_auto_generated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "listed_at": { + "name": "listed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "sold_at": { + "name": "sold_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "buyer_id": { + "name": "buyer_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_listings_asset_idx": { + "name": "market_listings_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_seller_idx": { + "name": "market_listings_seller_idx", + "columns": [ + { + "expression": "seller_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_npc_idx": { + "name": "market_listings_npc_idx", + "columns": [ + { + "expression": "npc_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_currency_idx": { + "name": "market_listings_currency_idx", + "columns": [ + { + "expression": "currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_status_idx": { + "name": "market_listings_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_buyer_idx": { + "name": "market_listings_buyer_idx", + "columns": [ + { + "expression": "buyer_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_updated_at_idx": { + "name": "market_listings_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_created_at_idx": { + "name": "market_listings_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_listings_asset_id_assets_id_fk": { + "name": "market_listings_asset_id_assets_id_fk", + "tableFrom": "market_listings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_seller_id_users_id_fk": { + "name": "market_listings_seller_id_users_id_fk", + "tableFrom": "market_listings", + "tableTo": "users", + "columnsFrom": [ + "seller_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_npc_id_game_npcs_id_fk": { + "name": "market_listings_npc_id_game_npcs_id_fk", + "tableFrom": "market_listings", + "tableTo": "game_npcs", + "columnsFrom": [ + "npc_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_currency_id_resources_id_fk": { + "name": "market_listings_currency_id_resources_id_fk", + "tableFrom": "market_listings", + "tableTo": "resources", + "columnsFrom": [ + "currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_buyer_id_users_id_fk": { + "name": "market_listings_buyer_id_users_id_fk", + "tableFrom": "market_listings", + "tableTo": "users", + "columnsFrom": [ + "buyer_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_negotiations_history": { + "name": "market_negotiations_history", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "from": { + "name": "from", + "type": "enum_market_negotiations_history_from", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "at": { + "name": "at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "market_negotiations_history_order_idx": { + "name": "market_negotiations_history_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_history_parent_id_idx": { + "name": "market_negotiations_history_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_negotiations_history_parent_id_fk": { + "name": "market_negotiations_history_parent_id_fk", + "tableFrom": "market_negotiations_history", + "tableTo": "market_negotiations", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_negotiations": { + "name": "market_negotiations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "listing_id": { + "name": "listing_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "buyer_id": { + "name": "buyer_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_market_negotiations_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "patience": { + "name": "patience", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "proposed_by": { + "name": "proposed_by", + "type": "enum_market_negotiations_proposed_by", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'buyer'" + }, + "accepted_price": { + "name": "accepted_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_negotiations_listing_idx": { + "name": "market_negotiations_listing_idx", + "columns": [ + { + "expression": "listing_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_buyer_idx": { + "name": "market_negotiations_buyer_idx", + "columns": [ + { + "expression": "buyer_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_status_idx": { + "name": "market_negotiations_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_updated_at_idx": { + "name": "market_negotiations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_created_at_idx": { + "name": "market_negotiations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_negotiations_listing_id_market_listings_id_fk": { + "name": "market_negotiations_listing_id_market_listings_id_fk", + "tableFrom": "market_negotiations", + "tableTo": "market_listings", + "columnsFrom": [ + "listing_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_negotiations_buyer_id_users_id_fk": { + "name": "market_negotiations_buyer_id_users_id_fk", + "tableFrom": "market_negotiations", + "tableTo": "users", + "columnsFrom": [ + "buyer_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_state": { + "name": "market_state", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "item_type": { + "name": "item_type", + "type": "enum_market_state_item_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "item_id": { + "name": "item_id", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "gm_baseline_supply": { + "name": "gm_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 100 + }, + "gm_baseline_demand": { + "name": "gm_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 50 + }, + "current_supply": { + "name": "current_supply", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 100 + }, + "artificial_demand": { + "name": "artificial_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 50 + }, + "real_demand": { + "name": "real_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "price_modifier": { + "name": "price_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "last_computed_at": { + "name": "last_computed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_state_item_type_idx": { + "name": "market_state_item_type_idx", + "columns": [ + { + "expression": "item_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_item_id_idx": { + "name": "market_state_item_id_idx", + "columns": [ + { + "expression": "item_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_updated_at_idx": { + "name": "market_state_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_created_at_idx": { + "name": "market_state_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "itemType_itemId_idx": { + "name": "itemType_itemId_idx", + "columns": [ + { + "expression": "item_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "item_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.voice_scripts": { + "name": "voice_scripts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "script": { + "name": "script", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "xp_amount": { + "name": "xp_amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 250 + }, + "spoiler": { + "name": "spoiler", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "status": { + "name": "status", + "type": "enum_voice_scripts_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'draft'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "voice_scripts_updated_at_idx": { + "name": "voice_scripts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_scripts_created_at_idx": { + "name": "voice_scripts_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.voice_submissions": { + "name": "voice_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "script_id": { + "name": "script_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_voice_submissions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "review_note": { + "name": "review_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "voice_submissions_script_idx": { + "name": "voice_submissions_script_idx", + "columns": [ + { + "expression": "script_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_user_idx": { + "name": "voice_submissions_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_updated_at_idx": { + "name": "voice_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_created_at_idx": { + "name": "voice_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_filename_idx": { + "name": "voice_submissions_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "voice_submissions_script_id_voice_scripts_id_fk": { + "name": "voice_submissions_script_id_voice_scripts_id_fk", + "tableFrom": "voice_submissions", + "tableTo": "voice_scripts", + "columnsFrom": [ + "script_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "voice_submissions_user_id_users_id_fk": { + "name": "voice_submissions_user_id_users_id_fk", + "tableFrom": "voice_submissions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_activity": { + "name": "tickets_activity", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_tickets_activity_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'system'" + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tickets_activity_order_idx": { + "name": "tickets_activity_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_activity_parent_id_idx": { + "name": "tickets_activity_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_activity_author_idx": { + "name": "tickets_activity_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_activity_author_id_users_id_fk": { + "name": "tickets_activity_author_id_users_id_fk", + "tableFrom": "tickets_activity", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_activity_parent_id_fk": { + "name": "tickets_activity_parent_id_fk", + "tableFrom": "tickets_activity", + "tableTo": "tickets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_edit_history": { + "name": "tickets_edit_history", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "before": { + "name": "before", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "after": { + "name": "after", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "edited_by_id": { + "name": "edited_by_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "edited_at": { + "name": "edited_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "tickets_edit_history_order_idx": { + "name": "tickets_edit_history_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_edit_history_parent_id_idx": { + "name": "tickets_edit_history_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_edit_history_edited_by_idx": { + "name": "tickets_edit_history_edited_by_idx", + "columns": [ + { + "expression": "edited_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_edit_history_edited_by_id_users_id_fk": { + "name": "tickets_edit_history_edited_by_id_users_id_fk", + "tableFrom": "tickets_edit_history", + "tableTo": "users", + "columnsFrom": [ + "edited_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_edit_history_parent_id_fk": { + "name": "tickets_edit_history_parent_id_fk", + "tableFrom": "tickets_edit_history", + "tableTo": "tickets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets": { + "name": "tickets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_tickets_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'support_request'" + }, + "priority": { + "name": "priority", + "type": "enum_tickets_priority", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'medium'" + }, + "status": { + "name": "status", + "type": "enum_tickets_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "reporter_id": { + "name": "reporter_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "assignee_id": { + "name": "assignee_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "closed_at": { + "name": "closed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sprint_id": { + "name": "sprint_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "release_id": { + "name": "release_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_ticket_id": { + "name": "parent_ticket_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "enum_tickets_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'task'" + }, + "story_points": { + "name": "story_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "estimate": { + "name": "estimate", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "due_date": { + "name": "due_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "resolution": { + "name": "resolution", + "type": "enum_tickets_resolution", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "tickets_category_idx": { + "name": "tickets_category_idx", + "columns": [ + { + "expression": "category", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_priority_idx": { + "name": "tickets_priority_idx", + "columns": [ + { + "expression": "priority", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_status_idx": { + "name": "tickets_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_reporter_idx": { + "name": "tickets_reporter_idx", + "columns": [ + { + "expression": "reporter_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_assignee_idx": { + "name": "tickets_assignee_idx", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_project_idx": { + "name": "tickets_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_sprint_idx": { + "name": "tickets_sprint_idx", + "columns": [ + { + "expression": "sprint_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_release_idx": { + "name": "tickets_release_idx", + "columns": [ + { + "expression": "release_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_parent_ticket_idx": { + "name": "tickets_parent_ticket_idx", + "columns": [ + { + "expression": "parent_ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_updated_at_idx": { + "name": "tickets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_created_at_idx": { + "name": "tickets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_reporter_id_users_id_fk": { + "name": "tickets_reporter_id_users_id_fk", + "tableFrom": "tickets", + "tableTo": "users", + "columnsFrom": [ + "reporter_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_assignee_id_users_id_fk": { + "name": "tickets_assignee_id_users_id_fk", + "tableFrom": "tickets", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_project_id_projects_id_fk": { + "name": "tickets_project_id_projects_id_fk", + "tableFrom": "tickets", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_sprint_id_sprints_id_fk": { + "name": "tickets_sprint_id_sprints_id_fk", + "tableFrom": "tickets", + "tableTo": "sprints", + "columnsFrom": [ + "sprint_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_release_id_releases_id_fk": { + "name": "tickets_release_id_releases_id_fk", + "tableFrom": "tickets", + "tableTo": "releases", + "columnsFrom": [ + "release_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_parent_ticket_id_tickets_id_fk": { + "name": "tickets_parent_ticket_id_tickets_id_fk", + "tableFrom": "tickets", + "tableTo": "tickets", + "columnsFrom": [ + "parent_ticket_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_rels": { + "name": "tickets_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "labels_id": { + "name": "labels_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tickets_rels_order_idx": { + "name": "tickets_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_parent_idx": { + "name": "tickets_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_path_idx": { + "name": "tickets_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_labels_id_idx": { + "name": "tickets_rels_labels_id_idx", + "columns": [ + { + "expression": "labels_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_rels_parent_fk": { + "name": "tickets_rels_parent_fk", + "tableFrom": "tickets_rels", + "tableTo": "tickets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tickets_rels_labels_fk": { + "name": "tickets_rels_labels_fk", + "tableFrom": "tickets_rels", + "tableTo": "labels", + "columnsFrom": [ + "labels_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ticket_votes": { + "name": "ticket_votes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "ticket_id": { + "name": "ticket_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ticket_votes_ticket_idx": { + "name": "ticket_votes_ticket_idx", + "columns": [ + { + "expression": "ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_user_idx": { + "name": "ticket_votes_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_updated_at_idx": { + "name": "ticket_votes_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_created_at_idx": { + "name": "ticket_votes_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_user_idx": { + "name": "ticket_user_idx", + "columns": [ + { + "expression": "ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ticket_votes_ticket_id_tickets_id_fk": { + "name": "ticket_votes_ticket_id_tickets_id_fk", + "tableFrom": "ticket_votes", + "tableTo": "tickets", + "columnsFrom": [ + "ticket_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ticket_votes_user_id_users_id_fk": { + "name": "ticket_votes_user_id_users_id_fk", + "tableFrom": "ticket_votes", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages": { + "name": "wiki_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_wiki_pages_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "body": { + "name": "body", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "lockdown": { + "name": "lockdown", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locked_by_id": { + "name": "locked_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locked_at": { + "name": "locked_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "last_editor_id": { + "name": "last_editor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_pages_slug_idx": { + "name": "wiki_pages_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_category_idx": { + "name": "wiki_pages_category_idx", + "columns": [ + { + "expression": "category", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_locked_by_idx": { + "name": "wiki_pages_locked_by_idx", + "columns": [ + { + "expression": "locked_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_last_editor_idx": { + "name": "wiki_pages_last_editor_idx", + "columns": [ + { + "expression": "last_editor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_updated_at_idx": { + "name": "wiki_pages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_created_at_idx": { + "name": "wiki_pages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_locked_by_id_users_id_fk": { + "name": "wiki_pages_locked_by_id_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "locked_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "wiki_pages_last_editor_id_users_id_fk": { + "name": "wiki_pages_last_editor_id_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "last_editor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages_texts": { + "name": "wiki_pages_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_pages_texts_order_parent": { + "name": "wiki_pages_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_texts_parent_fk": { + "name": "wiki_pages_texts_parent_fk", + "tableFrom": "wiki_pages_texts", + "tableTo": "wiki_pages", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_revisions": { + "name": "wiki_revisions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "page_id": { + "name": "page_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "revision_number": { + "name": "revision_number", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "title_snapshot": { + "name": "title_snapshot", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "content_snapshot": { + "name": "content_snapshot", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "editor_id": { + "name": "editor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "enum_wiki_revisions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "restored_from_revision": { + "name": "restored_from_revision", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_revisions_page_idx": { + "name": "wiki_revisions_page_idx", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_editor_idx": { + "name": "wiki_revisions_editor_idx", + "columns": [ + { + "expression": "editor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_updated_at_idx": { + "name": "wiki_revisions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_created_at_idx": { + "name": "wiki_revisions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_revisions_page_id_wiki_pages_id_fk": { + "name": "wiki_revisions_page_id_wiki_pages_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "wiki_pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "wiki_revisions_editor_id_users_id_fk": { + "name": "wiki_revisions_editor_id_users_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "users", + "columnsFrom": [ + "editor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_templates": { + "name": "wiki_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "body": { + "name": "body", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "css": { + "name": "css", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "html": { + "name": "html", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_templates_name_idx": { + "name": "wiki_templates_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_templates_updated_at_idx": { + "name": "wiki_templates_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_templates_created_at_idx": { + "name": "wiki_templates_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "lead_id": { + "name": "lead_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_projects_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'active'" + }, + "default_assignee_id": { + "name": "default_assignee_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "projects_key_idx": { + "name": "projects_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_lead_idx": { + "name": "projects_lead_idx", + "columns": [ + { + "expression": "lead_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_default_assignee_idx": { + "name": "projects_default_assignee_idx", + "columns": [ + { + "expression": "default_assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_updated_at_idx": { + "name": "projects_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_created_at_idx": { + "name": "projects_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_lead_id_users_id_fk": { + "name": "projects_lead_id_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "lead_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "projects_default_assignee_id_users_id_fk": { + "name": "projects_default_assignee_id_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "default_assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sprints": { + "name": "sprints", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "goal": { + "name": "goal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_sprints_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'planning'" + }, + "capacity": { + "name": "capacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sprints_project_idx": { + "name": "sprints_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sprints_updated_at_idx": { + "name": "sprints_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sprints_created_at_idx": { + "name": "sprints_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sprints_project_id_projects_id_fk": { + "name": "sprints_project_id_projects_id_fk", + "tableFrom": "sprints", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.releases": { + "name": "releases", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_releases_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "release_date": { + "name": "release_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "target_version": { + "name": "target_version", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "releases_project_idx": { + "name": "releases_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "releases_updated_at_idx": { + "name": "releases_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "releases_created_at_idx": { + "name": "releases_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "releases_project_id_projects_id_fk": { + "name": "releases_project_id_projects_id_fk", + "tableFrom": "releases", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labels": { + "name": "labels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#6366f1'" + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "labels_project_idx": { + "name": "labels_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labels_updated_at_idx": { + "name": "labels_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labels_created_at_idx": { + "name": "labels_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "labels_project_id_projects_id_fk": { + "name": "labels_project_id_projects_id_fk", + "tableFrom": "labels", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maps": { + "name": "maps", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "world_size_width": { + "name": "world_size_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 8192 + }, + "world_size_height": { + "name": "world_size_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 8192 + }, + "basemap_mode": { + "name": "basemap_mode", + "type": "enum_maps_basemap_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'image'" + }, + "basemap_image_id": { + "name": "basemap_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tile_url_template": { + "name": "tile_url_template", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "min_zoom": { + "name": "min_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "max_zoom": { + "name": "max_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 12 + }, + "default_center_x": { + "name": "default_center_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_center_y": { + "name": "default_center_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_zoom": { + "name": "default_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 2 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "maps_name_idx": { + "name": "maps_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_basemap_image_idx": { + "name": "maps_basemap_image_idx", + "columns": [ + { + "expression": "basemap_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_updated_at_idx": { + "name": "maps_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_created_at_idx": { + "name": "maps_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maps_basemap_image_id_media_id_fk": { + "name": "maps_basemap_image_id_media_id_fk", + "tableFrom": "maps", + "tableTo": "media", + "columnsFrom": [ + "basemap_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_roads": { + "name": "map_roads", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "surface": { + "name": "surface", + "type": "enum_map_roads_surface", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'paved'" + }, + "speed_multiplier": { + "name": "speed_multiplier", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "stroke_color": { + "name": "stroke_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stroke_weight": { + "name": "stroke_weight", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 2 + }, + "stroke_style": { + "name": "stroke_style", + "type": "enum_map_roads_stroke_style", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'solid'" + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "points": { + "name": "points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "map_roads_map_idx": { + "name": "map_roads_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_roads_updated_at_idx": { + "name": "map_roads_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_roads_created_at_idx": { + "name": "map_roads_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_roads_map_id_maps_id_fk": { + "name": "map_roads_map_id_maps_id_fk", + "tableFrom": "map_roads", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_zones": { + "name": "map_zones", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_map_zones_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "fill_color": { + "name": "fill_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stroke_color": { + "name": "stroke_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "fill_opacity": { + "name": "fill_opacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "stroke_weight": { + "name": "stroke_weight", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "points": { + "name": "points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "map_zones_map_idx": { + "name": "map_zones_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_updated_at_idx": { + "name": "map_zones_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_created_at_idx": { + "name": "map_zones_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_zones_map_id_maps_id_fk": { + "name": "map_zones_map_id_maps_id_fk", + "tableFrom": "map_zones", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_zones_rels": { + "name": "map_zones_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "map_zones_rels_order_idx": { + "name": "map_zones_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_parent_idx": { + "name": "map_zones_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_path_idx": { + "name": "map_zones_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_resources_id_idx": { + "name": "map_zones_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_zones_rels_parent_fk": { + "name": "map_zones_rels_parent_fk", + "tableFrom": "map_zones_rels", + "tableTo": "map_zones", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "map_zones_rels_resources_fk": { + "name": "map_zones_rels_resources_fk", + "tableFrom": "map_zones_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_nodes": { + "name": "resource_nodes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "position": { + "name": "position", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "richness": { + "name": "richness", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resource_nodes_map_idx": { + "name": "resource_nodes_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_updated_at_idx": { + "name": "resource_nodes_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_created_at_idx": { + "name": "resource_nodes_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_nodes_map_id_maps_id_fk": { + "name": "resource_nodes_map_id_maps_id_fk", + "tableFrom": "resource_nodes", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_nodes_rels": { + "name": "resource_nodes_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "resource_nodes_rels_order_idx": { + "name": "resource_nodes_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_parent_idx": { + "name": "resource_nodes_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_path_idx": { + "name": "resource_nodes_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_resources_id_idx": { + "name": "resource_nodes_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_nodes_rels_parent_fk": { + "name": "resource_nodes_rels_parent_fk", + "tableFrom": "resource_nodes_rels", + "tableTo": "resource_nodes", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "resource_nodes_rels_resources_fk": { + "name": "resource_nodes_rels_resources_fk", + "tableFrom": "resource_nodes_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.narrative_events": { + "name": "narrative_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "flow_data": { + "name": "flow_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "triggers_type": { + "name": "triggers_type", + "type": "enum_narrative_events_triggers_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'manual'" + }, + "triggers_condition": { + "name": "triggers_condition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "narrative_events_updated_at_idx": { + "name": "narrative_events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "narrative_events_created_at_idx": { + "name": "narrative_events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.story_beats": { + "name": "story_beats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occurred_at": { + "name": "occurred_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_story_beats_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'draft'" + }, + "body": { + "name": "body", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "story_beats_status_idx": { + "name": "story_beats_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_mission_idx": { + "name": "story_beats_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_updated_at_idx": { + "name": "story_beats_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_created_at_idx": { + "name": "story_beats_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "story_beats_mission_id_missions_id_fk": { + "name": "story_beats_mission_id_missions_id_fk", + "tableFrom": "story_beats", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.story_beat_states": { + "name": "story_beat_states", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "beat_id": { + "name": "beat_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "read_at": { + "name": "read_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "reaction": { + "name": "reaction", + "type": "enum_story_beat_states_reaction", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "story_beat_states_user_idx": { + "name": "story_beat_states_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_beat_idx": { + "name": "story_beat_states_beat_idx", + "columns": [ + { + "expression": "beat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_updated_at_idx": { + "name": "story_beat_states_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_created_at_idx": { + "name": "story_beat_states_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "story_beat_states_user_id_users_id_fk": { + "name": "story_beat_states_user_id_users_id_fk", + "tableFrom": "story_beat_states", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "story_beat_states_beat_id_story_beats_id_fk": { + "name": "story_beat_states_beat_id_story_beats_id_fk", + "tableFrom": "story_beat_states", + "tableTo": "story_beats", + "columnsFrom": [ + "beat_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mission_files": { + "name": "mission_files", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mission_file_name": { + "name": "mission_file_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mission_files_author_idx": { + "name": "mission_files_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_updated_at_idx": { + "name": "mission_files_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_created_at_idx": { + "name": "mission_files_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_filename_idx": { + "name": "mission_files_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mission_files_author_id_users_id_fk": { + "name": "mission_files_author_id_users_id_fk", + "tableFrom": "mission_files", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mod_lists": { + "name": "mod_lists", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "modlist_name": { + "name": "modlist_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mod_lists_author_idx": { + "name": "mod_lists_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_updated_at_idx": { + "name": "mod_lists_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_created_at_idx": { + "name": "mod_lists_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_filename_idx": { + "name": "mod_lists_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mod_lists_author_id_users_id_fk": { + "name": "mod_lists_author_id_users_id_fk", + "tableFrom": "mod_lists", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_servers": { + "name": "game_servers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_game_servers_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'offline'" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_servers_server_id_idx": { + "name": "game_servers_server_id_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_servers_updated_at_idx": { + "name": "game_servers_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_servers_created_at_idx": { + "name": "game_servers_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.arma_sync_events": { + "name": "arma_sync_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "event_id": { + "name": "event_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occurred_at": { + "name": "occurred_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "arma_sync_events_event_id_idx": { + "name": "arma_sync_events_event_id_idx", + "columns": [ + { + "expression": "event_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_server_idx": { + "name": "arma_sync_events_server_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_type_idx": { + "name": "arma_sync_events_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_updated_at_idx": { + "name": "arma_sync_events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_created_at_idx": { + "name": "arma_sync_events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "arma_sync_events_server_id_game_servers_id_fk": { + "name": "arma_sync_events_server_id_game_servers_id_fk", + "tableFrom": "arma_sync_events", + "tableTo": "game_servers", + "columnsFrom": [ + "server_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.arma_commands": { + "name": "arma_commands", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "command_id": { + "name": "command_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_arma_commands_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'queued'" + }, + "result": { + "name": "result", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "delivered_at": { + "name": "delivered_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "arma_commands_command_id_idx": { + "name": "arma_commands_command_id_idx", + "columns": [ + { + "expression": "command_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_server_idx": { + "name": "arma_commands_server_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_updated_at_idx": { + "name": "arma_commands_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_created_at_idx": { + "name": "arma_commands_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "arma_commands_server_id_game_servers_id_fk": { + "name": "arma_commands_server_id_game_servers_id_fk", + "tableFrom": "arma_commands", + "tableTo": "game_servers", + "columnsFrom": [ + "server_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.respawn_tickets": { + "name": "respawn_tickets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "balance": { + "name": "balance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "respawn_tickets_user_idx": { + "name": "respawn_tickets_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "respawn_tickets_updated_at_idx": { + "name": "respawn_tickets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "respawn_tickets_created_at_idx": { + "name": "respawn_tickets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "respawn_tickets_user_id_users_id_fk": { + "name": "respawn_tickets_user_id_users_id_fk", + "tableFrom": "respawn_tickets", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_minefields": { + "name": "custom_minefields", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rows": { + "name": "rows", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "cols": { + "name": "cols", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "mines": { + "name": "mines", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "mine_count": { + "name": "mine_count", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "published": { + "name": "published", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "expose_edge_mines": { + "name": "expose_edge_mines", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "play_count": { + "name": "play_count", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "creator_xp_bank": { + "name": "creator_xp_bank", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_minefields_author_idx": { + "name": "custom_minefields_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefields_updated_at_idx": { + "name": "custom_minefields_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefields_created_at_idx": { + "name": "custom_minefields_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_minefields_author_id_users_id_fk": { + "name": "custom_minefields_author_id_users_id_fk", + "tableFrom": "custom_minefields", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_minefield_scores": { + "name": "custom_minefield_scores", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "minefield_id": { + "name": "minefield_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "seconds": { + "name": "seconds", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "flags": { + "name": "flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "won": { + "name": "won", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_minefield_scores_minefield_idx": { + "name": "custom_minefield_scores_minefield_idx", + "columns": [ + { + "expression": "minefield_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_user_idx": { + "name": "custom_minefield_scores_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_updated_at_idx": { + "name": "custom_minefield_scores_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_created_at_idx": { + "name": "custom_minefield_scores_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_minefield_scores_minefield_id_custom_minefields_id_fk": { + "name": "custom_minefield_scores_minefield_id_custom_minefields_id_fk", + "tableFrom": "custom_minefield_scores", + "tableTo": "custom_minefields", + "columnsFrom": [ + "minefield_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "custom_minefield_scores_user_id_users_id_fk": { + "name": "custom_minefield_scores_user_id_users_id_fk", + "tableFrom": "custom_minefield_scores", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_radio_tests": { + "name": "custom_radio_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "messages": { + "name": "messages", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "message_count": { + "name": "message_count", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "enum_custom_radio_tests_order", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'fixed'" + }, + "published": { + "name": "published", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "play_count": { + "name": "play_count", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_radio_tests_author_idx": { + "name": "custom_radio_tests_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_tests_updated_at_idx": { + "name": "custom_radio_tests_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_tests_created_at_idx": { + "name": "custom_radio_tests_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_radio_tests_author_id_users_id_fk": { + "name": "custom_radio_tests_author_id_users_id_fk", + "tableFrom": "custom_radio_tests", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_radio_test_scores": { + "name": "custom_radio_test_scores", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_id": { + "name": "test_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "score": { + "name": "score", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "accuracy": { + "name": "accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "correct_messages": { + "name": "correct_messages", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "incorrect_messages": { + "name": "incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "mode": { + "name": "mode", + "type": "enum_custom_radio_test_scores_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "time_ms": { + "name": "time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_radio_test_scores_test_idx": { + "name": "custom_radio_test_scores_test_idx", + "columns": [ + { + "expression": "test_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_user_idx": { + "name": "custom_radio_test_scores_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_updated_at_idx": { + "name": "custom_radio_test_scores_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_created_at_idx": { + "name": "custom_radio_test_scores_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_radio_test_scores_test_id_custom_radio_tests_id_fk": { + "name": "custom_radio_test_scores_test_id_custom_radio_tests_id_fk", + "tableFrom": "custom_radio_test_scores", + "tableTo": "custom_radio_tests", + "columnsFrom": [ + "test_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "custom_radio_test_scores_user_id_users_id_fk": { + "name": "custom_radio_test_scores_user_id_users_id_fk", + "tableFrom": "custom_radio_test_scores", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_ai_instructions_images": { + "name": "plugin_ai_instructions_images", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "plugin_ai_instructions_images_order_idx": { + "name": "plugin_ai_instructions_images_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_images_parent_id_idx": { + "name": "plugin_ai_instructions_images_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_images_image_idx": { + "name": "plugin_ai_instructions_images_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "plugin_ai_instructions_images_image_id_media_id_fk": { + "name": "plugin_ai_instructions_images_image_id_media_id_fk", + "tableFrom": "plugin_ai_instructions_images", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "plugin_ai_instructions_images_parent_id_fk": { + "name": "plugin_ai_instructions_images_parent_id_fk", + "tableFrom": "plugin_ai_instructions_images", + "tableTo": "plugin_ai_instructions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_ai_instructions": { + "name": "plugin_ai_instructions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "schema_path": { + "name": "schema_path", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "field_type": { + "name": "field_type", + "type": "enum_plugin_ai_instructions_field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'text'" + }, + "relation_to": { + "name": "relation_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "model_id": { + "name": "model_id", + "type": "enum_plugin_ai_instructions_model_id", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "disabled": { + "name": "disabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "prompt": { + "name": "prompt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "system": { + "name": "system", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'INSTRUCTIONS:\nYou are a highly skilled and professional blog writer,\nrenowned for crafting engaging and well-organized articles.\nWhen given a title, you meticulously create blogs that are not only\ninformative and accurate but also captivating and beautifully structured.'" + }, + "layout": { + "name": "layout", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'[paragraph] - Write a concise introduction (2-3 sentences) that outlines the main topic.\n[horizontalrule] - Insert a horizontal rule to separate the introduction from the main content.\n[list] - Create a list with 3-5 items. Each list item should contain:\n a. [heading] - A brief, descriptive heading (up to 5 words)\n b. [paragraph] - A short explanation or elaboration (1-2 sentences)\n[horizontalrule] - Insert another horizontal rule to separate the main content from the conclusion.\n[paragraph] - Compose a brief conclusion (2-3 sentences) summarizing the key points.\n[quote] - Include a relevant quote from a famous person, directly related to the topic. Format: \"Quote text.\" - Author Name'" + }, + "unsloth_text_settings_model": { + "name": "unsloth_text_settings_model", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'unsloth/gemma-4-E4B-it-qat-GGUF'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "plugin_ai_instructions_schema_path_idx": { + "name": "plugin_ai_instructions_schema_path_idx", + "columns": [ + { + "expression": "schema_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_updated_at_idx": { + "name": "plugin_ai_instructions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_created_at_idx": { + "name": "plugin_ai_instructions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_mcp_api_keys": { + "name": "payload_mcp_api_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "media_find": { + "name": "media_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_create": { + "name": "media_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_update": { + "name": "media_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_delete": { + "name": "media_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_find": { + "name": "game_hard_resources_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_create": { + "name": "game_hard_resources_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_update": { + "name": "game_hard_resources_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_delete": { + "name": "game_hard_resources_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_find": { + "name": "game_structures_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_create": { + "name": "game_structures_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_update": { + "name": "game_structures_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_delete": { + "name": "game_structures_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_find": { + "name": "game_vehicles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_create": { + "name": "game_vehicles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_update": { + "name": "game_vehicles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_delete": { + "name": "game_vehicles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_find": { + "name": "game_npcs_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_create": { + "name": "game_npcs_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_update": { + "name": "game_npcs_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_delete": { + "name": "game_npcs_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_find": { + "name": "npc_staffing_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_create": { + "name": "npc_staffing_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_update": { + "name": "npc_staffing_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_delete": { + "name": "npc_staffing_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_find": { + "name": "labor_classifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_create": { + "name": "labor_classifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_update": { + "name": "labor_classifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_delete": { + "name": "labor_classifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_find": { + "name": "game_event_logs_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_create": { + "name": "game_event_logs_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_update": { + "name": "game_event_logs_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_delete": { + "name": "game_event_logs_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_find": { + "name": "users_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_create": { + "name": "users_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_update": { + "name": "users_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_delete": { + "name": "users_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_find": { + "name": "roles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_create": { + "name": "roles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_update": { + "name": "roles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_delete": { + "name": "roles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_find": { + "name": "ranks_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_create": { + "name": "ranks_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_update": { + "name": "ranks_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_delete": { + "name": "ranks_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_find": { + "name": "profiles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_create": { + "name": "profiles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_update": { + "name": "profiles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_delete": { + "name": "profiles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_find": { + "name": "awards_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_create": { + "name": "awards_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_update": { + "name": "awards_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_delete": { + "name": "awards_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_find": { + "name": "qualifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_create": { + "name": "qualifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_update": { + "name": "qualifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_delete": { + "name": "qualifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_find": { + "name": "assignments_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_create": { + "name": "assignments_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_update": { + "name": "assignments_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_delete": { + "name": "assignments_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_find": { + "name": "assignment_transfers_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_create": { + "name": "assignment_transfers_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_update": { + "name": "assignment_transfers_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_delete": { + "name": "assignment_transfers_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_find": { + "name": "experience_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_create": { + "name": "experience_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_update": { + "name": "experience_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_delete": { + "name": "experience_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_find": { + "name": "user_notifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_create": { + "name": "user_notifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_update": { + "name": "user_notifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_delete": { + "name": "user_notifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_find": { + "name": "evaluations_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_create": { + "name": "evaluations_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_update": { + "name": "evaluations_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_delete": { + "name": "evaluations_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_find": { + "name": "ribbon_submissions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_create": { + "name": "ribbon_submissions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_update": { + "name": "ribbon_submissions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_delete": { + "name": "ribbon_submissions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_find": { + "name": "missions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_create": { + "name": "missions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_update": { + "name": "missions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_delete": { + "name": "missions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_find": { + "name": "mission_attendances_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_create": { + "name": "mission_attendances_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_update": { + "name": "mission_attendances_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_delete": { + "name": "mission_attendances_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_find": { + "name": "campaigns_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_create": { + "name": "campaigns_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_update": { + "name": "campaigns_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_delete": { + "name": "campaigns_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_find": { + "name": "factions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_create": { + "name": "factions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_update": { + "name": "factions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_delete": { + "name": "factions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_find": { + "name": "technologies_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_create": { + "name": "technologies_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_update": { + "name": "technologies_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_delete": { + "name": "technologies_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_find": { + "name": "assets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_create": { + "name": "assets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_update": { + "name": "assets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_delete": { + "name": "assets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_find": { + "name": "resources_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_create": { + "name": "resources_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_update": { + "name": "resources_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_delete": { + "name": "resources_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_find": { + "name": "vehicles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_create": { + "name": "vehicles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_update": { + "name": "vehicles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_delete": { + "name": "vehicles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_find": { + "name": "structures_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_create": { + "name": "structures_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_update": { + "name": "structures_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_delete": { + "name": "structures_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_find": { + "name": "shipments_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_create": { + "name": "shipments_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_update": { + "name": "shipments_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_delete": { + "name": "shipments_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_find": { + "name": "bank_accounts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_create": { + "name": "bank_accounts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_update": { + "name": "bank_accounts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_delete": { + "name": "bank_accounts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_find": { + "name": "bank_transactions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_create": { + "name": "bank_transactions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_update": { + "name": "bank_transactions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_delete": { + "name": "bank_transactions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_find": { + "name": "ledger_entries_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_create": { + "name": "ledger_entries_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_update": { + "name": "ledger_entries_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_delete": { + "name": "ledger_entries_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_find": { + "name": "locker_storages_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_create": { + "name": "locker_storages_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_update": { + "name": "locker_storages_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_delete": { + "name": "locker_storages_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_find": { + "name": "loadouts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_create": { + "name": "loadouts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_update": { + "name": "loadouts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_delete": { + "name": "loadouts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_find": { + "name": "market_listings_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_create": { + "name": "market_listings_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_update": { + "name": "market_listings_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_delete": { + "name": "market_listings_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_find": { + "name": "market_negotiations_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_create": { + "name": "market_negotiations_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_update": { + "name": "market_negotiations_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_delete": { + "name": "market_negotiations_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_find": { + "name": "market_state_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_create": { + "name": "market_state_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_update": { + "name": "market_state_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_delete": { + "name": "market_state_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_find": { + "name": "voice_scripts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_create": { + "name": "voice_scripts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_update": { + "name": "voice_scripts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_delete": { + "name": "voice_scripts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_find": { + "name": "voice_submissions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_create": { + "name": "voice_submissions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_update": { + "name": "voice_submissions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_delete": { + "name": "voice_submissions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_find": { + "name": "tickets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_create": { + "name": "tickets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_update": { + "name": "tickets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_delete": { + "name": "tickets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_find": { + "name": "ticket_votes_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_create": { + "name": "ticket_votes_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_update": { + "name": "ticket_votes_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_delete": { + "name": "ticket_votes_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_find": { + "name": "wiki_pages_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_create": { + "name": "wiki_pages_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_update": { + "name": "wiki_pages_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_delete": { + "name": "wiki_pages_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_find": { + "name": "wiki_revisions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_create": { + "name": "wiki_revisions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_update": { + "name": "wiki_revisions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_delete": { + "name": "wiki_revisions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_find": { + "name": "wiki_templates_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_create": { + "name": "wiki_templates_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_update": { + "name": "wiki_templates_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_delete": { + "name": "wiki_templates_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_find": { + "name": "projects_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_create": { + "name": "projects_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_update": { + "name": "projects_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_delete": { + "name": "projects_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_find": { + "name": "sprints_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_create": { + "name": "sprints_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_update": { + "name": "sprints_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_delete": { + "name": "sprints_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_find": { + "name": "releases_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_create": { + "name": "releases_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_update": { + "name": "releases_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_delete": { + "name": "releases_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_find": { + "name": "labels_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_create": { + "name": "labels_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_update": { + "name": "labels_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_delete": { + "name": "labels_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_find": { + "name": "maps_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_create": { + "name": "maps_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_update": { + "name": "maps_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_delete": { + "name": "maps_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_find": { + "name": "map_roads_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_create": { + "name": "map_roads_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_update": { + "name": "map_roads_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_delete": { + "name": "map_roads_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_find": { + "name": "map_zones_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_create": { + "name": "map_zones_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_update": { + "name": "map_zones_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_delete": { + "name": "map_zones_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_find": { + "name": "resource_nodes_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_create": { + "name": "resource_nodes_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_update": { + "name": "resource_nodes_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_delete": { + "name": "resource_nodes_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_find": { + "name": "narrative_events_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_create": { + "name": "narrative_events_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_update": { + "name": "narrative_events_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_delete": { + "name": "narrative_events_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_find": { + "name": "story_beats_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_create": { + "name": "story_beats_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_update": { + "name": "story_beats_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_delete": { + "name": "story_beats_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_find": { + "name": "story_beat_states_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_create": { + "name": "story_beat_states_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_update": { + "name": "story_beat_states_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_delete": { + "name": "story_beat_states_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_find": { + "name": "mission_files_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_create": { + "name": "mission_files_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_update": { + "name": "mission_files_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_delete": { + "name": "mission_files_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_find": { + "name": "mod_lists_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_create": { + "name": "mod_lists_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_update": { + "name": "mod_lists_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_delete": { + "name": "mod_lists_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_find": { + "name": "game_servers_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_create": { + "name": "game_servers_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_update": { + "name": "game_servers_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_delete": { + "name": "game_servers_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_find": { + "name": "arma_sync_events_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_create": { + "name": "arma_sync_events_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_update": { + "name": "arma_sync_events_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_delete": { + "name": "arma_sync_events_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_find": { + "name": "arma_commands_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_create": { + "name": "arma_commands_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_update": { + "name": "arma_commands_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_delete": { + "name": "arma_commands_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_find": { + "name": "respawn_tickets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_create": { + "name": "respawn_tickets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_update": { + "name": "respawn_tickets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_delete": { + "name": "respawn_tickets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_find": { + "name": "custom_minefields_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_create": { + "name": "custom_minefields_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_update": { + "name": "custom_minefields_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_delete": { + "name": "custom_minefields_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_find": { + "name": "custom_minefield_scores_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_create": { + "name": "custom_minefield_scores_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_update": { + "name": "custom_minefield_scores_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_delete": { + "name": "custom_minefield_scores_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_find": { + "name": "custom_radio_tests_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_create": { + "name": "custom_radio_tests_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_update": { + "name": "custom_radio_tests_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_delete": { + "name": "custom_radio_tests_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_find": { + "name": "custom_radio_test_scores_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_create": { + "name": "custom_radio_test_scores_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_update": { + "name": "custom_radio_test_scores_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_delete": { + "name": "custom_radio_test_scores_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "enable_a_p_i_key": { + "name": "enable_a_p_i_key", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "api_key": { + "name": "api_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "api_key_index": { + "name": "api_key_index", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_mcp_api_keys_user_idx": { + "name": "payload_mcp_api_keys_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_mcp_api_keys_updated_at_idx": { + "name": "payload_mcp_api_keys_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_mcp_api_keys_created_at_idx": { + "name": "payload_mcp_api_keys_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_mcp_api_keys_user_id_users_id_fk": { + "name": "payload_mcp_api_keys_user_id_users_id_fk", + "tableFrom": "payload_mcp_api_keys", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_kv": { + "name": "payload_kv", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "payload_kv_key_idx": { + "name": "payload_kv_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents": { + "name": "payload_locked_documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "global_slug": { + "name": "global_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_locked_documents_global_slug_idx": { + "name": "payload_locked_documents_global_slug_idx", + "columns": [ + { + "expression": "global_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_updated_at_idx": { + "name": "payload_locked_documents_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_created_at_idx": { + "name": "payload_locked_documents_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents_rels": { + "name": "payload_locked_documents_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_hard_resources_id": { + "name": "game_hard_resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_structures_id": { + "name": "game_structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_vehicles_id": { + "name": "game_vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_npcs_id": { + "name": "game_npcs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "npc_staffing_id": { + "name": "npc_staffing_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "labor_classifications_id": { + "name": "labor_classifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_event_logs_id": { + "name": "game_event_logs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ranks_id": { + "name": "ranks_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "profiles_id": { + "name": "profiles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "awards_id": { + "name": "awards_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assignment_transfers_id": { + "name": "assignment_transfers_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "experience_id": { + "name": "experience_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "user_notifications_id": { + "name": "user_notifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "evaluations_id": { + "name": "evaluations_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ribbon_submissions_id": { + "name": "ribbon_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "missions_id": { + "name": "missions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mission_attendances_id": { + "name": "mission_attendances_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "factions_id": { + "name": "factions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shipments_id": { + "name": "shipments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bank_accounts_id": { + "name": "bank_accounts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bank_transactions_id": { + "name": "bank_transactions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ledger_entries_id": { + "name": "ledger_entries_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locker_storages_id": { + "name": "locker_storages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "loadouts_id": { + "name": "loadouts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_listings_id": { + "name": "market_listings_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_negotiations_id": { + "name": "market_negotiations_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_state_id": { + "name": "market_state_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voice_scripts_id": { + "name": "voice_scripts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voice_submissions_id": { + "name": "voice_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tickets_id": { + "name": "tickets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ticket_votes_id": { + "name": "ticket_votes_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_pages_id": { + "name": "wiki_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_revisions_id": { + "name": "wiki_revisions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_templates_id": { + "name": "wiki_templates_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "projects_id": { + "name": "projects_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sprints_id": { + "name": "sprints_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "releases_id": { + "name": "releases_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "labels_id": { + "name": "labels_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maps_id": { + "name": "maps_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_roads_id": { + "name": "map_roads_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_zones_id": { + "name": "map_zones_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resource_nodes_id": { + "name": "resource_nodes_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "narrative_events_id": { + "name": "narrative_events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "story_beats_id": { + "name": "story_beats_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "story_beat_states_id": { + "name": "story_beat_states_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mission_files_id": { + "name": "mission_files_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mod_lists_id": { + "name": "mod_lists_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_servers_id": { + "name": "game_servers_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "arma_sync_events_id": { + "name": "arma_sync_events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "arma_commands_id": { + "name": "arma_commands_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "respawn_tickets_id": { + "name": "respawn_tickets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_minefields_id": { + "name": "custom_minefields_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_minefield_scores_id": { + "name": "custom_minefield_scores_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_radio_tests_id": { + "name": "custom_radio_tests_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_radio_test_scores_id": { + "name": "custom_radio_test_scores_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "plugin_ai_instructions_id": { + "name": "plugin_ai_instructions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "payload_mcp_api_keys_id": { + "name": "payload_mcp_api_keys_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_locked_documents_rels_order_idx": { + "name": "payload_locked_documents_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_parent_idx": { + "name": "payload_locked_documents_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_path_idx": { + "name": "payload_locked_documents_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_media_id_idx": { + "name": "payload_locked_documents_rels_media_id_idx", + "columns": [ + { + "expression": "media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_hard_resources_id_idx": { + "name": "payload_locked_documents_rels_game_hard_resources_id_idx", + "columns": [ + { + "expression": "game_hard_resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_structures_id_idx": { + "name": "payload_locked_documents_rels_game_structures_id_idx", + "columns": [ + { + "expression": "game_structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_vehicles_id_idx": { + "name": "payload_locked_documents_rels_game_vehicles_id_idx", + "columns": [ + { + "expression": "game_vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_npcs_id_idx": { + "name": "payload_locked_documents_rels_game_npcs_id_idx", + "columns": [ + { + "expression": "game_npcs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_npc_staffing_id_idx": { + "name": "payload_locked_documents_rels_npc_staffing_id_idx", + "columns": [ + { + "expression": "npc_staffing_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_labor_classifications_id_idx": { + "name": "payload_locked_documents_rels_labor_classifications_id_idx", + "columns": [ + { + "expression": "labor_classifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_event_logs_id_idx": { + "name": "payload_locked_documents_rels_game_event_logs_id_idx", + "columns": [ + { + "expression": "game_event_logs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_users_id_idx": { + "name": "payload_locked_documents_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_roles_id_idx": { + "name": "payload_locked_documents_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ranks_id_idx": { + "name": "payload_locked_documents_rels_ranks_id_idx", + "columns": [ + { + "expression": "ranks_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_profiles_id_idx": { + "name": "payload_locked_documents_rels_profiles_id_idx", + "columns": [ + { + "expression": "profiles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_awards_id_idx": { + "name": "payload_locked_documents_rels_awards_id_idx", + "columns": [ + { + "expression": "awards_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_qualifications_id_idx": { + "name": "payload_locked_documents_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assignments_id_idx": { + "name": "payload_locked_documents_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assignment_transfers_id_idx": { + "name": "payload_locked_documents_rels_assignment_transfers_id_idx", + "columns": [ + { + "expression": "assignment_transfers_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_experience_id_idx": { + "name": "payload_locked_documents_rels_experience_id_idx", + "columns": [ + { + "expression": "experience_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_user_notifications_id_idx": { + "name": "payload_locked_documents_rels_user_notifications_id_idx", + "columns": [ + { + "expression": "user_notifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_evaluations_id_idx": { + "name": "payload_locked_documents_rels_evaluations_id_idx", + "columns": [ + { + "expression": "evaluations_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ribbon_submissions_id_idx": { + "name": "payload_locked_documents_rels_ribbon_submissions_id_idx", + "columns": [ + { + "expression": "ribbon_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_missions_id_idx": { + "name": "payload_locked_documents_rels_missions_id_idx", + "columns": [ + { + "expression": "missions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mission_attendances_id_idx": { + "name": "payload_locked_documents_rels_mission_attendances_id_idx", + "columns": [ + { + "expression": "mission_attendances_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_campaigns_id_idx": { + "name": "payload_locked_documents_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_factions_id_idx": { + "name": "payload_locked_documents_rels_factions_id_idx", + "columns": [ + { + "expression": "factions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_technologies_id_idx": { + "name": "payload_locked_documents_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assets_id_idx": { + "name": "payload_locked_documents_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_resources_id_idx": { + "name": "payload_locked_documents_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_vehicles_id_idx": { + "name": "payload_locked_documents_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_structures_id_idx": { + "name": "payload_locked_documents_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_shipments_id_idx": { + "name": "payload_locked_documents_rels_shipments_id_idx", + "columns": [ + { + "expression": "shipments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_bank_accounts_id_idx": { + "name": "payload_locked_documents_rels_bank_accounts_id_idx", + "columns": [ + { + "expression": "bank_accounts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_bank_transactions_id_idx": { + "name": "payload_locked_documents_rels_bank_transactions_id_idx", + "columns": [ + { + "expression": "bank_transactions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ledger_entries_id_idx": { + "name": "payload_locked_documents_rels_ledger_entries_id_idx", + "columns": [ + { + "expression": "ledger_entries_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_locker_storages_id_idx": { + "name": "payload_locked_documents_rels_locker_storages_id_idx", + "columns": [ + { + "expression": "locker_storages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_loadouts_id_idx": { + "name": "payload_locked_documents_rels_loadouts_id_idx", + "columns": [ + { + "expression": "loadouts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_listings_id_idx": { + "name": "payload_locked_documents_rels_market_listings_id_idx", + "columns": [ + { + "expression": "market_listings_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_negotiations_id_idx": { + "name": "payload_locked_documents_rels_market_negotiations_id_idx", + "columns": [ + { + "expression": "market_negotiations_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_state_id_idx": { + "name": "payload_locked_documents_rels_market_state_id_idx", + "columns": [ + { + "expression": "market_state_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_voice_scripts_id_idx": { + "name": "payload_locked_documents_rels_voice_scripts_id_idx", + "columns": [ + { + "expression": "voice_scripts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_voice_submissions_id_idx": { + "name": "payload_locked_documents_rels_voice_submissions_id_idx", + "columns": [ + { + "expression": "voice_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_tickets_id_idx": { + "name": "payload_locked_documents_rels_tickets_id_idx", + "columns": [ + { + "expression": "tickets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ticket_votes_id_idx": { + "name": "payload_locked_documents_rels_ticket_votes_id_idx", + "columns": [ + { + "expression": "ticket_votes_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_pages_id_idx": { + "name": "payload_locked_documents_rels_wiki_pages_id_idx", + "columns": [ + { + "expression": "wiki_pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_revisions_id_idx": { + "name": "payload_locked_documents_rels_wiki_revisions_id_idx", + "columns": [ + { + "expression": "wiki_revisions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_templates_id_idx": { + "name": "payload_locked_documents_rels_wiki_templates_id_idx", + "columns": [ + { + "expression": "wiki_templates_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_projects_id_idx": { + "name": "payload_locked_documents_rels_projects_id_idx", + "columns": [ + { + "expression": "projects_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_sprints_id_idx": { + "name": "payload_locked_documents_rels_sprints_id_idx", + "columns": [ + { + "expression": "sprints_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_releases_id_idx": { + "name": "payload_locked_documents_rels_releases_id_idx", + "columns": [ + { + "expression": "releases_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_labels_id_idx": { + "name": "payload_locked_documents_rels_labels_id_idx", + "columns": [ + { + "expression": "labels_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_maps_id_idx": { + "name": "payload_locked_documents_rels_maps_id_idx", + "columns": [ + { + "expression": "maps_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_map_roads_id_idx": { + "name": "payload_locked_documents_rels_map_roads_id_idx", + "columns": [ + { + "expression": "map_roads_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_map_zones_id_idx": { + "name": "payload_locked_documents_rels_map_zones_id_idx", + "columns": [ + { + "expression": "map_zones_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_resource_nodes_id_idx": { + "name": "payload_locked_documents_rels_resource_nodes_id_idx", + "columns": [ + { + "expression": "resource_nodes_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_narrative_events_id_idx": { + "name": "payload_locked_documents_rels_narrative_events_id_idx", + "columns": [ + { + "expression": "narrative_events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_story_beats_id_idx": { + "name": "payload_locked_documents_rels_story_beats_id_idx", + "columns": [ + { + "expression": "story_beats_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_story_beat_states_id_idx": { + "name": "payload_locked_documents_rels_story_beat_states_id_idx", + "columns": [ + { + "expression": "story_beat_states_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mission_files_id_idx": { + "name": "payload_locked_documents_rels_mission_files_id_idx", + "columns": [ + { + "expression": "mission_files_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mod_lists_id_idx": { + "name": "payload_locked_documents_rels_mod_lists_id_idx", + "columns": [ + { + "expression": "mod_lists_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_servers_id_idx": { + "name": "payload_locked_documents_rels_game_servers_id_idx", + "columns": [ + { + "expression": "game_servers_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_arma_sync_events_id_idx": { + "name": "payload_locked_documents_rels_arma_sync_events_id_idx", + "columns": [ + { + "expression": "arma_sync_events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_arma_commands_id_idx": { + "name": "payload_locked_documents_rels_arma_commands_id_idx", + "columns": [ + { + "expression": "arma_commands_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_respawn_tickets_id_idx": { + "name": "payload_locked_documents_rels_respawn_tickets_id_idx", + "columns": [ + { + "expression": "respawn_tickets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_minefields_id_idx": { + "name": "payload_locked_documents_rels_custom_minefields_id_idx", + "columns": [ + { + "expression": "custom_minefields_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_minefield_scores_id_idx": { + "name": "payload_locked_documents_rels_custom_minefield_scores_id_idx", + "columns": [ + { + "expression": "custom_minefield_scores_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_radio_tests_id_idx": { + "name": "payload_locked_documents_rels_custom_radio_tests_id_idx", + "columns": [ + { + "expression": "custom_radio_tests_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_radio_test_scores_i_idx": { + "name": "payload_locked_documents_rels_custom_radio_test_scores_i_idx", + "columns": [ + { + "expression": "custom_radio_test_scores_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_plugin_ai_instructions_id_idx": { + "name": "payload_locked_documents_rels_plugin_ai_instructions_id_idx", + "columns": [ + { + "expression": "plugin_ai_instructions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_payload_mcp_api_keys_id_idx": { + "name": "payload_locked_documents_rels_payload_mcp_api_keys_id_idx", + "columns": [ + { + "expression": "payload_mcp_api_keys_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_locked_documents_rels_parent_fk": { + "name": "payload_locked_documents_rels_parent_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_locked_documents", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_media_fk": { + "name": "payload_locked_documents_rels_media_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_hard_resources_fk": { + "name": "payload_locked_documents_rels_game_hard_resources_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_hard_resources", + "columnsFrom": [ + "game_hard_resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_structures_fk": { + "name": "payload_locked_documents_rels_game_structures_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_structures", + "columnsFrom": [ + "game_structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_vehicles_fk": { + "name": "payload_locked_documents_rels_game_vehicles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_vehicles", + "columnsFrom": [ + "game_vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_npcs_fk": { + "name": "payload_locked_documents_rels_game_npcs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_npcs", + "columnsFrom": [ + "game_npcs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_npc_staffing_fk": { + "name": "payload_locked_documents_rels_npc_staffing_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "npc_staffing", + "columnsFrom": [ + "npc_staffing_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_labor_classifications_fk": { + "name": "payload_locked_documents_rels_labor_classifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "labor_classifications", + "columnsFrom": [ + "labor_classifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_event_logs_fk": { + "name": "payload_locked_documents_rels_game_event_logs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_event_logs", + "columnsFrom": [ + "game_event_logs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_users_fk": { + "name": "payload_locked_documents_rels_users_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_roles_fk": { + "name": "payload_locked_documents_rels_roles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ranks_fk": { + "name": "payload_locked_documents_rels_ranks_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ranks", + "columnsFrom": [ + "ranks_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_profiles_fk": { + "name": "payload_locked_documents_rels_profiles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "profiles", + "columnsFrom": [ + "profiles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_awards_fk": { + "name": "payload_locked_documents_rels_awards_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "awards", + "columnsFrom": [ + "awards_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_qualifications_fk": { + "name": "payload_locked_documents_rels_qualifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assignments_fk": { + "name": "payload_locked_documents_rels_assignments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assignment_transfers_fk": { + "name": "payload_locked_documents_rels_assignment_transfers_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assignment_transfers", + "columnsFrom": [ + "assignment_transfers_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_experience_fk": { + "name": "payload_locked_documents_rels_experience_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "experience", + "columnsFrom": [ + "experience_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_user_notifications_fk": { + "name": "payload_locked_documents_rels_user_notifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "user_notifications", + "columnsFrom": [ + "user_notifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_evaluations_fk": { + "name": "payload_locked_documents_rels_evaluations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "evaluations", + "columnsFrom": [ + "evaluations_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ribbon_submissions_fk": { + "name": "payload_locked_documents_rels_ribbon_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ribbon_submissions", + "columnsFrom": [ + "ribbon_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_missions_fk": { + "name": "payload_locked_documents_rels_missions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "missions", + "columnsFrom": [ + "missions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mission_attendances_fk": { + "name": "payload_locked_documents_rels_mission_attendances_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mission_attendances", + "columnsFrom": [ + "mission_attendances_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_campaigns_fk": { + "name": "payload_locked_documents_rels_campaigns_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_factions_fk": { + "name": "payload_locked_documents_rels_factions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "factions", + "columnsFrom": [ + "factions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_technologies_fk": { + "name": "payload_locked_documents_rels_technologies_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assets_fk": { + "name": "payload_locked_documents_rels_assets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_resources_fk": { + "name": "payload_locked_documents_rels_resources_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_vehicles_fk": { + "name": "payload_locked_documents_rels_vehicles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_structures_fk": { + "name": "payload_locked_documents_rels_structures_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_shipments_fk": { + "name": "payload_locked_documents_rels_shipments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "shipments", + "columnsFrom": [ + "shipments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_bank_accounts_fk": { + "name": "payload_locked_documents_rels_bank_accounts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "bank_accounts", + "columnsFrom": [ + "bank_accounts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_bank_transactions_fk": { + "name": "payload_locked_documents_rels_bank_transactions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "bank_transactions", + "columnsFrom": [ + "bank_transactions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ledger_entries_fk": { + "name": "payload_locked_documents_rels_ledger_entries_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ledger_entries", + "columnsFrom": [ + "ledger_entries_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_locker_storages_fk": { + "name": "payload_locked_documents_rels_locker_storages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "locker_storages", + "columnsFrom": [ + "locker_storages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_loadouts_fk": { + "name": "payload_locked_documents_rels_loadouts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "loadouts", + "columnsFrom": [ + "loadouts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_listings_fk": { + "name": "payload_locked_documents_rels_market_listings_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_listings", + "columnsFrom": [ + "market_listings_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_negotiations_fk": { + "name": "payload_locked_documents_rels_market_negotiations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_negotiations", + "columnsFrom": [ + "market_negotiations_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_state_fk": { + "name": "payload_locked_documents_rels_market_state_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_state", + "columnsFrom": [ + "market_state_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_voice_scripts_fk": { + "name": "payload_locked_documents_rels_voice_scripts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "voice_scripts", + "columnsFrom": [ + "voice_scripts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_voice_submissions_fk": { + "name": "payload_locked_documents_rels_voice_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "voice_submissions", + "columnsFrom": [ + "voice_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_tickets_fk": { + "name": "payload_locked_documents_rels_tickets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "tickets", + "columnsFrom": [ + "tickets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ticket_votes_fk": { + "name": "payload_locked_documents_rels_ticket_votes_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ticket_votes", + "columnsFrom": [ + "ticket_votes_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_pages_fk": { + "name": "payload_locked_documents_rels_wiki_pages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_pages", + "columnsFrom": [ + "wiki_pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_revisions_fk": { + "name": "payload_locked_documents_rels_wiki_revisions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_revisions", + "columnsFrom": [ + "wiki_revisions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_templates_fk": { + "name": "payload_locked_documents_rels_wiki_templates_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_templates", + "columnsFrom": [ + "wiki_templates_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_projects_fk": { + "name": "payload_locked_documents_rels_projects_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "projects", + "columnsFrom": [ + "projects_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_sprints_fk": { + "name": "payload_locked_documents_rels_sprints_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "sprints", + "columnsFrom": [ + "sprints_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_releases_fk": { + "name": "payload_locked_documents_rels_releases_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "releases", + "columnsFrom": [ + "releases_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_labels_fk": { + "name": "payload_locked_documents_rels_labels_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "labels", + "columnsFrom": [ + "labels_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_maps_fk": { + "name": "payload_locked_documents_rels_maps_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "maps", + "columnsFrom": [ + "maps_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_map_roads_fk": { + "name": "payload_locked_documents_rels_map_roads_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "map_roads", + "columnsFrom": [ + "map_roads_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_map_zones_fk": { + "name": "payload_locked_documents_rels_map_zones_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "map_zones", + "columnsFrom": [ + "map_zones_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_resource_nodes_fk": { + "name": "payload_locked_documents_rels_resource_nodes_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "resource_nodes", + "columnsFrom": [ + "resource_nodes_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_narrative_events_fk": { + "name": "payload_locked_documents_rels_narrative_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "narrative_events", + "columnsFrom": [ + "narrative_events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_story_beats_fk": { + "name": "payload_locked_documents_rels_story_beats_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "story_beats", + "columnsFrom": [ + "story_beats_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_story_beat_states_fk": { + "name": "payload_locked_documents_rels_story_beat_states_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "story_beat_states", + "columnsFrom": [ + "story_beat_states_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mission_files_fk": { + "name": "payload_locked_documents_rels_mission_files_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mission_files", + "columnsFrom": [ + "mission_files_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mod_lists_fk": { + "name": "payload_locked_documents_rels_mod_lists_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mod_lists", + "columnsFrom": [ + "mod_lists_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_servers_fk": { + "name": "payload_locked_documents_rels_game_servers_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_servers", + "columnsFrom": [ + "game_servers_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_arma_sync_events_fk": { + "name": "payload_locked_documents_rels_arma_sync_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "arma_sync_events", + "columnsFrom": [ + "arma_sync_events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_arma_commands_fk": { + "name": "payload_locked_documents_rels_arma_commands_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "arma_commands", + "columnsFrom": [ + "arma_commands_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_respawn_tickets_fk": { + "name": "payload_locked_documents_rels_respawn_tickets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "respawn_tickets", + "columnsFrom": [ + "respawn_tickets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_minefields_fk": { + "name": "payload_locked_documents_rels_custom_minefields_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_minefields", + "columnsFrom": [ + "custom_minefields_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_minefield_scores_fk": { + "name": "payload_locked_documents_rels_custom_minefield_scores_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_minefield_scores", + "columnsFrom": [ + "custom_minefield_scores_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_radio_tests_fk": { + "name": "payload_locked_documents_rels_custom_radio_tests_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_radio_tests", + "columnsFrom": [ + "custom_radio_tests_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_radio_test_scores_fk": { + "name": "payload_locked_documents_rels_custom_radio_test_scores_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_radio_test_scores", + "columnsFrom": [ + "custom_radio_test_scores_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_plugin_ai_instructions_fk": { + "name": "payload_locked_documents_rels_plugin_ai_instructions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "plugin_ai_instructions", + "columnsFrom": [ + "plugin_ai_instructions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_payload_mcp_api_keys_fk": { + "name": "payload_locked_documents_rels_payload_mcp_api_keys_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_mcp_api_keys", + "columnsFrom": [ + "payload_mcp_api_keys_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences": { + "name": "payload_preferences", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "value": { + "name": "value", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_preferences_key_idx": { + "name": "payload_preferences_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_updated_at_idx": { + "name": "payload_preferences_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_created_at_idx": { + "name": "payload_preferences_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences_rels": { + "name": "payload_preferences_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "payload_mcp_api_keys_id": { + "name": "payload_mcp_api_keys_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_preferences_rels_order_idx": { + "name": "payload_preferences_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_parent_idx": { + "name": "payload_preferences_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_path_idx": { + "name": "payload_preferences_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_users_id_idx": { + "name": "payload_preferences_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_payload_mcp_api_keys_id_idx": { + "name": "payload_preferences_rels_payload_mcp_api_keys_id_idx", + "columns": [ + { + "expression": "payload_mcp_api_keys_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_preferences_rels_parent_fk": { + "name": "payload_preferences_rels_parent_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_preferences", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_users_fk": { + "name": "payload_preferences_rels_users_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_payload_mcp_api_keys_fk": { + "name": "payload_preferences_rels_payload_mcp_api_keys_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_mcp_api_keys", + "columnsFrom": [ + "payload_mcp_api_keys_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_migrations": { + "name": "payload_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "batch": { + "name": "batch", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_migrations_updated_at_idx": { + "name": "payload_migrations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_migrations_created_at_idx": { + "name": "payload_migrations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_rules": { + "name": "game_rules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "main_currency_id": { + "name": "main_currency_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "currency_name": { + "name": "currency_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_symbol": { + "name": "currency_symbol", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_singular": { + "name": "currency_singular", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_plural": { + "name": "currency_plural", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_denomination": { + "name": "currency_denomination", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "proximity_threshold": { + "name": "proximity_threshold", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1000 + }, + "game_tick_interval_minutes": { + "name": "game_tick_interval_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "locker_grid_width": { + "name": "locker_grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "locker_grid_height": { + "name": "locker_grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 6 + }, + "staff_hiring_enabled": { + "name": "staff_hiring_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "staff_hiring_disabled_message": { + "name": "staff_hiring_disabled_message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "economy_default_price_band": { + "name": "economy_default_price_band", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.5 + }, + "economy_real_demand_window_ticks": { + "name": "economy_real_demand_window_ticks", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 24 + }, + "economy_real_demand_decay": { + "name": "economy_real_demand_decay", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.5 + }, + "economy_artificial_demand_drift": { + "name": "economy_artificial_demand_drift", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.05 + }, + "economy_cold_start_observations": { + "name": "economy_cold_start_observations", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 5 + }, + "economy_tick_interval_hint_minutes": { + "name": "economy_tick_interval_hint_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 60 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_rules_main_currency_idx": { + "name": "game_rules_main_currency_idx", + "columns": [ + { + "expression": "main_currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_rules_main_currency_id_resources_id_fk": { + "name": "game_rules_main_currency_id_resources_id_fk", + "tableFrom": "game_rules", + "tableTo": "resources", + "columnsFrom": [ + "main_currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_rules_rels": { + "name": "game_rules_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_rules_rels_order_idx": { + "name": "game_rules_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_parent_idx": { + "name": "game_rules_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_path_idx": { + "name": "game_rules_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_assignments_id_idx": { + "name": "game_rules_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_rules_rels_parent_fk": { + "name": "game_rules_rels_parent_fk", + "tableFrom": "game_rules_rels", + "tableTo": "game_rules", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "game_rules_rels_assignments_fk": { + "name": "game_rules_rels_assignments_fk", + "tableFrom": "game_rules_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_shims_targeting_roles": { + "name": "shims_shims_targeting_roles", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_shims_shims_targeting_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "shims_shims_targeting_roles_order_idx": { + "name": "shims_shims_targeting_roles_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_targeting_roles_parent_idx": { + "name": "shims_shims_targeting_roles_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_shims_targeting_roles_parent_fk": { + "name": "shims_shims_targeting_roles_parent_fk", + "tableFrom": "shims_shims_targeting_roles", + "tableTo": "shims_shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_shims": { + "name": "shims_shims", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "type": { + "name": "type", + "type": "enum_shims_shims_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'css'" + }, + "content": { + "name": "content", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "targeting_audience": { + "name": "targeting_audience", + "type": "enum_shims_shims_targeting_audience", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'all'" + }, + "targeting_percentage": { + "name": "targeting_percentage", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "paths_match_type": { + "name": "paths_match_type", + "type": "enum_shims_shims_paths_match_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'all'" + } + }, + "indexes": { + "shims_shims_order_idx": { + "name": "shims_shims_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_parent_id_idx": { + "name": "shims_shims_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_name_idx": { + "name": "shims_shims_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_shims_parent_id_fk": { + "name": "shims_shims_parent_id_fk", + "tableFrom": "shims_shims", + "tableTo": "shims", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims": { + "name": "shims", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_texts": { + "name": "shims_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shims_texts_order_parent": { + "name": "shims_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_texts_parent_fk": { + "name": "shims_texts_parent_fk", + "tableFrom": "shims_texts", + "tableTo": "shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_rels": { + "name": "shims_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shims_rels_order_idx": { + "name": "shims_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_parent_idx": { + "name": "shims_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_path_idx": { + "name": "shims_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_users_id_idx": { + "name": "shims_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_rels_parent_fk": { + "name": "shims_rels_parent_fk", + "tableFrom": "shims_rels", + "tableTo": "shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shims_rels_users_fk": { + "name": "shims_rels_users_fk", + "tableFrom": "shims_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.enum_game_structures_staff_positions_position_type": { + "name": "enum_game_structures_staff_positions_position_type", + "schema": "public", + "values": [ + "administrative", + "technical", + "other" + ] + }, + "public.enum_game_structures_construction_status": { + "name": "enum_game_structures_construction_status", + "schema": "public", + "values": [ + "awaiting_materials", + "building", + "complete" + ] + }, + "public.enum_game_vehicles_status": { + "name": "enum_game_vehicles_status", + "schema": "public", + "values": [ + "idle", + "assigned", + "in_transit", + "damaged", + "destroyed" + ] + }, + "public.enum_npc_staffing_position_type": { + "name": "enum_npc_staffing_position_type", + "schema": "public", + "values": [ + "labor", + "administrative", + "technical", + "other" + ] + }, + "public.enum_npc_staffing_status": { + "name": "enum_npc_staffing_status", + "schema": "public", + "values": [ + "active", + "terminated" + ] + }, + "public.enum_game_event_logs_target_collection": { + "name": "enum_game_event_logs_target_collection", + "schema": "public", + "values": [ + "game-structures", + "game-vehicles", + "game-npcs", + "npc-staffing", + "structures", + "resources", + "assets", + "vehicles", + "factions", + "missions", + "campaigns", + "users", + "technologies", + "maps", + "shipments", + "bank-accounts", + "bank-transactions", + "ledger-entries", + "locker-storages", + "loadouts", + "market-listings", + "market-negotiations", + "market-state", + "evaluations", + "tickets", + "wiki-pages", + "wiki-revisions", + "wiki-templates", + "game-servers", + "assignment-transfers", + "voice-scripts", + "voice-submissions", + "story-beats", + "story-beat-states", + "custom-minefields", + "custom-minefield-scores", + "custom-radio-tests", + "custom-radio-test-scores", + "ribbon-submissions" + ] + }, + "public.enum_users_roles": { + "name": "enum_users_roles", + "schema": "public", + "values": [ + "guest", + "user", + "trusted", + "admin", + "developer" + ] + }, + "public.enum_users_preferences_notifications_muted_types": { + "name": "enum_users_preferences_notifications_muted_types", + "schema": "public", + "values": [ + "market:offer", + "market:counter", + "market:accept", + "market:reject", + "market:withdrawn", + "market:closed", + "market:sold", + "market:expired", + "award:granted", + "account:discord-request", + "finance:deposit", + "finance:withdraw", + "finance:transfer", + "shipment:completed", + "ticket:created", + "ticket:assigned", + "ticket:reply", + "ticket:status", + "poker:force-ended", + "poker:everyone-left", + "blackjack:force-ended", + "blackjack:everyone-left" + ] + }, + "public.enum_users_preferences_discord_muted_types": { + "name": "enum_users_preferences_discord_muted_types", + "schema": "public", + "values": [ + "market:offer", + "market:counter", + "market:accept", + "market:reject", + "market:withdrawn", + "market:closed", + "market:sold", + "market:expired", + "award:granted", + "account:discord-request", + "finance:deposit", + "finance:withdraw", + "finance:transfer", + "shipment:completed", + "ticket:created", + "ticket:assigned", + "ticket:reply", + "ticket:status", + "poker:force-ended", + "poker:everyone-left", + "blackjack:force-ended", + "blackjack:everyone-left" + ] + }, + "public.enum_users_preferences_display_lead_or_actual": { + "name": "enum_users_preferences_display_lead_or_actual", + "schema": "public", + "values": [ + "lead", + "actual" + ] + }, + "public.enum_roles_permissions": { + "name": "enum_roles_permissions", + "schema": "public", + "values": [ + "system:admin-access", + "media:create", + "media:read", + "media:update", + "media:delete", + "admin:media:manage", + "users:create", + "users:read", + "users:update", + "users:delete", + "users:unlock", + "users:assign-roles", + "admin:users:manage", + "roles:create", + "roles:read", + "roles:update", + "roles:delete", + "admin:roles:manage", + "ranks:create", + "ranks:read", + "ranks:update", + "ranks:delete", + "admin:ranks:manage", + "profiles:create", + "profiles:read", + "profiles:update", + "profiles:delete", + "admin:profiles:manage", + "awards:create", + "awards:read", + "awards:update", + "awards:delete", + "admin:awards:manage", + "qualifications:create", + "qualifications:read", + "qualifications:update", + "qualifications:delete", + "admin:qualifications:manage", + "assignments:create", + "assignments:read", + "assignments:update", + "assignments:delete", + "admin:assignments:manage", + "assignment-transfers:create", + "assignment-transfers:read", + "assignment-transfers:update", + "assignment-transfers:delete", + "admin:assignment-transfers:manage", + "experience:create", + "experience:read", + "experience:update", + "experience:delete", + "admin:experience:manage", + "user-notifications:create", + "user-notifications:read", + "user-notifications:update", + "user-notifications:delete", + "admin:user-notifications:manage", + "evaluations:create", + "evaluations:read", + "evaluations:update", + "evaluations:delete", + "admin:evaluations:manage", + "missions:create", + "missions:read", + "missions:update", + "missions:delete", + "missions:read-sensitive", + "admin:missions:manage", + "mission-attendances:create", + "mission-attendances:read", + "mission-attendances:update", + "mission-attendances:delete", + "admin:mission-attendances:manage", + "campaigns:create", + "campaigns:read", + "campaigns:update", + "campaigns:delete", + "admin:campaigns:manage", + "campaigns:manage", + "factions:create", + "factions:read", + "factions:update", + "factions:delete", + "admin:factions:manage", + "technologies:create", + "technologies:read", + "technologies:update", + "technologies:delete", + "admin:technologies:manage", + "assets:create", + "assets:read", + "assets:update", + "assets:delete", + "admin:assets:manage", + "resources:create", + "resources:read", + "resources:update", + "resources:delete", + "admin:resources:manage", + "vehicles:create", + "vehicles:read", + "vehicles:update", + "vehicles:delete", + "admin:vehicles:manage", + "structures:create", + "structures:read", + "structures:update", + "structures:delete", + "admin:structures:manage", + "shipments:create", + "shipments:read", + "shipments:update", + "shipments:delete", + "admin:shipments:manage", + "bank-accounts:create", + "bank-accounts:read", + "bank-accounts:update", + "bank-accounts:delete", + "admin:bank-accounts:manage", + "bank-transactions:create", + "bank-transactions:read", + "bank-transactions:update", + "bank-transactions:delete", + "admin:bank-transactions:manage", + "ledger-entries:create", + "ledger-entries:read", + "ledger-entries:update", + "ledger-entries:delete", + "admin:ledger-entries:manage", + "locker-storages:create", + "locker-storages:read", + "locker-storages:update", + "locker-storages:delete", + "admin:locker-storages:manage", + "loadouts:create", + "loadouts:read", + "loadouts:update", + "loadouts:delete", + "admin:loadouts:manage", + "market-listings:create", + "market-listings:read", + "market-listings:update", + "market-listings:delete", + "admin:market-listings:manage", + "market-negotiations:create", + "market-negotiations:read", + "market-negotiations:update", + "market-negotiations:delete", + "admin:market-negotiations:manage", + "market-state:create", + "market-state:read", + "market-state:update", + "market-state:delete", + "admin:market-state:manage", + "projects:create", + "projects:read", + "projects:update", + "projects:delete", + "admin:projects:manage", + "labels:create", + "labels:read", + "labels:update", + "labels:delete", + "admin:labels:manage", + "sprints:create", + "sprints:read", + "sprints:update", + "sprints:delete", + "admin:sprints:manage", + "releases:create", + "releases:read", + "releases:update", + "releases:delete", + "admin:releases:manage", + "tickets:create", + "tickets:read", + "tickets:update", + "tickets:delete", + "admin:tickets:manage", + "ticket-votes:create", + "ticket-votes:read", + "ticket-votes:update", + "ticket-votes:delete", + "admin:ticket-votes:manage", + "game-structures:create", + "game-structures:read", + "game-structures:update", + "game-structures:delete", + "admin:game-structures:manage", + "game-vehicles:create", + "game-vehicles:read", + "game-vehicles:update", + "game-vehicles:delete", + "admin:game-vehicles:manage", + "game-npcs:create", + "game-npcs:read", + "game-npcs:update", + "game-npcs:delete", + "admin:game-npcs:manage", + "game-hard-resources:create", + "game-hard-resources:read", + "game-hard-resources:update", + "game-hard-resources:delete", + "admin:game-hard-resources:manage", + "game-event-logs:create", + "game-event-logs:read", + "game-event-logs:update", + "game-event-logs:delete", + "admin:game-event-logs:manage", + "maps:create", + "maps:read", + "maps:update", + "maps:delete", + "admin:maps:manage", + "map-roads:read", + "admin:map-roads:manage", + "map-zones:read", + "admin:map-zones:manage", + "resource-nodes:read", + "admin:resource-nodes:manage", + "narrative-events:create", + "narrative-events:read", + "narrative-events:update", + "narrative-events:delete", + "admin:narrative-events:manage", + "mission-files:create", + "mission-files:read", + "mission-files:update", + "mission-files:delete", + "admin:mission-files:manage", + "mod-lists:create", + "mod-lists:read", + "mod-lists:update", + "mod-lists:delete", + "admin:mod-lists:manage", + "game-servers:create", + "game-servers:read", + "game-servers:update", + "game-servers:delete", + "admin:game-servers:manage", + "arma-sync-events:create", + "arma-sync-events:read", + "arma-sync-events:update", + "arma-sync-events:delete", + "admin:arma-sync-events:manage", + "arma-commands:create", + "arma-commands:read", + "arma-commands:update", + "arma-commands:delete", + "admin:arma-commands:manage", + "game-rules:read", + "game-rules:update", + "shims:read", + "shims:update", + "logistics:manage", + "intelligence:manage", + "profiles:intel_excerpt:update", + "banking:manage", + "tickets:staff", + "discord:staff", + "discord:announce", + "custom-minefields:update", + "custom-minefields:delete", + "custom-minefield-scores:delete", + "custom-radio-tests:update", + "custom-radio-tests:delete", + "custom-radio-test-scores:delete" + ] + }, + "public.enum_awards_grant_config_allowed_grantor_assignment_types": { + "name": "enum_awards_grant_config_allowed_grantor_assignment_types", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_awards_type": { + "name": "enum_awards_type", + "schema": "public", + "values": [ + "commendation", + "ribbon", + "medal" + ] + }, + "public.enum_awards_grant_config_recipient_scope": { + "name": "enum_awards_grant_config_recipient_scope", + "schema": "public", + "values": [ + "same_command", + "whitelist", + "anyone" + ] + }, + "public.enum_assignments_type": { + "name": "enum_assignments_type", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_assignment_transfers_status": { + "name": "enum_assignment_transfers_status", + "schema": "public", + "values": [ + "pending", + "rejected", + "awaiting_superuser", + "completed", + "cancelled", + "denied" + ] + }, + "public.enum_assignment_transfers_escalation_reason": { + "name": "enum_assignment_transfers_escalation_reason", + "schema": "public", + "values": [ + "no_leaders", + "appeal", + "leader_changed" + ] + }, + "public.enum_assignment_transfers_from_leader_decision": { + "name": "enum_assignment_transfers_from_leader_decision", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected", + "not_required" + ] + }, + "public.enum_assignment_transfers_to_leader_decision": { + "name": "enum_assignment_transfers_to_leader_decision", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected", + "not_required" + ] + }, + "public.enum_evaluations_kind": { + "name": "enum_evaluations_kind", + "schema": "public", + "values": [ + "leader-direct", + "leader-indirect", + "subordinate" + ] + }, + "public.enum_evaluations_level": { + "name": "enum_evaluations_level", + "schema": "public", + "values": [ + "exceptional", + "excellent", + "proficient", + "adequate", + "moderate", + "under-review" + ] + }, + "public.enum_ribbon_submissions_grantor_types": { + "name": "enum_ribbon_submissions_grantor_types", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_ribbon_submissions_status": { + "name": "enum_ribbon_submissions_status", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected" + ] + }, + "public.enum_ribbon_submissions_recipient_scope": { + "name": "enum_ribbon_submissions_recipient_scope", + "schema": "public", + "values": [ + "same_command", + "whitelist", + "anyone" + ] + }, + "public.enum_missions_factions_involved_threat_level": { + "name": "enum_missions_factions_involved_threat_level", + "schema": "public", + "values": [ + "ally", + "friendly", + "neutral", + "hostile" + ] + }, + "public.enum_missions_logistics_and_support_insertion": { + "name": "enum_missions_logistics_and_support_insertion", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_logistics_and_support_extraction": { + "name": "enum_missions_logistics_and_support_extraction", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_operation_type": { + "name": "enum_missions_operation_type", + "schema": "public", + "values": [ + "main", + "side", + "external" + ] + }, + "public.enum_missions_classification_mission_type": { + "name": "enum_missions_classification_mission_type", + "schema": "public", + "values": [ + "Zeus", + "PvE", + "PvP", + "PvPvE", + "Training", + "Special" + ] + }, + "public.enum_missions_ownership_and_status_status": { + "name": "enum_missions_ownership_and_status_status", + "schema": "public", + "values": [ + "Concept", + "Planning", + "Ready", + "Scheduled", + "Active", + "Completed", + "Cancelled" + ] + }, + "public.enum_missions_ownership_and_status_visibility": { + "name": "enum_missions_ownership_and_status_visibility", + "schema": "public", + "values": [ + "unit", + "leadership", + "intel", + "private" + ] + }, + "public.enum_missions_civilian_presence": { + "name": "enum_missions_civilian_presence", + "schema": "public", + "values": [ + "None", + "Low", + "Medium", + "High" + ] + }, + "public.enum_mission_attendances_response": { + "name": "enum_mission_attendances_response", + "schema": "public", + "values": [ + "yes", + "no", + "tentative" + ] + }, + "public.enum_campaigns_status": { + "name": "enum_campaigns_status", + "schema": "public", + "values": [ + "concept", + "inProgress", + "completed" + ] + }, + "public.enum_campaigns_campaign_mode": { + "name": "enum_campaigns_campaign_mode", + "schema": "public", + "values": [ + "official", + "custom" + ] + }, + "public.enum_factions_type": { + "name": "enum_factions_type", + "schema": "public", + "values": [ + "playerFaction", + "majorFaction", + "minorFaction", + "corporation", + "special" + ] + }, + "public.enum_technologies_approval_status": { + "name": "enum_technologies_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_technologies_type": { + "name": "enum_technologies_type", + "schema": "public", + "values": [ + "asset", + "upgrade" + ] + }, + "public.enum_assets_skin_configuration_applies_to_asset_types": { + "name": "enum_assets_skin_configuration_applies_to_asset_types", + "schema": "public", + "values": [ + "weapon", + "uniform", + "vest", + "backpack", + "helmet" + ] + }, + "public.enum_assets_approval_status": { + "name": "enum_assets_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_assets_asset_type": { + "name": "enum_assets_asset_type", + "schema": "public", + "values": [ + "weapon", + "magazine", + "optic", + "muzzle", + "bipod", + "uniform", + "vest", + "backpack", + "helmet", + "facewear", + "nvg", + "radio", + "medical", + "tool", + "explosive", + "skin", + "miscellaneous" + ] + }, + "public.enum_assets_weapon_configuration_slot_type": { + "name": "enum_assets_weapon_configuration_slot_type", + "schema": "public", + "values": [ + "primary", + "secondary", + "launcher" + ] + }, + "public.enum_assets_nightvision_configuration_nvg_generation": { + "name": "enum_assets_nightvision_configuration_nvg_generation", + "schema": "public", + "values": [ + "gen1", + "gen2", + "gen3" + ] + }, + "public.enum_assets_market_trading_rarity": { + "name": "enum_assets_market_trading_rarity", + "schema": "public", + "values": [ + "basic", + "common", + "uncommon", + "rare", + "veryRare", + "epic", + "legendary", + "unique" + ] + }, + "public.enum_resources_approval_status": { + "name": "enum_resources_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_resources_type": { + "name": "enum_resources_type", + "schema": "public", + "values": [ + "physical", + "fluid", + "energy", + "abstract" + ] + }, + "public.enum_resources_rarity": { + "name": "enum_resources_rarity", + "schema": "public", + "values": [ + "common", + "uncommon", + "rare", + "epic", + "legendary", + "exotic", + "unique" + ] + }, + "public.enum_vehicles_category": { + "name": "enum_vehicles_category", + "schema": "public", + "values": [ + "civilian", + "utility", + "transport", + "weaponized", + "military" + ] + }, + "public.enum_vehicles_pylons_pylon_type": { + "name": "enum_vehicles_pylons_pylon_type", + "schema": "public", + "values": [ + "mountedWeapon", + "pylon" + ] + }, + "public.enum_vehicles_approval_status": { + "name": "enum_vehicles_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_vehicles_transport_mode": { + "name": "enum_vehicles_transport_mode", + "schema": "public", + "values": [ + "ground", + "air", + "sea" + ] + }, + "public.enum_vehicles_armor_rating": { + "name": "enum_vehicles_armor_rating", + "schema": "public", + "values": [ + "none", + "light", + "medium", + "heavy", + "composite" + ] + }, + "public.enum_structures_staff_positions_position_type": { + "name": "enum_structures_staff_positions_position_type", + "schema": "public", + "values": [ + "administrative", + "technical", + "other" + ] + }, + "public.enum_structures_approval_status": { + "name": "enum_structures_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_structures_category": { + "name": "enum_structures_category", + "schema": "public", + "values": [ + "logistics", + "military", + "civilian" + ] + }, + "public.enum_structures_terrain_type": { + "name": "enum_structures_terrain_type", + "schema": "public", + "values": [ + "land", + "water" + ] + }, + "public.enum_structures_function_type": { + "name": "enum_structures_function_type", + "schema": "public", + "values": [ + "producer", + "storage", + "sensor", + "converter", + "defense", + "miscellaneous" + ] + }, + "public.enum_shipments_status": { + "name": "enum_shipments_status", + "schema": "public", + "values": [ + "pending", + "dispatched", + "in_transit", + "arrived", + "completed", + "cancelled", + "failed", + "stranded" + ] + }, + "public.enum_bank_accounts_account_type": { + "name": "enum_bank_accounts_account_type", + "schema": "public", + "values": [ + "treasury", + "faction", + "personal" + ] + }, + "public.enum_bank_accounts_status": { + "name": "enum_bank_accounts_status", + "schema": "public", + "values": [ + "open", + "frozen", + "closed" + ] + }, + "public.enum_bank_transactions_type": { + "name": "enum_bank_transactions_type", + "schema": "public", + "values": [ + "deposit", + "withdrawal", + "transfer", + "payment", + "fee", + "salary", + "adjustment" + ] + }, + "public.enum_bank_transactions_status": { + "name": "enum_bank_transactions_status", + "schema": "public", + "values": [ + "completed", + "reversed" + ] + }, + "public.enum_ledger_entries_type": { + "name": "enum_ledger_entries_type", + "schema": "public", + "values": [ + "deposit", + "withdrawal", + "transfer", + "payment", + "fee", + "salary", + "adjustment" + ] + }, + "public.enum_market_listings_status": { + "name": "enum_market_listings_status", + "schema": "public", + "values": [ + "active", + "sold", + "cancelled", + "expired" + ] + }, + "public.enum_market_negotiations_history_from": { + "name": "enum_market_negotiations_history_from", + "schema": "public", + "values": [ + "buyer", + "seller" + ] + }, + "public.enum_market_negotiations_status": { + "name": "enum_market_negotiations_status", + "schema": "public", + "values": [ + "open", + "accepted", + "rejected", + "closed", + "cancelled", + "expired" + ] + }, + "public.enum_market_negotiations_proposed_by": { + "name": "enum_market_negotiations_proposed_by", + "schema": "public", + "values": [ + "buyer", + "seller" + ] + }, + "public.enum_market_state_item_type": { + "name": "enum_market_state_item_type", + "schema": "public", + "values": [ + "resource", + "asset" + ] + }, + "public.enum_voice_scripts_status": { + "name": "enum_voice_scripts_status", + "schema": "public", + "values": [ + "draft", + "open", + "closed" + ] + }, + "public.enum_voice_submissions_status": { + "name": "enum_voice_submissions_status", + "schema": "public", + "values": [ + "pending", + "accepted", + "rejected" + ] + }, + "public.enum_tickets_activity_type": { + "name": "enum_tickets_activity_type", + "schema": "public", + "values": [ + "system", + "agent_message", + "client_message" + ] + }, + "public.enum_tickets_category": { + "name": "enum_tickets_category", + "schema": "public", + "values": [ + "bug_report", + "feature_request", + "support_request", + "other" + ] + }, + "public.enum_tickets_priority": { + "name": "enum_tickets_priority", + "schema": "public", + "values": [ + "low", + "medium", + "high", + "critical" + ] + }, + "public.enum_tickets_status": { + "name": "enum_tickets_status", + "schema": "public", + "values": [ + "open", + "in_review", + "planning", + "in_progress", + "waiting_on_reporter", + "in_testing", + "resolved", + "canceled", + "closed" + ] + }, + "public.enum_tickets_type": { + "name": "enum_tickets_type", + "schema": "public", + "values": [ + "task", + "bug", + "story", + "epic", + "improvement" + ] + }, + "public.enum_tickets_resolution": { + "name": "enum_tickets_resolution", + "schema": "public", + "values": [ + "fixed", + "wontfix", + "duplicate", + "invalid" + ] + }, + "public.enum_wiki_pages_category": { + "name": "enum_wiki_pages_category", + "schema": "public", + "values": [ + "Campaign", + "World", + "Lore", + "Characters", + "Plot", + "Media", + "Guides", + "Meta" + ] + }, + "public.enum_wiki_revisions_type": { + "name": "enum_wiki_revisions_type", + "schema": "public", + "values": [ + "create", + "edit", + "restore" + ] + }, + "public.enum_projects_status": { + "name": "enum_projects_status", + "schema": "public", + "values": [ + "active", + "archived" + ] + }, + "public.enum_sprints_status": { + "name": "enum_sprints_status", + "schema": "public", + "values": [ + "planning", + "active", + "completed" + ] + }, + "public.enum_releases_status": { + "name": "enum_releases_status", + "schema": "public", + "values": [ + "draft", + "in_progress", + "released" + ] + }, + "public.enum_maps_basemap_mode": { + "name": "enum_maps_basemap_mode", + "schema": "public", + "values": [ + "image", + "tiles" + ] + }, + "public.enum_map_roads_surface": { + "name": "enum_map_roads_surface", + "schema": "public", + "values": [ + "paved", + "dirt", + "trail" + ] + }, + "public.enum_map_roads_stroke_style": { + "name": "enum_map_roads_stroke_style", + "schema": "public", + "values": [ + "solid", + "dashed", + "dotted" + ] + }, + "public.enum_map_zones_type": { + "name": "enum_map_zones_type", + "schema": "public", + "values": [ + "water", + "land", + "territory", + "border", + "other" + ] + }, + "public.enum_narrative_events_triggers_type": { + "name": "enum_narrative_events_triggers_type", + "schema": "public", + "values": [ + "manual", + "mission_complete", + "timer", + "condition" + ] + }, + "public.enum_story_beats_status": { + "name": "enum_story_beats_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum_story_beat_states_reaction": { + "name": "enum_story_beat_states_reaction", + "schema": "public", + "values": [ + "like", + "heart", + "salute" + ] + }, + "public.enum_game_servers_status": { + "name": "enum_game_servers_status", + "schema": "public", + "values": [ + "online", + "offline" + ] + }, + "public.enum_arma_commands_status": { + "name": "enum_arma_commands_status", + "schema": "public", + "values": [ + "queued", + "delivered", + "succeeded", + "failed" + ] + }, + "public.enum_custom_radio_tests_order": { + "name": "enum_custom_radio_tests_order", + "schema": "public", + "values": [ + "fixed", + "shuffled" + ] + }, + "public.enum_custom_radio_test_scores_mode": { + "name": "enum_custom_radio_test_scores_mode", + "schema": "public", + "values": [ + "sprint", + "watch" + ] + }, + "public.enum_plugin_ai_instructions_field_type": { + "name": "enum_plugin_ai_instructions_field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "upload", + "richText" + ] + }, + "public.enum_plugin_ai_instructions_model_id": { + "name": "enum_plugin_ai_instructions_model_id", + "schema": "public", + "values": [ + "unsloth-text" + ] + }, + "public.enum_shims_shims_targeting_roles": { + "name": "enum_shims_shims_targeting_roles", + "schema": "public", + "values": [ + "guest", + "user", + "trusted", + "admin", + "developer" + ] + }, + "public.enum_shims_shims_type": { + "name": "enum_shims_shims_type", + "schema": "public", + "values": [ + "css", + "js" + ] + }, + "public.enum_shims_shims_targeting_audience": { + "name": "enum_shims_shims_targeting_audience", + "schema": "public", + "values": [ + "all", + "percentage", + "users", + "roles" + ] + }, + "public.enum_shims_shims_paths_match_type": { + "name": "enum_shims_shims_paths_match_type", + "schema": "public", + "values": [ + "all", + "include", + "exclude" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "id": "a5689dfb-4cea-42b2-adca-e812e5b0441b", + "prevId": "00000000-0000-0000-0000-000000000000" +} \ No newline at end of file diff --git a/src/migrations/20260918_052751_add_production_system.ts b/src/migrations/20260918_052751_add_production_system.ts new file mode 100644 index 0000000..f11d9fd --- /dev/null +++ b/src/migrations/20260918_052751_add_production_system.ts @@ -0,0 +1,84 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres' + +export async function up({ db, payload, req }: MigrateUpArgs): Promise { + await db.execute(sql` + ALTER TYPE "public"."enum_map_zones_type" ADD VALUE IF NOT EXISTS 'territory'; + ALTER TYPE "public"."enum_map_zones_type" ADD VALUE IF NOT EXISTS 'border'; + ALTER TYPE "public"."enum_map_zones_type" ADD VALUE IF NOT EXISTS 'other'; + CREATE TABLE "game_structures_production_inputs" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "resource_id" integer NOT NULL, + "amount_per_hour" numeric DEFAULT 0 NOT NULL + ); + + CREATE TABLE "game_structures_production_outputs" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "resource_id" integer NOT NULL, + "amount_per_hour" numeric DEFAULT 0 NOT NULL + ); + + CREATE TABLE "structures_production_inputs" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "resource_id" integer NOT NULL, + "amount_per_hour" numeric DEFAULT 0 NOT NULL + ); + + CREATE TABLE "structures_production_outputs" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "resource_id" integer NOT NULL, + "amount_per_hour" numeric DEFAULT 0 NOT NULL + ); + + ALTER TABLE "map_roads" ALTER COLUMN "label_visible" DROP DEFAULT; + ALTER TABLE "game_structures" ADD COLUMN "production_paused" boolean DEFAULT false; + ALTER TABLE "game_structures" ADD COLUMN "last_production_at" timestamp(3) with time zone; + ALTER TABLE "game_structures" ADD COLUMN "production_stall_reason" varchar; + ALTER TABLE "game_structures_production_inputs" ADD CONSTRAINT "game_structures_production_inputs_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "game_structures_production_inputs" ADD CONSTRAINT "game_structures_production_inputs_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."game_structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "game_structures_production_outputs" ADD CONSTRAINT "game_structures_production_outputs_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "game_structures_production_outputs" ADD CONSTRAINT "game_structures_production_outputs_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."game_structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_production_inputs" ADD CONSTRAINT "structures_production_inputs_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "structures_production_inputs" ADD CONSTRAINT "structures_production_inputs_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_production_outputs" ADD CONSTRAINT "structures_production_outputs_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "structures_production_outputs" ADD CONSTRAINT "structures_production_outputs_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + CREATE INDEX "game_structures_production_inputs_order_idx" ON "game_structures_production_inputs" USING btree ("_order"); + CREATE INDEX "game_structures_production_inputs_parent_id_idx" ON "game_structures_production_inputs" USING btree ("_parent_id"); + CREATE INDEX "game_structures_production_inputs_resource_idx" ON "game_structures_production_inputs" USING btree ("resource_id"); + CREATE INDEX "game_structures_production_outputs_order_idx" ON "game_structures_production_outputs" USING btree ("_order"); + CREATE INDEX "game_structures_production_outputs_parent_id_idx" ON "game_structures_production_outputs" USING btree ("_parent_id"); + CREATE INDEX "game_structures_production_outputs_resource_idx" ON "game_structures_production_outputs" USING btree ("resource_id"); + CREATE INDEX "structures_production_inputs_order_idx" ON "structures_production_inputs" USING btree ("_order"); + CREATE INDEX "structures_production_inputs_parent_id_idx" ON "structures_production_inputs" USING btree ("_parent_id"); + CREATE INDEX "structures_production_inputs_resource_idx" ON "structures_production_inputs" USING btree ("resource_id"); + CREATE INDEX "structures_production_outputs_order_idx" ON "structures_production_outputs" USING btree ("_order"); + CREATE INDEX "structures_production_outputs_parent_id_idx" ON "structures_production_outputs" USING btree ("_parent_id"); + CREATE INDEX "structures_production_outputs_resource_idx" ON "structures_production_outputs" USING btree ("resource_id");`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.execute(sql` + ALTER TABLE "game_structures_production_inputs" DISABLE ROW LEVEL SECURITY; + ALTER TABLE "game_structures_production_outputs" DISABLE ROW LEVEL SECURITY; + ALTER TABLE "structures_production_inputs" DISABLE ROW LEVEL SECURITY; + ALTER TABLE "structures_production_outputs" DISABLE ROW LEVEL SECURITY; + DROP TABLE "game_structures_production_inputs" CASCADE; + DROP TABLE "game_structures_production_outputs" CASCADE; + DROP TABLE "structures_production_inputs" CASCADE; + DROP TABLE "structures_production_outputs" CASCADE; + ALTER TABLE "map_zones" ALTER COLUMN "type" SET DATA TYPE text; + DROP TYPE "public"."enum_map_zones_type"; + CREATE TYPE "public"."enum_map_zones_type" AS ENUM('water', 'land'); + ALTER TABLE "map_zones" ALTER COLUMN "type" SET DATA TYPE "public"."enum_map_zones_type" USING "type"::"public"."enum_map_zones_type"; + ALTER TABLE "map_roads" ALTER COLUMN "label_visible" SET DEFAULT true; + ALTER TABLE "game_structures" DROP COLUMN "production_paused"; + ALTER TABLE "game_structures" DROP COLUMN "last_production_at"; + ALTER TABLE "game_structures" DROP COLUMN "production_stall_reason";`) +} diff --git a/src/migrations/20260918_054722_add_labor_construction_speed.json b/src/migrations/20260918_054722_add_labor_construction_speed.json new file mode 100644 index 0000000..d37586b --- /dev/null +++ b/src/migrations/20260918_054722_add_labor_construction_speed.json @@ -0,0 +1,28626 @@ +{ + "version": "7", + "dialect": "postgresql", + "tables": { + "public.media": { + "name": "media", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "media_updated_at_idx": { + "name": "media_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_created_at_idx": { + "name": "media_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_filename_idx": { + "name": "media_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_hard_resources": { + "name": "game_hard_resources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_hard_resources_name_idx": { + "name": "game_hard_resources_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_hard_resources_updated_at_idx": { + "name": "game_hard_resources_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_hard_resources_created_at_idx": { + "name": "game_hard_resources_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_labor_requirements": { + "name": "game_structures_labor_requirements", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "classification_id": { + "name": "classification_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "required_headcount": { + "name": "required_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_headcount": { + "name": "max_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_labor_requirements_order_idx": { + "name": "game_structures_labor_requirements_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_labor_requirements_parent_id_idx": { + "name": "game_structures_labor_requirements_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_labor_requirements_classification_idx": { + "name": "game_structures_labor_requirements_classification_idx", + "columns": [ + { + "expression": "classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_labor_requirements_classification_id_labor_classifications_id_fk": { + "name": "game_structures_labor_requirements_classification_id_labor_classifications_id_fk", + "tableFrom": "game_structures_labor_requirements", + "tableTo": "labor_classifications", + "columnsFrom": [ + "classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_labor_requirements_parent_id_fk": { + "name": "game_structures_labor_requirements_parent_id_fk", + "tableFrom": "game_structures_labor_requirements", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_staff_positions": { + "name": "game_structures_staff_positions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_game_structures_staff_positions_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "max": { + "name": "max", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_staff_positions_order_idx": { + "name": "game_structures_staff_positions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_staff_positions_parent_id_idx": { + "name": "game_structures_staff_positions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_staff_positions_parent_id_fk": { + "name": "game_structures_staff_positions_parent_id_fk", + "tableFrom": "game_structures_staff_positions", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_production_inputs": { + "name": "game_structures_production_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "game_structures_production_inputs_order_idx": { + "name": "game_structures_production_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_inputs_parent_id_idx": { + "name": "game_structures_production_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_inputs_resource_idx": { + "name": "game_structures_production_inputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_production_inputs_resource_id_resources_id_fk": { + "name": "game_structures_production_inputs_resource_id_resources_id_fk", + "tableFrom": "game_structures_production_inputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_production_inputs_parent_id_fk": { + "name": "game_structures_production_inputs_parent_id_fk", + "tableFrom": "game_structures_production_inputs", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_production_outputs": { + "name": "game_structures_production_outputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "game_structures_production_outputs_order_idx": { + "name": "game_structures_production_outputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_outputs_parent_id_idx": { + "name": "game_structures_production_outputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_outputs_resource_idx": { + "name": "game_structures_production_outputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_production_outputs_resource_id_resources_id_fk": { + "name": "game_structures_production_outputs_resource_id_resources_id_fk", + "tableFrom": "game_structures_production_outputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_production_outputs_parent_id_fk": { + "name": "game_structures_production_outputs_parent_id_fk", + "tableFrom": "game_structures_production_outputs", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_stored_resources": { + "name": "game_structures_stored_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_structures_stored_resources_order_idx": { + "name": "game_structures_stored_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_stored_resources_parent_id_idx": { + "name": "game_structures_stored_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_stored_resources_resource_idx": { + "name": "game_structures_stored_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_stored_resources_resource_id_resources_id_fk": { + "name": "game_structures_stored_resources_resource_id_resources_id_fk", + "tableFrom": "game_structures_stored_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_stored_resources_parent_id_fk": { + "name": "game_structures_stored_resources_parent_id_fk", + "tableFrom": "game_structures_stored_resources", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_void_storage": { + "name": "game_structures_void_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_structures_void_storage_order_idx": { + "name": "game_structures_void_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_void_storage_parent_id_idx": { + "name": "game_structures_void_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_void_storage_resource_idx": { + "name": "game_structures_void_storage_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_void_storage_resource_id_resources_id_fk": { + "name": "game_structures_void_storage_resource_id_resources_id_fk", + "tableFrom": "game_structures_void_storage", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_void_storage_parent_id_fk": { + "name": "game_structures_void_storage_parent_id_fk", + "tableFrom": "game_structures_void_storage", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures": { + "name": "game_structures", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type_id": { + "name": "type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "construction_status": { + "name": "construction_status", + "type": "enum_game_structures_construction_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'complete'" + }, + "construction_started_at": { + "name": "construction_started_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "construction_completes_at": { + "name": "construction_completes_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "maintenance_cost": { + "name": "maintenance_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "production_paused": { + "name": "production_paused", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "last_production_at": { + "name": "last_production_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "production_stall_reason": { + "name": "production_stall_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "coordinates": { + "name": "coordinates", + "type": "geometry(Point)", + "primaryKey": false, + "notNull": false + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "label_priority": { + "name": "label_priority", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_structures_type_idx": { + "name": "game_structures_type_idx", + "columns": [ + { + "expression": "type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_faction_idx": { + "name": "game_structures_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_map_idx": { + "name": "game_structures_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_updated_at_idx": { + "name": "game_structures_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_created_at_idx": { + "name": "game_structures_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_type_id_structures_id_fk": { + "name": "game_structures_type_id_structures_id_fk", + "tableFrom": "game_structures", + "tableTo": "structures", + "columnsFrom": [ + "type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_faction_id_factions_id_fk": { + "name": "game_structures_faction_id_factions_id_fk", + "tableFrom": "game_structures", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_map_id_maps_id_fk": { + "name": "game_structures_map_id_maps_id_fk", + "tableFrom": "game_structures", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles_stored_resources": { + "name": "game_vehicles_stored_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_vehicles_stored_resources_order_idx": { + "name": "game_vehicles_stored_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_stored_resources_parent_id_idx": { + "name": "game_vehicles_stored_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_stored_resources_resource_idx": { + "name": "game_vehicles_stored_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_stored_resources_resource_id_resources_id_fk": { + "name": "game_vehicles_stored_resources_resource_id_resources_id_fk", + "tableFrom": "game_vehicles_stored_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_stored_resources_parent_id_fk": { + "name": "game_vehicles_stored_resources_parent_id_fk", + "tableFrom": "game_vehicles_stored_resources", + "tableTo": "game_vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles_void_storage": { + "name": "game_vehicles_void_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_vehicles_void_storage_order_idx": { + "name": "game_vehicles_void_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_void_storage_parent_id_idx": { + "name": "game_vehicles_void_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_void_storage_resource_idx": { + "name": "game_vehicles_void_storage_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_void_storage_resource_id_resources_id_fk": { + "name": "game_vehicles_void_storage_resource_id_resources_id_fk", + "tableFrom": "game_vehicles_void_storage", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_void_storage_parent_id_fk": { + "name": "game_vehicles_void_storage_parent_id_fk", + "tableFrom": "game_vehicles_void_storage", + "tableTo": "game_vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles": { + "name": "game_vehicles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type_id": { + "name": "type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "deployed_at_id": { + "name": "deployed_at_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_game_vehicles_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'idle'" + }, + "current_fuel": { + "name": "current_fuel", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "current_health": { + "name": "current_health", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_vehicles_type_idx": { + "name": "game_vehicles_type_idx", + "columns": [ + { + "expression": "type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_deployed_at_idx": { + "name": "game_vehicles_deployed_at_idx", + "columns": [ + { + "expression": "deployed_at_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_faction_idx": { + "name": "game_vehicles_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_updated_at_idx": { + "name": "game_vehicles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_created_at_idx": { + "name": "game_vehicles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_type_id_vehicles_id_fk": { + "name": "game_vehicles_type_id_vehicles_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "vehicles", + "columnsFrom": [ + "type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_deployed_at_id_game_structures_id_fk": { + "name": "game_vehicles_deployed_at_id_game_structures_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "game_structures", + "columnsFrom": [ + "deployed_at_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_faction_id_factions_id_fk": { + "name": "game_vehicles_faction_id_factions_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_npcs": { + "name": "game_npcs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occupation": { + "name": "occupation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "location_id": { + "name": "location_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bio": { + "name": "bio", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "is_generated": { + "name": "is_generated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "is_in_game": { + "name": "is_in_game", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "vendor_enabled": { + "name": "vendor_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vendor_price_modifier": { + "name": "vendor_price_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_npcs_location_idx": { + "name": "game_npcs_location_idx", + "columns": [ + { + "expression": "location_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_faction_idx": { + "name": "game_npcs_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_updated_at_idx": { + "name": "game_npcs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_created_at_idx": { + "name": "game_npcs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_npcs_location_id_game_structures_id_fk": { + "name": "game_npcs_location_id_game_structures_id_fk", + "tableFrom": "game_npcs", + "tableTo": "game_structures", + "columnsFrom": [ + "location_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_npcs_faction_id_factions_id_fk": { + "name": "game_npcs_faction_id_factions_id_fk", + "tableFrom": "game_npcs", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_npcs_rels": { + "name": "game_npcs_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_npcs_rels_order_idx": { + "name": "game_npcs_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_parent_idx": { + "name": "game_npcs_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_path_idx": { + "name": "game_npcs_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_assets_id_idx": { + "name": "game_npcs_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_npcs_rels_parent_fk": { + "name": "game_npcs_rels_parent_fk", + "tableFrom": "game_npcs_rels", + "tableTo": "game_npcs", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "game_npcs_rels_assets_fk": { + "name": "game_npcs_rels_assets_fk", + "tableFrom": "game_npcs_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.npc_staffing": { + "name": "npc_staffing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "npc_id": { + "name": "npc_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_npc_staffing_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'labor'" + }, + "position_title": { + "name": "position_title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "headcount": { + "name": "headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "labor_classification_id": { + "name": "labor_classification_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "salary": { + "name": "salary", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_npc_staffing_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'active'" + }, + "hired_at": { + "name": "hired_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "terminated_at": { + "name": "terminated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "npc_staffing_npc_idx": { + "name": "npc_staffing_npc_idx", + "columns": [ + { + "expression": "npc_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_structure_idx": { + "name": "npc_staffing_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_labor_classification_idx": { + "name": "npc_staffing_labor_classification_idx", + "columns": [ + { + "expression": "labor_classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_updated_at_idx": { + "name": "npc_staffing_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_created_at_idx": { + "name": "npc_staffing_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "npc_staffing_npc_id_game_npcs_id_fk": { + "name": "npc_staffing_npc_id_game_npcs_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "game_npcs", + "columnsFrom": [ + "npc_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "npc_staffing_structure_id_game_structures_id_fk": { + "name": "npc_staffing_structure_id_game_structures_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "game_structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "npc_staffing_labor_classification_id_labor_classifications_id_fk": { + "name": "npc_staffing_labor_classification_id_labor_classifications_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "labor_classifications", + "columnsFrom": [ + "labor_classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labor_classifications": { + "name": "labor_classifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "default_unit_salary": { + "name": "default_unit_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "build_efficiency": { + "name": "build_efficiency", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "available_headcount": { + "name": "available_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "labor_classifications_name_idx": { + "name": "labor_classifications_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_key_idx": { + "name": "labor_classifications_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_updated_at_idx": { + "name": "labor_classifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_created_at_idx": { + "name": "labor_classifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_event_logs": { + "name": "game_event_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "system": { + "name": "system", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "actor_id": { + "name": "actor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "target_collection": { + "name": "target_collection", + "type": "enum_game_event_logs_target_collection", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "target_id": { + "name": "target_id", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_event_logs_type_idx": { + "name": "game_event_logs_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_actor_idx": { + "name": "game_event_logs_actor_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_structure_idx": { + "name": "game_event_logs_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_updated_at_idx": { + "name": "game_event_logs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_created_at_idx": { + "name": "game_event_logs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_event_logs_actor_id_users_id_fk": { + "name": "game_event_logs_actor_id_users_id_fk", + "tableFrom": "game_event_logs", + "tableTo": "users", + "columnsFrom": [ + "actor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_event_logs_structure_id_game_structures_id_fk": { + "name": "game_event_logs_structure_id_game_structures_id_fk", + "tableFrom": "game_event_logs", + "tableTo": "game_structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_roles": { + "name": "users_roles", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_roles_order_idx": { + "name": "users_roles_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_roles_parent_idx": { + "name": "users_roles_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_roles_parent_fk": { + "name": "users_roles_parent_fk", + "tableFrom": "users_roles", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_preferences_notifications_muted_types": { + "name": "users_preferences_notifications_muted_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_preferences_notifications_muted_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_preferences_notifications_muted_types_order_idx": { + "name": "users_preferences_notifications_muted_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_preferences_notifications_muted_types_parent_idx": { + "name": "users_preferences_notifications_muted_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_preferences_notifications_muted_types_parent_fk": { + "name": "users_preferences_notifications_muted_types_parent_fk", + "tableFrom": "users_preferences_notifications_muted_types", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_preferences_discord_muted_types": { + "name": "users_preferences_discord_muted_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_preferences_discord_muted_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_preferences_discord_muted_types_order_idx": { + "name": "users_preferences_discord_muted_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_preferences_discord_muted_types_parent_idx": { + "name": "users_preferences_discord_muted_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_preferences_discord_muted_types_parent_fk": { + "name": "users_preferences_discord_muted_types_parent_fk", + "tableFrom": "users_preferences_discord_muted_types", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_sessions": { + "name": "users_sessions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "users_sessions_order_idx": { + "name": "users_sessions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_sessions_parent_id_idx": { + "name": "users_sessions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_sessions_parent_id_fk": { + "name": "users_sessions_parent_id_fk", + "tableFrom": "users_sessions", + "tableTo": "users", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "discord_username": { + "name": "discord_username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "discord_id": { + "name": "discord_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "payload_display_name": { + "name": "payload_display_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "steam_id": { + "name": "steam_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "preferences_notifications_muted_all": { + "name": "preferences_notifications_muted_all", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_show_callsign": { + "name": "preferences_display_show_callsign", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_lead_or_actual": { + "name": "preferences_display_lead_or_actual", + "type": "enum_users_preferences_display_lead_or_actual", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'lead'" + }, + "preferences_display_show_version_overlay": { + "name": "preferences_display_show_version_overlay", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "preferences_display_xp_display_mini": { + "name": "preferences_display_xp_display_mini", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_show_background_texture": { + "name": "preferences_display_show_background_texture", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "preferences_discord_enabled": { + "name": "preferences_discord_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_dashboard_layout": { + "name": "preferences_dashboard_layout", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "reset_password_token": { + "name": "reset_password_token", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reset_password_expiration": { + "name": "reset_password_expiration", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "salt": { + "name": "salt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hash": { + "name": "hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "login_attempts": { + "name": "login_attempts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lock_until": { + "name": "lock_until", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_discord_username_idx": { + "name": "users_discord_username_idx", + "columns": [ + { + "expression": "discord_username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_discord_id_idx": { + "name": "users_discord_id_idx", + "columns": [ + { + "expression": "discord_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_updated_at_idx": { + "name": "users_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_created_at_idx": { + "name": "users_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_username_idx": { + "name": "users_username_idx", + "columns": [ + { + "expression": "username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_rels": { + "name": "users_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_rels_order_idx": { + "name": "users_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_parent_idx": { + "name": "users_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_path_idx": { + "name": "users_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_roles_id_idx": { + "name": "users_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_rels_parent_fk": { + "name": "users_rels_parent_fk", + "tableFrom": "users_rels", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "users_rels_roles_fk": { + "name": "users_rels_roles_fk", + "tableFrom": "users_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles_permissions": { + "name": "roles_permissions", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_roles_permissions", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "roles_permissions_order_idx": { + "name": "roles_permissions_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_permissions_parent_idx": { + "name": "roles_permissions_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "roles_permissions_parent_fk": { + "name": "roles_permissions_parent_fk", + "tableFrom": "roles_permissions", + "tableTo": "roles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles": { + "name": "roles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "is_system": { + "name": "is_system", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "is_superuser": { + "name": "is_superuser", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "roles_name_idx": { + "name": "roles_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_slug_idx": { + "name": "roles_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_updated_at_idx": { + "name": "roles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_created_at_idx": { + "name": "roles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles_rels": { + "name": "roles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "roles_rels_order_idx": { + "name": "roles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_parent_idx": { + "name": "roles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_path_idx": { + "name": "roles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_roles_id_idx": { + "name": "roles_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "roles_rels_parent_fk": { + "name": "roles_rels_parent_fk", + "tableFrom": "roles_rels", + "tableTo": "roles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "roles_rels_roles_fk": { + "name": "roles_rels_roles_fk", + "tableFrom": "roles_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ranks": { + "name": "ranks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_order": { + "name": "_order", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "abbreviation": { + "name": "abbreviation", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "insignia_id": { + "name": "insignia_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "promotion_ceiling_id": { + "name": "promotion_ceiling_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ranks__order_idx": { + "name": "ranks__order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_name_idx": { + "name": "ranks_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_abbreviation_idx": { + "name": "ranks_abbreviation_idx", + "columns": [ + { + "expression": "abbreviation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_insignia_idx": { + "name": "ranks_insignia_idx", + "columns": [ + { + "expression": "insignia_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_promotion_ceiling_idx": { + "name": "ranks_promotion_ceiling_idx", + "columns": [ + { + "expression": "promotion_ceiling_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_updated_at_idx": { + "name": "ranks_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_created_at_idx": { + "name": "ranks_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ranks_insignia_id_media_id_fk": { + "name": "ranks_insignia_id_media_id_fk", + "tableFrom": "ranks", + "tableTo": "media", + "columnsFrom": [ + "insignia_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ranks_promotion_ceiling_id_ranks_id_fk": { + "name": "ranks_promotion_ceiling_id_ranks_id_fk", + "tableFrom": "ranks", + "tableTo": "ranks", + "columnsFrom": [ + "promotion_ceiling_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles_progression_awards": { + "name": "profiles_progression_awards", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "award_id": { + "name": "award_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "awarded_by_id": { + "name": "awarded_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "awarded_at": { + "name": "awarded_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "award_reason": { + "name": "award_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "upgraded_from_id": { + "name": "upgraded_from_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "upgraded_at": { + "name": "upgraded_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "profiles_progression_awards_order_idx": { + "name": "profiles_progression_awards_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_parent_id_idx": { + "name": "profiles_progression_awards_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_award_idx": { + "name": "profiles_progression_awards_award_idx", + "columns": [ + { + "expression": "award_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_awarded_by_idx": { + "name": "profiles_progression_awards_awarded_by_idx", + "columns": [ + { + "expression": "awarded_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_upgraded_from_idx": { + "name": "profiles_progression_awards_upgraded_from_idx", + "columns": [ + { + "expression": "upgraded_from_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_progression_awards_award_id_awards_id_fk": { + "name": "profiles_progression_awards_award_id_awards_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "awards", + "columnsFrom": [ + "award_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_awarded_by_id_profiles_id_fk": { + "name": "profiles_progression_awards_awarded_by_id_profiles_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "profiles", + "columnsFrom": [ + "awarded_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_upgraded_from_id_awards_id_fk": { + "name": "profiles_progression_awards_upgraded_from_id_awards_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "awards", + "columnsFrom": [ + "upgraded_from_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_parent_id_fk": { + "name": "profiles_progression_awards_parent_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "profiles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles": { + "name": "profiles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rank_id": { + "name": "rank_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "dossier_enlistment_date": { + "name": "dossier_enlistment_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "dossier_personal_excerpt": { + "name": "dossier_personal_excerpt", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "dossier_intel_excerpt": { + "name": "dossier_intel_excerpt", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "progression_scoreboard_infantry_kills": { + "name": "progression_scoreboard_infantry_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_vehicle_kills": { + "name": "progression_scoreboard_vehicle_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_armor_kills": { + "name": "progression_scoreboard_armor_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_air_kills": { + "name": "progression_scoreboard_air_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_deaths": { + "name": "progression_scoreboard_deaths", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_games_played": { + "name": "progression_minigames_flappy_bird_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_total_passes": { + "name": "progression_minigames_flappy_bird_total_passes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_best_score": { + "name": "progression_minigames_flappy_bird_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_xp_earned": { + "name": "progression_minigames_flappy_bird_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_games_played": { + "name": "progression_minigames_eod_minesweeper_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_wins": { + "name": "progression_minigames_eod_minesweeper_wins", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_losses": { + "name": "progression_minigames_eod_minesweeper_losses", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_score": { + "name": "progression_minigames_eod_minesweeper_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_xp_earned": { + "name": "progression_minigames_eod_minesweeper_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_training_time": { + "name": "progression_minigames_eod_minesweeper_best_training_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_perimeter_time": { + "name": "progression_minigames_eod_minesweeper_best_perimeter_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_supply_road_time": { + "name": "progression_minigames_eod_minesweeper_best_supply_road_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_training_flags": { + "name": "progression_minigames_eod_minesweeper_best_training_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_perimeter_flags": { + "name": "progression_minigames_eod_minesweeper_best_perimeter_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_supply_road_flags": { + "name": "progression_minigames_eod_minesweeper_best_supply_road_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_games_played": { + "name": "progression_minigames_radio_traffic_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_total_messages": { + "name": "progression_minigames_radio_traffic_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_incorrect_messages": { + "name": "progression_minigames_radio_traffic_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_score": { + "name": "progression_minigames_radio_traffic_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_accuracy": { + "name": "progression_minigames_radio_traffic_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_sprint_time_ms": { + "name": "progression_minigames_radio_traffic_best_sprint_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_games_played": { + "name": "progression_minigames_radio_traffic_sprint_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_total_messages": { + "name": "progression_minigames_radio_traffic_sprint_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_incorrect_messages": { + "name": "progression_minigames_radio_traffic_sprint_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_best_score": { + "name": "progression_minigames_radio_traffic_sprint_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_best_accuracy": { + "name": "progression_minigames_radio_traffic_sprint_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_games_played": { + "name": "progression_minigames_radio_traffic_watch_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_total_messages": { + "name": "progression_minigames_radio_traffic_watch_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_incorrect_messages": { + "name": "progression_minigames_radio_traffic_watch_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_best_score": { + "name": "progression_minigames_radio_traffic_watch_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_best_accuracy": { + "name": "progression_minigames_radio_traffic_watch_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_xp_earned": { + "name": "progression_minigames_radio_traffic_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_games_played": { + "name": "progression_minigames_aim_trainer_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_best_score": { + "name": "progression_minigames_aim_trainer_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_recruit_best_score": { + "name": "progression_minigames_aim_trainer_recruit_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_veteran_best_score": { + "name": "progression_minigames_aim_trainer_veteran_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_elite_best_score": { + "name": "progression_minigames_aim_trainer_elite_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_recruit_best_accuracy": { + "name": "progression_minigames_aim_trainer_recruit_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_veteran_best_accuracy": { + "name": "progression_minigames_aim_trainer_veteran_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_elite_best_accuracy": { + "name": "progression_minigames_aim_trainer_elite_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_xp_earned": { + "name": "progression_minigames_aim_trainer_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_games_played": { + "name": "progression_minigames_opord_recall_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_best_score": { + "name": "progression_minigames_opord_recall_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_best_accuracy": { + "name": "progression_minigames_opord_recall_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_recruit_best_score": { + "name": "progression_minigames_opord_recall_recruit_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_veteran_best_score": { + "name": "progression_minigames_opord_recall_veteran_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_elite_best_score": { + "name": "progression_minigames_opord_recall_elite_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_recruit_best_time_ms": { + "name": "progression_minigames_opord_recall_recruit_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_veteran_best_time_ms": { + "name": "progression_minigames_opord_recall_veteran_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_elite_best_time_ms": { + "name": "progression_minigames_opord_recall_elite_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_xp_earned": { + "name": "progression_minigames_opord_recall_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_games_played": { + "name": "progression_minigames_poker_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_wins": { + "name": "progression_minigames_poker_wins", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_second_places": { + "name": "progression_minigames_poker_second_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_third_places": { + "name": "progression_minigames_poker_third_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_fourth_places": { + "name": "progression_minigames_poker_fourth_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_hands_won": { + "name": "progression_minigames_poker_hands_won", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_best_score": { + "name": "progression_minigames_poker_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_xp_earned": { + "name": "progression_minigames_poker_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_games_played": { + "name": "progression_minigames_blackjack_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_rounds_won": { + "name": "progression_minigames_blackjack_rounds_won", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_blackjacks_hit": { + "name": "progression_minigames_blackjack_blackjacks_hit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_best_score": { + "name": "progression_minigames_blackjack_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_xp_earned": { + "name": "progression_minigames_blackjack_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_chip_bank": { + "name": "progression_chip_bank", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_chip_bank_refilled_at": { + "name": "progression_chip_bank_refilled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "progression_voiceover_xp_earned": { + "name": "progression_voiceover_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "profiles_user_idx": { + "name": "profiles_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rank_idx": { + "name": "profiles_rank_idx", + "columns": [ + { + "expression": "rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_updated_at_idx": { + "name": "profiles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_created_at_idx": { + "name": "profiles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_user_id_users_id_fk": { + "name": "profiles_user_id_users_id_fk", + "tableFrom": "profiles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_rank_id_ranks_id_fk": { + "name": "profiles_rank_id_ranks_id_fk", + "tableFrom": "profiles", + "tableTo": "ranks", + "columnsFrom": [ + "rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles_rels": { + "name": "profiles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "profiles_rels_order_idx": { + "name": "profiles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_parent_idx": { + "name": "profiles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_path_idx": { + "name": "profiles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_qualifications_id_idx": { + "name": "profiles_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_rels_parent_fk": { + "name": "profiles_rels_parent_fk", + "tableFrom": "profiles_rels", + "tableTo": "profiles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "profiles_rels_qualifications_fk": { + "name": "profiles_rels_qualifications_fk", + "tableFrom": "profiles_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards_grant_config_allowed_grantor_assignment_types": { + "name": "awards_grant_config_allowed_grantor_assignment_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_awards_grant_config_allowed_grantor_assignment_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "awards_grant_config_allowed_grantor_assignment_types_order_idx": { + "name": "awards_grant_config_allowed_grantor_assignment_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_grant_config_allowed_grantor_assignment_types_parent_idx": { + "name": "awards_grant_config_allowed_grantor_assignment_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_grant_config_allowed_grantor_assignment_types_parent_fk": { + "name": "awards_grant_config_allowed_grantor_assignment_types_parent_fk", + "tableFrom": "awards_grant_config_allowed_grantor_assignment_types", + "tableTo": "awards", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards": { + "name": "awards", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_awards_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'commendation'" + }, + "commendation_color": { + "name": "commendation_color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#92400e'" + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "experience_points": { + "name": "experience_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "ribbon_design": { + "name": "ribbon_design", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "background_image_id": { + "name": "background_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "medal_design": { + "name": "medal_design", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "advancement_series_key": { + "name": "advancement_series_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "advancement_tier": { + "name": "advancement_tier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "grant_config_max_grants_per_grantor": { + "name": "grant_config_max_grants_per_grantor", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "grant_config_recipient_scope": { + "name": "grant_config_recipient_scope", + "type": "enum_awards_grant_config_recipient_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'same_command'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "awards_name_idx": { + "name": "awards_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_image_idx": { + "name": "awards_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_background_image_idx": { + "name": "awards_background_image_idx", + "columns": [ + { + "expression": "background_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_updated_at_idx": { + "name": "awards_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_created_at_idx": { + "name": "awards_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_image_id_media_id_fk": { + "name": "awards_image_id_media_id_fk", + "tableFrom": "awards", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "awards_background_image_id_media_id_fk": { + "name": "awards_background_image_id_media_id_fk", + "tableFrom": "awards", + "tableTo": "media", + "columnsFrom": [ + "background_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards_rels": { + "name": "awards_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "awards_rels_order_idx": { + "name": "awards_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_parent_idx": { + "name": "awards_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_path_idx": { + "name": "awards_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_assignments_id_idx": { + "name": "awards_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_rels_parent_fk": { + "name": "awards_rels_parent_fk", + "tableFrom": "awards_rels", + "tableTo": "awards", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "awards_rels_assignments_fk": { + "name": "awards_rels_assignments_fk", + "tableFrom": "awards_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.qualifications": { + "name": "qualifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "qualifications_name_idx": { + "name": "qualifications_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_updated_at_idx": { + "name": "qualifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_created_at_idx": { + "name": "qualifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments": { + "name": "assignments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_assignments_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "callsign": { + "name": "callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "leader_id": { + "name": "leader_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assignments_leader_idx": { + "name": "assignments_leader_idx", + "columns": [ + { + "expression": "leader_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_updated_at_idx": { + "name": "assignments_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_created_at_idx": { + "name": "assignments_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_leader_id_users_id_fk": { + "name": "assignments_leader_id_users_id_fk", + "tableFrom": "assignments", + "tableTo": "users", + "columnsFrom": [ + "leader_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments_rels": { + "name": "assignments_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assignments_rels_order_idx": { + "name": "assignments_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_parent_idx": { + "name": "assignments_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_path_idx": { + "name": "assignments_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_assignments_id_idx": { + "name": "assignments_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_users_id_idx": { + "name": "assignments_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_rels_parent_fk": { + "name": "assignments_rels_parent_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_assignments_fk": { + "name": "assignments_rels_assignments_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_users_fk": { + "name": "assignments_rels_users_fk", + "tableFrom": "assignments_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignment_transfers": { + "name": "assignment_transfers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "requester_id": { + "name": "requester_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "from_assignment_id": { + "name": "from_assignment_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "to_assignment_id": { + "name": "to_assignment_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_assignment_transfers_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "escalation_reason": { + "name": "escalation_reason", + "type": "enum_assignment_transfers_escalation_reason", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_leader_decision": { + "name": "from_leader_decision", + "type": "enum_assignment_transfers_from_leader_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "to_leader_decision": { + "name": "to_leader_decision", + "type": "enum_assignment_transfers_to_leader_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "from_decision_by_id": { + "name": "from_decision_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_decision_by_id": { + "name": "to_decision_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "from_decided_at": { + "name": "from_decided_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "to_decided_at": { + "name": "to_decided_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "from_leader_snapshot_id": { + "name": "from_leader_snapshot_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_leader_snapshot_id": { + "name": "to_leader_snapshot_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rejection_reason": { + "name": "rejection_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "request_note": { + "name": "request_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "appeal_note": { + "name": "appeal_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "resolved_by_id": { + "name": "resolved_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resolution_note": { + "name": "resolution_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "resolved_at": { + "name": "resolved_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "discord_from_leader_message_id": { + "name": "discord_from_leader_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_to_leader_message_id": { + "name": "discord_to_leader_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_requester_message_id": { + "name": "discord_requester_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "source_notified_to_user_id_id": { + "name": "source_notified_to_user_id_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "destination_notified_to_user_id_id": { + "name": "destination_notified_to_user_id_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "discord_delivered_keys": { + "name": "discord_delivered_keys", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assignment_transfers_requester_idx": { + "name": "assignment_transfers_requester_idx", + "columns": [ + { + "expression": "requester_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_assignment_idx": { + "name": "assignment_transfers_from_assignment_idx", + "columns": [ + { + "expression": "from_assignment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_assignment_idx": { + "name": "assignment_transfers_to_assignment_idx", + "columns": [ + { + "expression": "to_assignment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_status_idx": { + "name": "assignment_transfers_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_decision_by_idx": { + "name": "assignment_transfers_from_decision_by_idx", + "columns": [ + { + "expression": "from_decision_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_decision_by_idx": { + "name": "assignment_transfers_to_decision_by_idx", + "columns": [ + { + "expression": "to_decision_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_leader_snapshot_idx": { + "name": "assignment_transfers_from_leader_snapshot_idx", + "columns": [ + { + "expression": "from_leader_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_leader_snapshot_idx": { + "name": "assignment_transfers_to_leader_snapshot_idx", + "columns": [ + { + "expression": "to_leader_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_resolved_by_idx": { + "name": "assignment_transfers_resolved_by_idx", + "columns": [ + { + "expression": "resolved_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_source_notified_to_user_id_idx": { + "name": "assignment_transfers_source_notified_to_user_id_idx", + "columns": [ + { + "expression": "source_notified_to_user_id_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_destination_notified_to_user_id_idx": { + "name": "assignment_transfers_destination_notified_to_user_id_idx", + "columns": [ + { + "expression": "destination_notified_to_user_id_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_updated_at_idx": { + "name": "assignment_transfers_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_created_at_idx": { + "name": "assignment_transfers_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignment_transfers_requester_id_users_id_fk": { + "name": "assignment_transfers_requester_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "requester_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_assignment_id_assignments_id_fk": { + "name": "assignment_transfers_from_assignment_id_assignments_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "assignments", + "columnsFrom": [ + "from_assignment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_assignment_id_assignments_id_fk": { + "name": "assignment_transfers_to_assignment_id_assignments_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "assignments", + "columnsFrom": [ + "to_assignment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_decision_by_id_users_id_fk": { + "name": "assignment_transfers_from_decision_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "from_decision_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_decision_by_id_users_id_fk": { + "name": "assignment_transfers_to_decision_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "to_decision_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_leader_snapshot_id_users_id_fk": { + "name": "assignment_transfers_from_leader_snapshot_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "from_leader_snapshot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_leader_snapshot_id_users_id_fk": { + "name": "assignment_transfers_to_leader_snapshot_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "to_leader_snapshot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_resolved_by_id_users_id_fk": { + "name": "assignment_transfers_resolved_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "resolved_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_source_notified_to_user_id_id_users_id_fk": { + "name": "assignment_transfers_source_notified_to_user_id_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "source_notified_to_user_id_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_destination_notified_to_user_id_id_users_id_fk": { + "name": "assignment_transfers_destination_notified_to_user_id_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "destination_notified_to_user_id_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.experience": { + "name": "experience", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "required_points": { + "name": "required_points", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "experience_name_idx": { + "name": "experience_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "experience_updated_at_idx": { + "name": "experience_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "experience_created_at_idx": { + "name": "experience_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_notifications": { + "name": "user_notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link": { + "name": "link", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "read": { + "name": "read", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "user_notifications_user_idx": { + "name": "user_notifications_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_read_idx": { + "name": "user_notifications_read_idx", + "columns": [ + { + "expression": "read", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_updated_at_idx": { + "name": "user_notifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_created_at_idx": { + "name": "user_notifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_notifications_user_id_users_id_fk": { + "name": "user_notifications_user_id_users_id_fk", + "tableFrom": "user_notifications", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.evaluations": { + "name": "evaluations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "rater_id": { + "name": "rater_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ratee_id": { + "name": "ratee_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "enum_evaluations_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "level": { + "name": "level", + "type": "enum_evaluations_level", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "comment": { + "name": "comment", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "evaluations_rater_idx": { + "name": "evaluations_rater_idx", + "columns": [ + { + "expression": "rater_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_ratee_idx": { + "name": "evaluations_ratee_idx", + "columns": [ + { + "expression": "ratee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_mission_idx": { + "name": "evaluations_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_updated_at_idx": { + "name": "evaluations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_created_at_idx": { + "name": "evaluations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "evaluations_rater_id_users_id_fk": { + "name": "evaluations_rater_id_users_id_fk", + "tableFrom": "evaluations", + "tableTo": "users", + "columnsFrom": [ + "rater_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "evaluations_ratee_id_users_id_fk": { + "name": "evaluations_ratee_id_users_id_fk", + "tableFrom": "evaluations", + "tableTo": "users", + "columnsFrom": [ + "ratee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "evaluations_mission_id_missions_id_fk": { + "name": "evaluations_mission_id_missions_id_fk", + "tableFrom": "evaluations", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ribbon_submissions_grantor_types": { + "name": "ribbon_submissions_grantor_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_ribbon_submissions_grantor_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "ribbon_submissions_grantor_types_order_idx": { + "name": "ribbon_submissions_grantor_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_grantor_types_parent_idx": { + "name": "ribbon_submissions_grantor_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ribbon_submissions_grantor_types_parent_fk": { + "name": "ribbon_submissions_grantor_types_parent_fk", + "tableFrom": "ribbon_submissions_grantor_types", + "tableTo": "ribbon_submissions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ribbon_submissions": { + "name": "ribbon_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "design": { + "name": "design", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_ribbon_submissions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "review_note": { + "name": "review_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reviewed_by_id": { + "name": "reviewed_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reviewed_at": { + "name": "reviewed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "award_id": { + "name": "award_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "award_xp": { + "name": "award_xp", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "recipient_scope": { + "name": "recipient_scope", + "type": "enum_ribbon_submissions_recipient_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'same_command'" + }, + "max_grants_per_grantor": { + "name": "max_grants_per_grantor", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ribbon_submissions_user_idx": { + "name": "ribbon_submissions_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_reviewed_by_idx": { + "name": "ribbon_submissions_reviewed_by_idx", + "columns": [ + { + "expression": "reviewed_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_award_idx": { + "name": "ribbon_submissions_award_idx", + "columns": [ + { + "expression": "award_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_updated_at_idx": { + "name": "ribbon_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_created_at_idx": { + "name": "ribbon_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ribbon_submissions_user_id_users_id_fk": { + "name": "ribbon_submissions_user_id_users_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ribbon_submissions_reviewed_by_id_users_id_fk": { + "name": "ribbon_submissions_reviewed_by_id_users_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "users", + "columnsFrom": [ + "reviewed_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ribbon_submissions_award_id_awards_id_fk": { + "name": "ribbon_submissions_award_id_awards_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "awards", + "columnsFrom": [ + "award_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_roles_provided_roles": { + "name": "missions_mission_roles_provided_roles", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "role_name": { + "name": "role_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "minimum_rank_id": { + "name": "minimum_rank_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_mission_roles_provided_roles_order_idx": { + "name": "missions_mission_roles_provided_roles_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_parent_id_idx": { + "name": "missions_mission_roles_provided_roles_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_minimum_rank_idx": { + "name": "missions_mission_roles_provided_roles_minimum_rank_idx", + "columns": [ + { + "expression": "minimum_rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk": { + "name": "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "ranks", + "columnsFrom": [ + "minimum_rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_mission_roles_provided_roles_parent_id_fk": { + "name": "missions_mission_roles_provided_roles_parent_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_briefing": { + "name": "missions_briefing", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "section_name": { + "name": "section_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "details": { + "name": "details", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_briefing_order_idx": { + "name": "missions_briefing_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_briefing_parent_id_idx": { + "name": "missions_briefing_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_briefing_parent_id_fk": { + "name": "missions_briefing_parent_id_fk", + "tableFrom": "missions_briefing", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_objectives": { + "name": "missions_mission_objectives", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "success_or_fail_conditions": { + "name": "success_or_fail_conditions", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "redacted": { + "name": "redacted", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "missions_mission_objectives_order_idx": { + "name": "missions_mission_objectives_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_objectives_parent_id_idx": { + "name": "missions_mission_objectives_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_objectives_parent_id_fk": { + "name": "missions_mission_objectives_parent_id_fk", + "tableFrom": "missions_mission_objectives", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_factions_involved": { + "name": "missions_factions_involved", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "threat_level": { + "name": "threat_level", + "type": "enum_missions_factions_involved_threat_level", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'hostile'" + } + }, + "indexes": { + "missions_factions_involved_order_idx": { + "name": "missions_factions_involved_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_factions_involved_parent_id_idx": { + "name": "missions_factions_involved_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_factions_involved_faction_idx": { + "name": "missions_factions_involved_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_factions_involved_faction_id_factions_id_fk": { + "name": "missions_factions_involved_faction_id_factions_id_fk", + "tableFrom": "missions_factions_involved", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_factions_involved_parent_id_fk": { + "name": "missions_factions_involved_parent_id_fk", + "tableFrom": "missions_factions_involved", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_insertion": { + "name": "missions_logistics_and_support_insertion", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_insertion", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_insertion_order_idx": { + "name": "missions_logistics_and_support_insertion_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_insertion_parent_idx": { + "name": "missions_logistics_and_support_insertion_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_insertion_parent_fk": { + "name": "missions_logistics_and_support_insertion_parent_fk", + "tableFrom": "missions_logistics_and_support_insertion", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_extraction": { + "name": "missions_logistics_and_support_extraction", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_extraction", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_extraction_order_idx": { + "name": "missions_logistics_and_support_extraction_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_extraction_parent_idx": { + "name": "missions_logistics_and_support_extraction_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_extraction_parent_fk": { + "name": "missions_logistics_and_support_extraction_parent_fk", + "tableFrom": "missions_logistics_and_support_extraction", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_assets_available": { + "name": "missions_logistics_and_support_assets_available", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_type": { + "name": "asset_type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "asset_count": { + "name": "asset_count", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "does_respawn": { + "name": "does_respawn", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_callsign": { + "name": "asset_callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_logistics_and_support_assets_available_order_idx": { + "name": "missions_logistics_and_support_assets_available_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_assets_available_parent_id_idx": { + "name": "missions_logistics_and_support_assets_available_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_assets_available_parent_id_fk": { + "name": "missions_logistics_and_support_assets_available_parent_id_fk", + "tableFrom": "missions_logistics_and_support_assets_available", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_comms_and_docs_frequencies": { + "name": "missions_comms_and_docs_frequencies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "frequency": { + "name": "frequency", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "channel": { + "name": "channel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "net_name": { + "name": "net_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "freq_usage": { + "name": "freq_usage", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_comms_and_docs_frequencies_order_idx": { + "name": "missions_comms_and_docs_frequencies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_comms_and_docs_frequencies_parent_id_idx": { + "name": "missions_comms_and_docs_frequencies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_comms_and_docs_frequencies_parent_id_fk": { + "name": "missions_comms_and_docs_frequencies_parent_id_fk", + "tableFrom": "missions_comms_and_docs_frequencies", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions": { + "name": "missions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "operation_type": { + "name": "operation_type", + "type": "enum_missions_operation_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "discord_message_id": { + "name": "discord_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_attendance_hash": { + "name": "discord_attendance_hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_attendance_sent_at": { + "name": "discord_attendance_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "discord_modlist_hash": { + "name": "discord_modlist_hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_cancelled_at": { + "name": "discord_cancelled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "evaluation_reminders_sent_at": { + "name": "evaluation_reminders_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "ready_reminder_web_sent_at": { + "name": "ready_reminder_web_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "ready_reminder_dm_sent_at": { + "name": "ready_reminder_dm_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "tickets_settled_at": { + "name": "tickets_settled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by_id": { + "name": "created_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "classification_map_id": { + "name": "classification_map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "classification_mission_type": { + "name": "classification_mission_type", + "type": "enum_missions_classification_mission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Zeus'" + }, + "classification_campaign_id": { + "name": "classification_campaign_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "classification_custom_scripts": { + "name": "classification_custom_scripts", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "classification_start_date_time": { + "name": "classification_start_date_time", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "classification_estimated_duration": { + "name": "classification_estimated_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 240 + }, + "ownership_and_status_status": { + "name": "ownership_and_status_status", + "type": "enum_missions_ownership_and_status_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Concept'" + }, + "ownership_and_status_visibility": { + "name": "ownership_and_status_visibility", + "type": "enum_missions_ownership_and_status_visibility", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'leadership'" + }, + "ownership_and_status_completed_at": { + "name": "ownership_and_status_completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "mission_roles_max_players": { + "name": "mission_roles_max_players", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 32 + }, + "mission_roles_notes": { + "name": "mission_roles_notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "civilian_presence": { + "name": "civilian_presence", + "type": "enum_missions_civilian_presence", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'None'" + }, + "game_details_server_details_server_ip": { + "name": "game_details_server_details_server_ip", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'arma.onyxsimple.com'" + }, + "game_details_server_details_server_port": { + "name": "game_details_server_details_server_port", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 2302 + }, + "game_details_server_details_server_password": { + "name": "game_details_server_details_server_password", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'ptf313'" + }, + "game_details_game_setup_mission_file_id": { + "name": "game_details_game_setup_mission_file_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_details_game_setup_required_mods_id": { + "name": "game_details_game_setup_required_mods_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "comms_and_docs_radio_plan": { + "name": "comms_and_docs_radio_plan", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "missions_code_name_idx": { + "name": "missions_code_name_idx", + "columns": [ + { + "expression": "code_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_created_by_idx": { + "name": "missions_created_by_idx", + "columns": [ + { + "expression": "created_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_cover_image_idx": { + "name": "missions_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_map_idx": { + "name": "missions_classification_classification_map_idx", + "columns": [ + { + "expression": "classification_map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_campaign_idx": { + "name": "missions_classification_classification_campaign_idx", + "columns": [ + { + "expression": "classification_campaign_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_setup_idx": { + "name": "missions_game_details_game_setup_game_details_game_setup_idx", + "columns": [ + { + "expression": "game_details_game_setup_mission_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_set_1_idx": { + "name": "missions_game_details_game_setup_game_details_game_set_1_idx", + "columns": [ + { + "expression": "game_details_game_setup_required_mods_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_updated_at_idx": { + "name": "missions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_created_at_idx": { + "name": "missions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_created_by_id_users_id_fk": { + "name": "missions_created_by_id_users_id_fk", + "tableFrom": "missions", + "tableTo": "users", + "columnsFrom": [ + "created_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_cover_image_id_media_id_fk": { + "name": "missions_cover_image_id_media_id_fk", + "tableFrom": "missions", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_classification_map_id_maps_id_fk": { + "name": "missions_classification_map_id_maps_id_fk", + "tableFrom": "missions", + "tableTo": "maps", + "columnsFrom": [ + "classification_map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_classification_campaign_id_campaigns_id_fk": { + "name": "missions_classification_campaign_id_campaigns_id_fk", + "tableFrom": "missions", + "tableTo": "campaigns", + "columnsFrom": [ + "classification_campaign_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_mission_file_id_mission_files_id_fk": { + "name": "missions_game_details_game_setup_mission_file_id_mission_files_id_fk", + "tableFrom": "missions", + "tableTo": "mission_files", + "columnsFrom": [ + "game_details_game_setup_mission_file_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk": { + "name": "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk", + "tableFrom": "missions", + "tableTo": "mod_lists", + "columnsFrom": [ + "game_details_game_setup_required_mods_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_rels": { + "name": "missions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_rels_order_idx": { + "name": "missions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_parent_idx": { + "name": "missions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_path_idx": { + "name": "missions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_users_id_idx": { + "name": "missions_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_qualifications_id_idx": { + "name": "missions_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_rels_parent_fk": { + "name": "missions_rels_parent_fk", + "tableFrom": "missions_rels", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_users_fk": { + "name": "missions_rels_users_fk", + "tableFrom": "missions_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_qualifications_fk": { + "name": "missions_rels_qualifications_fk", + "tableFrom": "missions_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mission_attendances": { + "name": "mission_attendances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "response": { + "name": "response", + "type": "enum_mission_attendances_response", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mission_attendances_mission_idx": { + "name": "mission_attendances_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_user_idx": { + "name": "mission_attendances_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_updated_at_idx": { + "name": "mission_attendances_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_created_at_idx": { + "name": "mission_attendances_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mission_attendances_mission_id_missions_id_fk": { + "name": "mission_attendances_mission_id_missions_id_fk", + "tableFrom": "mission_attendances", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "mission_attendances_user_id_users_id_fk": { + "name": "mission_attendances_user_id_users_id_fk", + "tableFrom": "mission_attendances", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.campaigns": { + "name": "campaigns", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'An Arma 3 campaign.'" + }, + "status": { + "name": "status", + "type": "enum_campaigns_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'concept'" + }, + "campaign_mode": { + "name": "campaign_mode", + "type": "enum_campaigns_campaign_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'custom'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "owner_id": { + "name": "owner_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "campaigns_name_idx": { + "name": "campaigns_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_cover_image_idx": { + "name": "campaigns_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_owner_idx": { + "name": "campaigns_owner_idx", + "columns": [ + { + "expression": "owner_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_updated_at_idx": { + "name": "campaigns_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_created_at_idx": { + "name": "campaigns_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "campaigns_cover_image_id_media_id_fk": { + "name": "campaigns_cover_image_id_media_id_fk", + "tableFrom": "campaigns", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "campaigns_owner_id_users_id_fk": { + "name": "campaigns_owner_id_users_id_fk", + "tableFrom": "campaigns", + "tableTo": "users", + "columnsFrom": [ + "owner_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions_relationships": { + "name": "factions_relationships", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "target_faction_id": { + "name": "target_faction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "factions_relationships_order_idx": { + "name": "factions_relationships_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_relationships_parent_id_idx": { + "name": "factions_relationships_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_relationships_target_faction_idx": { + "name": "factions_relationships_target_faction_idx", + "columns": [ + { + "expression": "target_faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_relationships_target_faction_id_factions_id_fk": { + "name": "factions_relationships_target_faction_id_factions_id_fk", + "tableFrom": "factions_relationships", + "tableTo": "factions", + "columnsFrom": [ + "target_faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "factions_relationships_parent_id_fk": { + "name": "factions_relationships_parent_id_fk", + "tableFrom": "factions_relationships", + "tableTo": "factions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions": { + "name": "factions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_factions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'minorFaction'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "reputation": { + "name": "reputation", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "playable_faction": { + "name": "playable_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "starting_faction": { + "name": "starting_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "factions_name_idx": { + "name": "factions_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_cover_image_idx": { + "name": "factions_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_updated_at_idx": { + "name": "factions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_created_at_idx": { + "name": "factions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_cover_image_id_media_id_fk": { + "name": "factions_cover_image_id_media_id_fk", + "tableFrom": "factions", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions_rels": { + "name": "factions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "factions_rels_order_idx": { + "name": "factions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_parent_idx": { + "name": "factions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_path_idx": { + "name": "factions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_campaigns_id_idx": { + "name": "factions_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_rels_parent_fk": { + "name": "factions_rels_parent_fk", + "tableFrom": "factions_rels", + "tableTo": "factions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "factions_rels_campaigns_fk": { + "name": "factions_rels_campaigns_fk", + "tableFrom": "factions_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_requirements_prerequisite_technologies": { + "name": "technologies_requirements_prerequisite_technologies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "technologies_requirements_prerequisite_technologies_order_idx": { + "name": "technologies_requirements_prerequisite_technologies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_requirements_prerequisite_technologies_parent_id_idx": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_requirements_prerequisite_technologies_parent_id_fk": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_fk", + "tableFrom": "technologies_requirements_prerequisite_technologies", + "tableTo": "technologies", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_research_costs_resources": { + "name": "technologies_research_costs_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + } + }, + "indexes": { + "technologies_research_costs_resources_order_idx": { + "name": "technologies_research_costs_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_research_costs_resources_parent_id_idx": { + "name": "technologies_research_costs_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_research_costs_resources_resource_idx": { + "name": "technologies_research_costs_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_research_costs_resources_resource_id_resources_id_fk": { + "name": "technologies_research_costs_resources_resource_id_resources_id_fk", + "tableFrom": "technologies_research_costs_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "technologies_research_costs_resources_parent_id_fk": { + "name": "technologies_research_costs_resources_parent_id_fk", + "tableFrom": "technologies_research_costs_resources", + "tableTo": "technologies", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies": { + "name": "technologies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_technologies_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "type": { + "name": "type", + "type": "enum_technologies_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'upgrade'" + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "research_costs_minimum_research_duration": { + "name": "research_costs_minimum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "research_costs_maximum_research_duration": { + "name": "research_costs_maximum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "technologies_updated_at_idx": { + "name": "technologies_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_created_at_idx": { + "name": "technologies_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_rels": { + "name": "technologies_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "technologies_rels_order_idx": { + "name": "technologies_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_parent_idx": { + "name": "technologies_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_path_idx": { + "name": "technologies_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_technologies_id_idx": { + "name": "technologies_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_rels_parent_fk": { + "name": "technologies_rels_parent_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "technologies_rels_technologies_fk": { + "name": "technologies_rels_technologies_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_skin_configuration_applies_to_asset_types": { + "name": "assets_skin_configuration_applies_to_asset_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_assets_skin_configuration_applies_to_asset_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "assets_skin_configuration_applies_to_asset_types_order_idx": { + "name": "assets_skin_configuration_applies_to_asset_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_skin_configuration_applies_to_asset_types_parent_idx": { + "name": "assets_skin_configuration_applies_to_asset_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_skin_configuration_applies_to_asset_types_parent_fk": { + "name": "assets_skin_configuration_applies_to_asset_types_parent_fk", + "tableFrom": "assets_skin_configuration_applies_to_asset_types", + "tableTo": "assets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_inputs": { + "name": "assets_crafting_crafting_data_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "lended": { + "name": "lended", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_inputs_order_idx": { + "name": "assets_crafting_crafting_data_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_inputs_parent_id_idx": { + "name": "assets_crafting_crafting_data_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_inputs_parent_id_fk": { + "name": "assets_crafting_crafting_data_inputs_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_inputs", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_byproducts": { + "name": "assets_crafting_crafting_data_byproducts", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_byproducts_order_idx": { + "name": "assets_crafting_crafting_data_byproducts_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_byproducts_parent_id_idx": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_byproducts_parent_id_fk": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_byproducts", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_assets_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "class_name": { + "name": "class_name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "asset_type": { + "name": "asset_type", + "type": "enum_assets_asset_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'weapon'" + }, + "weapon_configuration_slot_type": { + "name": "weapon_configuration_slot_type", + "type": "enum_assets_weapon_configuration_slot_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_generation": { + "name": "nightvision_configuration_nvg_generation", + "type": "enum_assets_nightvision_configuration_nvg_generation", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_has_thermals": { + "name": "nightvision_configuration_nvg_has_thermals", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "container_configuration_capacity_kg": { + "name": "container_configuration_capacity_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "container_configuration_weight_kg": { + "name": "container_configuration_weight_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_round_capacity": { + "name": "magazine_configuration_round_capacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_ammo_type": { + "name": "magazine_configuration_ammo_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_greenmag_compatible": { + "name": "magazine_configuration_greenmag_compatible", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_mod": { + "name": "asset_metadata_mod", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_thumbnail_id": { + "name": "asset_metadata_thumbnail_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_game_description": { + "name": "asset_metadata_game_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "market_trading_rarity": { + "name": "market_trading_rarity", + "type": "enum_assets_market_trading_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_buy_price": { + "name": "market_trading_perceived_value_base_buy_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_sell_price": { + "name": "market_trading_perceived_value_base_sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "economy_baseline_supply": { + "name": "economy_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "economy_baseline_demand": { + "name": "economy_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "economy_max_modifier": { + "name": "economy_max_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "crafting_craftable": { + "name": "crafting_craftable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_blueprint_required": { + "name": "crafting_blueprint_required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_technology_required_to_use": { + "name": "crafting_technology_required_to_use", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_crafting_data_crafting_time_per_unit": { + "name": "crafting_crafting_data_crafting_time_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "crafting_crafting_data_batch_size": { + "name": "crafting_crafting_data_batch_size", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_grid_width": { + "name": "storage_dimensions_grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_grid_height": { + "name": "storage_dimensions_grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_stackable": { + "name": "storage_dimensions_stackable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "storage_dimensions_max_stack_size": { + "name": "storage_dimensions_max_stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "storage_dimensions_rotatable": { + "name": "storage_dimensions_rotatable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "is_live": { + "name": "is_live", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assets_asset_metadata_asset_metadata_thumbnail_idx": { + "name": "assets_asset_metadata_asset_metadata_thumbnail_idx", + "columns": [ + { + "expression": "asset_metadata_thumbnail_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_updated_at_idx": { + "name": "assets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_created_at_idx": { + "name": "assets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_asset_metadata_thumbnail_id_media_id_fk": { + "name": "assets_asset_metadata_thumbnail_id_media_id_fk", + "tableFrom": "assets", + "tableTo": "media", + "columnsFrom": [ + "asset_metadata_thumbnail_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_rels": { + "name": "assets_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_rels_order_idx": { + "name": "assets_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_parent_idx": { + "name": "assets_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_path_idx": { + "name": "assets_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_assets_id_idx": { + "name": "assets_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_technologies_id_idx": { + "name": "assets_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_resources_id_idx": { + "name": "assets_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_structures_id_idx": { + "name": "assets_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_rels_parent_fk": { + "name": "assets_rels_parent_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_assets_fk": { + "name": "assets_rels_assets_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_technologies_fk": { + "name": "assets_rels_technologies_fk", + "tableFrom": "assets_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_resources_fk": { + "name": "assets_rels_resources_fk", + "tableFrom": "assets_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_structures_fk": { + "name": "assets_rels_structures_fk", + "tableFrom": "assets_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resources": { + "name": "resources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_resources_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "type": { + "name": "type", + "type": "enum_resources_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'physical'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "icon_id": { + "name": "icon_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "base_value": { + "name": "base_value", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "rarity": { + "name": "rarity", + "type": "enum_resources_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'common'" + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "economy_baseline_supply": { + "name": "economy_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "economy_baseline_demand": { + "name": "economy_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "economy_max_modifier": { + "name": "economy_max_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "unit_of_measure": { + "name": "unit_of_measure", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mass_per_unit": { + "name": "mass_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "stack_size": { + "name": "stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "grid_width": { + "name": "grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "grid_height": { + "name": "grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "stackable": { + "name": "stackable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "max_stack_size": { + "name": "max_stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "rotatable": { + "name": "rotatable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resources_icon_idx": { + "name": "resources_icon_idx", + "columns": [ + { + "expression": "icon_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_updated_at_idx": { + "name": "resources_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_created_at_idx": { + "name": "resources_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resources_icon_id_media_id_fk": { + "name": "resources_icon_id_media_id_fk", + "tableFrom": "resources", + "tableTo": "media", + "columnsFrom": [ + "icon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_category": { + "name": "vehicles_category", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_vehicles_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "vehicles_category_order_idx": { + "name": "vehicles_category_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_category_parent_idx": { + "name": "vehicles_category_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_category_parent_fk": { + "name": "vehicles_category_parent_fk", + "tableFrom": "vehicles_category", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_materials": { + "name": "vehicles_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_materials_order_idx": { + "name": "vehicles_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_parent_id_idx": { + "name": "vehicles_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_resource_idx": { + "name": "vehicles_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_materials_resource_id_resources_id_fk": { + "name": "vehicles_materials_resource_id_resources_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_materials_parent_id_fk": { + "name": "vehicles_materials_parent_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_scrap_returns": { + "name": "vehicles_scrap_returns", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "chance": { + "name": "chance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + } + }, + "indexes": { + "vehicles_scrap_returns_order_idx": { + "name": "vehicles_scrap_returns_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_parent_id_idx": { + "name": "vehicles_scrap_returns_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_resource_idx": { + "name": "vehicles_scrap_returns_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_scrap_returns_resource_id_resources_id_fk": { + "name": "vehicles_scrap_returns_resource_id_resources_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_scrap_returns_parent_id_fk": { + "name": "vehicles_scrap_returns_parent_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_upkeep_costs": { + "name": "vehicles_upkeep_costs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_upkeep_costs_order_idx": { + "name": "vehicles_upkeep_costs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_parent_id_idx": { + "name": "vehicles_upkeep_costs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_resource_idx": { + "name": "vehicles_upkeep_costs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_upkeep_costs_resource_id_resources_id_fk": { + "name": "vehicles_upkeep_costs_resource_id_resources_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_upkeep_costs_parent_id_fk": { + "name": "vehicles_upkeep_costs_parent_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_allowed_virtual_cargo": { + "name": "vehicles_allowed_virtual_cargo", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_allowed_virtual_cargo_order_idx": { + "name": "vehicles_allowed_virtual_cargo_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_allowed_virtual_cargo_parent_id_idx": { + "name": "vehicles_allowed_virtual_cargo_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_allowed_virtual_cargo_parent_id_fk": { + "name": "vehicles_allowed_virtual_cargo_parent_id_fk", + "tableFrom": "vehicles_allowed_virtual_cargo", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_pylons": { + "name": "vehicles_pylons", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "pylon_name": { + "name": "pylon_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pylon_type": { + "name": "pylon_type", + "type": "enum_vehicles_pylons_pylon_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'mountedWeapon'" + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "ammo_type_id": { + "name": "ammo_type_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_pylons_order_idx": { + "name": "vehicles_pylons_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_parent_id_idx": { + "name": "vehicles_pylons_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_ammo_type_idx": { + "name": "vehicles_pylons_ammo_type_idx", + "columns": [ + { + "expression": "ammo_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_pylons_ammo_type_id_assets_id_fk": { + "name": "vehicles_pylons_ammo_type_id_assets_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "assets", + "columnsFrom": [ + "ammo_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_pylons_parent_id_fk": { + "name": "vehicles_pylons_parent_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles": { + "name": "vehicles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "classname": { + "name": "classname", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "approval_status": { + "name": "approval_status", + "type": "enum_vehicles_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "fuel_fuel_type_id": { + "name": "fuel_fuel_type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "fuel_fuel_capacity": { + "name": "fuel_fuel_capacity", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_fuel_consumption_rate": { + "name": "fuel_fuel_consumption_rate", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "construction_time": { + "name": "construction_time", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "transport_mode": { + "name": "transport_mode", + "type": "enum_vehicles_transport_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'ground'" + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_mass": { + "name": "max_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "ace_cargo_slots": { + "name": "ace_cargo_slots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "armor_rating": { + "name": "armor_rating", + "type": "enum_vehicles_armor_rating", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_speed_on_road": { + "name": "max_speed_on_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_speed_off_road": { + "name": "max_speed_off_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_airspeed": { + "name": "max_airspeed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_knots": { + "name": "max_knots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "vehicles_image_idx": { + "name": "vehicles_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_fuel_fuel_fuel_type_idx": { + "name": "vehicles_fuel_fuel_fuel_type_idx", + "columns": [ + { + "expression": "fuel_fuel_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_updated_at_idx": { + "name": "vehicles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_created_at_idx": { + "name": "vehicles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_image_id_media_id_fk": { + "name": "vehicles_image_id_media_id_fk", + "tableFrom": "vehicles", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_fuel_fuel_type_id_resources_id_fk": { + "name": "vehicles_fuel_fuel_type_id_resources_id_fk", + "tableFrom": "vehicles", + "tableTo": "resources", + "columnsFrom": [ + "fuel_fuel_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_rels": { + "name": "vehicles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_rels_order_idx": { + "name": "vehicles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_parent_idx": { + "name": "vehicles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_path_idx": { + "name": "vehicles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_technologies_id_idx": { + "name": "vehicles_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_assets_id_idx": { + "name": "vehicles_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_vehicles_id_idx": { + "name": "vehicles_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_resources_id_idx": { + "name": "vehicles_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_rels_parent_fk": { + "name": "vehicles_rels_parent_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_technologies_fk": { + "name": "vehicles_rels_technologies_fk", + "tableFrom": "vehicles_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_assets_fk": { + "name": "vehicles_rels_assets_fk", + "tableFrom": "vehicles_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_vehicles_fk": { + "name": "vehicles_rels_vehicles_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_resources_fk": { + "name": "vehicles_rels_resources_fk", + "tableFrom": "vehicles_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_materials": { + "name": "structures_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_materials_order_idx": { + "name": "structures_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_parent_id_idx": { + "name": "structures_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_resource_idx": { + "name": "structures_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_materials_resource_id_resources_id_fk": { + "name": "structures_materials_resource_id_resources_id_fk", + "tableFrom": "structures_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_materials_parent_id_fk": { + "name": "structures_materials_parent_id_fk", + "tableFrom": "structures_materials", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_resources_in_range": { + "name": "structures_resources_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_resources_in_range_order_idx": { + "name": "structures_resources_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_parent_id_idx": { + "name": "structures_resources_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_resource_idx": { + "name": "structures_resources_in_range_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_resources_in_range_resource_id_resources_id_fk": { + "name": "structures_resources_in_range_resource_id_resources_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_resources_in_range_parent_id_fk": { + "name": "structures_resources_in_range_parent_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_structures_in_range": { + "name": "structures_structures_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_structures_in_range_order_idx": { + "name": "structures_structures_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_parent_id_idx": { + "name": "structures_structures_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_structure_idx": { + "name": "structures_structures_in_range_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_structures_in_range_structure_id_structures_id_fk": { + "name": "structures_structures_in_range_structure_id_structures_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_structures_in_range_parent_id_fk": { + "name": "structures_structures_in_range_parent_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_upkeep": { + "name": "structures_upkeep", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_upkeep_order_idx": { + "name": "structures_upkeep_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_parent_id_idx": { + "name": "structures_upkeep_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_resource_idx": { + "name": "structures_upkeep_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_upkeep_resource_id_resources_id_fk": { + "name": "structures_upkeep_resource_id_resources_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upkeep_parent_id_fk": { + "name": "structures_upkeep_parent_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_labor_requirements": { + "name": "structures_labor_requirements", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "classification_id": { + "name": "classification_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "required_headcount": { + "name": "required_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_headcount": { + "name": "max_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_labor_requirements_order_idx": { + "name": "structures_labor_requirements_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_labor_requirements_parent_id_idx": { + "name": "structures_labor_requirements_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_labor_requirements_classification_idx": { + "name": "structures_labor_requirements_classification_idx", + "columns": [ + { + "expression": "classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_labor_requirements_classification_id_labor_classifications_id_fk": { + "name": "structures_labor_requirements_classification_id_labor_classifications_id_fk", + "tableFrom": "structures_labor_requirements", + "tableTo": "labor_classifications", + "columnsFrom": [ + "classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_labor_requirements_parent_id_fk": { + "name": "structures_labor_requirements_parent_id_fk", + "tableFrom": "structures_labor_requirements", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_staff_positions": { + "name": "structures_staff_positions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_structures_staff_positions_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "max": { + "name": "max", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_staff_positions_order_idx": { + "name": "structures_staff_positions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_staff_positions_parent_id_idx": { + "name": "structures_staff_positions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_staff_positions_parent_id_fk": { + "name": "structures_staff_positions_parent_id_fk", + "tableFrom": "structures_staff_positions", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_production_inputs": { + "name": "structures_production_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "structures_production_inputs_order_idx": { + "name": "structures_production_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_inputs_parent_id_idx": { + "name": "structures_production_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_inputs_resource_idx": { + "name": "structures_production_inputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_production_inputs_resource_id_resources_id_fk": { + "name": "structures_production_inputs_resource_id_resources_id_fk", + "tableFrom": "structures_production_inputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_production_inputs_parent_id_fk": { + "name": "structures_production_inputs_parent_id_fk", + "tableFrom": "structures_production_inputs", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_production_outputs": { + "name": "structures_production_outputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "structures_production_outputs_order_idx": { + "name": "structures_production_outputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_outputs_parent_id_idx": { + "name": "structures_production_outputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_outputs_resource_idx": { + "name": "structures_production_outputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_production_outputs_resource_id_resources_id_fk": { + "name": "structures_production_outputs_resource_id_resources_id_fk", + "tableFrom": "structures_production_outputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_production_outputs_parent_id_fk": { + "name": "structures_production_outputs_parent_id_fk", + "tableFrom": "structures_production_outputs", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_auto_generated_resources": { + "name": "structures_auto_generated_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "min_amount": { + "name": "min_amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "max_amount": { + "name": "max_amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "min_frequency": { + "name": "min_frequency", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'1'" + }, + "max_frequency": { + "name": "max_frequency", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "produce_chance": { + "name": "produce_chance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + } + }, + "indexes": { + "structures_auto_generated_resources_order_idx": { + "name": "structures_auto_generated_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_parent_id_idx": { + "name": "structures_auto_generated_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_resource_idx": { + "name": "structures_auto_generated_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_auto_generated_resources_resource_id_resources_id_fk": { + "name": "structures_auto_generated_resources_resource_id_resources_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_auto_generated_resources_parent_id_fk": { + "name": "structures_auto_generated_resources_parent_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_allowed_storage": { + "name": "structures_allowed_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_allowed_storage_order_idx": { + "name": "structures_allowed_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_allowed_storage_parent_id_idx": { + "name": "structures_allowed_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_allowed_storage_parent_id_fk": { + "name": "structures_allowed_storage_parent_id_fk", + "tableFrom": "structures_allowed_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_prohibited_storage": { + "name": "structures_prohibited_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "structures_prohibited_storage_order_idx": { + "name": "structures_prohibited_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_prohibited_storage_parent_id_idx": { + "name": "structures_prohibited_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_prohibited_storage_parent_id_fk": { + "name": "structures_prohibited_storage_parent_id_fk", + "tableFrom": "structures_prohibited_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures": { + "name": "structures", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_structures_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "category": { + "name": "category", + "type": "enum_structures_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "construction_duration_minutes": { + "name": "construction_duration_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "construction_crew_required": { + "name": "construction_crew_required", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "requires_upgrade": { + "name": "requires_upgrade", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "upgrades_into_id": { + "name": "upgrades_into_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "upgrade_cost_multiplier": { + "name": "upgrade_cost_multiplier", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "terrain_type": { + "name": "terrain_type", + "type": "enum_structures_terrain_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "sell_price": { + "name": "sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "maintenance_cost": { + "name": "maintenance_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "function_type": { + "name": "function_type", + "type": "enum_structures_function_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_capacity_mass": { + "name": "max_capacity_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "restrict_to_allowed": { + "name": "restrict_to_allowed", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "x_size": { + "name": "x_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "y_size": { + "name": "y_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "repair_speed": { + "name": "repair_speed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "structures_image_idx": { + "name": "structures_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upgrades_into_idx": { + "name": "structures_upgrades_into_idx", + "columns": [ + { + "expression": "upgrades_into_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_updated_at_idx": { + "name": "structures_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_created_at_idx": { + "name": "structures_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_image_id_media_id_fk": { + "name": "structures_image_id_media_id_fk", + "tableFrom": "structures", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upgrades_into_id_structures_id_fk": { + "name": "structures_upgrades_into_id_structures_id_fk", + "tableFrom": "structures", + "tableTo": "structures", + "columnsFrom": [ + "upgrades_into_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_rels": { + "name": "structures_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_rels_order_idx": { + "name": "structures_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_parent_idx": { + "name": "structures_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_path_idx": { + "name": "structures_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_technologies_id_idx": { + "name": "structures_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_assets_id_idx": { + "name": "structures_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_vehicles_id_idx": { + "name": "structures_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_resources_id_idx": { + "name": "structures_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_rels_parent_fk": { + "name": "structures_rels_parent_fk", + "tableFrom": "structures_rels", + "tableTo": "structures", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_technologies_fk": { + "name": "structures_rels_technologies_fk", + "tableFrom": "structures_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_assets_fk": { + "name": "structures_rels_assets_fk", + "tableFrom": "structures_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_vehicles_fk": { + "name": "structures_rels_vehicles_fk", + "tableFrom": "structures_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_resources_fk": { + "name": "structures_rels_resources_fk", + "tableFrom": "structures_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments_cargo": { + "name": "shipments_cargo", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "shipments_cargo_order_idx": { + "name": "shipments_cargo_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_cargo_parent_id_idx": { + "name": "shipments_cargo_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_cargo_parent_id_fk": { + "name": "shipments_cargo_parent_id_fk", + "tableFrom": "shipments_cargo", + "tableTo": "shipments", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments": { + "name": "shipments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "origin_id": { + "name": "origin_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "destination_id": { + "name": "destination_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "route_path": { + "name": "route_path", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "transport_vehicle_id": { + "name": "transport_vehicle_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "distance": { + "name": "distance", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_cost": { + "name": "fuel_cost", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_consumed": { + "name": "fuel_consumed", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_shipments_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "dispatched_at": { + "name": "dispatched_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "estimated_arrival": { + "name": "estimated_arrival", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "auto_return": { + "name": "auto_return", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "created_by_id": { + "name": "created_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "shipments_origin_idx": { + "name": "shipments_origin_idx", + "columns": [ + { + "expression": "origin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_destination_idx": { + "name": "shipments_destination_idx", + "columns": [ + { + "expression": "destination_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_map_idx": { + "name": "shipments_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_transport_vehicle_idx": { + "name": "shipments_transport_vehicle_idx", + "columns": [ + { + "expression": "transport_vehicle_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_created_by_idx": { + "name": "shipments_created_by_idx", + "columns": [ + { + "expression": "created_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_updated_at_idx": { + "name": "shipments_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_created_at_idx": { + "name": "shipments_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_origin_id_game_structures_id_fk": { + "name": "shipments_origin_id_game_structures_id_fk", + "tableFrom": "shipments", + "tableTo": "game_structures", + "columnsFrom": [ + "origin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_destination_id_game_structures_id_fk": { + "name": "shipments_destination_id_game_structures_id_fk", + "tableFrom": "shipments", + "tableTo": "game_structures", + "columnsFrom": [ + "destination_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_map_id_maps_id_fk": { + "name": "shipments_map_id_maps_id_fk", + "tableFrom": "shipments", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_transport_vehicle_id_game_vehicles_id_fk": { + "name": "shipments_transport_vehicle_id_game_vehicles_id_fk", + "tableFrom": "shipments", + "tableTo": "game_vehicles", + "columnsFrom": [ + "transport_vehicle_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_created_by_id_users_id_fk": { + "name": "shipments_created_by_id_users_id_fk", + "tableFrom": "shipments", + "tableTo": "users", + "columnsFrom": [ + "created_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments_rels": { + "name": "shipments_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shipments_rels_order_idx": { + "name": "shipments_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_parent_idx": { + "name": "shipments_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_path_idx": { + "name": "shipments_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_resources_id_idx": { + "name": "shipments_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_assets_id_idx": { + "name": "shipments_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_vehicles_id_idx": { + "name": "shipments_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_rels_parent_fk": { + "name": "shipments_rels_parent_fk", + "tableFrom": "shipments_rels", + "tableTo": "shipments", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_resources_fk": { + "name": "shipments_rels_resources_fk", + "tableFrom": "shipments_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_assets_fk": { + "name": "shipments_rels_assets_fk", + "tableFrom": "shipments_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_vehicles_fk": { + "name": "shipments_rels_vehicles_fk", + "tableFrom": "shipments_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.bank_accounts": { + "name": "bank_accounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "account_type": { + "name": "account_type", + "type": "enum_bank_accounts_account_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'personal'" + }, + "owner_faction_id": { + "name": "owner_faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "currency_id": { + "name": "currency_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "balance": { + "name": "balance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_bank_accounts_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "bank_accounts_owner_faction_idx": { + "name": "bank_accounts_owner_faction_idx", + "columns": [ + { + "expression": "owner_faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_owner_user_idx": { + "name": "bank_accounts_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_currency_idx": { + "name": "bank_accounts_currency_idx", + "columns": [ + { + "expression": "currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_updated_at_idx": { + "name": "bank_accounts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "bank_accounts_owner_faction_id_factions_id_fk": { + "name": "bank_accounts_owner_faction_id_factions_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "factions", + "columnsFrom": [ + "owner_faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_accounts_owner_user_id_users_id_fk": { + "name": "bank_accounts_owner_user_id_users_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_accounts_currency_id_resources_id_fk": { + "name": "bank_accounts_currency_id_resources_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "resources", + "columnsFrom": [ + "currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.bank_transactions": { + "name": "bank_transactions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "transaction_number": { + "name": "transaction_number", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_bank_transactions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "from_account_id": { + "name": "from_account_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_account_id": { + "name": "to_account_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fee": { + "name": "fee", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "memo": { + "name": "memo", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "actor_id": { + "name": "actor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_bank_transactions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'completed'" + }, + "reference_id": { + "name": "reference_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "bank_transactions_transaction_number_idx": { + "name": "bank_transactions_transaction_number_idx", + "columns": [ + { + "expression": "transaction_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_from_account_idx": { + "name": "bank_transactions_from_account_idx", + "columns": [ + { + "expression": "from_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_to_account_idx": { + "name": "bank_transactions_to_account_idx", + "columns": [ + { + "expression": "to_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_actor_idx": { + "name": "bank_transactions_actor_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_reference_idx": { + "name": "bank_transactions_reference_idx", + "columns": [ + { + "expression": "reference_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_updated_at_idx": { + "name": "bank_transactions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_created_at_idx": { + "name": "bank_transactions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "bank_transactions_from_account_id_bank_accounts_id_fk": { + "name": "bank_transactions_from_account_id_bank_accounts_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_accounts", + "columnsFrom": [ + "from_account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_to_account_id_bank_accounts_id_fk": { + "name": "bank_transactions_to_account_id_bank_accounts_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_accounts", + "columnsFrom": [ + "to_account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_actor_id_users_id_fk": { + "name": "bank_transactions_actor_id_users_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "users", + "columnsFrom": [ + "actor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_reference_id_bank_transactions_id_fk": { + "name": "bank_transactions_reference_id_bank_transactions_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_transactions", + "columnsFrom": [ + "reference_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ledger_entries": { + "name": "ledger_entries", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "account_id": { + "name": "account_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "transaction_id": { + "name": "transaction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_ledger_entries_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "balance_after": { + "name": "balance_after", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "memo": { + "name": "memo", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ledger_entries_account_idx": { + "name": "ledger_entries_account_idx", + "columns": [ + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_transaction_idx": { + "name": "ledger_entries_transaction_idx", + "columns": [ + { + "expression": "transaction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_updated_at_idx": { + "name": "ledger_entries_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_created_at_idx": { + "name": "ledger_entries_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ledger_entries_account_id_bank_accounts_id_fk": { + "name": "ledger_entries_account_id_bank_accounts_id_fk", + "tableFrom": "ledger_entries", + "tableTo": "bank_accounts", + "columnsFrom": [ + "account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ledger_entries_transaction_id_bank_transactions_id_fk": { + "name": "ledger_entries_transaction_id_bank_transactions_id_fk", + "tableFrom": "ledger_entries", + "tableTo": "bank_transactions", + "columnsFrom": [ + "transaction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages_items_equipment_attachments": { + "name": "locker_storages_items_equipment_attachments", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "locker_storages_items_equipment_attachments_order_idx": { + "name": "locker_storages_items_equipment_attachments_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_attachments_parent_id_idx": { + "name": "locker_storages_items_equipment_attachments_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_attachments_asset_idx": { + "name": "locker_storages_items_equipment_attachments_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_items_equipment_attachments_asset_id_assets_id_fk": { + "name": "locker_storages_items_equipment_attachments_asset_id_assets_id_fk", + "tableFrom": "locker_storages_items_equipment_attachments", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_equipment_attachments_parent_id_fk": { + "name": "locker_storages_items_equipment_attachments_parent_id_fk", + "tableFrom": "locker_storages_items_equipment_attachments", + "tableTo": "locker_storages_items", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages_items": { + "name": "locker_storages_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "equipment_skin_id": { + "name": "equipment_skin_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "equipment_custom_name": { + "name": "equipment_custom_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "locker_storages_items_order_idx": { + "name": "locker_storages_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_parent_id_idx": { + "name": "locker_storages_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_asset_idx": { + "name": "locker_storages_items_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_equipment_skin_idx": { + "name": "locker_storages_items_equipment_equipment_skin_idx", + "columns": [ + { + "expression": "equipment_skin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_items_asset_id_assets_id_fk": { + "name": "locker_storages_items_asset_id_assets_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_equipment_skin_id_assets_id_fk": { + "name": "locker_storages_items_equipment_skin_id_assets_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "assets", + "columnsFrom": [ + "equipment_skin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_parent_id_fk": { + "name": "locker_storages_items_parent_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "locker_storages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages": { + "name": "locker_storages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Personal Locker'" + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "item_count": { + "name": "item_count", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "locker_storages_owner_user_idx": { + "name": "locker_storages_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_updated_at_idx": { + "name": "locker_storages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_created_at_idx": { + "name": "locker_storages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_owner_user_id_users_id_fk": { + "name": "locker_storages_owner_user_id_users_id_fk", + "tableFrom": "locker_storages", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.loadouts": { + "name": "loadouts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "equipped": { + "name": "equipped", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "slots_primary_id": { + "name": "slots_primary_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_secondary_id": { + "name": "slots_secondary_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_launcher_id": { + "name": "slots_launcher_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_uniform_id": { + "name": "slots_uniform_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_vest_id": { + "name": "slots_vest_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_backpack_id": { + "name": "slots_backpack_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_helmet_id": { + "name": "slots_helmet_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_facewear_id": { + "name": "slots_facewear_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_nvg_id": { + "name": "slots_nvg_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_radio_id": { + "name": "slots_radio_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_optic_id": { + "name": "slots_optic_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_muzzle_id": { + "name": "slots_muzzle_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_bipod_id": { + "name": "slots_bipod_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "loadouts_owner_user_idx": { + "name": "loadouts_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_primary_idx": { + "name": "loadouts_slots_slots_primary_idx", + "columns": [ + { + "expression": "slots_primary_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_secondary_idx": { + "name": "loadouts_slots_slots_secondary_idx", + "columns": [ + { + "expression": "slots_secondary_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_launcher_idx": { + "name": "loadouts_slots_slots_launcher_idx", + "columns": [ + { + "expression": "slots_launcher_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_uniform_idx": { + "name": "loadouts_slots_slots_uniform_idx", + "columns": [ + { + "expression": "slots_uniform_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_vest_idx": { + "name": "loadouts_slots_slots_vest_idx", + "columns": [ + { + "expression": "slots_vest_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_backpack_idx": { + "name": "loadouts_slots_slots_backpack_idx", + "columns": [ + { + "expression": "slots_backpack_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_helmet_idx": { + "name": "loadouts_slots_slots_helmet_idx", + "columns": [ + { + "expression": "slots_helmet_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_facewear_idx": { + "name": "loadouts_slots_slots_facewear_idx", + "columns": [ + { + "expression": "slots_facewear_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_nvg_idx": { + "name": "loadouts_slots_slots_nvg_idx", + "columns": [ + { + "expression": "slots_nvg_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_radio_idx": { + "name": "loadouts_slots_slots_radio_idx", + "columns": [ + { + "expression": "slots_radio_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_optic_idx": { + "name": "loadouts_slots_slots_optic_idx", + "columns": [ + { + "expression": "slots_optic_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_muzzle_idx": { + "name": "loadouts_slots_slots_muzzle_idx", + "columns": [ + { + "expression": "slots_muzzle_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_bipod_idx": { + "name": "loadouts_slots_slots_bipod_idx", + "columns": [ + { + "expression": "slots_bipod_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_updated_at_idx": { + "name": "loadouts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_created_at_idx": { + "name": "loadouts_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "loadouts_owner_user_id_users_id_fk": { + "name": "loadouts_owner_user_id_users_id_fk", + "tableFrom": "loadouts", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_primary_id_assets_id_fk": { + "name": "loadouts_slots_primary_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_primary_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_secondary_id_assets_id_fk": { + "name": "loadouts_slots_secondary_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_secondary_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_launcher_id_assets_id_fk": { + "name": "loadouts_slots_launcher_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_launcher_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_uniform_id_assets_id_fk": { + "name": "loadouts_slots_uniform_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_uniform_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_vest_id_assets_id_fk": { + "name": "loadouts_slots_vest_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_vest_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_backpack_id_assets_id_fk": { + "name": "loadouts_slots_backpack_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_backpack_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_helmet_id_assets_id_fk": { + "name": "loadouts_slots_helmet_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_helmet_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_facewear_id_assets_id_fk": { + "name": "loadouts_slots_facewear_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_facewear_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_nvg_id_assets_id_fk": { + "name": "loadouts_slots_nvg_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_nvg_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_radio_id_assets_id_fk": { + "name": "loadouts_slots_radio_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_radio_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_optic_id_assets_id_fk": { + "name": "loadouts_slots_optic_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_optic_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_muzzle_id_assets_id_fk": { + "name": "loadouts_slots_muzzle_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_muzzle_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_bipod_id_assets_id_fk": { + "name": "loadouts_slots_bipod_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_bipod_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_listings": { + "name": "market_listings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "seller_id": { + "name": "seller_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "npc_id": { + "name": "npc_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "price": { + "name": "price", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "desired_price": { + "name": "desired_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "min_price": { + "name": "min_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "currency_id": { + "name": "currency_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_market_listings_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "is_auto_generated": { + "name": "is_auto_generated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "listed_at": { + "name": "listed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "sold_at": { + "name": "sold_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "buyer_id": { + "name": "buyer_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_listings_asset_idx": { + "name": "market_listings_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_seller_idx": { + "name": "market_listings_seller_idx", + "columns": [ + { + "expression": "seller_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_npc_idx": { + "name": "market_listings_npc_idx", + "columns": [ + { + "expression": "npc_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_currency_idx": { + "name": "market_listings_currency_idx", + "columns": [ + { + "expression": "currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_status_idx": { + "name": "market_listings_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_buyer_idx": { + "name": "market_listings_buyer_idx", + "columns": [ + { + "expression": "buyer_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_updated_at_idx": { + "name": "market_listings_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_created_at_idx": { + "name": "market_listings_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_listings_asset_id_assets_id_fk": { + "name": "market_listings_asset_id_assets_id_fk", + "tableFrom": "market_listings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_seller_id_users_id_fk": { + "name": "market_listings_seller_id_users_id_fk", + "tableFrom": "market_listings", + "tableTo": "users", + "columnsFrom": [ + "seller_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_npc_id_game_npcs_id_fk": { + "name": "market_listings_npc_id_game_npcs_id_fk", + "tableFrom": "market_listings", + "tableTo": "game_npcs", + "columnsFrom": [ + "npc_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_currency_id_resources_id_fk": { + "name": "market_listings_currency_id_resources_id_fk", + "tableFrom": "market_listings", + "tableTo": "resources", + "columnsFrom": [ + "currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_buyer_id_users_id_fk": { + "name": "market_listings_buyer_id_users_id_fk", + "tableFrom": "market_listings", + "tableTo": "users", + "columnsFrom": [ + "buyer_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_negotiations_history": { + "name": "market_negotiations_history", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "from": { + "name": "from", + "type": "enum_market_negotiations_history_from", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "at": { + "name": "at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "market_negotiations_history_order_idx": { + "name": "market_negotiations_history_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_history_parent_id_idx": { + "name": "market_negotiations_history_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_negotiations_history_parent_id_fk": { + "name": "market_negotiations_history_parent_id_fk", + "tableFrom": "market_negotiations_history", + "tableTo": "market_negotiations", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_negotiations": { + "name": "market_negotiations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "listing_id": { + "name": "listing_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "buyer_id": { + "name": "buyer_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_market_negotiations_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "patience": { + "name": "patience", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "proposed_by": { + "name": "proposed_by", + "type": "enum_market_negotiations_proposed_by", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'buyer'" + }, + "accepted_price": { + "name": "accepted_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_negotiations_listing_idx": { + "name": "market_negotiations_listing_idx", + "columns": [ + { + "expression": "listing_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_buyer_idx": { + "name": "market_negotiations_buyer_idx", + "columns": [ + { + "expression": "buyer_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_status_idx": { + "name": "market_negotiations_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_updated_at_idx": { + "name": "market_negotiations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_created_at_idx": { + "name": "market_negotiations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_negotiations_listing_id_market_listings_id_fk": { + "name": "market_negotiations_listing_id_market_listings_id_fk", + "tableFrom": "market_negotiations", + "tableTo": "market_listings", + "columnsFrom": [ + "listing_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_negotiations_buyer_id_users_id_fk": { + "name": "market_negotiations_buyer_id_users_id_fk", + "tableFrom": "market_negotiations", + "tableTo": "users", + "columnsFrom": [ + "buyer_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_state": { + "name": "market_state", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "item_type": { + "name": "item_type", + "type": "enum_market_state_item_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "item_id": { + "name": "item_id", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "gm_baseline_supply": { + "name": "gm_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 100 + }, + "gm_baseline_demand": { + "name": "gm_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 50 + }, + "current_supply": { + "name": "current_supply", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 100 + }, + "artificial_demand": { + "name": "artificial_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 50 + }, + "real_demand": { + "name": "real_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "price_modifier": { + "name": "price_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "last_computed_at": { + "name": "last_computed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_state_item_type_idx": { + "name": "market_state_item_type_idx", + "columns": [ + { + "expression": "item_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_item_id_idx": { + "name": "market_state_item_id_idx", + "columns": [ + { + "expression": "item_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_updated_at_idx": { + "name": "market_state_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_created_at_idx": { + "name": "market_state_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "itemType_itemId_idx": { + "name": "itemType_itemId_idx", + "columns": [ + { + "expression": "item_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "item_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.voice_scripts": { + "name": "voice_scripts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "script": { + "name": "script", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "xp_amount": { + "name": "xp_amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 250 + }, + "spoiler": { + "name": "spoiler", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "status": { + "name": "status", + "type": "enum_voice_scripts_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'draft'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "voice_scripts_updated_at_idx": { + "name": "voice_scripts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_scripts_created_at_idx": { + "name": "voice_scripts_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.voice_submissions": { + "name": "voice_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "script_id": { + "name": "script_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_voice_submissions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "review_note": { + "name": "review_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "voice_submissions_script_idx": { + "name": "voice_submissions_script_idx", + "columns": [ + { + "expression": "script_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_user_idx": { + "name": "voice_submissions_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_updated_at_idx": { + "name": "voice_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_created_at_idx": { + "name": "voice_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_filename_idx": { + "name": "voice_submissions_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "voice_submissions_script_id_voice_scripts_id_fk": { + "name": "voice_submissions_script_id_voice_scripts_id_fk", + "tableFrom": "voice_submissions", + "tableTo": "voice_scripts", + "columnsFrom": [ + "script_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "voice_submissions_user_id_users_id_fk": { + "name": "voice_submissions_user_id_users_id_fk", + "tableFrom": "voice_submissions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_activity": { + "name": "tickets_activity", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_tickets_activity_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'system'" + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tickets_activity_order_idx": { + "name": "tickets_activity_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_activity_parent_id_idx": { + "name": "tickets_activity_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_activity_author_idx": { + "name": "tickets_activity_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_activity_author_id_users_id_fk": { + "name": "tickets_activity_author_id_users_id_fk", + "tableFrom": "tickets_activity", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_activity_parent_id_fk": { + "name": "tickets_activity_parent_id_fk", + "tableFrom": "tickets_activity", + "tableTo": "tickets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_edit_history": { + "name": "tickets_edit_history", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "before": { + "name": "before", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "after": { + "name": "after", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "edited_by_id": { + "name": "edited_by_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "edited_at": { + "name": "edited_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "tickets_edit_history_order_idx": { + "name": "tickets_edit_history_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_edit_history_parent_id_idx": { + "name": "tickets_edit_history_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_edit_history_edited_by_idx": { + "name": "tickets_edit_history_edited_by_idx", + "columns": [ + { + "expression": "edited_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_edit_history_edited_by_id_users_id_fk": { + "name": "tickets_edit_history_edited_by_id_users_id_fk", + "tableFrom": "tickets_edit_history", + "tableTo": "users", + "columnsFrom": [ + "edited_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_edit_history_parent_id_fk": { + "name": "tickets_edit_history_parent_id_fk", + "tableFrom": "tickets_edit_history", + "tableTo": "tickets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets": { + "name": "tickets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_tickets_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'support_request'" + }, + "priority": { + "name": "priority", + "type": "enum_tickets_priority", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'medium'" + }, + "status": { + "name": "status", + "type": "enum_tickets_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "reporter_id": { + "name": "reporter_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "assignee_id": { + "name": "assignee_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "closed_at": { + "name": "closed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sprint_id": { + "name": "sprint_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "release_id": { + "name": "release_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_ticket_id": { + "name": "parent_ticket_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "enum_tickets_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'task'" + }, + "story_points": { + "name": "story_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "estimate": { + "name": "estimate", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "due_date": { + "name": "due_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "resolution": { + "name": "resolution", + "type": "enum_tickets_resolution", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "tickets_category_idx": { + "name": "tickets_category_idx", + "columns": [ + { + "expression": "category", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_priority_idx": { + "name": "tickets_priority_idx", + "columns": [ + { + "expression": "priority", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_status_idx": { + "name": "tickets_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_reporter_idx": { + "name": "tickets_reporter_idx", + "columns": [ + { + "expression": "reporter_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_assignee_idx": { + "name": "tickets_assignee_idx", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_project_idx": { + "name": "tickets_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_sprint_idx": { + "name": "tickets_sprint_idx", + "columns": [ + { + "expression": "sprint_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_release_idx": { + "name": "tickets_release_idx", + "columns": [ + { + "expression": "release_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_parent_ticket_idx": { + "name": "tickets_parent_ticket_idx", + "columns": [ + { + "expression": "parent_ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_updated_at_idx": { + "name": "tickets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_created_at_idx": { + "name": "tickets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_reporter_id_users_id_fk": { + "name": "tickets_reporter_id_users_id_fk", + "tableFrom": "tickets", + "tableTo": "users", + "columnsFrom": [ + "reporter_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_assignee_id_users_id_fk": { + "name": "tickets_assignee_id_users_id_fk", + "tableFrom": "tickets", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_project_id_projects_id_fk": { + "name": "tickets_project_id_projects_id_fk", + "tableFrom": "tickets", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_sprint_id_sprints_id_fk": { + "name": "tickets_sprint_id_sprints_id_fk", + "tableFrom": "tickets", + "tableTo": "sprints", + "columnsFrom": [ + "sprint_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_release_id_releases_id_fk": { + "name": "tickets_release_id_releases_id_fk", + "tableFrom": "tickets", + "tableTo": "releases", + "columnsFrom": [ + "release_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_parent_ticket_id_tickets_id_fk": { + "name": "tickets_parent_ticket_id_tickets_id_fk", + "tableFrom": "tickets", + "tableTo": "tickets", + "columnsFrom": [ + "parent_ticket_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_rels": { + "name": "tickets_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "labels_id": { + "name": "labels_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tickets_rels_order_idx": { + "name": "tickets_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_parent_idx": { + "name": "tickets_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_path_idx": { + "name": "tickets_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_labels_id_idx": { + "name": "tickets_rels_labels_id_idx", + "columns": [ + { + "expression": "labels_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_rels_parent_fk": { + "name": "tickets_rels_parent_fk", + "tableFrom": "tickets_rels", + "tableTo": "tickets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tickets_rels_labels_fk": { + "name": "tickets_rels_labels_fk", + "tableFrom": "tickets_rels", + "tableTo": "labels", + "columnsFrom": [ + "labels_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ticket_votes": { + "name": "ticket_votes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "ticket_id": { + "name": "ticket_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ticket_votes_ticket_idx": { + "name": "ticket_votes_ticket_idx", + "columns": [ + { + "expression": "ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_user_idx": { + "name": "ticket_votes_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_updated_at_idx": { + "name": "ticket_votes_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_created_at_idx": { + "name": "ticket_votes_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_user_idx": { + "name": "ticket_user_idx", + "columns": [ + { + "expression": "ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ticket_votes_ticket_id_tickets_id_fk": { + "name": "ticket_votes_ticket_id_tickets_id_fk", + "tableFrom": "ticket_votes", + "tableTo": "tickets", + "columnsFrom": [ + "ticket_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ticket_votes_user_id_users_id_fk": { + "name": "ticket_votes_user_id_users_id_fk", + "tableFrom": "ticket_votes", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages": { + "name": "wiki_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_wiki_pages_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "body": { + "name": "body", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "lockdown": { + "name": "lockdown", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locked_by_id": { + "name": "locked_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locked_at": { + "name": "locked_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "last_editor_id": { + "name": "last_editor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_pages_slug_idx": { + "name": "wiki_pages_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_category_idx": { + "name": "wiki_pages_category_idx", + "columns": [ + { + "expression": "category", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_locked_by_idx": { + "name": "wiki_pages_locked_by_idx", + "columns": [ + { + "expression": "locked_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_last_editor_idx": { + "name": "wiki_pages_last_editor_idx", + "columns": [ + { + "expression": "last_editor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_updated_at_idx": { + "name": "wiki_pages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_created_at_idx": { + "name": "wiki_pages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_locked_by_id_users_id_fk": { + "name": "wiki_pages_locked_by_id_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "locked_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "wiki_pages_last_editor_id_users_id_fk": { + "name": "wiki_pages_last_editor_id_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "last_editor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages_texts": { + "name": "wiki_pages_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_pages_texts_order_parent": { + "name": "wiki_pages_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_texts_parent_fk": { + "name": "wiki_pages_texts_parent_fk", + "tableFrom": "wiki_pages_texts", + "tableTo": "wiki_pages", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_revisions": { + "name": "wiki_revisions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "page_id": { + "name": "page_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "revision_number": { + "name": "revision_number", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "title_snapshot": { + "name": "title_snapshot", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "content_snapshot": { + "name": "content_snapshot", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "editor_id": { + "name": "editor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "enum_wiki_revisions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "restored_from_revision": { + "name": "restored_from_revision", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_revisions_page_idx": { + "name": "wiki_revisions_page_idx", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_editor_idx": { + "name": "wiki_revisions_editor_idx", + "columns": [ + { + "expression": "editor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_updated_at_idx": { + "name": "wiki_revisions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_created_at_idx": { + "name": "wiki_revisions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_revisions_page_id_wiki_pages_id_fk": { + "name": "wiki_revisions_page_id_wiki_pages_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "wiki_pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "wiki_revisions_editor_id_users_id_fk": { + "name": "wiki_revisions_editor_id_users_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "users", + "columnsFrom": [ + "editor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_templates": { + "name": "wiki_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "body": { + "name": "body", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "css": { + "name": "css", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "html": { + "name": "html", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_templates_name_idx": { + "name": "wiki_templates_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_templates_updated_at_idx": { + "name": "wiki_templates_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_templates_created_at_idx": { + "name": "wiki_templates_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "lead_id": { + "name": "lead_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_projects_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'active'" + }, + "default_assignee_id": { + "name": "default_assignee_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "projects_key_idx": { + "name": "projects_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_lead_idx": { + "name": "projects_lead_idx", + "columns": [ + { + "expression": "lead_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_default_assignee_idx": { + "name": "projects_default_assignee_idx", + "columns": [ + { + "expression": "default_assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_updated_at_idx": { + "name": "projects_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_created_at_idx": { + "name": "projects_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_lead_id_users_id_fk": { + "name": "projects_lead_id_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "lead_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "projects_default_assignee_id_users_id_fk": { + "name": "projects_default_assignee_id_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "default_assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sprints": { + "name": "sprints", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "goal": { + "name": "goal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_sprints_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'planning'" + }, + "capacity": { + "name": "capacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sprints_project_idx": { + "name": "sprints_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sprints_updated_at_idx": { + "name": "sprints_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sprints_created_at_idx": { + "name": "sprints_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sprints_project_id_projects_id_fk": { + "name": "sprints_project_id_projects_id_fk", + "tableFrom": "sprints", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.releases": { + "name": "releases", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_releases_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "release_date": { + "name": "release_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "target_version": { + "name": "target_version", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "releases_project_idx": { + "name": "releases_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "releases_updated_at_idx": { + "name": "releases_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "releases_created_at_idx": { + "name": "releases_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "releases_project_id_projects_id_fk": { + "name": "releases_project_id_projects_id_fk", + "tableFrom": "releases", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labels": { + "name": "labels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#6366f1'" + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "labels_project_idx": { + "name": "labels_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labels_updated_at_idx": { + "name": "labels_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labels_created_at_idx": { + "name": "labels_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "labels_project_id_projects_id_fk": { + "name": "labels_project_id_projects_id_fk", + "tableFrom": "labels", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maps": { + "name": "maps", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "world_size_width": { + "name": "world_size_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 8192 + }, + "world_size_height": { + "name": "world_size_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 8192 + }, + "basemap_mode": { + "name": "basemap_mode", + "type": "enum_maps_basemap_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'image'" + }, + "basemap_image_id": { + "name": "basemap_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tile_url_template": { + "name": "tile_url_template", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "min_zoom": { + "name": "min_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "max_zoom": { + "name": "max_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 12 + }, + "default_center_x": { + "name": "default_center_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_center_y": { + "name": "default_center_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_zoom": { + "name": "default_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 2 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "maps_name_idx": { + "name": "maps_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_basemap_image_idx": { + "name": "maps_basemap_image_idx", + "columns": [ + { + "expression": "basemap_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_updated_at_idx": { + "name": "maps_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_created_at_idx": { + "name": "maps_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maps_basemap_image_id_media_id_fk": { + "name": "maps_basemap_image_id_media_id_fk", + "tableFrom": "maps", + "tableTo": "media", + "columnsFrom": [ + "basemap_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_roads": { + "name": "map_roads", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "surface": { + "name": "surface", + "type": "enum_map_roads_surface", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'paved'" + }, + "speed_multiplier": { + "name": "speed_multiplier", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "stroke_color": { + "name": "stroke_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stroke_weight": { + "name": "stroke_weight", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 2 + }, + "stroke_style": { + "name": "stroke_style", + "type": "enum_map_roads_stroke_style", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'solid'" + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "points": { + "name": "points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "map_roads_map_idx": { + "name": "map_roads_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_roads_updated_at_idx": { + "name": "map_roads_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_roads_created_at_idx": { + "name": "map_roads_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_roads_map_id_maps_id_fk": { + "name": "map_roads_map_id_maps_id_fk", + "tableFrom": "map_roads", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_zones": { + "name": "map_zones", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_map_zones_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "fill_color": { + "name": "fill_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stroke_color": { + "name": "stroke_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "fill_opacity": { + "name": "fill_opacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "stroke_weight": { + "name": "stroke_weight", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "points": { + "name": "points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "map_zones_map_idx": { + "name": "map_zones_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_updated_at_idx": { + "name": "map_zones_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_created_at_idx": { + "name": "map_zones_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_zones_map_id_maps_id_fk": { + "name": "map_zones_map_id_maps_id_fk", + "tableFrom": "map_zones", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_zones_rels": { + "name": "map_zones_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "map_zones_rels_order_idx": { + "name": "map_zones_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_parent_idx": { + "name": "map_zones_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_path_idx": { + "name": "map_zones_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_resources_id_idx": { + "name": "map_zones_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_zones_rels_parent_fk": { + "name": "map_zones_rels_parent_fk", + "tableFrom": "map_zones_rels", + "tableTo": "map_zones", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "map_zones_rels_resources_fk": { + "name": "map_zones_rels_resources_fk", + "tableFrom": "map_zones_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_nodes": { + "name": "resource_nodes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "position": { + "name": "position", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "richness": { + "name": "richness", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resource_nodes_map_idx": { + "name": "resource_nodes_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_updated_at_idx": { + "name": "resource_nodes_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_created_at_idx": { + "name": "resource_nodes_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_nodes_map_id_maps_id_fk": { + "name": "resource_nodes_map_id_maps_id_fk", + "tableFrom": "resource_nodes", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_nodes_rels": { + "name": "resource_nodes_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "resource_nodes_rels_order_idx": { + "name": "resource_nodes_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_parent_idx": { + "name": "resource_nodes_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_path_idx": { + "name": "resource_nodes_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_resources_id_idx": { + "name": "resource_nodes_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_nodes_rels_parent_fk": { + "name": "resource_nodes_rels_parent_fk", + "tableFrom": "resource_nodes_rels", + "tableTo": "resource_nodes", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "resource_nodes_rels_resources_fk": { + "name": "resource_nodes_rels_resources_fk", + "tableFrom": "resource_nodes_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.narrative_events": { + "name": "narrative_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "flow_data": { + "name": "flow_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "triggers_type": { + "name": "triggers_type", + "type": "enum_narrative_events_triggers_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'manual'" + }, + "triggers_condition": { + "name": "triggers_condition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "narrative_events_updated_at_idx": { + "name": "narrative_events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "narrative_events_created_at_idx": { + "name": "narrative_events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.story_beats": { + "name": "story_beats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occurred_at": { + "name": "occurred_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_story_beats_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'draft'" + }, + "body": { + "name": "body", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "story_beats_status_idx": { + "name": "story_beats_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_mission_idx": { + "name": "story_beats_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_updated_at_idx": { + "name": "story_beats_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_created_at_idx": { + "name": "story_beats_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "story_beats_mission_id_missions_id_fk": { + "name": "story_beats_mission_id_missions_id_fk", + "tableFrom": "story_beats", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.story_beat_states": { + "name": "story_beat_states", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "beat_id": { + "name": "beat_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "read_at": { + "name": "read_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "reaction": { + "name": "reaction", + "type": "enum_story_beat_states_reaction", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "story_beat_states_user_idx": { + "name": "story_beat_states_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_beat_idx": { + "name": "story_beat_states_beat_idx", + "columns": [ + { + "expression": "beat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_updated_at_idx": { + "name": "story_beat_states_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_created_at_idx": { + "name": "story_beat_states_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "story_beat_states_user_id_users_id_fk": { + "name": "story_beat_states_user_id_users_id_fk", + "tableFrom": "story_beat_states", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "story_beat_states_beat_id_story_beats_id_fk": { + "name": "story_beat_states_beat_id_story_beats_id_fk", + "tableFrom": "story_beat_states", + "tableTo": "story_beats", + "columnsFrom": [ + "beat_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mission_files": { + "name": "mission_files", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mission_file_name": { + "name": "mission_file_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mission_files_author_idx": { + "name": "mission_files_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_updated_at_idx": { + "name": "mission_files_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_created_at_idx": { + "name": "mission_files_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_filename_idx": { + "name": "mission_files_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mission_files_author_id_users_id_fk": { + "name": "mission_files_author_id_users_id_fk", + "tableFrom": "mission_files", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mod_lists": { + "name": "mod_lists", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "modlist_name": { + "name": "modlist_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mod_lists_author_idx": { + "name": "mod_lists_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_updated_at_idx": { + "name": "mod_lists_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_created_at_idx": { + "name": "mod_lists_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_filename_idx": { + "name": "mod_lists_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mod_lists_author_id_users_id_fk": { + "name": "mod_lists_author_id_users_id_fk", + "tableFrom": "mod_lists", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_servers": { + "name": "game_servers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_game_servers_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'offline'" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_servers_server_id_idx": { + "name": "game_servers_server_id_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_servers_updated_at_idx": { + "name": "game_servers_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_servers_created_at_idx": { + "name": "game_servers_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.arma_sync_events": { + "name": "arma_sync_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "event_id": { + "name": "event_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occurred_at": { + "name": "occurred_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "arma_sync_events_event_id_idx": { + "name": "arma_sync_events_event_id_idx", + "columns": [ + { + "expression": "event_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_server_idx": { + "name": "arma_sync_events_server_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_type_idx": { + "name": "arma_sync_events_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_updated_at_idx": { + "name": "arma_sync_events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_created_at_idx": { + "name": "arma_sync_events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "arma_sync_events_server_id_game_servers_id_fk": { + "name": "arma_sync_events_server_id_game_servers_id_fk", + "tableFrom": "arma_sync_events", + "tableTo": "game_servers", + "columnsFrom": [ + "server_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.arma_commands": { + "name": "arma_commands", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "command_id": { + "name": "command_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_arma_commands_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'queued'" + }, + "result": { + "name": "result", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "delivered_at": { + "name": "delivered_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "arma_commands_command_id_idx": { + "name": "arma_commands_command_id_idx", + "columns": [ + { + "expression": "command_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_server_idx": { + "name": "arma_commands_server_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_updated_at_idx": { + "name": "arma_commands_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_created_at_idx": { + "name": "arma_commands_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "arma_commands_server_id_game_servers_id_fk": { + "name": "arma_commands_server_id_game_servers_id_fk", + "tableFrom": "arma_commands", + "tableTo": "game_servers", + "columnsFrom": [ + "server_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.respawn_tickets": { + "name": "respawn_tickets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "balance": { + "name": "balance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "respawn_tickets_user_idx": { + "name": "respawn_tickets_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "respawn_tickets_updated_at_idx": { + "name": "respawn_tickets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "respawn_tickets_created_at_idx": { + "name": "respawn_tickets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "respawn_tickets_user_id_users_id_fk": { + "name": "respawn_tickets_user_id_users_id_fk", + "tableFrom": "respawn_tickets", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_minefields": { + "name": "custom_minefields", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rows": { + "name": "rows", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "cols": { + "name": "cols", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "mines": { + "name": "mines", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "mine_count": { + "name": "mine_count", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "published": { + "name": "published", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "expose_edge_mines": { + "name": "expose_edge_mines", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "play_count": { + "name": "play_count", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "creator_xp_bank": { + "name": "creator_xp_bank", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_minefields_author_idx": { + "name": "custom_minefields_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefields_updated_at_idx": { + "name": "custom_minefields_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefields_created_at_idx": { + "name": "custom_minefields_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_minefields_author_id_users_id_fk": { + "name": "custom_minefields_author_id_users_id_fk", + "tableFrom": "custom_minefields", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_minefield_scores": { + "name": "custom_minefield_scores", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "minefield_id": { + "name": "minefield_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "seconds": { + "name": "seconds", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "flags": { + "name": "flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "won": { + "name": "won", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_minefield_scores_minefield_idx": { + "name": "custom_minefield_scores_minefield_idx", + "columns": [ + { + "expression": "minefield_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_user_idx": { + "name": "custom_minefield_scores_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_updated_at_idx": { + "name": "custom_minefield_scores_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_created_at_idx": { + "name": "custom_minefield_scores_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_minefield_scores_minefield_id_custom_minefields_id_fk": { + "name": "custom_minefield_scores_minefield_id_custom_minefields_id_fk", + "tableFrom": "custom_minefield_scores", + "tableTo": "custom_minefields", + "columnsFrom": [ + "minefield_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "custom_minefield_scores_user_id_users_id_fk": { + "name": "custom_minefield_scores_user_id_users_id_fk", + "tableFrom": "custom_minefield_scores", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_radio_tests": { + "name": "custom_radio_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "messages": { + "name": "messages", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "message_count": { + "name": "message_count", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "enum_custom_radio_tests_order", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'fixed'" + }, + "published": { + "name": "published", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "play_count": { + "name": "play_count", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_radio_tests_author_idx": { + "name": "custom_radio_tests_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_tests_updated_at_idx": { + "name": "custom_radio_tests_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_tests_created_at_idx": { + "name": "custom_radio_tests_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_radio_tests_author_id_users_id_fk": { + "name": "custom_radio_tests_author_id_users_id_fk", + "tableFrom": "custom_radio_tests", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_radio_test_scores": { + "name": "custom_radio_test_scores", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_id": { + "name": "test_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "score": { + "name": "score", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "accuracy": { + "name": "accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "correct_messages": { + "name": "correct_messages", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "incorrect_messages": { + "name": "incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "mode": { + "name": "mode", + "type": "enum_custom_radio_test_scores_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "time_ms": { + "name": "time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_radio_test_scores_test_idx": { + "name": "custom_radio_test_scores_test_idx", + "columns": [ + { + "expression": "test_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_user_idx": { + "name": "custom_radio_test_scores_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_updated_at_idx": { + "name": "custom_radio_test_scores_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_created_at_idx": { + "name": "custom_radio_test_scores_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_radio_test_scores_test_id_custom_radio_tests_id_fk": { + "name": "custom_radio_test_scores_test_id_custom_radio_tests_id_fk", + "tableFrom": "custom_radio_test_scores", + "tableTo": "custom_radio_tests", + "columnsFrom": [ + "test_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "custom_radio_test_scores_user_id_users_id_fk": { + "name": "custom_radio_test_scores_user_id_users_id_fk", + "tableFrom": "custom_radio_test_scores", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_ai_instructions_images": { + "name": "plugin_ai_instructions_images", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "plugin_ai_instructions_images_order_idx": { + "name": "plugin_ai_instructions_images_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_images_parent_id_idx": { + "name": "plugin_ai_instructions_images_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_images_image_idx": { + "name": "plugin_ai_instructions_images_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "plugin_ai_instructions_images_image_id_media_id_fk": { + "name": "plugin_ai_instructions_images_image_id_media_id_fk", + "tableFrom": "plugin_ai_instructions_images", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "plugin_ai_instructions_images_parent_id_fk": { + "name": "plugin_ai_instructions_images_parent_id_fk", + "tableFrom": "plugin_ai_instructions_images", + "tableTo": "plugin_ai_instructions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_ai_instructions": { + "name": "plugin_ai_instructions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "schema_path": { + "name": "schema_path", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "field_type": { + "name": "field_type", + "type": "enum_plugin_ai_instructions_field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'text'" + }, + "relation_to": { + "name": "relation_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "model_id": { + "name": "model_id", + "type": "enum_plugin_ai_instructions_model_id", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "disabled": { + "name": "disabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "prompt": { + "name": "prompt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "system": { + "name": "system", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'INSTRUCTIONS:\nYou are a highly skilled and professional blog writer,\nrenowned for crafting engaging and well-organized articles.\nWhen given a title, you meticulously create blogs that are not only\ninformative and accurate but also captivating and beautifully structured.'" + }, + "layout": { + "name": "layout", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'[paragraph] - Write a concise introduction (2-3 sentences) that outlines the main topic.\n[horizontalrule] - Insert a horizontal rule to separate the introduction from the main content.\n[list] - Create a list with 3-5 items. Each list item should contain:\n a. [heading] - A brief, descriptive heading (up to 5 words)\n b. [paragraph] - A short explanation or elaboration (1-2 sentences)\n[horizontalrule] - Insert another horizontal rule to separate the main content from the conclusion.\n[paragraph] - Compose a brief conclusion (2-3 sentences) summarizing the key points.\n[quote] - Include a relevant quote from a famous person, directly related to the topic. Format: \"Quote text.\" - Author Name'" + }, + "unsloth_text_settings_model": { + "name": "unsloth_text_settings_model", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'unsloth/gemma-4-E4B-it-qat-GGUF'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "plugin_ai_instructions_schema_path_idx": { + "name": "plugin_ai_instructions_schema_path_idx", + "columns": [ + { + "expression": "schema_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_updated_at_idx": { + "name": "plugin_ai_instructions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_created_at_idx": { + "name": "plugin_ai_instructions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_mcp_api_keys": { + "name": "payload_mcp_api_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "media_find": { + "name": "media_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_create": { + "name": "media_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_update": { + "name": "media_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_delete": { + "name": "media_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_find": { + "name": "game_hard_resources_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_create": { + "name": "game_hard_resources_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_update": { + "name": "game_hard_resources_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_delete": { + "name": "game_hard_resources_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_find": { + "name": "game_structures_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_create": { + "name": "game_structures_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_update": { + "name": "game_structures_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_delete": { + "name": "game_structures_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_find": { + "name": "game_vehicles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_create": { + "name": "game_vehicles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_update": { + "name": "game_vehicles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_delete": { + "name": "game_vehicles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_find": { + "name": "game_npcs_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_create": { + "name": "game_npcs_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_update": { + "name": "game_npcs_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_delete": { + "name": "game_npcs_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_find": { + "name": "npc_staffing_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_create": { + "name": "npc_staffing_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_update": { + "name": "npc_staffing_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_delete": { + "name": "npc_staffing_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_find": { + "name": "labor_classifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_create": { + "name": "labor_classifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_update": { + "name": "labor_classifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_delete": { + "name": "labor_classifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_find": { + "name": "game_event_logs_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_create": { + "name": "game_event_logs_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_update": { + "name": "game_event_logs_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_delete": { + "name": "game_event_logs_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_find": { + "name": "users_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_create": { + "name": "users_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_update": { + "name": "users_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_delete": { + "name": "users_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_find": { + "name": "roles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_create": { + "name": "roles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_update": { + "name": "roles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_delete": { + "name": "roles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_find": { + "name": "ranks_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_create": { + "name": "ranks_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_update": { + "name": "ranks_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_delete": { + "name": "ranks_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_find": { + "name": "profiles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_create": { + "name": "profiles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_update": { + "name": "profiles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_delete": { + "name": "profiles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_find": { + "name": "awards_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_create": { + "name": "awards_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_update": { + "name": "awards_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_delete": { + "name": "awards_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_find": { + "name": "qualifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_create": { + "name": "qualifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_update": { + "name": "qualifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_delete": { + "name": "qualifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_find": { + "name": "assignments_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_create": { + "name": "assignments_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_update": { + "name": "assignments_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_delete": { + "name": "assignments_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_find": { + "name": "assignment_transfers_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_create": { + "name": "assignment_transfers_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_update": { + "name": "assignment_transfers_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_delete": { + "name": "assignment_transfers_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_find": { + "name": "experience_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_create": { + "name": "experience_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_update": { + "name": "experience_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_delete": { + "name": "experience_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_find": { + "name": "user_notifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_create": { + "name": "user_notifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_update": { + "name": "user_notifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_delete": { + "name": "user_notifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_find": { + "name": "evaluations_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_create": { + "name": "evaluations_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_update": { + "name": "evaluations_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_delete": { + "name": "evaluations_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_find": { + "name": "ribbon_submissions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_create": { + "name": "ribbon_submissions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_update": { + "name": "ribbon_submissions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_delete": { + "name": "ribbon_submissions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_find": { + "name": "missions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_create": { + "name": "missions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_update": { + "name": "missions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_delete": { + "name": "missions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_find": { + "name": "mission_attendances_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_create": { + "name": "mission_attendances_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_update": { + "name": "mission_attendances_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_delete": { + "name": "mission_attendances_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_find": { + "name": "campaigns_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_create": { + "name": "campaigns_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_update": { + "name": "campaigns_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_delete": { + "name": "campaigns_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_find": { + "name": "factions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_create": { + "name": "factions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_update": { + "name": "factions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_delete": { + "name": "factions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_find": { + "name": "technologies_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_create": { + "name": "technologies_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_update": { + "name": "technologies_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_delete": { + "name": "technologies_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_find": { + "name": "assets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_create": { + "name": "assets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_update": { + "name": "assets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_delete": { + "name": "assets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_find": { + "name": "resources_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_create": { + "name": "resources_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_update": { + "name": "resources_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_delete": { + "name": "resources_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_find": { + "name": "vehicles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_create": { + "name": "vehicles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_update": { + "name": "vehicles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_delete": { + "name": "vehicles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_find": { + "name": "structures_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_create": { + "name": "structures_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_update": { + "name": "structures_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_delete": { + "name": "structures_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_find": { + "name": "shipments_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_create": { + "name": "shipments_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_update": { + "name": "shipments_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_delete": { + "name": "shipments_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_find": { + "name": "bank_accounts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_create": { + "name": "bank_accounts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_update": { + "name": "bank_accounts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_delete": { + "name": "bank_accounts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_find": { + "name": "bank_transactions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_create": { + "name": "bank_transactions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_update": { + "name": "bank_transactions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_delete": { + "name": "bank_transactions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_find": { + "name": "ledger_entries_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_create": { + "name": "ledger_entries_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_update": { + "name": "ledger_entries_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_delete": { + "name": "ledger_entries_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_find": { + "name": "locker_storages_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_create": { + "name": "locker_storages_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_update": { + "name": "locker_storages_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_delete": { + "name": "locker_storages_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_find": { + "name": "loadouts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_create": { + "name": "loadouts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_update": { + "name": "loadouts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_delete": { + "name": "loadouts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_find": { + "name": "market_listings_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_create": { + "name": "market_listings_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_update": { + "name": "market_listings_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_delete": { + "name": "market_listings_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_find": { + "name": "market_negotiations_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_create": { + "name": "market_negotiations_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_update": { + "name": "market_negotiations_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_delete": { + "name": "market_negotiations_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_find": { + "name": "market_state_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_create": { + "name": "market_state_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_update": { + "name": "market_state_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_delete": { + "name": "market_state_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_find": { + "name": "voice_scripts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_create": { + "name": "voice_scripts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_update": { + "name": "voice_scripts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_delete": { + "name": "voice_scripts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_find": { + "name": "voice_submissions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_create": { + "name": "voice_submissions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_update": { + "name": "voice_submissions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_delete": { + "name": "voice_submissions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_find": { + "name": "tickets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_create": { + "name": "tickets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_update": { + "name": "tickets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_delete": { + "name": "tickets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_find": { + "name": "ticket_votes_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_create": { + "name": "ticket_votes_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_update": { + "name": "ticket_votes_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_delete": { + "name": "ticket_votes_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_find": { + "name": "wiki_pages_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_create": { + "name": "wiki_pages_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_update": { + "name": "wiki_pages_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_delete": { + "name": "wiki_pages_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_find": { + "name": "wiki_revisions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_create": { + "name": "wiki_revisions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_update": { + "name": "wiki_revisions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_delete": { + "name": "wiki_revisions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_find": { + "name": "wiki_templates_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_create": { + "name": "wiki_templates_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_update": { + "name": "wiki_templates_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_delete": { + "name": "wiki_templates_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_find": { + "name": "projects_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_create": { + "name": "projects_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_update": { + "name": "projects_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_delete": { + "name": "projects_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_find": { + "name": "sprints_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_create": { + "name": "sprints_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_update": { + "name": "sprints_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_delete": { + "name": "sprints_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_find": { + "name": "releases_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_create": { + "name": "releases_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_update": { + "name": "releases_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_delete": { + "name": "releases_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_find": { + "name": "labels_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_create": { + "name": "labels_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_update": { + "name": "labels_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_delete": { + "name": "labels_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_find": { + "name": "maps_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_create": { + "name": "maps_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_update": { + "name": "maps_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_delete": { + "name": "maps_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_find": { + "name": "map_roads_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_create": { + "name": "map_roads_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_update": { + "name": "map_roads_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_delete": { + "name": "map_roads_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_find": { + "name": "map_zones_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_create": { + "name": "map_zones_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_update": { + "name": "map_zones_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_delete": { + "name": "map_zones_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_find": { + "name": "resource_nodes_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_create": { + "name": "resource_nodes_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_update": { + "name": "resource_nodes_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_delete": { + "name": "resource_nodes_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_find": { + "name": "narrative_events_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_create": { + "name": "narrative_events_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_update": { + "name": "narrative_events_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_delete": { + "name": "narrative_events_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_find": { + "name": "story_beats_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_create": { + "name": "story_beats_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_update": { + "name": "story_beats_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_delete": { + "name": "story_beats_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_find": { + "name": "story_beat_states_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_create": { + "name": "story_beat_states_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_update": { + "name": "story_beat_states_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_delete": { + "name": "story_beat_states_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_find": { + "name": "mission_files_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_create": { + "name": "mission_files_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_update": { + "name": "mission_files_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_delete": { + "name": "mission_files_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_find": { + "name": "mod_lists_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_create": { + "name": "mod_lists_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_update": { + "name": "mod_lists_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_delete": { + "name": "mod_lists_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_find": { + "name": "game_servers_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_create": { + "name": "game_servers_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_update": { + "name": "game_servers_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_delete": { + "name": "game_servers_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_find": { + "name": "arma_sync_events_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_create": { + "name": "arma_sync_events_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_update": { + "name": "arma_sync_events_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_delete": { + "name": "arma_sync_events_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_find": { + "name": "arma_commands_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_create": { + "name": "arma_commands_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_update": { + "name": "arma_commands_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_delete": { + "name": "arma_commands_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_find": { + "name": "respawn_tickets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_create": { + "name": "respawn_tickets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_update": { + "name": "respawn_tickets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_delete": { + "name": "respawn_tickets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_find": { + "name": "custom_minefields_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_create": { + "name": "custom_minefields_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_update": { + "name": "custom_minefields_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_delete": { + "name": "custom_minefields_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_find": { + "name": "custom_minefield_scores_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_create": { + "name": "custom_minefield_scores_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_update": { + "name": "custom_minefield_scores_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_delete": { + "name": "custom_minefield_scores_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_find": { + "name": "custom_radio_tests_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_create": { + "name": "custom_radio_tests_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_update": { + "name": "custom_radio_tests_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_delete": { + "name": "custom_radio_tests_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_find": { + "name": "custom_radio_test_scores_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_create": { + "name": "custom_radio_test_scores_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_update": { + "name": "custom_radio_test_scores_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_delete": { + "name": "custom_radio_test_scores_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "enable_a_p_i_key": { + "name": "enable_a_p_i_key", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "api_key": { + "name": "api_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "api_key_index": { + "name": "api_key_index", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_mcp_api_keys_user_idx": { + "name": "payload_mcp_api_keys_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_mcp_api_keys_updated_at_idx": { + "name": "payload_mcp_api_keys_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_mcp_api_keys_created_at_idx": { + "name": "payload_mcp_api_keys_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_mcp_api_keys_user_id_users_id_fk": { + "name": "payload_mcp_api_keys_user_id_users_id_fk", + "tableFrom": "payload_mcp_api_keys", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_kv": { + "name": "payload_kv", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "payload_kv_key_idx": { + "name": "payload_kv_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents": { + "name": "payload_locked_documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "global_slug": { + "name": "global_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_locked_documents_global_slug_idx": { + "name": "payload_locked_documents_global_slug_idx", + "columns": [ + { + "expression": "global_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_updated_at_idx": { + "name": "payload_locked_documents_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_created_at_idx": { + "name": "payload_locked_documents_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents_rels": { + "name": "payload_locked_documents_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_hard_resources_id": { + "name": "game_hard_resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_structures_id": { + "name": "game_structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_vehicles_id": { + "name": "game_vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_npcs_id": { + "name": "game_npcs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "npc_staffing_id": { + "name": "npc_staffing_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "labor_classifications_id": { + "name": "labor_classifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_event_logs_id": { + "name": "game_event_logs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ranks_id": { + "name": "ranks_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "profiles_id": { + "name": "profiles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "awards_id": { + "name": "awards_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assignment_transfers_id": { + "name": "assignment_transfers_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "experience_id": { + "name": "experience_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "user_notifications_id": { + "name": "user_notifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "evaluations_id": { + "name": "evaluations_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ribbon_submissions_id": { + "name": "ribbon_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "missions_id": { + "name": "missions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mission_attendances_id": { + "name": "mission_attendances_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "factions_id": { + "name": "factions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shipments_id": { + "name": "shipments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bank_accounts_id": { + "name": "bank_accounts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bank_transactions_id": { + "name": "bank_transactions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ledger_entries_id": { + "name": "ledger_entries_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locker_storages_id": { + "name": "locker_storages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "loadouts_id": { + "name": "loadouts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_listings_id": { + "name": "market_listings_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_negotiations_id": { + "name": "market_negotiations_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_state_id": { + "name": "market_state_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voice_scripts_id": { + "name": "voice_scripts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voice_submissions_id": { + "name": "voice_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tickets_id": { + "name": "tickets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ticket_votes_id": { + "name": "ticket_votes_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_pages_id": { + "name": "wiki_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_revisions_id": { + "name": "wiki_revisions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_templates_id": { + "name": "wiki_templates_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "projects_id": { + "name": "projects_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sprints_id": { + "name": "sprints_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "releases_id": { + "name": "releases_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "labels_id": { + "name": "labels_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maps_id": { + "name": "maps_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_roads_id": { + "name": "map_roads_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_zones_id": { + "name": "map_zones_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resource_nodes_id": { + "name": "resource_nodes_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "narrative_events_id": { + "name": "narrative_events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "story_beats_id": { + "name": "story_beats_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "story_beat_states_id": { + "name": "story_beat_states_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mission_files_id": { + "name": "mission_files_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mod_lists_id": { + "name": "mod_lists_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_servers_id": { + "name": "game_servers_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "arma_sync_events_id": { + "name": "arma_sync_events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "arma_commands_id": { + "name": "arma_commands_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "respawn_tickets_id": { + "name": "respawn_tickets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_minefields_id": { + "name": "custom_minefields_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_minefield_scores_id": { + "name": "custom_minefield_scores_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_radio_tests_id": { + "name": "custom_radio_tests_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_radio_test_scores_id": { + "name": "custom_radio_test_scores_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "plugin_ai_instructions_id": { + "name": "plugin_ai_instructions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "payload_mcp_api_keys_id": { + "name": "payload_mcp_api_keys_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_locked_documents_rels_order_idx": { + "name": "payload_locked_documents_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_parent_idx": { + "name": "payload_locked_documents_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_path_idx": { + "name": "payload_locked_documents_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_media_id_idx": { + "name": "payload_locked_documents_rels_media_id_idx", + "columns": [ + { + "expression": "media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_hard_resources_id_idx": { + "name": "payload_locked_documents_rels_game_hard_resources_id_idx", + "columns": [ + { + "expression": "game_hard_resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_structures_id_idx": { + "name": "payload_locked_documents_rels_game_structures_id_idx", + "columns": [ + { + "expression": "game_structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_vehicles_id_idx": { + "name": "payload_locked_documents_rels_game_vehicles_id_idx", + "columns": [ + { + "expression": "game_vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_npcs_id_idx": { + "name": "payload_locked_documents_rels_game_npcs_id_idx", + "columns": [ + { + "expression": "game_npcs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_npc_staffing_id_idx": { + "name": "payload_locked_documents_rels_npc_staffing_id_idx", + "columns": [ + { + "expression": "npc_staffing_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_labor_classifications_id_idx": { + "name": "payload_locked_documents_rels_labor_classifications_id_idx", + "columns": [ + { + "expression": "labor_classifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_event_logs_id_idx": { + "name": "payload_locked_documents_rels_game_event_logs_id_idx", + "columns": [ + { + "expression": "game_event_logs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_users_id_idx": { + "name": "payload_locked_documents_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_roles_id_idx": { + "name": "payload_locked_documents_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ranks_id_idx": { + "name": "payload_locked_documents_rels_ranks_id_idx", + "columns": [ + { + "expression": "ranks_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_profiles_id_idx": { + "name": "payload_locked_documents_rels_profiles_id_idx", + "columns": [ + { + "expression": "profiles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_awards_id_idx": { + "name": "payload_locked_documents_rels_awards_id_idx", + "columns": [ + { + "expression": "awards_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_qualifications_id_idx": { + "name": "payload_locked_documents_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assignments_id_idx": { + "name": "payload_locked_documents_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assignment_transfers_id_idx": { + "name": "payload_locked_documents_rels_assignment_transfers_id_idx", + "columns": [ + { + "expression": "assignment_transfers_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_experience_id_idx": { + "name": "payload_locked_documents_rels_experience_id_idx", + "columns": [ + { + "expression": "experience_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_user_notifications_id_idx": { + "name": "payload_locked_documents_rels_user_notifications_id_idx", + "columns": [ + { + "expression": "user_notifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_evaluations_id_idx": { + "name": "payload_locked_documents_rels_evaluations_id_idx", + "columns": [ + { + "expression": "evaluations_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ribbon_submissions_id_idx": { + "name": "payload_locked_documents_rels_ribbon_submissions_id_idx", + "columns": [ + { + "expression": "ribbon_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_missions_id_idx": { + "name": "payload_locked_documents_rels_missions_id_idx", + "columns": [ + { + "expression": "missions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mission_attendances_id_idx": { + "name": "payload_locked_documents_rels_mission_attendances_id_idx", + "columns": [ + { + "expression": "mission_attendances_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_campaigns_id_idx": { + "name": "payload_locked_documents_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_factions_id_idx": { + "name": "payload_locked_documents_rels_factions_id_idx", + "columns": [ + { + "expression": "factions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_technologies_id_idx": { + "name": "payload_locked_documents_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assets_id_idx": { + "name": "payload_locked_documents_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_resources_id_idx": { + "name": "payload_locked_documents_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_vehicles_id_idx": { + "name": "payload_locked_documents_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_structures_id_idx": { + "name": "payload_locked_documents_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_shipments_id_idx": { + "name": "payload_locked_documents_rels_shipments_id_idx", + "columns": [ + { + "expression": "shipments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_bank_accounts_id_idx": { + "name": "payload_locked_documents_rels_bank_accounts_id_idx", + "columns": [ + { + "expression": "bank_accounts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_bank_transactions_id_idx": { + "name": "payload_locked_documents_rels_bank_transactions_id_idx", + "columns": [ + { + "expression": "bank_transactions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ledger_entries_id_idx": { + "name": "payload_locked_documents_rels_ledger_entries_id_idx", + "columns": [ + { + "expression": "ledger_entries_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_locker_storages_id_idx": { + "name": "payload_locked_documents_rels_locker_storages_id_idx", + "columns": [ + { + "expression": "locker_storages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_loadouts_id_idx": { + "name": "payload_locked_documents_rels_loadouts_id_idx", + "columns": [ + { + "expression": "loadouts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_listings_id_idx": { + "name": "payload_locked_documents_rels_market_listings_id_idx", + "columns": [ + { + "expression": "market_listings_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_negotiations_id_idx": { + "name": "payload_locked_documents_rels_market_negotiations_id_idx", + "columns": [ + { + "expression": "market_negotiations_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_state_id_idx": { + "name": "payload_locked_documents_rels_market_state_id_idx", + "columns": [ + { + "expression": "market_state_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_voice_scripts_id_idx": { + "name": "payload_locked_documents_rels_voice_scripts_id_idx", + "columns": [ + { + "expression": "voice_scripts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_voice_submissions_id_idx": { + "name": "payload_locked_documents_rels_voice_submissions_id_idx", + "columns": [ + { + "expression": "voice_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_tickets_id_idx": { + "name": "payload_locked_documents_rels_tickets_id_idx", + "columns": [ + { + "expression": "tickets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ticket_votes_id_idx": { + "name": "payload_locked_documents_rels_ticket_votes_id_idx", + "columns": [ + { + "expression": "ticket_votes_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_pages_id_idx": { + "name": "payload_locked_documents_rels_wiki_pages_id_idx", + "columns": [ + { + "expression": "wiki_pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_revisions_id_idx": { + "name": "payload_locked_documents_rels_wiki_revisions_id_idx", + "columns": [ + { + "expression": "wiki_revisions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_templates_id_idx": { + "name": "payload_locked_documents_rels_wiki_templates_id_idx", + "columns": [ + { + "expression": "wiki_templates_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_projects_id_idx": { + "name": "payload_locked_documents_rels_projects_id_idx", + "columns": [ + { + "expression": "projects_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_sprints_id_idx": { + "name": "payload_locked_documents_rels_sprints_id_idx", + "columns": [ + { + "expression": "sprints_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_releases_id_idx": { + "name": "payload_locked_documents_rels_releases_id_idx", + "columns": [ + { + "expression": "releases_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_labels_id_idx": { + "name": "payload_locked_documents_rels_labels_id_idx", + "columns": [ + { + "expression": "labels_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_maps_id_idx": { + "name": "payload_locked_documents_rels_maps_id_idx", + "columns": [ + { + "expression": "maps_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_map_roads_id_idx": { + "name": "payload_locked_documents_rels_map_roads_id_idx", + "columns": [ + { + "expression": "map_roads_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_map_zones_id_idx": { + "name": "payload_locked_documents_rels_map_zones_id_idx", + "columns": [ + { + "expression": "map_zones_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_resource_nodes_id_idx": { + "name": "payload_locked_documents_rels_resource_nodes_id_idx", + "columns": [ + { + "expression": "resource_nodes_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_narrative_events_id_idx": { + "name": "payload_locked_documents_rels_narrative_events_id_idx", + "columns": [ + { + "expression": "narrative_events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_story_beats_id_idx": { + "name": "payload_locked_documents_rels_story_beats_id_idx", + "columns": [ + { + "expression": "story_beats_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_story_beat_states_id_idx": { + "name": "payload_locked_documents_rels_story_beat_states_id_idx", + "columns": [ + { + "expression": "story_beat_states_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mission_files_id_idx": { + "name": "payload_locked_documents_rels_mission_files_id_idx", + "columns": [ + { + "expression": "mission_files_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mod_lists_id_idx": { + "name": "payload_locked_documents_rels_mod_lists_id_idx", + "columns": [ + { + "expression": "mod_lists_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_servers_id_idx": { + "name": "payload_locked_documents_rels_game_servers_id_idx", + "columns": [ + { + "expression": "game_servers_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_arma_sync_events_id_idx": { + "name": "payload_locked_documents_rels_arma_sync_events_id_idx", + "columns": [ + { + "expression": "arma_sync_events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_arma_commands_id_idx": { + "name": "payload_locked_documents_rels_arma_commands_id_idx", + "columns": [ + { + "expression": "arma_commands_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_respawn_tickets_id_idx": { + "name": "payload_locked_documents_rels_respawn_tickets_id_idx", + "columns": [ + { + "expression": "respawn_tickets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_minefields_id_idx": { + "name": "payload_locked_documents_rels_custom_minefields_id_idx", + "columns": [ + { + "expression": "custom_minefields_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_minefield_scores_id_idx": { + "name": "payload_locked_documents_rels_custom_minefield_scores_id_idx", + "columns": [ + { + "expression": "custom_minefield_scores_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_radio_tests_id_idx": { + "name": "payload_locked_documents_rels_custom_radio_tests_id_idx", + "columns": [ + { + "expression": "custom_radio_tests_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_radio_test_scores_i_idx": { + "name": "payload_locked_documents_rels_custom_radio_test_scores_i_idx", + "columns": [ + { + "expression": "custom_radio_test_scores_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_plugin_ai_instructions_id_idx": { + "name": "payload_locked_documents_rels_plugin_ai_instructions_id_idx", + "columns": [ + { + "expression": "plugin_ai_instructions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_payload_mcp_api_keys_id_idx": { + "name": "payload_locked_documents_rels_payload_mcp_api_keys_id_idx", + "columns": [ + { + "expression": "payload_mcp_api_keys_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_locked_documents_rels_parent_fk": { + "name": "payload_locked_documents_rels_parent_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_locked_documents", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_media_fk": { + "name": "payload_locked_documents_rels_media_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_hard_resources_fk": { + "name": "payload_locked_documents_rels_game_hard_resources_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_hard_resources", + "columnsFrom": [ + "game_hard_resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_structures_fk": { + "name": "payload_locked_documents_rels_game_structures_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_structures", + "columnsFrom": [ + "game_structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_vehicles_fk": { + "name": "payload_locked_documents_rels_game_vehicles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_vehicles", + "columnsFrom": [ + "game_vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_npcs_fk": { + "name": "payload_locked_documents_rels_game_npcs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_npcs", + "columnsFrom": [ + "game_npcs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_npc_staffing_fk": { + "name": "payload_locked_documents_rels_npc_staffing_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "npc_staffing", + "columnsFrom": [ + "npc_staffing_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_labor_classifications_fk": { + "name": "payload_locked_documents_rels_labor_classifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "labor_classifications", + "columnsFrom": [ + "labor_classifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_event_logs_fk": { + "name": "payload_locked_documents_rels_game_event_logs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_event_logs", + "columnsFrom": [ + "game_event_logs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_users_fk": { + "name": "payload_locked_documents_rels_users_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_roles_fk": { + "name": "payload_locked_documents_rels_roles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ranks_fk": { + "name": "payload_locked_documents_rels_ranks_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ranks", + "columnsFrom": [ + "ranks_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_profiles_fk": { + "name": "payload_locked_documents_rels_profiles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "profiles", + "columnsFrom": [ + "profiles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_awards_fk": { + "name": "payload_locked_documents_rels_awards_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "awards", + "columnsFrom": [ + "awards_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_qualifications_fk": { + "name": "payload_locked_documents_rels_qualifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assignments_fk": { + "name": "payload_locked_documents_rels_assignments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assignment_transfers_fk": { + "name": "payload_locked_documents_rels_assignment_transfers_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assignment_transfers", + "columnsFrom": [ + "assignment_transfers_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_experience_fk": { + "name": "payload_locked_documents_rels_experience_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "experience", + "columnsFrom": [ + "experience_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_user_notifications_fk": { + "name": "payload_locked_documents_rels_user_notifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "user_notifications", + "columnsFrom": [ + "user_notifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_evaluations_fk": { + "name": "payload_locked_documents_rels_evaluations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "evaluations", + "columnsFrom": [ + "evaluations_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ribbon_submissions_fk": { + "name": "payload_locked_documents_rels_ribbon_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ribbon_submissions", + "columnsFrom": [ + "ribbon_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_missions_fk": { + "name": "payload_locked_documents_rels_missions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "missions", + "columnsFrom": [ + "missions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mission_attendances_fk": { + "name": "payload_locked_documents_rels_mission_attendances_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mission_attendances", + "columnsFrom": [ + "mission_attendances_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_campaigns_fk": { + "name": "payload_locked_documents_rels_campaigns_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_factions_fk": { + "name": "payload_locked_documents_rels_factions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "factions", + "columnsFrom": [ + "factions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_technologies_fk": { + "name": "payload_locked_documents_rels_technologies_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assets_fk": { + "name": "payload_locked_documents_rels_assets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_resources_fk": { + "name": "payload_locked_documents_rels_resources_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_vehicles_fk": { + "name": "payload_locked_documents_rels_vehicles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_structures_fk": { + "name": "payload_locked_documents_rels_structures_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_shipments_fk": { + "name": "payload_locked_documents_rels_shipments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "shipments", + "columnsFrom": [ + "shipments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_bank_accounts_fk": { + "name": "payload_locked_documents_rels_bank_accounts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "bank_accounts", + "columnsFrom": [ + "bank_accounts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_bank_transactions_fk": { + "name": "payload_locked_documents_rels_bank_transactions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "bank_transactions", + "columnsFrom": [ + "bank_transactions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ledger_entries_fk": { + "name": "payload_locked_documents_rels_ledger_entries_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ledger_entries", + "columnsFrom": [ + "ledger_entries_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_locker_storages_fk": { + "name": "payload_locked_documents_rels_locker_storages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "locker_storages", + "columnsFrom": [ + "locker_storages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_loadouts_fk": { + "name": "payload_locked_documents_rels_loadouts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "loadouts", + "columnsFrom": [ + "loadouts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_listings_fk": { + "name": "payload_locked_documents_rels_market_listings_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_listings", + "columnsFrom": [ + "market_listings_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_negotiations_fk": { + "name": "payload_locked_documents_rels_market_negotiations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_negotiations", + "columnsFrom": [ + "market_negotiations_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_state_fk": { + "name": "payload_locked_documents_rels_market_state_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_state", + "columnsFrom": [ + "market_state_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_voice_scripts_fk": { + "name": "payload_locked_documents_rels_voice_scripts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "voice_scripts", + "columnsFrom": [ + "voice_scripts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_voice_submissions_fk": { + "name": "payload_locked_documents_rels_voice_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "voice_submissions", + "columnsFrom": [ + "voice_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_tickets_fk": { + "name": "payload_locked_documents_rels_tickets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "tickets", + "columnsFrom": [ + "tickets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ticket_votes_fk": { + "name": "payload_locked_documents_rels_ticket_votes_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ticket_votes", + "columnsFrom": [ + "ticket_votes_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_pages_fk": { + "name": "payload_locked_documents_rels_wiki_pages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_pages", + "columnsFrom": [ + "wiki_pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_revisions_fk": { + "name": "payload_locked_documents_rels_wiki_revisions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_revisions", + "columnsFrom": [ + "wiki_revisions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_templates_fk": { + "name": "payload_locked_documents_rels_wiki_templates_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_templates", + "columnsFrom": [ + "wiki_templates_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_projects_fk": { + "name": "payload_locked_documents_rels_projects_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "projects", + "columnsFrom": [ + "projects_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_sprints_fk": { + "name": "payload_locked_documents_rels_sprints_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "sprints", + "columnsFrom": [ + "sprints_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_releases_fk": { + "name": "payload_locked_documents_rels_releases_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "releases", + "columnsFrom": [ + "releases_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_labels_fk": { + "name": "payload_locked_documents_rels_labels_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "labels", + "columnsFrom": [ + "labels_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_maps_fk": { + "name": "payload_locked_documents_rels_maps_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "maps", + "columnsFrom": [ + "maps_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_map_roads_fk": { + "name": "payload_locked_documents_rels_map_roads_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "map_roads", + "columnsFrom": [ + "map_roads_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_map_zones_fk": { + "name": "payload_locked_documents_rels_map_zones_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "map_zones", + "columnsFrom": [ + "map_zones_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_resource_nodes_fk": { + "name": "payload_locked_documents_rels_resource_nodes_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "resource_nodes", + "columnsFrom": [ + "resource_nodes_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_narrative_events_fk": { + "name": "payload_locked_documents_rels_narrative_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "narrative_events", + "columnsFrom": [ + "narrative_events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_story_beats_fk": { + "name": "payload_locked_documents_rels_story_beats_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "story_beats", + "columnsFrom": [ + "story_beats_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_story_beat_states_fk": { + "name": "payload_locked_documents_rels_story_beat_states_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "story_beat_states", + "columnsFrom": [ + "story_beat_states_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mission_files_fk": { + "name": "payload_locked_documents_rels_mission_files_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mission_files", + "columnsFrom": [ + "mission_files_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mod_lists_fk": { + "name": "payload_locked_documents_rels_mod_lists_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mod_lists", + "columnsFrom": [ + "mod_lists_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_servers_fk": { + "name": "payload_locked_documents_rels_game_servers_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_servers", + "columnsFrom": [ + "game_servers_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_arma_sync_events_fk": { + "name": "payload_locked_documents_rels_arma_sync_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "arma_sync_events", + "columnsFrom": [ + "arma_sync_events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_arma_commands_fk": { + "name": "payload_locked_documents_rels_arma_commands_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "arma_commands", + "columnsFrom": [ + "arma_commands_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_respawn_tickets_fk": { + "name": "payload_locked_documents_rels_respawn_tickets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "respawn_tickets", + "columnsFrom": [ + "respawn_tickets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_minefields_fk": { + "name": "payload_locked_documents_rels_custom_minefields_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_minefields", + "columnsFrom": [ + "custom_minefields_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_minefield_scores_fk": { + "name": "payload_locked_documents_rels_custom_minefield_scores_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_minefield_scores", + "columnsFrom": [ + "custom_minefield_scores_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_radio_tests_fk": { + "name": "payload_locked_documents_rels_custom_radio_tests_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_radio_tests", + "columnsFrom": [ + "custom_radio_tests_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_radio_test_scores_fk": { + "name": "payload_locked_documents_rels_custom_radio_test_scores_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_radio_test_scores", + "columnsFrom": [ + "custom_radio_test_scores_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_plugin_ai_instructions_fk": { + "name": "payload_locked_documents_rels_plugin_ai_instructions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "plugin_ai_instructions", + "columnsFrom": [ + "plugin_ai_instructions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_payload_mcp_api_keys_fk": { + "name": "payload_locked_documents_rels_payload_mcp_api_keys_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_mcp_api_keys", + "columnsFrom": [ + "payload_mcp_api_keys_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences": { + "name": "payload_preferences", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "value": { + "name": "value", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_preferences_key_idx": { + "name": "payload_preferences_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_updated_at_idx": { + "name": "payload_preferences_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_created_at_idx": { + "name": "payload_preferences_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences_rels": { + "name": "payload_preferences_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "payload_mcp_api_keys_id": { + "name": "payload_mcp_api_keys_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_preferences_rels_order_idx": { + "name": "payload_preferences_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_parent_idx": { + "name": "payload_preferences_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_path_idx": { + "name": "payload_preferences_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_users_id_idx": { + "name": "payload_preferences_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_payload_mcp_api_keys_id_idx": { + "name": "payload_preferences_rels_payload_mcp_api_keys_id_idx", + "columns": [ + { + "expression": "payload_mcp_api_keys_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_preferences_rels_parent_fk": { + "name": "payload_preferences_rels_parent_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_preferences", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_users_fk": { + "name": "payload_preferences_rels_users_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_payload_mcp_api_keys_fk": { + "name": "payload_preferences_rels_payload_mcp_api_keys_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_mcp_api_keys", + "columnsFrom": [ + "payload_mcp_api_keys_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_migrations": { + "name": "payload_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "batch": { + "name": "batch", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_migrations_updated_at_idx": { + "name": "payload_migrations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_migrations_created_at_idx": { + "name": "payload_migrations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_rules": { + "name": "game_rules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "main_currency_id": { + "name": "main_currency_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "currency_name": { + "name": "currency_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_symbol": { + "name": "currency_symbol", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_singular": { + "name": "currency_singular", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_plural": { + "name": "currency_plural", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_denomination": { + "name": "currency_denomination", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "proximity_threshold": { + "name": "proximity_threshold", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1000 + }, + "game_tick_interval_minutes": { + "name": "game_tick_interval_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "locker_grid_width": { + "name": "locker_grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "locker_grid_height": { + "name": "locker_grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 6 + }, + "staff_hiring_enabled": { + "name": "staff_hiring_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "staff_hiring_disabled_message": { + "name": "staff_hiring_disabled_message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "economy_default_price_band": { + "name": "economy_default_price_band", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.5 + }, + "economy_real_demand_window_ticks": { + "name": "economy_real_demand_window_ticks", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 24 + }, + "economy_real_demand_decay": { + "name": "economy_real_demand_decay", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.5 + }, + "economy_artificial_demand_drift": { + "name": "economy_artificial_demand_drift", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.05 + }, + "economy_cold_start_observations": { + "name": "economy_cold_start_observations", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 5 + }, + "economy_tick_interval_hint_minutes": { + "name": "economy_tick_interval_hint_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 60 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_rules_main_currency_idx": { + "name": "game_rules_main_currency_idx", + "columns": [ + { + "expression": "main_currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_rules_main_currency_id_resources_id_fk": { + "name": "game_rules_main_currency_id_resources_id_fk", + "tableFrom": "game_rules", + "tableTo": "resources", + "columnsFrom": [ + "main_currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_rules_rels": { + "name": "game_rules_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_rules_rels_order_idx": { + "name": "game_rules_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_parent_idx": { + "name": "game_rules_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_path_idx": { + "name": "game_rules_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_assignments_id_idx": { + "name": "game_rules_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_rules_rels_parent_fk": { + "name": "game_rules_rels_parent_fk", + "tableFrom": "game_rules_rels", + "tableTo": "game_rules", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "game_rules_rels_assignments_fk": { + "name": "game_rules_rels_assignments_fk", + "tableFrom": "game_rules_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_shims_targeting_roles": { + "name": "shims_shims_targeting_roles", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_shims_shims_targeting_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "shims_shims_targeting_roles_order_idx": { + "name": "shims_shims_targeting_roles_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_targeting_roles_parent_idx": { + "name": "shims_shims_targeting_roles_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_shims_targeting_roles_parent_fk": { + "name": "shims_shims_targeting_roles_parent_fk", + "tableFrom": "shims_shims_targeting_roles", + "tableTo": "shims_shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_shims": { + "name": "shims_shims", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "type": { + "name": "type", + "type": "enum_shims_shims_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'css'" + }, + "content": { + "name": "content", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "targeting_audience": { + "name": "targeting_audience", + "type": "enum_shims_shims_targeting_audience", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'all'" + }, + "targeting_percentage": { + "name": "targeting_percentage", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "paths_match_type": { + "name": "paths_match_type", + "type": "enum_shims_shims_paths_match_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'all'" + } + }, + "indexes": { + "shims_shims_order_idx": { + "name": "shims_shims_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_parent_id_idx": { + "name": "shims_shims_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_name_idx": { + "name": "shims_shims_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_shims_parent_id_fk": { + "name": "shims_shims_parent_id_fk", + "tableFrom": "shims_shims", + "tableTo": "shims", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims": { + "name": "shims", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_texts": { + "name": "shims_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shims_texts_order_parent": { + "name": "shims_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_texts_parent_fk": { + "name": "shims_texts_parent_fk", + "tableFrom": "shims_texts", + "tableTo": "shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_rels": { + "name": "shims_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shims_rels_order_idx": { + "name": "shims_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_parent_idx": { + "name": "shims_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_path_idx": { + "name": "shims_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_users_id_idx": { + "name": "shims_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_rels_parent_fk": { + "name": "shims_rels_parent_fk", + "tableFrom": "shims_rels", + "tableTo": "shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shims_rels_users_fk": { + "name": "shims_rels_users_fk", + "tableFrom": "shims_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.enum_game_structures_staff_positions_position_type": { + "name": "enum_game_structures_staff_positions_position_type", + "schema": "public", + "values": [ + "administrative", + "technical", + "other" + ] + }, + "public.enum_game_structures_construction_status": { + "name": "enum_game_structures_construction_status", + "schema": "public", + "values": [ + "awaiting_materials", + "building", + "complete" + ] + }, + "public.enum_game_vehicles_status": { + "name": "enum_game_vehicles_status", + "schema": "public", + "values": [ + "idle", + "assigned", + "in_transit", + "damaged", + "destroyed" + ] + }, + "public.enum_npc_staffing_position_type": { + "name": "enum_npc_staffing_position_type", + "schema": "public", + "values": [ + "labor", + "administrative", + "technical", + "other" + ] + }, + "public.enum_npc_staffing_status": { + "name": "enum_npc_staffing_status", + "schema": "public", + "values": [ + "active", + "terminated" + ] + }, + "public.enum_game_event_logs_target_collection": { + "name": "enum_game_event_logs_target_collection", + "schema": "public", + "values": [ + "game-structures", + "game-vehicles", + "game-npcs", + "npc-staffing", + "structures", + "resources", + "assets", + "vehicles", + "factions", + "missions", + "campaigns", + "users", + "technologies", + "maps", + "shipments", + "bank-accounts", + "bank-transactions", + "ledger-entries", + "locker-storages", + "loadouts", + "market-listings", + "market-negotiations", + "market-state", + "evaluations", + "tickets", + "wiki-pages", + "wiki-revisions", + "wiki-templates", + "game-servers", + "assignment-transfers", + "voice-scripts", + "voice-submissions", + "story-beats", + "story-beat-states", + "custom-minefields", + "custom-minefield-scores", + "custom-radio-tests", + "custom-radio-test-scores", + "ribbon-submissions" + ] + }, + "public.enum_users_roles": { + "name": "enum_users_roles", + "schema": "public", + "values": [ + "guest", + "user", + "trusted", + "admin", + "developer" + ] + }, + "public.enum_users_preferences_notifications_muted_types": { + "name": "enum_users_preferences_notifications_muted_types", + "schema": "public", + "values": [ + "market:offer", + "market:counter", + "market:accept", + "market:reject", + "market:withdrawn", + "market:closed", + "market:sold", + "market:expired", + "award:granted", + "account:discord-request", + "finance:deposit", + "finance:withdraw", + "finance:transfer", + "shipment:completed", + "ticket:created", + "ticket:assigned", + "ticket:reply", + "ticket:status", + "poker:force-ended", + "poker:everyone-left", + "blackjack:force-ended", + "blackjack:everyone-left" + ] + }, + "public.enum_users_preferences_discord_muted_types": { + "name": "enum_users_preferences_discord_muted_types", + "schema": "public", + "values": [ + "market:offer", + "market:counter", + "market:accept", + "market:reject", + "market:withdrawn", + "market:closed", + "market:sold", + "market:expired", + "award:granted", + "account:discord-request", + "finance:deposit", + "finance:withdraw", + "finance:transfer", + "shipment:completed", + "ticket:created", + "ticket:assigned", + "ticket:reply", + "ticket:status", + "poker:force-ended", + "poker:everyone-left", + "blackjack:force-ended", + "blackjack:everyone-left" + ] + }, + "public.enum_users_preferences_display_lead_or_actual": { + "name": "enum_users_preferences_display_lead_or_actual", + "schema": "public", + "values": [ + "lead", + "actual" + ] + }, + "public.enum_roles_permissions": { + "name": "enum_roles_permissions", + "schema": "public", + "values": [ + "system:admin-access", + "media:create", + "media:read", + "media:update", + "media:delete", + "admin:media:manage", + "users:create", + "users:read", + "users:update", + "users:delete", + "users:unlock", + "users:assign-roles", + "admin:users:manage", + "roles:create", + "roles:read", + "roles:update", + "roles:delete", + "admin:roles:manage", + "ranks:create", + "ranks:read", + "ranks:update", + "ranks:delete", + "admin:ranks:manage", + "profiles:create", + "profiles:read", + "profiles:update", + "profiles:delete", + "admin:profiles:manage", + "awards:create", + "awards:read", + "awards:update", + "awards:delete", + "admin:awards:manage", + "qualifications:create", + "qualifications:read", + "qualifications:update", + "qualifications:delete", + "admin:qualifications:manage", + "assignments:create", + "assignments:read", + "assignments:update", + "assignments:delete", + "admin:assignments:manage", + "assignment-transfers:create", + "assignment-transfers:read", + "assignment-transfers:update", + "assignment-transfers:delete", + "admin:assignment-transfers:manage", + "experience:create", + "experience:read", + "experience:update", + "experience:delete", + "admin:experience:manage", + "user-notifications:create", + "user-notifications:read", + "user-notifications:update", + "user-notifications:delete", + "admin:user-notifications:manage", + "evaluations:create", + "evaluations:read", + "evaluations:update", + "evaluations:delete", + "admin:evaluations:manage", + "missions:create", + "missions:read", + "missions:update", + "missions:delete", + "missions:read-sensitive", + "admin:missions:manage", + "mission-attendances:create", + "mission-attendances:read", + "mission-attendances:update", + "mission-attendances:delete", + "admin:mission-attendances:manage", + "campaigns:create", + "campaigns:read", + "campaigns:update", + "campaigns:delete", + "admin:campaigns:manage", + "campaigns:manage", + "factions:create", + "factions:read", + "factions:update", + "factions:delete", + "admin:factions:manage", + "technologies:create", + "technologies:read", + "technologies:update", + "technologies:delete", + "admin:technologies:manage", + "assets:create", + "assets:read", + "assets:update", + "assets:delete", + "admin:assets:manage", + "resources:create", + "resources:read", + "resources:update", + "resources:delete", + "admin:resources:manage", + "vehicles:create", + "vehicles:read", + "vehicles:update", + "vehicles:delete", + "admin:vehicles:manage", + "structures:create", + "structures:read", + "structures:update", + "structures:delete", + "admin:structures:manage", + "shipments:create", + "shipments:read", + "shipments:update", + "shipments:delete", + "admin:shipments:manage", + "bank-accounts:create", + "bank-accounts:read", + "bank-accounts:update", + "bank-accounts:delete", + "admin:bank-accounts:manage", + "bank-transactions:create", + "bank-transactions:read", + "bank-transactions:update", + "bank-transactions:delete", + "admin:bank-transactions:manage", + "ledger-entries:create", + "ledger-entries:read", + "ledger-entries:update", + "ledger-entries:delete", + "admin:ledger-entries:manage", + "locker-storages:create", + "locker-storages:read", + "locker-storages:update", + "locker-storages:delete", + "admin:locker-storages:manage", + "loadouts:create", + "loadouts:read", + "loadouts:update", + "loadouts:delete", + "admin:loadouts:manage", + "market-listings:create", + "market-listings:read", + "market-listings:update", + "market-listings:delete", + "admin:market-listings:manage", + "market-negotiations:create", + "market-negotiations:read", + "market-negotiations:update", + "market-negotiations:delete", + "admin:market-negotiations:manage", + "market-state:create", + "market-state:read", + "market-state:update", + "market-state:delete", + "admin:market-state:manage", + "projects:create", + "projects:read", + "projects:update", + "projects:delete", + "admin:projects:manage", + "labels:create", + "labels:read", + "labels:update", + "labels:delete", + "admin:labels:manage", + "sprints:create", + "sprints:read", + "sprints:update", + "sprints:delete", + "admin:sprints:manage", + "releases:create", + "releases:read", + "releases:update", + "releases:delete", + "admin:releases:manage", + "tickets:create", + "tickets:read", + "tickets:update", + "tickets:delete", + "admin:tickets:manage", + "ticket-votes:create", + "ticket-votes:read", + "ticket-votes:update", + "ticket-votes:delete", + "admin:ticket-votes:manage", + "game-structures:create", + "game-structures:read", + "game-structures:update", + "game-structures:delete", + "admin:game-structures:manage", + "game-vehicles:create", + "game-vehicles:read", + "game-vehicles:update", + "game-vehicles:delete", + "admin:game-vehicles:manage", + "game-npcs:create", + "game-npcs:read", + "game-npcs:update", + "game-npcs:delete", + "admin:game-npcs:manage", + "game-hard-resources:create", + "game-hard-resources:read", + "game-hard-resources:update", + "game-hard-resources:delete", + "admin:game-hard-resources:manage", + "game-event-logs:create", + "game-event-logs:read", + "game-event-logs:update", + "game-event-logs:delete", + "admin:game-event-logs:manage", + "maps:create", + "maps:read", + "maps:update", + "maps:delete", + "admin:maps:manage", + "map-roads:read", + "admin:map-roads:manage", + "map-zones:read", + "admin:map-zones:manage", + "resource-nodes:read", + "admin:resource-nodes:manage", + "narrative-events:create", + "narrative-events:read", + "narrative-events:update", + "narrative-events:delete", + "admin:narrative-events:manage", + "mission-files:create", + "mission-files:read", + "mission-files:update", + "mission-files:delete", + "admin:mission-files:manage", + "mod-lists:create", + "mod-lists:read", + "mod-lists:update", + "mod-lists:delete", + "admin:mod-lists:manage", + "game-servers:create", + "game-servers:read", + "game-servers:update", + "game-servers:delete", + "admin:game-servers:manage", + "arma-sync-events:create", + "arma-sync-events:read", + "arma-sync-events:update", + "arma-sync-events:delete", + "admin:arma-sync-events:manage", + "arma-commands:create", + "arma-commands:read", + "arma-commands:update", + "arma-commands:delete", + "admin:arma-commands:manage", + "game-rules:read", + "game-rules:update", + "shims:read", + "shims:update", + "logistics:manage", + "intelligence:manage", + "profiles:intel_excerpt:update", + "banking:manage", + "tickets:staff", + "discord:staff", + "discord:announce", + "custom-minefields:update", + "custom-minefields:delete", + "custom-minefield-scores:delete", + "custom-radio-tests:update", + "custom-radio-tests:delete", + "custom-radio-test-scores:delete" + ] + }, + "public.enum_awards_grant_config_allowed_grantor_assignment_types": { + "name": "enum_awards_grant_config_allowed_grantor_assignment_types", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_awards_type": { + "name": "enum_awards_type", + "schema": "public", + "values": [ + "commendation", + "ribbon", + "medal" + ] + }, + "public.enum_awards_grant_config_recipient_scope": { + "name": "enum_awards_grant_config_recipient_scope", + "schema": "public", + "values": [ + "same_command", + "whitelist", + "anyone" + ] + }, + "public.enum_assignments_type": { + "name": "enum_assignments_type", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_assignment_transfers_status": { + "name": "enum_assignment_transfers_status", + "schema": "public", + "values": [ + "pending", + "rejected", + "awaiting_superuser", + "completed", + "cancelled", + "denied" + ] + }, + "public.enum_assignment_transfers_escalation_reason": { + "name": "enum_assignment_transfers_escalation_reason", + "schema": "public", + "values": [ + "no_leaders", + "appeal", + "leader_changed" + ] + }, + "public.enum_assignment_transfers_from_leader_decision": { + "name": "enum_assignment_transfers_from_leader_decision", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected", + "not_required" + ] + }, + "public.enum_assignment_transfers_to_leader_decision": { + "name": "enum_assignment_transfers_to_leader_decision", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected", + "not_required" + ] + }, + "public.enum_evaluations_kind": { + "name": "enum_evaluations_kind", + "schema": "public", + "values": [ + "leader-direct", + "leader-indirect", + "subordinate" + ] + }, + "public.enum_evaluations_level": { + "name": "enum_evaluations_level", + "schema": "public", + "values": [ + "exceptional", + "excellent", + "proficient", + "adequate", + "moderate", + "under-review" + ] + }, + "public.enum_ribbon_submissions_grantor_types": { + "name": "enum_ribbon_submissions_grantor_types", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_ribbon_submissions_status": { + "name": "enum_ribbon_submissions_status", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected" + ] + }, + "public.enum_ribbon_submissions_recipient_scope": { + "name": "enum_ribbon_submissions_recipient_scope", + "schema": "public", + "values": [ + "same_command", + "whitelist", + "anyone" + ] + }, + "public.enum_missions_factions_involved_threat_level": { + "name": "enum_missions_factions_involved_threat_level", + "schema": "public", + "values": [ + "ally", + "friendly", + "neutral", + "hostile" + ] + }, + "public.enum_missions_logistics_and_support_insertion": { + "name": "enum_missions_logistics_and_support_insertion", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_logistics_and_support_extraction": { + "name": "enum_missions_logistics_and_support_extraction", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_operation_type": { + "name": "enum_missions_operation_type", + "schema": "public", + "values": [ + "main", + "side", + "external" + ] + }, + "public.enum_missions_classification_mission_type": { + "name": "enum_missions_classification_mission_type", + "schema": "public", + "values": [ + "Zeus", + "PvE", + "PvP", + "PvPvE", + "Training", + "Special" + ] + }, + "public.enum_missions_ownership_and_status_status": { + "name": "enum_missions_ownership_and_status_status", + "schema": "public", + "values": [ + "Concept", + "Planning", + "Ready", + "Scheduled", + "Active", + "Completed", + "Cancelled" + ] + }, + "public.enum_missions_ownership_and_status_visibility": { + "name": "enum_missions_ownership_and_status_visibility", + "schema": "public", + "values": [ + "unit", + "leadership", + "intel", + "private" + ] + }, + "public.enum_missions_civilian_presence": { + "name": "enum_missions_civilian_presence", + "schema": "public", + "values": [ + "None", + "Low", + "Medium", + "High" + ] + }, + "public.enum_mission_attendances_response": { + "name": "enum_mission_attendances_response", + "schema": "public", + "values": [ + "yes", + "no", + "tentative" + ] + }, + "public.enum_campaigns_status": { + "name": "enum_campaigns_status", + "schema": "public", + "values": [ + "concept", + "inProgress", + "completed" + ] + }, + "public.enum_campaigns_campaign_mode": { + "name": "enum_campaigns_campaign_mode", + "schema": "public", + "values": [ + "official", + "custom" + ] + }, + "public.enum_factions_type": { + "name": "enum_factions_type", + "schema": "public", + "values": [ + "playerFaction", + "majorFaction", + "minorFaction", + "corporation", + "special" + ] + }, + "public.enum_technologies_approval_status": { + "name": "enum_technologies_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_technologies_type": { + "name": "enum_technologies_type", + "schema": "public", + "values": [ + "asset", + "upgrade" + ] + }, + "public.enum_assets_skin_configuration_applies_to_asset_types": { + "name": "enum_assets_skin_configuration_applies_to_asset_types", + "schema": "public", + "values": [ + "weapon", + "uniform", + "vest", + "backpack", + "helmet" + ] + }, + "public.enum_assets_approval_status": { + "name": "enum_assets_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_assets_asset_type": { + "name": "enum_assets_asset_type", + "schema": "public", + "values": [ + "weapon", + "magazine", + "optic", + "muzzle", + "bipod", + "uniform", + "vest", + "backpack", + "helmet", + "facewear", + "nvg", + "radio", + "medical", + "tool", + "explosive", + "skin", + "miscellaneous" + ] + }, + "public.enum_assets_weapon_configuration_slot_type": { + "name": "enum_assets_weapon_configuration_slot_type", + "schema": "public", + "values": [ + "primary", + "secondary", + "launcher" + ] + }, + "public.enum_assets_nightvision_configuration_nvg_generation": { + "name": "enum_assets_nightvision_configuration_nvg_generation", + "schema": "public", + "values": [ + "gen1", + "gen2", + "gen3" + ] + }, + "public.enum_assets_market_trading_rarity": { + "name": "enum_assets_market_trading_rarity", + "schema": "public", + "values": [ + "basic", + "common", + "uncommon", + "rare", + "veryRare", + "epic", + "legendary", + "unique" + ] + }, + "public.enum_resources_approval_status": { + "name": "enum_resources_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_resources_type": { + "name": "enum_resources_type", + "schema": "public", + "values": [ + "physical", + "fluid", + "energy", + "abstract" + ] + }, + "public.enum_resources_rarity": { + "name": "enum_resources_rarity", + "schema": "public", + "values": [ + "common", + "uncommon", + "rare", + "epic", + "legendary", + "exotic", + "unique" + ] + }, + "public.enum_vehicles_category": { + "name": "enum_vehicles_category", + "schema": "public", + "values": [ + "civilian", + "utility", + "transport", + "weaponized", + "military" + ] + }, + "public.enum_vehicles_pylons_pylon_type": { + "name": "enum_vehicles_pylons_pylon_type", + "schema": "public", + "values": [ + "mountedWeapon", + "pylon" + ] + }, + "public.enum_vehicles_approval_status": { + "name": "enum_vehicles_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_vehicles_transport_mode": { + "name": "enum_vehicles_transport_mode", + "schema": "public", + "values": [ + "ground", + "air", + "sea" + ] + }, + "public.enum_vehicles_armor_rating": { + "name": "enum_vehicles_armor_rating", + "schema": "public", + "values": [ + "none", + "light", + "medium", + "heavy", + "composite" + ] + }, + "public.enum_structures_staff_positions_position_type": { + "name": "enum_structures_staff_positions_position_type", + "schema": "public", + "values": [ + "administrative", + "technical", + "other" + ] + }, + "public.enum_structures_approval_status": { + "name": "enum_structures_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_structures_category": { + "name": "enum_structures_category", + "schema": "public", + "values": [ + "logistics", + "military", + "civilian" + ] + }, + "public.enum_structures_terrain_type": { + "name": "enum_structures_terrain_type", + "schema": "public", + "values": [ + "land", + "water" + ] + }, + "public.enum_structures_function_type": { + "name": "enum_structures_function_type", + "schema": "public", + "values": [ + "producer", + "storage", + "sensor", + "converter", + "defense", + "miscellaneous" + ] + }, + "public.enum_shipments_status": { + "name": "enum_shipments_status", + "schema": "public", + "values": [ + "pending", + "dispatched", + "in_transit", + "arrived", + "completed", + "cancelled", + "failed", + "stranded" + ] + }, + "public.enum_bank_accounts_account_type": { + "name": "enum_bank_accounts_account_type", + "schema": "public", + "values": [ + "treasury", + "faction", + "personal" + ] + }, + "public.enum_bank_accounts_status": { + "name": "enum_bank_accounts_status", + "schema": "public", + "values": [ + "open", + "frozen", + "closed" + ] + }, + "public.enum_bank_transactions_type": { + "name": "enum_bank_transactions_type", + "schema": "public", + "values": [ + "deposit", + "withdrawal", + "transfer", + "payment", + "fee", + "salary", + "adjustment" + ] + }, + "public.enum_bank_transactions_status": { + "name": "enum_bank_transactions_status", + "schema": "public", + "values": [ + "completed", + "reversed" + ] + }, + "public.enum_ledger_entries_type": { + "name": "enum_ledger_entries_type", + "schema": "public", + "values": [ + "deposit", + "withdrawal", + "transfer", + "payment", + "fee", + "salary", + "adjustment" + ] + }, + "public.enum_market_listings_status": { + "name": "enum_market_listings_status", + "schema": "public", + "values": [ + "active", + "sold", + "cancelled", + "expired" + ] + }, + "public.enum_market_negotiations_history_from": { + "name": "enum_market_negotiations_history_from", + "schema": "public", + "values": [ + "buyer", + "seller" + ] + }, + "public.enum_market_negotiations_status": { + "name": "enum_market_negotiations_status", + "schema": "public", + "values": [ + "open", + "accepted", + "rejected", + "closed", + "cancelled", + "expired" + ] + }, + "public.enum_market_negotiations_proposed_by": { + "name": "enum_market_negotiations_proposed_by", + "schema": "public", + "values": [ + "buyer", + "seller" + ] + }, + "public.enum_market_state_item_type": { + "name": "enum_market_state_item_type", + "schema": "public", + "values": [ + "resource", + "asset" + ] + }, + "public.enum_voice_scripts_status": { + "name": "enum_voice_scripts_status", + "schema": "public", + "values": [ + "draft", + "open", + "closed" + ] + }, + "public.enum_voice_submissions_status": { + "name": "enum_voice_submissions_status", + "schema": "public", + "values": [ + "pending", + "accepted", + "rejected" + ] + }, + "public.enum_tickets_activity_type": { + "name": "enum_tickets_activity_type", + "schema": "public", + "values": [ + "system", + "agent_message", + "client_message" + ] + }, + "public.enum_tickets_category": { + "name": "enum_tickets_category", + "schema": "public", + "values": [ + "bug_report", + "feature_request", + "support_request", + "other" + ] + }, + "public.enum_tickets_priority": { + "name": "enum_tickets_priority", + "schema": "public", + "values": [ + "low", + "medium", + "high", + "critical" + ] + }, + "public.enum_tickets_status": { + "name": "enum_tickets_status", + "schema": "public", + "values": [ + "open", + "in_review", + "planning", + "in_progress", + "waiting_on_reporter", + "in_testing", + "resolved", + "canceled", + "closed" + ] + }, + "public.enum_tickets_type": { + "name": "enum_tickets_type", + "schema": "public", + "values": [ + "task", + "bug", + "story", + "epic", + "improvement" + ] + }, + "public.enum_tickets_resolution": { + "name": "enum_tickets_resolution", + "schema": "public", + "values": [ + "fixed", + "wontfix", + "duplicate", + "invalid" + ] + }, + "public.enum_wiki_pages_category": { + "name": "enum_wiki_pages_category", + "schema": "public", + "values": [ + "Campaign", + "World", + "Lore", + "Characters", + "Plot", + "Media", + "Guides", + "Meta" + ] + }, + "public.enum_wiki_revisions_type": { + "name": "enum_wiki_revisions_type", + "schema": "public", + "values": [ + "create", + "edit", + "restore" + ] + }, + "public.enum_projects_status": { + "name": "enum_projects_status", + "schema": "public", + "values": [ + "active", + "archived" + ] + }, + "public.enum_sprints_status": { + "name": "enum_sprints_status", + "schema": "public", + "values": [ + "planning", + "active", + "completed" + ] + }, + "public.enum_releases_status": { + "name": "enum_releases_status", + "schema": "public", + "values": [ + "draft", + "in_progress", + "released" + ] + }, + "public.enum_maps_basemap_mode": { + "name": "enum_maps_basemap_mode", + "schema": "public", + "values": [ + "image", + "tiles" + ] + }, + "public.enum_map_roads_surface": { + "name": "enum_map_roads_surface", + "schema": "public", + "values": [ + "paved", + "dirt", + "trail" + ] + }, + "public.enum_map_roads_stroke_style": { + "name": "enum_map_roads_stroke_style", + "schema": "public", + "values": [ + "solid", + "dashed", + "dotted" + ] + }, + "public.enum_map_zones_type": { + "name": "enum_map_zones_type", + "schema": "public", + "values": [ + "water", + "land", + "territory", + "border", + "other" + ] + }, + "public.enum_narrative_events_triggers_type": { + "name": "enum_narrative_events_triggers_type", + "schema": "public", + "values": [ + "manual", + "mission_complete", + "timer", + "condition" + ] + }, + "public.enum_story_beats_status": { + "name": "enum_story_beats_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum_story_beat_states_reaction": { + "name": "enum_story_beat_states_reaction", + "schema": "public", + "values": [ + "like", + "heart", + "salute" + ] + }, + "public.enum_game_servers_status": { + "name": "enum_game_servers_status", + "schema": "public", + "values": [ + "online", + "offline" + ] + }, + "public.enum_arma_commands_status": { + "name": "enum_arma_commands_status", + "schema": "public", + "values": [ + "queued", + "delivered", + "succeeded", + "failed" + ] + }, + "public.enum_custom_radio_tests_order": { + "name": "enum_custom_radio_tests_order", + "schema": "public", + "values": [ + "fixed", + "shuffled" + ] + }, + "public.enum_custom_radio_test_scores_mode": { + "name": "enum_custom_radio_test_scores_mode", + "schema": "public", + "values": [ + "sprint", + "watch" + ] + }, + "public.enum_plugin_ai_instructions_field_type": { + "name": "enum_plugin_ai_instructions_field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "upload", + "richText" + ] + }, + "public.enum_plugin_ai_instructions_model_id": { + "name": "enum_plugin_ai_instructions_model_id", + "schema": "public", + "values": [ + "unsloth-text" + ] + }, + "public.enum_shims_shims_targeting_roles": { + "name": "enum_shims_shims_targeting_roles", + "schema": "public", + "values": [ + "guest", + "user", + "trusted", + "admin", + "developer" + ] + }, + "public.enum_shims_shims_type": { + "name": "enum_shims_shims_type", + "schema": "public", + "values": [ + "css", + "js" + ] + }, + "public.enum_shims_shims_targeting_audience": { + "name": "enum_shims_shims_targeting_audience", + "schema": "public", + "values": [ + "all", + "percentage", + "users", + "roles" + ] + }, + "public.enum_shims_shims_paths_match_type": { + "name": "enum_shims_shims_paths_match_type", + "schema": "public", + "values": [ + "all", + "include", + "exclude" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "id": "1d0a600a-22c7-49fa-9503-b4bb9403a16e", + "prevId": "00000000-0000-0000-0000-000000000000" +} \ No newline at end of file diff --git a/src/migrations/20260918_054722_add_labor_construction_speed.ts b/src/migrations/20260918_054722_add_labor_construction_speed.ts new file mode 100644 index 0000000..2c6d0f0 --- /dev/null +++ b/src/migrations/20260918_054722_add_labor_construction_speed.ts @@ -0,0 +1,13 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres' + +export async function up({ db, payload, req }: MigrateUpArgs): Promise { + await db.execute(sql` + ALTER TABLE "labor_classifications" ADD COLUMN "build_efficiency" numeric DEFAULT 1; + ALTER TABLE "structures" ADD COLUMN "construction_crew_required" numeric DEFAULT 0;`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.execute(sql` + ALTER TABLE "labor_classifications" DROP COLUMN "build_efficiency"; + ALTER TABLE "structures" DROP COLUMN "construction_crew_required";`) +} diff --git a/src/migrations/20260918_061857_add_module_slots.json b/src/migrations/20260918_061857_add_module_slots.json new file mode 100644 index 0000000..8dcab68 --- /dev/null +++ b/src/migrations/20260918_061857_add_module_slots.json @@ -0,0 +1,29041 @@ +{ + "version": "7", + "dialect": "postgresql", + "tables": { + "public.media": { + "name": "media", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "media_updated_at_idx": { + "name": "media_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_created_at_idx": { + "name": "media_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_filename_idx": { + "name": "media_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_hard_resources": { + "name": "game_hard_resources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_hard_resources_name_idx": { + "name": "game_hard_resources_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_hard_resources_updated_at_idx": { + "name": "game_hard_resources_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_hard_resources_created_at_idx": { + "name": "game_hard_resources_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_labor_requirements": { + "name": "game_structures_labor_requirements", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "classification_id": { + "name": "classification_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "required_headcount": { + "name": "required_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_headcount": { + "name": "max_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_labor_requirements_order_idx": { + "name": "game_structures_labor_requirements_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_labor_requirements_parent_id_idx": { + "name": "game_structures_labor_requirements_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_labor_requirements_classification_idx": { + "name": "game_structures_labor_requirements_classification_idx", + "columns": [ + { + "expression": "classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_labor_requirements_classification_id_labor_classifications_id_fk": { + "name": "game_structures_labor_requirements_classification_id_labor_classifications_id_fk", + "tableFrom": "game_structures_labor_requirements", + "tableTo": "labor_classifications", + "columnsFrom": [ + "classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_labor_requirements_parent_id_fk": { + "name": "game_structures_labor_requirements_parent_id_fk", + "tableFrom": "game_structures_labor_requirements", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_staff_positions": { + "name": "game_structures_staff_positions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_game_structures_staff_positions_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "max": { + "name": "max", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_staff_positions_order_idx": { + "name": "game_structures_staff_positions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_staff_positions_parent_id_idx": { + "name": "game_structures_staff_positions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_staff_positions_parent_id_fk": { + "name": "game_structures_staff_positions_parent_id_fk", + "tableFrom": "game_structures_staff_positions", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_production_inputs": { + "name": "game_structures_production_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "game_structures_production_inputs_order_idx": { + "name": "game_structures_production_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_inputs_parent_id_idx": { + "name": "game_structures_production_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_inputs_resource_idx": { + "name": "game_structures_production_inputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_production_inputs_resource_id_resources_id_fk": { + "name": "game_structures_production_inputs_resource_id_resources_id_fk", + "tableFrom": "game_structures_production_inputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_production_inputs_parent_id_fk": { + "name": "game_structures_production_inputs_parent_id_fk", + "tableFrom": "game_structures_production_inputs", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_production_outputs": { + "name": "game_structures_production_outputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "game_structures_production_outputs_order_idx": { + "name": "game_structures_production_outputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_outputs_parent_id_idx": { + "name": "game_structures_production_outputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_outputs_resource_idx": { + "name": "game_structures_production_outputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_production_outputs_resource_id_resources_id_fk": { + "name": "game_structures_production_outputs_resource_id_resources_id_fk", + "tableFrom": "game_structures_production_outputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_production_outputs_parent_id_fk": { + "name": "game_structures_production_outputs_parent_id_fk", + "tableFrom": "game_structures_production_outputs", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_installed_modules": { + "name": "game_structures_installed_modules", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "installed_at": { + "name": "installed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_installed_modules_order_idx": { + "name": "game_structures_installed_modules_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_installed_modules_parent_id_idx": { + "name": "game_structures_installed_modules_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_installed_modules_parent_id_fk": { + "name": "game_structures_installed_modules_parent_id_fk", + "tableFrom": "game_structures_installed_modules", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_stored_resources": { + "name": "game_structures_stored_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_structures_stored_resources_order_idx": { + "name": "game_structures_stored_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_stored_resources_parent_id_idx": { + "name": "game_structures_stored_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_stored_resources_resource_idx": { + "name": "game_structures_stored_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_stored_resources_resource_id_resources_id_fk": { + "name": "game_structures_stored_resources_resource_id_resources_id_fk", + "tableFrom": "game_structures_stored_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_stored_resources_parent_id_fk": { + "name": "game_structures_stored_resources_parent_id_fk", + "tableFrom": "game_structures_stored_resources", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_void_storage": { + "name": "game_structures_void_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_structures_void_storage_order_idx": { + "name": "game_structures_void_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_void_storage_parent_id_idx": { + "name": "game_structures_void_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_void_storage_resource_idx": { + "name": "game_structures_void_storage_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_void_storage_resource_id_resources_id_fk": { + "name": "game_structures_void_storage_resource_id_resources_id_fk", + "tableFrom": "game_structures_void_storage", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_void_storage_parent_id_fk": { + "name": "game_structures_void_storage_parent_id_fk", + "tableFrom": "game_structures_void_storage", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures": { + "name": "game_structures", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type_id": { + "name": "type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "construction_status": { + "name": "construction_status", + "type": "enum_game_structures_construction_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'complete'" + }, + "construction_started_at": { + "name": "construction_started_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "construction_completes_at": { + "name": "construction_completes_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "maintenance_cost": { + "name": "maintenance_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "production_paused": { + "name": "production_paused", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "last_production_at": { + "name": "last_production_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "production_stall_reason": { + "name": "production_stall_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "coordinates": { + "name": "coordinates", + "type": "geometry(Point)", + "primaryKey": false, + "notNull": false + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "label_priority": { + "name": "label_priority", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_structures_type_idx": { + "name": "game_structures_type_idx", + "columns": [ + { + "expression": "type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_faction_idx": { + "name": "game_structures_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_map_idx": { + "name": "game_structures_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_updated_at_idx": { + "name": "game_structures_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_created_at_idx": { + "name": "game_structures_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_type_id_structures_id_fk": { + "name": "game_structures_type_id_structures_id_fk", + "tableFrom": "game_structures", + "tableTo": "structures", + "columnsFrom": [ + "type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_faction_id_factions_id_fk": { + "name": "game_structures_faction_id_factions_id_fk", + "tableFrom": "game_structures", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_map_id_maps_id_fk": { + "name": "game_structures_map_id_maps_id_fk", + "tableFrom": "game_structures", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles_stored_resources": { + "name": "game_vehicles_stored_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_vehicles_stored_resources_order_idx": { + "name": "game_vehicles_stored_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_stored_resources_parent_id_idx": { + "name": "game_vehicles_stored_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_stored_resources_resource_idx": { + "name": "game_vehicles_stored_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_stored_resources_resource_id_resources_id_fk": { + "name": "game_vehicles_stored_resources_resource_id_resources_id_fk", + "tableFrom": "game_vehicles_stored_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_stored_resources_parent_id_fk": { + "name": "game_vehicles_stored_resources_parent_id_fk", + "tableFrom": "game_vehicles_stored_resources", + "tableTo": "game_vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles_void_storage": { + "name": "game_vehicles_void_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_vehicles_void_storage_order_idx": { + "name": "game_vehicles_void_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_void_storage_parent_id_idx": { + "name": "game_vehicles_void_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_void_storage_resource_idx": { + "name": "game_vehicles_void_storage_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_void_storage_resource_id_resources_id_fk": { + "name": "game_vehicles_void_storage_resource_id_resources_id_fk", + "tableFrom": "game_vehicles_void_storage", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_void_storage_parent_id_fk": { + "name": "game_vehicles_void_storage_parent_id_fk", + "tableFrom": "game_vehicles_void_storage", + "tableTo": "game_vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles": { + "name": "game_vehicles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type_id": { + "name": "type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "deployed_at_id": { + "name": "deployed_at_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_game_vehicles_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'idle'" + }, + "current_fuel": { + "name": "current_fuel", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "current_health": { + "name": "current_health", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_vehicles_type_idx": { + "name": "game_vehicles_type_idx", + "columns": [ + { + "expression": "type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_deployed_at_idx": { + "name": "game_vehicles_deployed_at_idx", + "columns": [ + { + "expression": "deployed_at_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_faction_idx": { + "name": "game_vehicles_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_updated_at_idx": { + "name": "game_vehicles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_created_at_idx": { + "name": "game_vehicles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_type_id_vehicles_id_fk": { + "name": "game_vehicles_type_id_vehicles_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "vehicles", + "columnsFrom": [ + "type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_deployed_at_id_game_structures_id_fk": { + "name": "game_vehicles_deployed_at_id_game_structures_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "game_structures", + "columnsFrom": [ + "deployed_at_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_faction_id_factions_id_fk": { + "name": "game_vehicles_faction_id_factions_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_npcs": { + "name": "game_npcs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occupation": { + "name": "occupation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "location_id": { + "name": "location_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bio": { + "name": "bio", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "is_generated": { + "name": "is_generated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "is_in_game": { + "name": "is_in_game", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "vendor_enabled": { + "name": "vendor_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vendor_price_modifier": { + "name": "vendor_price_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_npcs_location_idx": { + "name": "game_npcs_location_idx", + "columns": [ + { + "expression": "location_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_faction_idx": { + "name": "game_npcs_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_updated_at_idx": { + "name": "game_npcs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_created_at_idx": { + "name": "game_npcs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_npcs_location_id_game_structures_id_fk": { + "name": "game_npcs_location_id_game_structures_id_fk", + "tableFrom": "game_npcs", + "tableTo": "game_structures", + "columnsFrom": [ + "location_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_npcs_faction_id_factions_id_fk": { + "name": "game_npcs_faction_id_factions_id_fk", + "tableFrom": "game_npcs", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_npcs_rels": { + "name": "game_npcs_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_npcs_rels_order_idx": { + "name": "game_npcs_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_parent_idx": { + "name": "game_npcs_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_path_idx": { + "name": "game_npcs_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_assets_id_idx": { + "name": "game_npcs_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_npcs_rels_parent_fk": { + "name": "game_npcs_rels_parent_fk", + "tableFrom": "game_npcs_rels", + "tableTo": "game_npcs", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "game_npcs_rels_assets_fk": { + "name": "game_npcs_rels_assets_fk", + "tableFrom": "game_npcs_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.npc_staffing": { + "name": "npc_staffing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "npc_id": { + "name": "npc_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_npc_staffing_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'labor'" + }, + "position_title": { + "name": "position_title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "headcount": { + "name": "headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "labor_classification_id": { + "name": "labor_classification_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "salary": { + "name": "salary", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_npc_staffing_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'active'" + }, + "hired_at": { + "name": "hired_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "terminated_at": { + "name": "terminated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "npc_staffing_npc_idx": { + "name": "npc_staffing_npc_idx", + "columns": [ + { + "expression": "npc_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_structure_idx": { + "name": "npc_staffing_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_labor_classification_idx": { + "name": "npc_staffing_labor_classification_idx", + "columns": [ + { + "expression": "labor_classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_updated_at_idx": { + "name": "npc_staffing_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_created_at_idx": { + "name": "npc_staffing_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "npc_staffing_npc_id_game_npcs_id_fk": { + "name": "npc_staffing_npc_id_game_npcs_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "game_npcs", + "columnsFrom": [ + "npc_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "npc_staffing_structure_id_game_structures_id_fk": { + "name": "npc_staffing_structure_id_game_structures_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "game_structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "npc_staffing_labor_classification_id_labor_classifications_id_fk": { + "name": "npc_staffing_labor_classification_id_labor_classifications_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "labor_classifications", + "columnsFrom": [ + "labor_classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labor_classifications": { + "name": "labor_classifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "default_unit_salary": { + "name": "default_unit_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "build_efficiency": { + "name": "build_efficiency", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "available_headcount": { + "name": "available_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "labor_classifications_name_idx": { + "name": "labor_classifications_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_key_idx": { + "name": "labor_classifications_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_updated_at_idx": { + "name": "labor_classifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_created_at_idx": { + "name": "labor_classifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_event_logs": { + "name": "game_event_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "system": { + "name": "system", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "actor_id": { + "name": "actor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "target_collection": { + "name": "target_collection", + "type": "enum_game_event_logs_target_collection", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "target_id": { + "name": "target_id", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_event_logs_type_idx": { + "name": "game_event_logs_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_actor_idx": { + "name": "game_event_logs_actor_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_structure_idx": { + "name": "game_event_logs_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_updated_at_idx": { + "name": "game_event_logs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_created_at_idx": { + "name": "game_event_logs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_event_logs_actor_id_users_id_fk": { + "name": "game_event_logs_actor_id_users_id_fk", + "tableFrom": "game_event_logs", + "tableTo": "users", + "columnsFrom": [ + "actor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_event_logs_structure_id_game_structures_id_fk": { + "name": "game_event_logs_structure_id_game_structures_id_fk", + "tableFrom": "game_event_logs", + "tableTo": "game_structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_roles": { + "name": "users_roles", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_roles_order_idx": { + "name": "users_roles_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_roles_parent_idx": { + "name": "users_roles_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_roles_parent_fk": { + "name": "users_roles_parent_fk", + "tableFrom": "users_roles", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_preferences_notifications_muted_types": { + "name": "users_preferences_notifications_muted_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_preferences_notifications_muted_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_preferences_notifications_muted_types_order_idx": { + "name": "users_preferences_notifications_muted_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_preferences_notifications_muted_types_parent_idx": { + "name": "users_preferences_notifications_muted_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_preferences_notifications_muted_types_parent_fk": { + "name": "users_preferences_notifications_muted_types_parent_fk", + "tableFrom": "users_preferences_notifications_muted_types", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_preferences_discord_muted_types": { + "name": "users_preferences_discord_muted_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_preferences_discord_muted_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_preferences_discord_muted_types_order_idx": { + "name": "users_preferences_discord_muted_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_preferences_discord_muted_types_parent_idx": { + "name": "users_preferences_discord_muted_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_preferences_discord_muted_types_parent_fk": { + "name": "users_preferences_discord_muted_types_parent_fk", + "tableFrom": "users_preferences_discord_muted_types", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_sessions": { + "name": "users_sessions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "users_sessions_order_idx": { + "name": "users_sessions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_sessions_parent_id_idx": { + "name": "users_sessions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_sessions_parent_id_fk": { + "name": "users_sessions_parent_id_fk", + "tableFrom": "users_sessions", + "tableTo": "users", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "discord_username": { + "name": "discord_username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "discord_id": { + "name": "discord_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "payload_display_name": { + "name": "payload_display_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "steam_id": { + "name": "steam_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "preferences_notifications_muted_all": { + "name": "preferences_notifications_muted_all", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_show_callsign": { + "name": "preferences_display_show_callsign", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_lead_or_actual": { + "name": "preferences_display_lead_or_actual", + "type": "enum_users_preferences_display_lead_or_actual", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'lead'" + }, + "preferences_display_show_version_overlay": { + "name": "preferences_display_show_version_overlay", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "preferences_display_xp_display_mini": { + "name": "preferences_display_xp_display_mini", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_show_background_texture": { + "name": "preferences_display_show_background_texture", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "preferences_discord_enabled": { + "name": "preferences_discord_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_dashboard_layout": { + "name": "preferences_dashboard_layout", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "reset_password_token": { + "name": "reset_password_token", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reset_password_expiration": { + "name": "reset_password_expiration", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "salt": { + "name": "salt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hash": { + "name": "hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "login_attempts": { + "name": "login_attempts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lock_until": { + "name": "lock_until", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_discord_username_idx": { + "name": "users_discord_username_idx", + "columns": [ + { + "expression": "discord_username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_discord_id_idx": { + "name": "users_discord_id_idx", + "columns": [ + { + "expression": "discord_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_updated_at_idx": { + "name": "users_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_created_at_idx": { + "name": "users_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_username_idx": { + "name": "users_username_idx", + "columns": [ + { + "expression": "username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_rels": { + "name": "users_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_rels_order_idx": { + "name": "users_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_parent_idx": { + "name": "users_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_path_idx": { + "name": "users_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_roles_id_idx": { + "name": "users_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_rels_parent_fk": { + "name": "users_rels_parent_fk", + "tableFrom": "users_rels", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "users_rels_roles_fk": { + "name": "users_rels_roles_fk", + "tableFrom": "users_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles_permissions": { + "name": "roles_permissions", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_roles_permissions", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "roles_permissions_order_idx": { + "name": "roles_permissions_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_permissions_parent_idx": { + "name": "roles_permissions_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "roles_permissions_parent_fk": { + "name": "roles_permissions_parent_fk", + "tableFrom": "roles_permissions", + "tableTo": "roles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles": { + "name": "roles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "is_system": { + "name": "is_system", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "is_superuser": { + "name": "is_superuser", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "roles_name_idx": { + "name": "roles_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_slug_idx": { + "name": "roles_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_updated_at_idx": { + "name": "roles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_created_at_idx": { + "name": "roles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles_rels": { + "name": "roles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "roles_rels_order_idx": { + "name": "roles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_parent_idx": { + "name": "roles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_path_idx": { + "name": "roles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_roles_id_idx": { + "name": "roles_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "roles_rels_parent_fk": { + "name": "roles_rels_parent_fk", + "tableFrom": "roles_rels", + "tableTo": "roles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "roles_rels_roles_fk": { + "name": "roles_rels_roles_fk", + "tableFrom": "roles_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ranks": { + "name": "ranks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_order": { + "name": "_order", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "abbreviation": { + "name": "abbreviation", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "insignia_id": { + "name": "insignia_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "promotion_ceiling_id": { + "name": "promotion_ceiling_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ranks__order_idx": { + "name": "ranks__order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_name_idx": { + "name": "ranks_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_abbreviation_idx": { + "name": "ranks_abbreviation_idx", + "columns": [ + { + "expression": "abbreviation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_insignia_idx": { + "name": "ranks_insignia_idx", + "columns": [ + { + "expression": "insignia_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_promotion_ceiling_idx": { + "name": "ranks_promotion_ceiling_idx", + "columns": [ + { + "expression": "promotion_ceiling_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_updated_at_idx": { + "name": "ranks_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_created_at_idx": { + "name": "ranks_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ranks_insignia_id_media_id_fk": { + "name": "ranks_insignia_id_media_id_fk", + "tableFrom": "ranks", + "tableTo": "media", + "columnsFrom": [ + "insignia_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ranks_promotion_ceiling_id_ranks_id_fk": { + "name": "ranks_promotion_ceiling_id_ranks_id_fk", + "tableFrom": "ranks", + "tableTo": "ranks", + "columnsFrom": [ + "promotion_ceiling_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles_progression_awards": { + "name": "profiles_progression_awards", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "award_id": { + "name": "award_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "awarded_by_id": { + "name": "awarded_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "awarded_at": { + "name": "awarded_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "award_reason": { + "name": "award_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "upgraded_from_id": { + "name": "upgraded_from_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "upgraded_at": { + "name": "upgraded_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "profiles_progression_awards_order_idx": { + "name": "profiles_progression_awards_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_parent_id_idx": { + "name": "profiles_progression_awards_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_award_idx": { + "name": "profiles_progression_awards_award_idx", + "columns": [ + { + "expression": "award_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_awarded_by_idx": { + "name": "profiles_progression_awards_awarded_by_idx", + "columns": [ + { + "expression": "awarded_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_upgraded_from_idx": { + "name": "profiles_progression_awards_upgraded_from_idx", + "columns": [ + { + "expression": "upgraded_from_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_progression_awards_award_id_awards_id_fk": { + "name": "profiles_progression_awards_award_id_awards_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "awards", + "columnsFrom": [ + "award_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_awarded_by_id_profiles_id_fk": { + "name": "profiles_progression_awards_awarded_by_id_profiles_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "profiles", + "columnsFrom": [ + "awarded_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_upgraded_from_id_awards_id_fk": { + "name": "profiles_progression_awards_upgraded_from_id_awards_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "awards", + "columnsFrom": [ + "upgraded_from_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_parent_id_fk": { + "name": "profiles_progression_awards_parent_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "profiles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles": { + "name": "profiles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rank_id": { + "name": "rank_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "dossier_enlistment_date": { + "name": "dossier_enlistment_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "dossier_personal_excerpt": { + "name": "dossier_personal_excerpt", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "dossier_intel_excerpt": { + "name": "dossier_intel_excerpt", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "progression_scoreboard_infantry_kills": { + "name": "progression_scoreboard_infantry_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_vehicle_kills": { + "name": "progression_scoreboard_vehicle_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_armor_kills": { + "name": "progression_scoreboard_armor_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_air_kills": { + "name": "progression_scoreboard_air_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_deaths": { + "name": "progression_scoreboard_deaths", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_games_played": { + "name": "progression_minigames_flappy_bird_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_total_passes": { + "name": "progression_minigames_flappy_bird_total_passes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_best_score": { + "name": "progression_minigames_flappy_bird_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_xp_earned": { + "name": "progression_minigames_flappy_bird_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_games_played": { + "name": "progression_minigames_eod_minesweeper_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_wins": { + "name": "progression_minigames_eod_minesweeper_wins", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_losses": { + "name": "progression_minigames_eod_minesweeper_losses", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_score": { + "name": "progression_minigames_eod_minesweeper_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_xp_earned": { + "name": "progression_minigames_eod_minesweeper_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_training_time": { + "name": "progression_minigames_eod_minesweeper_best_training_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_perimeter_time": { + "name": "progression_minigames_eod_minesweeper_best_perimeter_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_supply_road_time": { + "name": "progression_minigames_eod_minesweeper_best_supply_road_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_training_flags": { + "name": "progression_minigames_eod_minesweeper_best_training_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_perimeter_flags": { + "name": "progression_minigames_eod_minesweeper_best_perimeter_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_supply_road_flags": { + "name": "progression_minigames_eod_minesweeper_best_supply_road_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_games_played": { + "name": "progression_minigames_radio_traffic_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_total_messages": { + "name": "progression_minigames_radio_traffic_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_incorrect_messages": { + "name": "progression_minigames_radio_traffic_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_score": { + "name": "progression_minigames_radio_traffic_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_accuracy": { + "name": "progression_minigames_radio_traffic_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_sprint_time_ms": { + "name": "progression_minigames_radio_traffic_best_sprint_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_games_played": { + "name": "progression_minigames_radio_traffic_sprint_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_total_messages": { + "name": "progression_minigames_radio_traffic_sprint_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_incorrect_messages": { + "name": "progression_minigames_radio_traffic_sprint_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_best_score": { + "name": "progression_minigames_radio_traffic_sprint_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_best_accuracy": { + "name": "progression_minigames_radio_traffic_sprint_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_games_played": { + "name": "progression_minigames_radio_traffic_watch_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_total_messages": { + "name": "progression_minigames_radio_traffic_watch_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_incorrect_messages": { + "name": "progression_minigames_radio_traffic_watch_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_best_score": { + "name": "progression_minigames_radio_traffic_watch_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_best_accuracy": { + "name": "progression_minigames_radio_traffic_watch_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_xp_earned": { + "name": "progression_minigames_radio_traffic_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_games_played": { + "name": "progression_minigames_aim_trainer_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_best_score": { + "name": "progression_minigames_aim_trainer_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_recruit_best_score": { + "name": "progression_minigames_aim_trainer_recruit_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_veteran_best_score": { + "name": "progression_minigames_aim_trainer_veteran_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_elite_best_score": { + "name": "progression_minigames_aim_trainer_elite_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_recruit_best_accuracy": { + "name": "progression_minigames_aim_trainer_recruit_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_veteran_best_accuracy": { + "name": "progression_minigames_aim_trainer_veteran_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_elite_best_accuracy": { + "name": "progression_minigames_aim_trainer_elite_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_xp_earned": { + "name": "progression_minigames_aim_trainer_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_games_played": { + "name": "progression_minigames_opord_recall_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_best_score": { + "name": "progression_minigames_opord_recall_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_best_accuracy": { + "name": "progression_minigames_opord_recall_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_recruit_best_score": { + "name": "progression_minigames_opord_recall_recruit_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_veteran_best_score": { + "name": "progression_minigames_opord_recall_veteran_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_elite_best_score": { + "name": "progression_minigames_opord_recall_elite_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_recruit_best_time_ms": { + "name": "progression_minigames_opord_recall_recruit_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_veteran_best_time_ms": { + "name": "progression_minigames_opord_recall_veteran_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_elite_best_time_ms": { + "name": "progression_minigames_opord_recall_elite_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_xp_earned": { + "name": "progression_minigames_opord_recall_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_games_played": { + "name": "progression_minigames_poker_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_wins": { + "name": "progression_minigames_poker_wins", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_second_places": { + "name": "progression_minigames_poker_second_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_third_places": { + "name": "progression_minigames_poker_third_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_fourth_places": { + "name": "progression_minigames_poker_fourth_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_hands_won": { + "name": "progression_minigames_poker_hands_won", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_best_score": { + "name": "progression_minigames_poker_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_xp_earned": { + "name": "progression_minigames_poker_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_games_played": { + "name": "progression_minigames_blackjack_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_rounds_won": { + "name": "progression_minigames_blackjack_rounds_won", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_blackjacks_hit": { + "name": "progression_minigames_blackjack_blackjacks_hit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_best_score": { + "name": "progression_minigames_blackjack_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_xp_earned": { + "name": "progression_minigames_blackjack_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_chip_bank": { + "name": "progression_chip_bank", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_chip_bank_refilled_at": { + "name": "progression_chip_bank_refilled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "progression_voiceover_xp_earned": { + "name": "progression_voiceover_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "profiles_user_idx": { + "name": "profiles_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rank_idx": { + "name": "profiles_rank_idx", + "columns": [ + { + "expression": "rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_updated_at_idx": { + "name": "profiles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_created_at_idx": { + "name": "profiles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_user_id_users_id_fk": { + "name": "profiles_user_id_users_id_fk", + "tableFrom": "profiles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_rank_id_ranks_id_fk": { + "name": "profiles_rank_id_ranks_id_fk", + "tableFrom": "profiles", + "tableTo": "ranks", + "columnsFrom": [ + "rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles_rels": { + "name": "profiles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "profiles_rels_order_idx": { + "name": "profiles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_parent_idx": { + "name": "profiles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_path_idx": { + "name": "profiles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_qualifications_id_idx": { + "name": "profiles_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_rels_parent_fk": { + "name": "profiles_rels_parent_fk", + "tableFrom": "profiles_rels", + "tableTo": "profiles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "profiles_rels_qualifications_fk": { + "name": "profiles_rels_qualifications_fk", + "tableFrom": "profiles_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards_grant_config_allowed_grantor_assignment_types": { + "name": "awards_grant_config_allowed_grantor_assignment_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_awards_grant_config_allowed_grantor_assignment_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "awards_grant_config_allowed_grantor_assignment_types_order_idx": { + "name": "awards_grant_config_allowed_grantor_assignment_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_grant_config_allowed_grantor_assignment_types_parent_idx": { + "name": "awards_grant_config_allowed_grantor_assignment_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_grant_config_allowed_grantor_assignment_types_parent_fk": { + "name": "awards_grant_config_allowed_grantor_assignment_types_parent_fk", + "tableFrom": "awards_grant_config_allowed_grantor_assignment_types", + "tableTo": "awards", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards": { + "name": "awards", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_awards_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'commendation'" + }, + "commendation_color": { + "name": "commendation_color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#92400e'" + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "experience_points": { + "name": "experience_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "ribbon_design": { + "name": "ribbon_design", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "background_image_id": { + "name": "background_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "medal_design": { + "name": "medal_design", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "advancement_series_key": { + "name": "advancement_series_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "advancement_tier": { + "name": "advancement_tier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "grant_config_max_grants_per_grantor": { + "name": "grant_config_max_grants_per_grantor", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "grant_config_recipient_scope": { + "name": "grant_config_recipient_scope", + "type": "enum_awards_grant_config_recipient_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'same_command'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "awards_name_idx": { + "name": "awards_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_image_idx": { + "name": "awards_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_background_image_idx": { + "name": "awards_background_image_idx", + "columns": [ + { + "expression": "background_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_updated_at_idx": { + "name": "awards_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_created_at_idx": { + "name": "awards_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_image_id_media_id_fk": { + "name": "awards_image_id_media_id_fk", + "tableFrom": "awards", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "awards_background_image_id_media_id_fk": { + "name": "awards_background_image_id_media_id_fk", + "tableFrom": "awards", + "tableTo": "media", + "columnsFrom": [ + "background_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards_rels": { + "name": "awards_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "awards_rels_order_idx": { + "name": "awards_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_parent_idx": { + "name": "awards_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_path_idx": { + "name": "awards_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_assignments_id_idx": { + "name": "awards_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_rels_parent_fk": { + "name": "awards_rels_parent_fk", + "tableFrom": "awards_rels", + "tableTo": "awards", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "awards_rels_assignments_fk": { + "name": "awards_rels_assignments_fk", + "tableFrom": "awards_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.qualifications": { + "name": "qualifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "qualifications_name_idx": { + "name": "qualifications_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_updated_at_idx": { + "name": "qualifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_created_at_idx": { + "name": "qualifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments": { + "name": "assignments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_assignments_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "callsign": { + "name": "callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "leader_id": { + "name": "leader_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assignments_leader_idx": { + "name": "assignments_leader_idx", + "columns": [ + { + "expression": "leader_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_updated_at_idx": { + "name": "assignments_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_created_at_idx": { + "name": "assignments_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_leader_id_users_id_fk": { + "name": "assignments_leader_id_users_id_fk", + "tableFrom": "assignments", + "tableTo": "users", + "columnsFrom": [ + "leader_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments_rels": { + "name": "assignments_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assignments_rels_order_idx": { + "name": "assignments_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_parent_idx": { + "name": "assignments_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_path_idx": { + "name": "assignments_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_assignments_id_idx": { + "name": "assignments_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_users_id_idx": { + "name": "assignments_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_rels_parent_fk": { + "name": "assignments_rels_parent_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_assignments_fk": { + "name": "assignments_rels_assignments_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_users_fk": { + "name": "assignments_rels_users_fk", + "tableFrom": "assignments_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignment_transfers": { + "name": "assignment_transfers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "requester_id": { + "name": "requester_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "from_assignment_id": { + "name": "from_assignment_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "to_assignment_id": { + "name": "to_assignment_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_assignment_transfers_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "escalation_reason": { + "name": "escalation_reason", + "type": "enum_assignment_transfers_escalation_reason", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_leader_decision": { + "name": "from_leader_decision", + "type": "enum_assignment_transfers_from_leader_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "to_leader_decision": { + "name": "to_leader_decision", + "type": "enum_assignment_transfers_to_leader_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "from_decision_by_id": { + "name": "from_decision_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_decision_by_id": { + "name": "to_decision_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "from_decided_at": { + "name": "from_decided_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "to_decided_at": { + "name": "to_decided_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "from_leader_snapshot_id": { + "name": "from_leader_snapshot_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_leader_snapshot_id": { + "name": "to_leader_snapshot_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rejection_reason": { + "name": "rejection_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "request_note": { + "name": "request_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "appeal_note": { + "name": "appeal_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "resolved_by_id": { + "name": "resolved_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resolution_note": { + "name": "resolution_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "resolved_at": { + "name": "resolved_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "discord_from_leader_message_id": { + "name": "discord_from_leader_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_to_leader_message_id": { + "name": "discord_to_leader_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_requester_message_id": { + "name": "discord_requester_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "source_notified_to_user_id_id": { + "name": "source_notified_to_user_id_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "destination_notified_to_user_id_id": { + "name": "destination_notified_to_user_id_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "discord_delivered_keys": { + "name": "discord_delivered_keys", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assignment_transfers_requester_idx": { + "name": "assignment_transfers_requester_idx", + "columns": [ + { + "expression": "requester_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_assignment_idx": { + "name": "assignment_transfers_from_assignment_idx", + "columns": [ + { + "expression": "from_assignment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_assignment_idx": { + "name": "assignment_transfers_to_assignment_idx", + "columns": [ + { + "expression": "to_assignment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_status_idx": { + "name": "assignment_transfers_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_decision_by_idx": { + "name": "assignment_transfers_from_decision_by_idx", + "columns": [ + { + "expression": "from_decision_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_decision_by_idx": { + "name": "assignment_transfers_to_decision_by_idx", + "columns": [ + { + "expression": "to_decision_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_leader_snapshot_idx": { + "name": "assignment_transfers_from_leader_snapshot_idx", + "columns": [ + { + "expression": "from_leader_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_leader_snapshot_idx": { + "name": "assignment_transfers_to_leader_snapshot_idx", + "columns": [ + { + "expression": "to_leader_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_resolved_by_idx": { + "name": "assignment_transfers_resolved_by_idx", + "columns": [ + { + "expression": "resolved_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_source_notified_to_user_id_idx": { + "name": "assignment_transfers_source_notified_to_user_id_idx", + "columns": [ + { + "expression": "source_notified_to_user_id_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_destination_notified_to_user_id_idx": { + "name": "assignment_transfers_destination_notified_to_user_id_idx", + "columns": [ + { + "expression": "destination_notified_to_user_id_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_updated_at_idx": { + "name": "assignment_transfers_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_created_at_idx": { + "name": "assignment_transfers_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignment_transfers_requester_id_users_id_fk": { + "name": "assignment_transfers_requester_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "requester_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_assignment_id_assignments_id_fk": { + "name": "assignment_transfers_from_assignment_id_assignments_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "assignments", + "columnsFrom": [ + "from_assignment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_assignment_id_assignments_id_fk": { + "name": "assignment_transfers_to_assignment_id_assignments_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "assignments", + "columnsFrom": [ + "to_assignment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_decision_by_id_users_id_fk": { + "name": "assignment_transfers_from_decision_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "from_decision_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_decision_by_id_users_id_fk": { + "name": "assignment_transfers_to_decision_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "to_decision_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_leader_snapshot_id_users_id_fk": { + "name": "assignment_transfers_from_leader_snapshot_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "from_leader_snapshot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_leader_snapshot_id_users_id_fk": { + "name": "assignment_transfers_to_leader_snapshot_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "to_leader_snapshot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_resolved_by_id_users_id_fk": { + "name": "assignment_transfers_resolved_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "resolved_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_source_notified_to_user_id_id_users_id_fk": { + "name": "assignment_transfers_source_notified_to_user_id_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "source_notified_to_user_id_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_destination_notified_to_user_id_id_users_id_fk": { + "name": "assignment_transfers_destination_notified_to_user_id_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "destination_notified_to_user_id_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.experience": { + "name": "experience", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "required_points": { + "name": "required_points", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "experience_name_idx": { + "name": "experience_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "experience_updated_at_idx": { + "name": "experience_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "experience_created_at_idx": { + "name": "experience_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_notifications": { + "name": "user_notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link": { + "name": "link", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "read": { + "name": "read", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "user_notifications_user_idx": { + "name": "user_notifications_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_read_idx": { + "name": "user_notifications_read_idx", + "columns": [ + { + "expression": "read", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_updated_at_idx": { + "name": "user_notifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_created_at_idx": { + "name": "user_notifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_notifications_user_id_users_id_fk": { + "name": "user_notifications_user_id_users_id_fk", + "tableFrom": "user_notifications", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.evaluations": { + "name": "evaluations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "rater_id": { + "name": "rater_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ratee_id": { + "name": "ratee_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "enum_evaluations_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "level": { + "name": "level", + "type": "enum_evaluations_level", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "comment": { + "name": "comment", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "evaluations_rater_idx": { + "name": "evaluations_rater_idx", + "columns": [ + { + "expression": "rater_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_ratee_idx": { + "name": "evaluations_ratee_idx", + "columns": [ + { + "expression": "ratee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_mission_idx": { + "name": "evaluations_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_updated_at_idx": { + "name": "evaluations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_created_at_idx": { + "name": "evaluations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "evaluations_rater_id_users_id_fk": { + "name": "evaluations_rater_id_users_id_fk", + "tableFrom": "evaluations", + "tableTo": "users", + "columnsFrom": [ + "rater_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "evaluations_ratee_id_users_id_fk": { + "name": "evaluations_ratee_id_users_id_fk", + "tableFrom": "evaluations", + "tableTo": "users", + "columnsFrom": [ + "ratee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "evaluations_mission_id_missions_id_fk": { + "name": "evaluations_mission_id_missions_id_fk", + "tableFrom": "evaluations", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ribbon_submissions_grantor_types": { + "name": "ribbon_submissions_grantor_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_ribbon_submissions_grantor_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "ribbon_submissions_grantor_types_order_idx": { + "name": "ribbon_submissions_grantor_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_grantor_types_parent_idx": { + "name": "ribbon_submissions_grantor_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ribbon_submissions_grantor_types_parent_fk": { + "name": "ribbon_submissions_grantor_types_parent_fk", + "tableFrom": "ribbon_submissions_grantor_types", + "tableTo": "ribbon_submissions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ribbon_submissions": { + "name": "ribbon_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "design": { + "name": "design", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_ribbon_submissions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "review_note": { + "name": "review_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reviewed_by_id": { + "name": "reviewed_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reviewed_at": { + "name": "reviewed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "award_id": { + "name": "award_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "award_xp": { + "name": "award_xp", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "recipient_scope": { + "name": "recipient_scope", + "type": "enum_ribbon_submissions_recipient_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'same_command'" + }, + "max_grants_per_grantor": { + "name": "max_grants_per_grantor", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ribbon_submissions_user_idx": { + "name": "ribbon_submissions_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_reviewed_by_idx": { + "name": "ribbon_submissions_reviewed_by_idx", + "columns": [ + { + "expression": "reviewed_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_award_idx": { + "name": "ribbon_submissions_award_idx", + "columns": [ + { + "expression": "award_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_updated_at_idx": { + "name": "ribbon_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_created_at_idx": { + "name": "ribbon_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ribbon_submissions_user_id_users_id_fk": { + "name": "ribbon_submissions_user_id_users_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ribbon_submissions_reviewed_by_id_users_id_fk": { + "name": "ribbon_submissions_reviewed_by_id_users_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "users", + "columnsFrom": [ + "reviewed_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ribbon_submissions_award_id_awards_id_fk": { + "name": "ribbon_submissions_award_id_awards_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "awards", + "columnsFrom": [ + "award_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_roles_provided_roles": { + "name": "missions_mission_roles_provided_roles", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "role_name": { + "name": "role_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "minimum_rank_id": { + "name": "minimum_rank_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_mission_roles_provided_roles_order_idx": { + "name": "missions_mission_roles_provided_roles_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_parent_id_idx": { + "name": "missions_mission_roles_provided_roles_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_minimum_rank_idx": { + "name": "missions_mission_roles_provided_roles_minimum_rank_idx", + "columns": [ + { + "expression": "minimum_rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk": { + "name": "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "ranks", + "columnsFrom": [ + "minimum_rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_mission_roles_provided_roles_parent_id_fk": { + "name": "missions_mission_roles_provided_roles_parent_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_briefing": { + "name": "missions_briefing", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "section_name": { + "name": "section_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "details": { + "name": "details", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_briefing_order_idx": { + "name": "missions_briefing_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_briefing_parent_id_idx": { + "name": "missions_briefing_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_briefing_parent_id_fk": { + "name": "missions_briefing_parent_id_fk", + "tableFrom": "missions_briefing", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_objectives": { + "name": "missions_mission_objectives", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "success_or_fail_conditions": { + "name": "success_or_fail_conditions", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "redacted": { + "name": "redacted", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "missions_mission_objectives_order_idx": { + "name": "missions_mission_objectives_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_objectives_parent_id_idx": { + "name": "missions_mission_objectives_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_objectives_parent_id_fk": { + "name": "missions_mission_objectives_parent_id_fk", + "tableFrom": "missions_mission_objectives", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_factions_involved": { + "name": "missions_factions_involved", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "threat_level": { + "name": "threat_level", + "type": "enum_missions_factions_involved_threat_level", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'hostile'" + } + }, + "indexes": { + "missions_factions_involved_order_idx": { + "name": "missions_factions_involved_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_factions_involved_parent_id_idx": { + "name": "missions_factions_involved_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_factions_involved_faction_idx": { + "name": "missions_factions_involved_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_factions_involved_faction_id_factions_id_fk": { + "name": "missions_factions_involved_faction_id_factions_id_fk", + "tableFrom": "missions_factions_involved", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_factions_involved_parent_id_fk": { + "name": "missions_factions_involved_parent_id_fk", + "tableFrom": "missions_factions_involved", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_insertion": { + "name": "missions_logistics_and_support_insertion", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_insertion", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_insertion_order_idx": { + "name": "missions_logistics_and_support_insertion_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_insertion_parent_idx": { + "name": "missions_logistics_and_support_insertion_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_insertion_parent_fk": { + "name": "missions_logistics_and_support_insertion_parent_fk", + "tableFrom": "missions_logistics_and_support_insertion", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_extraction": { + "name": "missions_logistics_and_support_extraction", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_extraction", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_extraction_order_idx": { + "name": "missions_logistics_and_support_extraction_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_extraction_parent_idx": { + "name": "missions_logistics_and_support_extraction_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_extraction_parent_fk": { + "name": "missions_logistics_and_support_extraction_parent_fk", + "tableFrom": "missions_logistics_and_support_extraction", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_assets_available": { + "name": "missions_logistics_and_support_assets_available", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_type": { + "name": "asset_type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "asset_count": { + "name": "asset_count", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "does_respawn": { + "name": "does_respawn", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_callsign": { + "name": "asset_callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_logistics_and_support_assets_available_order_idx": { + "name": "missions_logistics_and_support_assets_available_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_assets_available_parent_id_idx": { + "name": "missions_logistics_and_support_assets_available_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_assets_available_parent_id_fk": { + "name": "missions_logistics_and_support_assets_available_parent_id_fk", + "tableFrom": "missions_logistics_and_support_assets_available", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_comms_and_docs_frequencies": { + "name": "missions_comms_and_docs_frequencies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "frequency": { + "name": "frequency", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "channel": { + "name": "channel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "net_name": { + "name": "net_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "freq_usage": { + "name": "freq_usage", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_comms_and_docs_frequencies_order_idx": { + "name": "missions_comms_and_docs_frequencies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_comms_and_docs_frequencies_parent_id_idx": { + "name": "missions_comms_and_docs_frequencies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_comms_and_docs_frequencies_parent_id_fk": { + "name": "missions_comms_and_docs_frequencies_parent_id_fk", + "tableFrom": "missions_comms_and_docs_frequencies", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions": { + "name": "missions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "operation_type": { + "name": "operation_type", + "type": "enum_missions_operation_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "discord_message_id": { + "name": "discord_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_attendance_hash": { + "name": "discord_attendance_hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_attendance_sent_at": { + "name": "discord_attendance_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "discord_modlist_hash": { + "name": "discord_modlist_hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_cancelled_at": { + "name": "discord_cancelled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "evaluation_reminders_sent_at": { + "name": "evaluation_reminders_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "ready_reminder_web_sent_at": { + "name": "ready_reminder_web_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "ready_reminder_dm_sent_at": { + "name": "ready_reminder_dm_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "tickets_settled_at": { + "name": "tickets_settled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by_id": { + "name": "created_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "classification_map_id": { + "name": "classification_map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "classification_mission_type": { + "name": "classification_mission_type", + "type": "enum_missions_classification_mission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Zeus'" + }, + "classification_campaign_id": { + "name": "classification_campaign_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "classification_custom_scripts": { + "name": "classification_custom_scripts", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "classification_start_date_time": { + "name": "classification_start_date_time", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "classification_estimated_duration": { + "name": "classification_estimated_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 240 + }, + "ownership_and_status_status": { + "name": "ownership_and_status_status", + "type": "enum_missions_ownership_and_status_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Concept'" + }, + "ownership_and_status_visibility": { + "name": "ownership_and_status_visibility", + "type": "enum_missions_ownership_and_status_visibility", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'leadership'" + }, + "ownership_and_status_completed_at": { + "name": "ownership_and_status_completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "mission_roles_max_players": { + "name": "mission_roles_max_players", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 32 + }, + "mission_roles_notes": { + "name": "mission_roles_notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "civilian_presence": { + "name": "civilian_presence", + "type": "enum_missions_civilian_presence", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'None'" + }, + "game_details_server_details_server_ip": { + "name": "game_details_server_details_server_ip", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'arma.onyxsimple.com'" + }, + "game_details_server_details_server_port": { + "name": "game_details_server_details_server_port", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 2302 + }, + "game_details_server_details_server_password": { + "name": "game_details_server_details_server_password", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'ptf313'" + }, + "game_details_game_setup_mission_file_id": { + "name": "game_details_game_setup_mission_file_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_details_game_setup_required_mods_id": { + "name": "game_details_game_setup_required_mods_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "comms_and_docs_radio_plan": { + "name": "comms_and_docs_radio_plan", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "missions_code_name_idx": { + "name": "missions_code_name_idx", + "columns": [ + { + "expression": "code_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_created_by_idx": { + "name": "missions_created_by_idx", + "columns": [ + { + "expression": "created_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_cover_image_idx": { + "name": "missions_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_map_idx": { + "name": "missions_classification_classification_map_idx", + "columns": [ + { + "expression": "classification_map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_campaign_idx": { + "name": "missions_classification_classification_campaign_idx", + "columns": [ + { + "expression": "classification_campaign_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_setup_idx": { + "name": "missions_game_details_game_setup_game_details_game_setup_idx", + "columns": [ + { + "expression": "game_details_game_setup_mission_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_set_1_idx": { + "name": "missions_game_details_game_setup_game_details_game_set_1_idx", + "columns": [ + { + "expression": "game_details_game_setup_required_mods_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_updated_at_idx": { + "name": "missions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_created_at_idx": { + "name": "missions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_created_by_id_users_id_fk": { + "name": "missions_created_by_id_users_id_fk", + "tableFrom": "missions", + "tableTo": "users", + "columnsFrom": [ + "created_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_cover_image_id_media_id_fk": { + "name": "missions_cover_image_id_media_id_fk", + "tableFrom": "missions", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_classification_map_id_maps_id_fk": { + "name": "missions_classification_map_id_maps_id_fk", + "tableFrom": "missions", + "tableTo": "maps", + "columnsFrom": [ + "classification_map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_classification_campaign_id_campaigns_id_fk": { + "name": "missions_classification_campaign_id_campaigns_id_fk", + "tableFrom": "missions", + "tableTo": "campaigns", + "columnsFrom": [ + "classification_campaign_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_mission_file_id_mission_files_id_fk": { + "name": "missions_game_details_game_setup_mission_file_id_mission_files_id_fk", + "tableFrom": "missions", + "tableTo": "mission_files", + "columnsFrom": [ + "game_details_game_setup_mission_file_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk": { + "name": "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk", + "tableFrom": "missions", + "tableTo": "mod_lists", + "columnsFrom": [ + "game_details_game_setup_required_mods_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_rels": { + "name": "missions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_rels_order_idx": { + "name": "missions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_parent_idx": { + "name": "missions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_path_idx": { + "name": "missions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_users_id_idx": { + "name": "missions_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_qualifications_id_idx": { + "name": "missions_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_rels_parent_fk": { + "name": "missions_rels_parent_fk", + "tableFrom": "missions_rels", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_users_fk": { + "name": "missions_rels_users_fk", + "tableFrom": "missions_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_qualifications_fk": { + "name": "missions_rels_qualifications_fk", + "tableFrom": "missions_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mission_attendances": { + "name": "mission_attendances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "response": { + "name": "response", + "type": "enum_mission_attendances_response", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mission_attendances_mission_idx": { + "name": "mission_attendances_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_user_idx": { + "name": "mission_attendances_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_updated_at_idx": { + "name": "mission_attendances_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_created_at_idx": { + "name": "mission_attendances_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mission_attendances_mission_id_missions_id_fk": { + "name": "mission_attendances_mission_id_missions_id_fk", + "tableFrom": "mission_attendances", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "mission_attendances_user_id_users_id_fk": { + "name": "mission_attendances_user_id_users_id_fk", + "tableFrom": "mission_attendances", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.campaigns": { + "name": "campaigns", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'An Arma 3 campaign.'" + }, + "status": { + "name": "status", + "type": "enum_campaigns_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'concept'" + }, + "campaign_mode": { + "name": "campaign_mode", + "type": "enum_campaigns_campaign_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'custom'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "owner_id": { + "name": "owner_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "campaigns_name_idx": { + "name": "campaigns_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_cover_image_idx": { + "name": "campaigns_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_owner_idx": { + "name": "campaigns_owner_idx", + "columns": [ + { + "expression": "owner_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_updated_at_idx": { + "name": "campaigns_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_created_at_idx": { + "name": "campaigns_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "campaigns_cover_image_id_media_id_fk": { + "name": "campaigns_cover_image_id_media_id_fk", + "tableFrom": "campaigns", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "campaigns_owner_id_users_id_fk": { + "name": "campaigns_owner_id_users_id_fk", + "tableFrom": "campaigns", + "tableTo": "users", + "columnsFrom": [ + "owner_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions_relationships": { + "name": "factions_relationships", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "target_faction_id": { + "name": "target_faction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "factions_relationships_order_idx": { + "name": "factions_relationships_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_relationships_parent_id_idx": { + "name": "factions_relationships_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_relationships_target_faction_idx": { + "name": "factions_relationships_target_faction_idx", + "columns": [ + { + "expression": "target_faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_relationships_target_faction_id_factions_id_fk": { + "name": "factions_relationships_target_faction_id_factions_id_fk", + "tableFrom": "factions_relationships", + "tableTo": "factions", + "columnsFrom": [ + "target_faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "factions_relationships_parent_id_fk": { + "name": "factions_relationships_parent_id_fk", + "tableFrom": "factions_relationships", + "tableTo": "factions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions": { + "name": "factions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_factions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'minorFaction'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "reputation": { + "name": "reputation", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "playable_faction": { + "name": "playable_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "starting_faction": { + "name": "starting_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "factions_name_idx": { + "name": "factions_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_cover_image_idx": { + "name": "factions_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_updated_at_idx": { + "name": "factions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_created_at_idx": { + "name": "factions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_cover_image_id_media_id_fk": { + "name": "factions_cover_image_id_media_id_fk", + "tableFrom": "factions", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions_rels": { + "name": "factions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "factions_rels_order_idx": { + "name": "factions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_parent_idx": { + "name": "factions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_path_idx": { + "name": "factions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_campaigns_id_idx": { + "name": "factions_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_rels_parent_fk": { + "name": "factions_rels_parent_fk", + "tableFrom": "factions_rels", + "tableTo": "factions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "factions_rels_campaigns_fk": { + "name": "factions_rels_campaigns_fk", + "tableFrom": "factions_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_requirements_prerequisite_technologies": { + "name": "technologies_requirements_prerequisite_technologies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "technologies_requirements_prerequisite_technologies_order_idx": { + "name": "technologies_requirements_prerequisite_technologies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_requirements_prerequisite_technologies_parent_id_idx": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_requirements_prerequisite_technologies_parent_id_fk": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_fk", + "tableFrom": "technologies_requirements_prerequisite_technologies", + "tableTo": "technologies", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_research_costs_resources": { + "name": "technologies_research_costs_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + } + }, + "indexes": { + "technologies_research_costs_resources_order_idx": { + "name": "technologies_research_costs_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_research_costs_resources_parent_id_idx": { + "name": "technologies_research_costs_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_research_costs_resources_resource_idx": { + "name": "technologies_research_costs_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_research_costs_resources_resource_id_resources_id_fk": { + "name": "technologies_research_costs_resources_resource_id_resources_id_fk", + "tableFrom": "technologies_research_costs_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "technologies_research_costs_resources_parent_id_fk": { + "name": "technologies_research_costs_resources_parent_id_fk", + "tableFrom": "technologies_research_costs_resources", + "tableTo": "technologies", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies": { + "name": "technologies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_technologies_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "type": { + "name": "type", + "type": "enum_technologies_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'upgrade'" + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "research_costs_minimum_research_duration": { + "name": "research_costs_minimum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "research_costs_maximum_research_duration": { + "name": "research_costs_maximum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "technologies_updated_at_idx": { + "name": "technologies_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_created_at_idx": { + "name": "technologies_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_rels": { + "name": "technologies_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "technologies_rels_order_idx": { + "name": "technologies_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_parent_idx": { + "name": "technologies_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_path_idx": { + "name": "technologies_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_technologies_id_idx": { + "name": "technologies_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_rels_parent_fk": { + "name": "technologies_rels_parent_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "technologies_rels_technologies_fk": { + "name": "technologies_rels_technologies_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_skin_configuration_applies_to_asset_types": { + "name": "assets_skin_configuration_applies_to_asset_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_assets_skin_configuration_applies_to_asset_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "assets_skin_configuration_applies_to_asset_types_order_idx": { + "name": "assets_skin_configuration_applies_to_asset_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_skin_configuration_applies_to_asset_types_parent_idx": { + "name": "assets_skin_configuration_applies_to_asset_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_skin_configuration_applies_to_asset_types_parent_fk": { + "name": "assets_skin_configuration_applies_to_asset_types_parent_fk", + "tableFrom": "assets_skin_configuration_applies_to_asset_types", + "tableTo": "assets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_inputs": { + "name": "assets_crafting_crafting_data_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "lended": { + "name": "lended", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_inputs_order_idx": { + "name": "assets_crafting_crafting_data_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_inputs_parent_id_idx": { + "name": "assets_crafting_crafting_data_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_inputs_parent_id_fk": { + "name": "assets_crafting_crafting_data_inputs_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_inputs", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_byproducts": { + "name": "assets_crafting_crafting_data_byproducts", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_byproducts_order_idx": { + "name": "assets_crafting_crafting_data_byproducts_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_byproducts_parent_id_idx": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_byproducts_parent_id_fk": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_byproducts", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_assets_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "class_name": { + "name": "class_name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "asset_type": { + "name": "asset_type", + "type": "enum_assets_asset_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'weapon'" + }, + "weapon_configuration_slot_type": { + "name": "weapon_configuration_slot_type", + "type": "enum_assets_weapon_configuration_slot_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_generation": { + "name": "nightvision_configuration_nvg_generation", + "type": "enum_assets_nightvision_configuration_nvg_generation", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_has_thermals": { + "name": "nightvision_configuration_nvg_has_thermals", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "container_configuration_capacity_kg": { + "name": "container_configuration_capacity_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "container_configuration_weight_kg": { + "name": "container_configuration_weight_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_round_capacity": { + "name": "magazine_configuration_round_capacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_ammo_type": { + "name": "magazine_configuration_ammo_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_greenmag_compatible": { + "name": "magazine_configuration_greenmag_compatible", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_mod": { + "name": "asset_metadata_mod", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_thumbnail_id": { + "name": "asset_metadata_thumbnail_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_game_description": { + "name": "asset_metadata_game_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "market_trading_rarity": { + "name": "market_trading_rarity", + "type": "enum_assets_market_trading_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_buy_price": { + "name": "market_trading_perceived_value_base_buy_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_sell_price": { + "name": "market_trading_perceived_value_base_sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "economy_baseline_supply": { + "name": "economy_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "economy_baseline_demand": { + "name": "economy_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "economy_max_modifier": { + "name": "economy_max_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "crafting_craftable": { + "name": "crafting_craftable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_blueprint_required": { + "name": "crafting_blueprint_required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_technology_required_to_use": { + "name": "crafting_technology_required_to_use", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_crafting_data_crafting_time_per_unit": { + "name": "crafting_crafting_data_crafting_time_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "crafting_crafting_data_batch_size": { + "name": "crafting_crafting_data_batch_size", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_grid_width": { + "name": "storage_dimensions_grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_grid_height": { + "name": "storage_dimensions_grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_stackable": { + "name": "storage_dimensions_stackable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "storage_dimensions_max_stack_size": { + "name": "storage_dimensions_max_stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "storage_dimensions_rotatable": { + "name": "storage_dimensions_rotatable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "is_live": { + "name": "is_live", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assets_asset_metadata_asset_metadata_thumbnail_idx": { + "name": "assets_asset_metadata_asset_metadata_thumbnail_idx", + "columns": [ + { + "expression": "asset_metadata_thumbnail_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_updated_at_idx": { + "name": "assets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_created_at_idx": { + "name": "assets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_asset_metadata_thumbnail_id_media_id_fk": { + "name": "assets_asset_metadata_thumbnail_id_media_id_fk", + "tableFrom": "assets", + "tableTo": "media", + "columnsFrom": [ + "asset_metadata_thumbnail_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_rels": { + "name": "assets_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_rels_order_idx": { + "name": "assets_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_parent_idx": { + "name": "assets_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_path_idx": { + "name": "assets_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_assets_id_idx": { + "name": "assets_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_technologies_id_idx": { + "name": "assets_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_resources_id_idx": { + "name": "assets_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_structures_id_idx": { + "name": "assets_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_rels_parent_fk": { + "name": "assets_rels_parent_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_assets_fk": { + "name": "assets_rels_assets_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_technologies_fk": { + "name": "assets_rels_technologies_fk", + "tableFrom": "assets_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_resources_fk": { + "name": "assets_rels_resources_fk", + "tableFrom": "assets_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_structures_fk": { + "name": "assets_rels_structures_fk", + "tableFrom": "assets_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resources": { + "name": "resources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_resources_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "type": { + "name": "type", + "type": "enum_resources_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'physical'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "icon_id": { + "name": "icon_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "base_value": { + "name": "base_value", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "rarity": { + "name": "rarity", + "type": "enum_resources_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'common'" + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "economy_baseline_supply": { + "name": "economy_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "economy_baseline_demand": { + "name": "economy_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "economy_max_modifier": { + "name": "economy_max_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "unit_of_measure": { + "name": "unit_of_measure", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mass_per_unit": { + "name": "mass_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "stack_size": { + "name": "stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "grid_width": { + "name": "grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "grid_height": { + "name": "grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "stackable": { + "name": "stackable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "max_stack_size": { + "name": "max_stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "rotatable": { + "name": "rotatable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resources_icon_idx": { + "name": "resources_icon_idx", + "columns": [ + { + "expression": "icon_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_updated_at_idx": { + "name": "resources_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_created_at_idx": { + "name": "resources_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resources_icon_id_media_id_fk": { + "name": "resources_icon_id_media_id_fk", + "tableFrom": "resources", + "tableTo": "media", + "columnsFrom": [ + "icon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_category": { + "name": "vehicles_category", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_vehicles_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "vehicles_category_order_idx": { + "name": "vehicles_category_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_category_parent_idx": { + "name": "vehicles_category_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_category_parent_fk": { + "name": "vehicles_category_parent_fk", + "tableFrom": "vehicles_category", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_materials": { + "name": "vehicles_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_materials_order_idx": { + "name": "vehicles_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_parent_id_idx": { + "name": "vehicles_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_resource_idx": { + "name": "vehicles_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_materials_resource_id_resources_id_fk": { + "name": "vehicles_materials_resource_id_resources_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_materials_parent_id_fk": { + "name": "vehicles_materials_parent_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_scrap_returns": { + "name": "vehicles_scrap_returns", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "chance": { + "name": "chance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + } + }, + "indexes": { + "vehicles_scrap_returns_order_idx": { + "name": "vehicles_scrap_returns_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_parent_id_idx": { + "name": "vehicles_scrap_returns_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_resource_idx": { + "name": "vehicles_scrap_returns_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_scrap_returns_resource_id_resources_id_fk": { + "name": "vehicles_scrap_returns_resource_id_resources_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_scrap_returns_parent_id_fk": { + "name": "vehicles_scrap_returns_parent_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_upkeep_costs": { + "name": "vehicles_upkeep_costs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_upkeep_costs_order_idx": { + "name": "vehicles_upkeep_costs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_parent_id_idx": { + "name": "vehicles_upkeep_costs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_resource_idx": { + "name": "vehicles_upkeep_costs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_upkeep_costs_resource_id_resources_id_fk": { + "name": "vehicles_upkeep_costs_resource_id_resources_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_upkeep_costs_parent_id_fk": { + "name": "vehicles_upkeep_costs_parent_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_allowed_virtual_cargo": { + "name": "vehicles_allowed_virtual_cargo", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_allowed_virtual_cargo_order_idx": { + "name": "vehicles_allowed_virtual_cargo_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_allowed_virtual_cargo_parent_id_idx": { + "name": "vehicles_allowed_virtual_cargo_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_allowed_virtual_cargo_parent_id_fk": { + "name": "vehicles_allowed_virtual_cargo_parent_id_fk", + "tableFrom": "vehicles_allowed_virtual_cargo", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_pylons": { + "name": "vehicles_pylons", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "pylon_name": { + "name": "pylon_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pylon_type": { + "name": "pylon_type", + "type": "enum_vehicles_pylons_pylon_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'mountedWeapon'" + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "ammo_type_id": { + "name": "ammo_type_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_pylons_order_idx": { + "name": "vehicles_pylons_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_parent_id_idx": { + "name": "vehicles_pylons_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_ammo_type_idx": { + "name": "vehicles_pylons_ammo_type_idx", + "columns": [ + { + "expression": "ammo_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_pylons_ammo_type_id_assets_id_fk": { + "name": "vehicles_pylons_ammo_type_id_assets_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "assets", + "columnsFrom": [ + "ammo_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_pylons_parent_id_fk": { + "name": "vehicles_pylons_parent_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles": { + "name": "vehicles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "classname": { + "name": "classname", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "approval_status": { + "name": "approval_status", + "type": "enum_vehicles_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "fuel_fuel_type_id": { + "name": "fuel_fuel_type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "fuel_fuel_capacity": { + "name": "fuel_fuel_capacity", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_fuel_consumption_rate": { + "name": "fuel_fuel_consumption_rate", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "construction_time": { + "name": "construction_time", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "transport_mode": { + "name": "transport_mode", + "type": "enum_vehicles_transport_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'ground'" + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_mass": { + "name": "max_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "ace_cargo_slots": { + "name": "ace_cargo_slots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "armor_rating": { + "name": "armor_rating", + "type": "enum_vehicles_armor_rating", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_speed_on_road": { + "name": "max_speed_on_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_speed_off_road": { + "name": "max_speed_off_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_airspeed": { + "name": "max_airspeed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_knots": { + "name": "max_knots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "vehicles_image_idx": { + "name": "vehicles_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_fuel_fuel_fuel_type_idx": { + "name": "vehicles_fuel_fuel_fuel_type_idx", + "columns": [ + { + "expression": "fuel_fuel_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_updated_at_idx": { + "name": "vehicles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_created_at_idx": { + "name": "vehicles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_image_id_media_id_fk": { + "name": "vehicles_image_id_media_id_fk", + "tableFrom": "vehicles", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_fuel_fuel_type_id_resources_id_fk": { + "name": "vehicles_fuel_fuel_type_id_resources_id_fk", + "tableFrom": "vehicles", + "tableTo": "resources", + "columnsFrom": [ + "fuel_fuel_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_rels": { + "name": "vehicles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_rels_order_idx": { + "name": "vehicles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_parent_idx": { + "name": "vehicles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_path_idx": { + "name": "vehicles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_technologies_id_idx": { + "name": "vehicles_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_assets_id_idx": { + "name": "vehicles_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_vehicles_id_idx": { + "name": "vehicles_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_resources_id_idx": { + "name": "vehicles_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_rels_parent_fk": { + "name": "vehicles_rels_parent_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_technologies_fk": { + "name": "vehicles_rels_technologies_fk", + "tableFrom": "vehicles_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_assets_fk": { + "name": "vehicles_rels_assets_fk", + "tableFrom": "vehicles_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_vehicles_fk": { + "name": "vehicles_rels_vehicles_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_resources_fk": { + "name": "vehicles_rels_resources_fk", + "tableFrom": "vehicles_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_materials": { + "name": "structures_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_materials_order_idx": { + "name": "structures_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_parent_id_idx": { + "name": "structures_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_resource_idx": { + "name": "structures_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_materials_resource_id_resources_id_fk": { + "name": "structures_materials_resource_id_resources_id_fk", + "tableFrom": "structures_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_materials_parent_id_fk": { + "name": "structures_materials_parent_id_fk", + "tableFrom": "structures_materials", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_resources_in_range": { + "name": "structures_resources_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_resources_in_range_order_idx": { + "name": "structures_resources_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_parent_id_idx": { + "name": "structures_resources_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_resource_idx": { + "name": "structures_resources_in_range_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_resources_in_range_resource_id_resources_id_fk": { + "name": "structures_resources_in_range_resource_id_resources_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_resources_in_range_parent_id_fk": { + "name": "structures_resources_in_range_parent_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_structures_in_range": { + "name": "structures_structures_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_structures_in_range_order_idx": { + "name": "structures_structures_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_parent_id_idx": { + "name": "structures_structures_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_structure_idx": { + "name": "structures_structures_in_range_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_structures_in_range_structure_id_structures_id_fk": { + "name": "structures_structures_in_range_structure_id_structures_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_structures_in_range_parent_id_fk": { + "name": "structures_structures_in_range_parent_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_upkeep": { + "name": "structures_upkeep", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_upkeep_order_idx": { + "name": "structures_upkeep_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_parent_id_idx": { + "name": "structures_upkeep_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_resource_idx": { + "name": "structures_upkeep_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_upkeep_resource_id_resources_id_fk": { + "name": "structures_upkeep_resource_id_resources_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upkeep_parent_id_fk": { + "name": "structures_upkeep_parent_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_labor_requirements": { + "name": "structures_labor_requirements", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "classification_id": { + "name": "classification_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "required_headcount": { + "name": "required_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_headcount": { + "name": "max_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_labor_requirements_order_idx": { + "name": "structures_labor_requirements_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_labor_requirements_parent_id_idx": { + "name": "structures_labor_requirements_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_labor_requirements_classification_idx": { + "name": "structures_labor_requirements_classification_idx", + "columns": [ + { + "expression": "classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_labor_requirements_classification_id_labor_classifications_id_fk": { + "name": "structures_labor_requirements_classification_id_labor_classifications_id_fk", + "tableFrom": "structures_labor_requirements", + "tableTo": "labor_classifications", + "columnsFrom": [ + "classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_labor_requirements_parent_id_fk": { + "name": "structures_labor_requirements_parent_id_fk", + "tableFrom": "structures_labor_requirements", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_staff_positions": { + "name": "structures_staff_positions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_structures_staff_positions_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "max": { + "name": "max", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_staff_positions_order_idx": { + "name": "structures_staff_positions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_staff_positions_parent_id_idx": { + "name": "structures_staff_positions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_staff_positions_parent_id_fk": { + "name": "structures_staff_positions_parent_id_fk", + "tableFrom": "structures_staff_positions", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_production_inputs": { + "name": "structures_production_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "structures_production_inputs_order_idx": { + "name": "structures_production_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_inputs_parent_id_idx": { + "name": "structures_production_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_inputs_resource_idx": { + "name": "structures_production_inputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_production_inputs_resource_id_resources_id_fk": { + "name": "structures_production_inputs_resource_id_resources_id_fk", + "tableFrom": "structures_production_inputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_production_inputs_parent_id_fk": { + "name": "structures_production_inputs_parent_id_fk", + "tableFrom": "structures_production_inputs", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_production_outputs": { + "name": "structures_production_outputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "structures_production_outputs_order_idx": { + "name": "structures_production_outputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_outputs_parent_id_idx": { + "name": "structures_production_outputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_outputs_resource_idx": { + "name": "structures_production_outputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_production_outputs_resource_id_resources_id_fk": { + "name": "structures_production_outputs_resource_id_resources_id_fk", + "tableFrom": "structures_production_outputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_production_outputs_parent_id_fk": { + "name": "structures_production_outputs_parent_id_fk", + "tableFrom": "structures_production_outputs", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_module_options_effects": { + "name": "structures_module_options_effects", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_structures_module_options_effects_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "numeric", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "structures_module_options_effects_order_idx": { + "name": "structures_module_options_effects_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_module_options_effects_parent_id_idx": { + "name": "structures_module_options_effects_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_module_options_effects_parent_id_fk": { + "name": "structures_module_options_effects_parent_id_fk", + "tableFrom": "structures_module_options_effects", + "tableTo": "structures_module_options", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_module_options_materials": { + "name": "structures_module_options_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "structures_module_options_materials_order_idx": { + "name": "structures_module_options_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_module_options_materials_parent_id_idx": { + "name": "structures_module_options_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_module_options_materials_resource_idx": { + "name": "structures_module_options_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_module_options_materials_resource_id_resources_id_fk": { + "name": "structures_module_options_materials_resource_id_resources_id_fk", + "tableFrom": "structures_module_options_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_module_options_materials_parent_id_fk": { + "name": "structures_module_options_materials_parent_id_fk", + "tableFrom": "structures_module_options_materials", + "tableTo": "structures_module_options", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_module_options": { + "name": "structures_module_options", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_structures_module_options_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'utility'" + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_module_options_order_idx": { + "name": "structures_module_options_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_module_options_parent_id_idx": { + "name": "structures_module_options_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_module_options_parent_id_fk": { + "name": "structures_module_options_parent_id_fk", + "tableFrom": "structures_module_options", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_auto_generated_resources": { + "name": "structures_auto_generated_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "min_amount": { + "name": "min_amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "max_amount": { + "name": "max_amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "min_frequency": { + "name": "min_frequency", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'1'" + }, + "max_frequency": { + "name": "max_frequency", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "produce_chance": { + "name": "produce_chance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + } + }, + "indexes": { + "structures_auto_generated_resources_order_idx": { + "name": "structures_auto_generated_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_parent_id_idx": { + "name": "structures_auto_generated_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_resource_idx": { + "name": "structures_auto_generated_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_auto_generated_resources_resource_id_resources_id_fk": { + "name": "structures_auto_generated_resources_resource_id_resources_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_auto_generated_resources_parent_id_fk": { + "name": "structures_auto_generated_resources_parent_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_allowed_storage": { + "name": "structures_allowed_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_allowed_storage_order_idx": { + "name": "structures_allowed_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_allowed_storage_parent_id_idx": { + "name": "structures_allowed_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_allowed_storage_parent_id_fk": { + "name": "structures_allowed_storage_parent_id_fk", + "tableFrom": "structures_allowed_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_prohibited_storage": { + "name": "structures_prohibited_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "structures_prohibited_storage_order_idx": { + "name": "structures_prohibited_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_prohibited_storage_parent_id_idx": { + "name": "structures_prohibited_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_prohibited_storage_parent_id_fk": { + "name": "structures_prohibited_storage_parent_id_fk", + "tableFrom": "structures_prohibited_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures": { + "name": "structures", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_structures_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "category": { + "name": "category", + "type": "enum_structures_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "construction_duration_minutes": { + "name": "construction_duration_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "construction_crew_required": { + "name": "construction_crew_required", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "requires_upgrade": { + "name": "requires_upgrade", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "upgrades_into_id": { + "name": "upgrades_into_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "upgrade_cost_multiplier": { + "name": "upgrade_cost_multiplier", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "terrain_type": { + "name": "terrain_type", + "type": "enum_structures_terrain_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "sell_price": { + "name": "sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "maintenance_cost": { + "name": "maintenance_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "module_slots": { + "name": "module_slots", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "function_type": { + "name": "function_type", + "type": "enum_structures_function_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_capacity_mass": { + "name": "max_capacity_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "restrict_to_allowed": { + "name": "restrict_to_allowed", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "x_size": { + "name": "x_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "y_size": { + "name": "y_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "repair_speed": { + "name": "repair_speed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "structures_image_idx": { + "name": "structures_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upgrades_into_idx": { + "name": "structures_upgrades_into_idx", + "columns": [ + { + "expression": "upgrades_into_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_updated_at_idx": { + "name": "structures_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_created_at_idx": { + "name": "structures_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_image_id_media_id_fk": { + "name": "structures_image_id_media_id_fk", + "tableFrom": "structures", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upgrades_into_id_structures_id_fk": { + "name": "structures_upgrades_into_id_structures_id_fk", + "tableFrom": "structures", + "tableTo": "structures", + "columnsFrom": [ + "upgrades_into_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_rels": { + "name": "structures_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_rels_order_idx": { + "name": "structures_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_parent_idx": { + "name": "structures_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_path_idx": { + "name": "structures_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_technologies_id_idx": { + "name": "structures_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_assets_id_idx": { + "name": "structures_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_vehicles_id_idx": { + "name": "structures_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_resources_id_idx": { + "name": "structures_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_rels_parent_fk": { + "name": "structures_rels_parent_fk", + "tableFrom": "structures_rels", + "tableTo": "structures", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_technologies_fk": { + "name": "structures_rels_technologies_fk", + "tableFrom": "structures_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_assets_fk": { + "name": "structures_rels_assets_fk", + "tableFrom": "structures_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_vehicles_fk": { + "name": "structures_rels_vehicles_fk", + "tableFrom": "structures_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_resources_fk": { + "name": "structures_rels_resources_fk", + "tableFrom": "structures_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments_cargo": { + "name": "shipments_cargo", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "shipments_cargo_order_idx": { + "name": "shipments_cargo_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_cargo_parent_id_idx": { + "name": "shipments_cargo_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_cargo_parent_id_fk": { + "name": "shipments_cargo_parent_id_fk", + "tableFrom": "shipments_cargo", + "tableTo": "shipments", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments": { + "name": "shipments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "origin_id": { + "name": "origin_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "destination_id": { + "name": "destination_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "route_path": { + "name": "route_path", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "transport_vehicle_id": { + "name": "transport_vehicle_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "distance": { + "name": "distance", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_cost": { + "name": "fuel_cost", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_consumed": { + "name": "fuel_consumed", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_shipments_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "dispatched_at": { + "name": "dispatched_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "estimated_arrival": { + "name": "estimated_arrival", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "auto_return": { + "name": "auto_return", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "created_by_id": { + "name": "created_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "shipments_origin_idx": { + "name": "shipments_origin_idx", + "columns": [ + { + "expression": "origin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_destination_idx": { + "name": "shipments_destination_idx", + "columns": [ + { + "expression": "destination_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_map_idx": { + "name": "shipments_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_transport_vehicle_idx": { + "name": "shipments_transport_vehicle_idx", + "columns": [ + { + "expression": "transport_vehicle_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_created_by_idx": { + "name": "shipments_created_by_idx", + "columns": [ + { + "expression": "created_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_updated_at_idx": { + "name": "shipments_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_created_at_idx": { + "name": "shipments_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_origin_id_game_structures_id_fk": { + "name": "shipments_origin_id_game_structures_id_fk", + "tableFrom": "shipments", + "tableTo": "game_structures", + "columnsFrom": [ + "origin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_destination_id_game_structures_id_fk": { + "name": "shipments_destination_id_game_structures_id_fk", + "tableFrom": "shipments", + "tableTo": "game_structures", + "columnsFrom": [ + "destination_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_map_id_maps_id_fk": { + "name": "shipments_map_id_maps_id_fk", + "tableFrom": "shipments", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_transport_vehicle_id_game_vehicles_id_fk": { + "name": "shipments_transport_vehicle_id_game_vehicles_id_fk", + "tableFrom": "shipments", + "tableTo": "game_vehicles", + "columnsFrom": [ + "transport_vehicle_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_created_by_id_users_id_fk": { + "name": "shipments_created_by_id_users_id_fk", + "tableFrom": "shipments", + "tableTo": "users", + "columnsFrom": [ + "created_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments_rels": { + "name": "shipments_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shipments_rels_order_idx": { + "name": "shipments_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_parent_idx": { + "name": "shipments_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_path_idx": { + "name": "shipments_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_resources_id_idx": { + "name": "shipments_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_assets_id_idx": { + "name": "shipments_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_vehicles_id_idx": { + "name": "shipments_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_rels_parent_fk": { + "name": "shipments_rels_parent_fk", + "tableFrom": "shipments_rels", + "tableTo": "shipments", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_resources_fk": { + "name": "shipments_rels_resources_fk", + "tableFrom": "shipments_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_assets_fk": { + "name": "shipments_rels_assets_fk", + "tableFrom": "shipments_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_vehicles_fk": { + "name": "shipments_rels_vehicles_fk", + "tableFrom": "shipments_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.bank_accounts": { + "name": "bank_accounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "account_type": { + "name": "account_type", + "type": "enum_bank_accounts_account_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'personal'" + }, + "owner_faction_id": { + "name": "owner_faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "currency_id": { + "name": "currency_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "balance": { + "name": "balance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_bank_accounts_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "bank_accounts_owner_faction_idx": { + "name": "bank_accounts_owner_faction_idx", + "columns": [ + { + "expression": "owner_faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_owner_user_idx": { + "name": "bank_accounts_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_currency_idx": { + "name": "bank_accounts_currency_idx", + "columns": [ + { + "expression": "currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_updated_at_idx": { + "name": "bank_accounts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "bank_accounts_owner_faction_id_factions_id_fk": { + "name": "bank_accounts_owner_faction_id_factions_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "factions", + "columnsFrom": [ + "owner_faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_accounts_owner_user_id_users_id_fk": { + "name": "bank_accounts_owner_user_id_users_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_accounts_currency_id_resources_id_fk": { + "name": "bank_accounts_currency_id_resources_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "resources", + "columnsFrom": [ + "currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.bank_transactions": { + "name": "bank_transactions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "transaction_number": { + "name": "transaction_number", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_bank_transactions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "from_account_id": { + "name": "from_account_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_account_id": { + "name": "to_account_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fee": { + "name": "fee", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "memo": { + "name": "memo", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "actor_id": { + "name": "actor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_bank_transactions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'completed'" + }, + "reference_id": { + "name": "reference_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "bank_transactions_transaction_number_idx": { + "name": "bank_transactions_transaction_number_idx", + "columns": [ + { + "expression": "transaction_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_from_account_idx": { + "name": "bank_transactions_from_account_idx", + "columns": [ + { + "expression": "from_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_to_account_idx": { + "name": "bank_transactions_to_account_idx", + "columns": [ + { + "expression": "to_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_actor_idx": { + "name": "bank_transactions_actor_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_reference_idx": { + "name": "bank_transactions_reference_idx", + "columns": [ + { + "expression": "reference_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_updated_at_idx": { + "name": "bank_transactions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_created_at_idx": { + "name": "bank_transactions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "bank_transactions_from_account_id_bank_accounts_id_fk": { + "name": "bank_transactions_from_account_id_bank_accounts_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_accounts", + "columnsFrom": [ + "from_account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_to_account_id_bank_accounts_id_fk": { + "name": "bank_transactions_to_account_id_bank_accounts_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_accounts", + "columnsFrom": [ + "to_account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_actor_id_users_id_fk": { + "name": "bank_transactions_actor_id_users_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "users", + "columnsFrom": [ + "actor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_reference_id_bank_transactions_id_fk": { + "name": "bank_transactions_reference_id_bank_transactions_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_transactions", + "columnsFrom": [ + "reference_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ledger_entries": { + "name": "ledger_entries", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "account_id": { + "name": "account_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "transaction_id": { + "name": "transaction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_ledger_entries_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "balance_after": { + "name": "balance_after", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "memo": { + "name": "memo", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ledger_entries_account_idx": { + "name": "ledger_entries_account_idx", + "columns": [ + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_transaction_idx": { + "name": "ledger_entries_transaction_idx", + "columns": [ + { + "expression": "transaction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_updated_at_idx": { + "name": "ledger_entries_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_created_at_idx": { + "name": "ledger_entries_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ledger_entries_account_id_bank_accounts_id_fk": { + "name": "ledger_entries_account_id_bank_accounts_id_fk", + "tableFrom": "ledger_entries", + "tableTo": "bank_accounts", + "columnsFrom": [ + "account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ledger_entries_transaction_id_bank_transactions_id_fk": { + "name": "ledger_entries_transaction_id_bank_transactions_id_fk", + "tableFrom": "ledger_entries", + "tableTo": "bank_transactions", + "columnsFrom": [ + "transaction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages_items_equipment_attachments": { + "name": "locker_storages_items_equipment_attachments", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "locker_storages_items_equipment_attachments_order_idx": { + "name": "locker_storages_items_equipment_attachments_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_attachments_parent_id_idx": { + "name": "locker_storages_items_equipment_attachments_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_attachments_asset_idx": { + "name": "locker_storages_items_equipment_attachments_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_items_equipment_attachments_asset_id_assets_id_fk": { + "name": "locker_storages_items_equipment_attachments_asset_id_assets_id_fk", + "tableFrom": "locker_storages_items_equipment_attachments", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_equipment_attachments_parent_id_fk": { + "name": "locker_storages_items_equipment_attachments_parent_id_fk", + "tableFrom": "locker_storages_items_equipment_attachments", + "tableTo": "locker_storages_items", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages_items": { + "name": "locker_storages_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "equipment_skin_id": { + "name": "equipment_skin_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "equipment_custom_name": { + "name": "equipment_custom_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "locker_storages_items_order_idx": { + "name": "locker_storages_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_parent_id_idx": { + "name": "locker_storages_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_asset_idx": { + "name": "locker_storages_items_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_equipment_skin_idx": { + "name": "locker_storages_items_equipment_equipment_skin_idx", + "columns": [ + { + "expression": "equipment_skin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_items_asset_id_assets_id_fk": { + "name": "locker_storages_items_asset_id_assets_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_equipment_skin_id_assets_id_fk": { + "name": "locker_storages_items_equipment_skin_id_assets_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "assets", + "columnsFrom": [ + "equipment_skin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_parent_id_fk": { + "name": "locker_storages_items_parent_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "locker_storages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages": { + "name": "locker_storages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Personal Locker'" + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "item_count": { + "name": "item_count", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "locker_storages_owner_user_idx": { + "name": "locker_storages_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_updated_at_idx": { + "name": "locker_storages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_created_at_idx": { + "name": "locker_storages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_owner_user_id_users_id_fk": { + "name": "locker_storages_owner_user_id_users_id_fk", + "tableFrom": "locker_storages", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.loadouts": { + "name": "loadouts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "equipped": { + "name": "equipped", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "slots_primary_id": { + "name": "slots_primary_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_secondary_id": { + "name": "slots_secondary_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_launcher_id": { + "name": "slots_launcher_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_uniform_id": { + "name": "slots_uniform_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_vest_id": { + "name": "slots_vest_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_backpack_id": { + "name": "slots_backpack_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_helmet_id": { + "name": "slots_helmet_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_facewear_id": { + "name": "slots_facewear_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_nvg_id": { + "name": "slots_nvg_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_radio_id": { + "name": "slots_radio_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_optic_id": { + "name": "slots_optic_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_muzzle_id": { + "name": "slots_muzzle_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_bipod_id": { + "name": "slots_bipod_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "loadouts_owner_user_idx": { + "name": "loadouts_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_primary_idx": { + "name": "loadouts_slots_slots_primary_idx", + "columns": [ + { + "expression": "slots_primary_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_secondary_idx": { + "name": "loadouts_slots_slots_secondary_idx", + "columns": [ + { + "expression": "slots_secondary_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_launcher_idx": { + "name": "loadouts_slots_slots_launcher_idx", + "columns": [ + { + "expression": "slots_launcher_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_uniform_idx": { + "name": "loadouts_slots_slots_uniform_idx", + "columns": [ + { + "expression": "slots_uniform_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_vest_idx": { + "name": "loadouts_slots_slots_vest_idx", + "columns": [ + { + "expression": "slots_vest_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_backpack_idx": { + "name": "loadouts_slots_slots_backpack_idx", + "columns": [ + { + "expression": "slots_backpack_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_helmet_idx": { + "name": "loadouts_slots_slots_helmet_idx", + "columns": [ + { + "expression": "slots_helmet_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_facewear_idx": { + "name": "loadouts_slots_slots_facewear_idx", + "columns": [ + { + "expression": "slots_facewear_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_nvg_idx": { + "name": "loadouts_slots_slots_nvg_idx", + "columns": [ + { + "expression": "slots_nvg_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_radio_idx": { + "name": "loadouts_slots_slots_radio_idx", + "columns": [ + { + "expression": "slots_radio_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_optic_idx": { + "name": "loadouts_slots_slots_optic_idx", + "columns": [ + { + "expression": "slots_optic_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_muzzle_idx": { + "name": "loadouts_slots_slots_muzzle_idx", + "columns": [ + { + "expression": "slots_muzzle_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_bipod_idx": { + "name": "loadouts_slots_slots_bipod_idx", + "columns": [ + { + "expression": "slots_bipod_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_updated_at_idx": { + "name": "loadouts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_created_at_idx": { + "name": "loadouts_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "loadouts_owner_user_id_users_id_fk": { + "name": "loadouts_owner_user_id_users_id_fk", + "tableFrom": "loadouts", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_primary_id_assets_id_fk": { + "name": "loadouts_slots_primary_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_primary_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_secondary_id_assets_id_fk": { + "name": "loadouts_slots_secondary_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_secondary_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_launcher_id_assets_id_fk": { + "name": "loadouts_slots_launcher_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_launcher_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_uniform_id_assets_id_fk": { + "name": "loadouts_slots_uniform_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_uniform_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_vest_id_assets_id_fk": { + "name": "loadouts_slots_vest_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_vest_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_backpack_id_assets_id_fk": { + "name": "loadouts_slots_backpack_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_backpack_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_helmet_id_assets_id_fk": { + "name": "loadouts_slots_helmet_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_helmet_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_facewear_id_assets_id_fk": { + "name": "loadouts_slots_facewear_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_facewear_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_nvg_id_assets_id_fk": { + "name": "loadouts_slots_nvg_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_nvg_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_radio_id_assets_id_fk": { + "name": "loadouts_slots_radio_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_radio_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_optic_id_assets_id_fk": { + "name": "loadouts_slots_optic_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_optic_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_muzzle_id_assets_id_fk": { + "name": "loadouts_slots_muzzle_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_muzzle_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_bipod_id_assets_id_fk": { + "name": "loadouts_slots_bipod_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_bipod_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_listings": { + "name": "market_listings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "seller_id": { + "name": "seller_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "npc_id": { + "name": "npc_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "price": { + "name": "price", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "desired_price": { + "name": "desired_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "min_price": { + "name": "min_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "currency_id": { + "name": "currency_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_market_listings_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "is_auto_generated": { + "name": "is_auto_generated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "listed_at": { + "name": "listed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "sold_at": { + "name": "sold_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "buyer_id": { + "name": "buyer_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_listings_asset_idx": { + "name": "market_listings_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_seller_idx": { + "name": "market_listings_seller_idx", + "columns": [ + { + "expression": "seller_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_npc_idx": { + "name": "market_listings_npc_idx", + "columns": [ + { + "expression": "npc_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_currency_idx": { + "name": "market_listings_currency_idx", + "columns": [ + { + "expression": "currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_status_idx": { + "name": "market_listings_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_buyer_idx": { + "name": "market_listings_buyer_idx", + "columns": [ + { + "expression": "buyer_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_updated_at_idx": { + "name": "market_listings_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_created_at_idx": { + "name": "market_listings_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_listings_asset_id_assets_id_fk": { + "name": "market_listings_asset_id_assets_id_fk", + "tableFrom": "market_listings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_seller_id_users_id_fk": { + "name": "market_listings_seller_id_users_id_fk", + "tableFrom": "market_listings", + "tableTo": "users", + "columnsFrom": [ + "seller_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_npc_id_game_npcs_id_fk": { + "name": "market_listings_npc_id_game_npcs_id_fk", + "tableFrom": "market_listings", + "tableTo": "game_npcs", + "columnsFrom": [ + "npc_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_currency_id_resources_id_fk": { + "name": "market_listings_currency_id_resources_id_fk", + "tableFrom": "market_listings", + "tableTo": "resources", + "columnsFrom": [ + "currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_buyer_id_users_id_fk": { + "name": "market_listings_buyer_id_users_id_fk", + "tableFrom": "market_listings", + "tableTo": "users", + "columnsFrom": [ + "buyer_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_negotiations_history": { + "name": "market_negotiations_history", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "from": { + "name": "from", + "type": "enum_market_negotiations_history_from", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "at": { + "name": "at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "market_negotiations_history_order_idx": { + "name": "market_negotiations_history_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_history_parent_id_idx": { + "name": "market_negotiations_history_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_negotiations_history_parent_id_fk": { + "name": "market_negotiations_history_parent_id_fk", + "tableFrom": "market_negotiations_history", + "tableTo": "market_negotiations", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_negotiations": { + "name": "market_negotiations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "listing_id": { + "name": "listing_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "buyer_id": { + "name": "buyer_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_market_negotiations_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "patience": { + "name": "patience", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "proposed_by": { + "name": "proposed_by", + "type": "enum_market_negotiations_proposed_by", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'buyer'" + }, + "accepted_price": { + "name": "accepted_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_negotiations_listing_idx": { + "name": "market_negotiations_listing_idx", + "columns": [ + { + "expression": "listing_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_buyer_idx": { + "name": "market_negotiations_buyer_idx", + "columns": [ + { + "expression": "buyer_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_status_idx": { + "name": "market_negotiations_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_updated_at_idx": { + "name": "market_negotiations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_created_at_idx": { + "name": "market_negotiations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_negotiations_listing_id_market_listings_id_fk": { + "name": "market_negotiations_listing_id_market_listings_id_fk", + "tableFrom": "market_negotiations", + "tableTo": "market_listings", + "columnsFrom": [ + "listing_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_negotiations_buyer_id_users_id_fk": { + "name": "market_negotiations_buyer_id_users_id_fk", + "tableFrom": "market_negotiations", + "tableTo": "users", + "columnsFrom": [ + "buyer_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_state": { + "name": "market_state", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "item_type": { + "name": "item_type", + "type": "enum_market_state_item_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "item_id": { + "name": "item_id", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "gm_baseline_supply": { + "name": "gm_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 100 + }, + "gm_baseline_demand": { + "name": "gm_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 50 + }, + "current_supply": { + "name": "current_supply", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 100 + }, + "artificial_demand": { + "name": "artificial_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 50 + }, + "real_demand": { + "name": "real_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "price_modifier": { + "name": "price_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "last_computed_at": { + "name": "last_computed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_state_item_type_idx": { + "name": "market_state_item_type_idx", + "columns": [ + { + "expression": "item_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_item_id_idx": { + "name": "market_state_item_id_idx", + "columns": [ + { + "expression": "item_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_updated_at_idx": { + "name": "market_state_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_created_at_idx": { + "name": "market_state_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "itemType_itemId_idx": { + "name": "itemType_itemId_idx", + "columns": [ + { + "expression": "item_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "item_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.voice_scripts": { + "name": "voice_scripts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "script": { + "name": "script", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "xp_amount": { + "name": "xp_amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 250 + }, + "spoiler": { + "name": "spoiler", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "status": { + "name": "status", + "type": "enum_voice_scripts_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'draft'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "voice_scripts_updated_at_idx": { + "name": "voice_scripts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_scripts_created_at_idx": { + "name": "voice_scripts_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.voice_submissions": { + "name": "voice_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "script_id": { + "name": "script_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_voice_submissions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "review_note": { + "name": "review_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "voice_submissions_script_idx": { + "name": "voice_submissions_script_idx", + "columns": [ + { + "expression": "script_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_user_idx": { + "name": "voice_submissions_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_updated_at_idx": { + "name": "voice_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_created_at_idx": { + "name": "voice_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_filename_idx": { + "name": "voice_submissions_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "voice_submissions_script_id_voice_scripts_id_fk": { + "name": "voice_submissions_script_id_voice_scripts_id_fk", + "tableFrom": "voice_submissions", + "tableTo": "voice_scripts", + "columnsFrom": [ + "script_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "voice_submissions_user_id_users_id_fk": { + "name": "voice_submissions_user_id_users_id_fk", + "tableFrom": "voice_submissions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_activity": { + "name": "tickets_activity", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_tickets_activity_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'system'" + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tickets_activity_order_idx": { + "name": "tickets_activity_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_activity_parent_id_idx": { + "name": "tickets_activity_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_activity_author_idx": { + "name": "tickets_activity_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_activity_author_id_users_id_fk": { + "name": "tickets_activity_author_id_users_id_fk", + "tableFrom": "tickets_activity", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_activity_parent_id_fk": { + "name": "tickets_activity_parent_id_fk", + "tableFrom": "tickets_activity", + "tableTo": "tickets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_edit_history": { + "name": "tickets_edit_history", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "before": { + "name": "before", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "after": { + "name": "after", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "edited_by_id": { + "name": "edited_by_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "edited_at": { + "name": "edited_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "tickets_edit_history_order_idx": { + "name": "tickets_edit_history_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_edit_history_parent_id_idx": { + "name": "tickets_edit_history_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_edit_history_edited_by_idx": { + "name": "tickets_edit_history_edited_by_idx", + "columns": [ + { + "expression": "edited_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_edit_history_edited_by_id_users_id_fk": { + "name": "tickets_edit_history_edited_by_id_users_id_fk", + "tableFrom": "tickets_edit_history", + "tableTo": "users", + "columnsFrom": [ + "edited_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_edit_history_parent_id_fk": { + "name": "tickets_edit_history_parent_id_fk", + "tableFrom": "tickets_edit_history", + "tableTo": "tickets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets": { + "name": "tickets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_tickets_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'support_request'" + }, + "priority": { + "name": "priority", + "type": "enum_tickets_priority", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'medium'" + }, + "status": { + "name": "status", + "type": "enum_tickets_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "reporter_id": { + "name": "reporter_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "assignee_id": { + "name": "assignee_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "closed_at": { + "name": "closed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sprint_id": { + "name": "sprint_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "release_id": { + "name": "release_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_ticket_id": { + "name": "parent_ticket_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "enum_tickets_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'task'" + }, + "story_points": { + "name": "story_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "estimate": { + "name": "estimate", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "due_date": { + "name": "due_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "resolution": { + "name": "resolution", + "type": "enum_tickets_resolution", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "tickets_category_idx": { + "name": "tickets_category_idx", + "columns": [ + { + "expression": "category", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_priority_idx": { + "name": "tickets_priority_idx", + "columns": [ + { + "expression": "priority", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_status_idx": { + "name": "tickets_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_reporter_idx": { + "name": "tickets_reporter_idx", + "columns": [ + { + "expression": "reporter_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_assignee_idx": { + "name": "tickets_assignee_idx", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_project_idx": { + "name": "tickets_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_sprint_idx": { + "name": "tickets_sprint_idx", + "columns": [ + { + "expression": "sprint_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_release_idx": { + "name": "tickets_release_idx", + "columns": [ + { + "expression": "release_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_parent_ticket_idx": { + "name": "tickets_parent_ticket_idx", + "columns": [ + { + "expression": "parent_ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_updated_at_idx": { + "name": "tickets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_created_at_idx": { + "name": "tickets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_reporter_id_users_id_fk": { + "name": "tickets_reporter_id_users_id_fk", + "tableFrom": "tickets", + "tableTo": "users", + "columnsFrom": [ + "reporter_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_assignee_id_users_id_fk": { + "name": "tickets_assignee_id_users_id_fk", + "tableFrom": "tickets", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_project_id_projects_id_fk": { + "name": "tickets_project_id_projects_id_fk", + "tableFrom": "tickets", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_sprint_id_sprints_id_fk": { + "name": "tickets_sprint_id_sprints_id_fk", + "tableFrom": "tickets", + "tableTo": "sprints", + "columnsFrom": [ + "sprint_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_release_id_releases_id_fk": { + "name": "tickets_release_id_releases_id_fk", + "tableFrom": "tickets", + "tableTo": "releases", + "columnsFrom": [ + "release_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_parent_ticket_id_tickets_id_fk": { + "name": "tickets_parent_ticket_id_tickets_id_fk", + "tableFrom": "tickets", + "tableTo": "tickets", + "columnsFrom": [ + "parent_ticket_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_rels": { + "name": "tickets_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "labels_id": { + "name": "labels_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tickets_rels_order_idx": { + "name": "tickets_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_parent_idx": { + "name": "tickets_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_path_idx": { + "name": "tickets_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_labels_id_idx": { + "name": "tickets_rels_labels_id_idx", + "columns": [ + { + "expression": "labels_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_rels_parent_fk": { + "name": "tickets_rels_parent_fk", + "tableFrom": "tickets_rels", + "tableTo": "tickets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tickets_rels_labels_fk": { + "name": "tickets_rels_labels_fk", + "tableFrom": "tickets_rels", + "tableTo": "labels", + "columnsFrom": [ + "labels_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ticket_votes": { + "name": "ticket_votes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "ticket_id": { + "name": "ticket_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ticket_votes_ticket_idx": { + "name": "ticket_votes_ticket_idx", + "columns": [ + { + "expression": "ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_user_idx": { + "name": "ticket_votes_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_updated_at_idx": { + "name": "ticket_votes_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_created_at_idx": { + "name": "ticket_votes_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_user_idx": { + "name": "ticket_user_idx", + "columns": [ + { + "expression": "ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ticket_votes_ticket_id_tickets_id_fk": { + "name": "ticket_votes_ticket_id_tickets_id_fk", + "tableFrom": "ticket_votes", + "tableTo": "tickets", + "columnsFrom": [ + "ticket_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ticket_votes_user_id_users_id_fk": { + "name": "ticket_votes_user_id_users_id_fk", + "tableFrom": "ticket_votes", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages": { + "name": "wiki_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_wiki_pages_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "body": { + "name": "body", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "lockdown": { + "name": "lockdown", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locked_by_id": { + "name": "locked_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locked_at": { + "name": "locked_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "last_editor_id": { + "name": "last_editor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_pages_slug_idx": { + "name": "wiki_pages_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_category_idx": { + "name": "wiki_pages_category_idx", + "columns": [ + { + "expression": "category", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_locked_by_idx": { + "name": "wiki_pages_locked_by_idx", + "columns": [ + { + "expression": "locked_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_last_editor_idx": { + "name": "wiki_pages_last_editor_idx", + "columns": [ + { + "expression": "last_editor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_updated_at_idx": { + "name": "wiki_pages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_created_at_idx": { + "name": "wiki_pages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_locked_by_id_users_id_fk": { + "name": "wiki_pages_locked_by_id_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "locked_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "wiki_pages_last_editor_id_users_id_fk": { + "name": "wiki_pages_last_editor_id_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "last_editor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages_texts": { + "name": "wiki_pages_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_pages_texts_order_parent": { + "name": "wiki_pages_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_texts_parent_fk": { + "name": "wiki_pages_texts_parent_fk", + "tableFrom": "wiki_pages_texts", + "tableTo": "wiki_pages", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_revisions": { + "name": "wiki_revisions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "page_id": { + "name": "page_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "revision_number": { + "name": "revision_number", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "title_snapshot": { + "name": "title_snapshot", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "content_snapshot": { + "name": "content_snapshot", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "editor_id": { + "name": "editor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "enum_wiki_revisions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "restored_from_revision": { + "name": "restored_from_revision", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_revisions_page_idx": { + "name": "wiki_revisions_page_idx", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_editor_idx": { + "name": "wiki_revisions_editor_idx", + "columns": [ + { + "expression": "editor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_updated_at_idx": { + "name": "wiki_revisions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_created_at_idx": { + "name": "wiki_revisions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_revisions_page_id_wiki_pages_id_fk": { + "name": "wiki_revisions_page_id_wiki_pages_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "wiki_pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "wiki_revisions_editor_id_users_id_fk": { + "name": "wiki_revisions_editor_id_users_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "users", + "columnsFrom": [ + "editor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_templates": { + "name": "wiki_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "body": { + "name": "body", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "css": { + "name": "css", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "html": { + "name": "html", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_templates_name_idx": { + "name": "wiki_templates_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_templates_updated_at_idx": { + "name": "wiki_templates_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_templates_created_at_idx": { + "name": "wiki_templates_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "lead_id": { + "name": "lead_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_projects_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'active'" + }, + "default_assignee_id": { + "name": "default_assignee_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "projects_key_idx": { + "name": "projects_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_lead_idx": { + "name": "projects_lead_idx", + "columns": [ + { + "expression": "lead_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_default_assignee_idx": { + "name": "projects_default_assignee_idx", + "columns": [ + { + "expression": "default_assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_updated_at_idx": { + "name": "projects_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_created_at_idx": { + "name": "projects_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_lead_id_users_id_fk": { + "name": "projects_lead_id_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "lead_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "projects_default_assignee_id_users_id_fk": { + "name": "projects_default_assignee_id_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "default_assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sprints": { + "name": "sprints", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "goal": { + "name": "goal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_sprints_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'planning'" + }, + "capacity": { + "name": "capacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sprints_project_idx": { + "name": "sprints_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sprints_updated_at_idx": { + "name": "sprints_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sprints_created_at_idx": { + "name": "sprints_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sprints_project_id_projects_id_fk": { + "name": "sprints_project_id_projects_id_fk", + "tableFrom": "sprints", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.releases": { + "name": "releases", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_releases_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "release_date": { + "name": "release_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "target_version": { + "name": "target_version", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "releases_project_idx": { + "name": "releases_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "releases_updated_at_idx": { + "name": "releases_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "releases_created_at_idx": { + "name": "releases_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "releases_project_id_projects_id_fk": { + "name": "releases_project_id_projects_id_fk", + "tableFrom": "releases", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labels": { + "name": "labels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#6366f1'" + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "labels_project_idx": { + "name": "labels_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labels_updated_at_idx": { + "name": "labels_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labels_created_at_idx": { + "name": "labels_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "labels_project_id_projects_id_fk": { + "name": "labels_project_id_projects_id_fk", + "tableFrom": "labels", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maps": { + "name": "maps", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "world_size_width": { + "name": "world_size_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 8192 + }, + "world_size_height": { + "name": "world_size_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 8192 + }, + "basemap_mode": { + "name": "basemap_mode", + "type": "enum_maps_basemap_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'image'" + }, + "basemap_image_id": { + "name": "basemap_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tile_url_template": { + "name": "tile_url_template", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "min_zoom": { + "name": "min_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "max_zoom": { + "name": "max_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 12 + }, + "default_center_x": { + "name": "default_center_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_center_y": { + "name": "default_center_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_zoom": { + "name": "default_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 2 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "maps_name_idx": { + "name": "maps_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_basemap_image_idx": { + "name": "maps_basemap_image_idx", + "columns": [ + { + "expression": "basemap_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_updated_at_idx": { + "name": "maps_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_created_at_idx": { + "name": "maps_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maps_basemap_image_id_media_id_fk": { + "name": "maps_basemap_image_id_media_id_fk", + "tableFrom": "maps", + "tableTo": "media", + "columnsFrom": [ + "basemap_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_roads": { + "name": "map_roads", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "surface": { + "name": "surface", + "type": "enum_map_roads_surface", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'paved'" + }, + "speed_multiplier": { + "name": "speed_multiplier", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "stroke_color": { + "name": "stroke_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stroke_weight": { + "name": "stroke_weight", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 2 + }, + "stroke_style": { + "name": "stroke_style", + "type": "enum_map_roads_stroke_style", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'solid'" + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "points": { + "name": "points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "map_roads_map_idx": { + "name": "map_roads_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_roads_updated_at_idx": { + "name": "map_roads_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_roads_created_at_idx": { + "name": "map_roads_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_roads_map_id_maps_id_fk": { + "name": "map_roads_map_id_maps_id_fk", + "tableFrom": "map_roads", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_zones": { + "name": "map_zones", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_map_zones_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "fill_color": { + "name": "fill_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stroke_color": { + "name": "stroke_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "fill_opacity": { + "name": "fill_opacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "stroke_weight": { + "name": "stroke_weight", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "points": { + "name": "points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "map_zones_map_idx": { + "name": "map_zones_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_updated_at_idx": { + "name": "map_zones_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_created_at_idx": { + "name": "map_zones_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_zones_map_id_maps_id_fk": { + "name": "map_zones_map_id_maps_id_fk", + "tableFrom": "map_zones", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_zones_rels": { + "name": "map_zones_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "map_zones_rels_order_idx": { + "name": "map_zones_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_parent_idx": { + "name": "map_zones_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_path_idx": { + "name": "map_zones_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_resources_id_idx": { + "name": "map_zones_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_zones_rels_parent_fk": { + "name": "map_zones_rels_parent_fk", + "tableFrom": "map_zones_rels", + "tableTo": "map_zones", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "map_zones_rels_resources_fk": { + "name": "map_zones_rels_resources_fk", + "tableFrom": "map_zones_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_nodes": { + "name": "resource_nodes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "position": { + "name": "position", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "richness": { + "name": "richness", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resource_nodes_map_idx": { + "name": "resource_nodes_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_updated_at_idx": { + "name": "resource_nodes_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_created_at_idx": { + "name": "resource_nodes_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_nodes_map_id_maps_id_fk": { + "name": "resource_nodes_map_id_maps_id_fk", + "tableFrom": "resource_nodes", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_nodes_rels": { + "name": "resource_nodes_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "resource_nodes_rels_order_idx": { + "name": "resource_nodes_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_parent_idx": { + "name": "resource_nodes_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_path_idx": { + "name": "resource_nodes_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_resources_id_idx": { + "name": "resource_nodes_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_nodes_rels_parent_fk": { + "name": "resource_nodes_rels_parent_fk", + "tableFrom": "resource_nodes_rels", + "tableTo": "resource_nodes", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "resource_nodes_rels_resources_fk": { + "name": "resource_nodes_rels_resources_fk", + "tableFrom": "resource_nodes_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.narrative_events": { + "name": "narrative_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "flow_data": { + "name": "flow_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "triggers_type": { + "name": "triggers_type", + "type": "enum_narrative_events_triggers_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'manual'" + }, + "triggers_condition": { + "name": "triggers_condition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "narrative_events_updated_at_idx": { + "name": "narrative_events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "narrative_events_created_at_idx": { + "name": "narrative_events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.story_beats": { + "name": "story_beats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occurred_at": { + "name": "occurred_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_story_beats_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'draft'" + }, + "body": { + "name": "body", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "story_beats_status_idx": { + "name": "story_beats_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_mission_idx": { + "name": "story_beats_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_updated_at_idx": { + "name": "story_beats_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_created_at_idx": { + "name": "story_beats_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "story_beats_mission_id_missions_id_fk": { + "name": "story_beats_mission_id_missions_id_fk", + "tableFrom": "story_beats", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.story_beat_states": { + "name": "story_beat_states", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "beat_id": { + "name": "beat_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "read_at": { + "name": "read_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "reaction": { + "name": "reaction", + "type": "enum_story_beat_states_reaction", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "story_beat_states_user_idx": { + "name": "story_beat_states_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_beat_idx": { + "name": "story_beat_states_beat_idx", + "columns": [ + { + "expression": "beat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_updated_at_idx": { + "name": "story_beat_states_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_created_at_idx": { + "name": "story_beat_states_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "story_beat_states_user_id_users_id_fk": { + "name": "story_beat_states_user_id_users_id_fk", + "tableFrom": "story_beat_states", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "story_beat_states_beat_id_story_beats_id_fk": { + "name": "story_beat_states_beat_id_story_beats_id_fk", + "tableFrom": "story_beat_states", + "tableTo": "story_beats", + "columnsFrom": [ + "beat_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mission_files": { + "name": "mission_files", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mission_file_name": { + "name": "mission_file_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mission_files_author_idx": { + "name": "mission_files_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_updated_at_idx": { + "name": "mission_files_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_created_at_idx": { + "name": "mission_files_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_filename_idx": { + "name": "mission_files_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mission_files_author_id_users_id_fk": { + "name": "mission_files_author_id_users_id_fk", + "tableFrom": "mission_files", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mod_lists": { + "name": "mod_lists", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "modlist_name": { + "name": "modlist_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mod_lists_author_idx": { + "name": "mod_lists_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_updated_at_idx": { + "name": "mod_lists_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_created_at_idx": { + "name": "mod_lists_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_filename_idx": { + "name": "mod_lists_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mod_lists_author_id_users_id_fk": { + "name": "mod_lists_author_id_users_id_fk", + "tableFrom": "mod_lists", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_servers": { + "name": "game_servers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_game_servers_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'offline'" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_servers_server_id_idx": { + "name": "game_servers_server_id_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_servers_updated_at_idx": { + "name": "game_servers_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_servers_created_at_idx": { + "name": "game_servers_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.arma_sync_events": { + "name": "arma_sync_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "event_id": { + "name": "event_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occurred_at": { + "name": "occurred_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "arma_sync_events_event_id_idx": { + "name": "arma_sync_events_event_id_idx", + "columns": [ + { + "expression": "event_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_server_idx": { + "name": "arma_sync_events_server_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_type_idx": { + "name": "arma_sync_events_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_updated_at_idx": { + "name": "arma_sync_events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_created_at_idx": { + "name": "arma_sync_events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "arma_sync_events_server_id_game_servers_id_fk": { + "name": "arma_sync_events_server_id_game_servers_id_fk", + "tableFrom": "arma_sync_events", + "tableTo": "game_servers", + "columnsFrom": [ + "server_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.arma_commands": { + "name": "arma_commands", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "command_id": { + "name": "command_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_arma_commands_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'queued'" + }, + "result": { + "name": "result", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "delivered_at": { + "name": "delivered_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "arma_commands_command_id_idx": { + "name": "arma_commands_command_id_idx", + "columns": [ + { + "expression": "command_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_server_idx": { + "name": "arma_commands_server_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_updated_at_idx": { + "name": "arma_commands_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_created_at_idx": { + "name": "arma_commands_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "arma_commands_server_id_game_servers_id_fk": { + "name": "arma_commands_server_id_game_servers_id_fk", + "tableFrom": "arma_commands", + "tableTo": "game_servers", + "columnsFrom": [ + "server_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.respawn_tickets": { + "name": "respawn_tickets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "balance": { + "name": "balance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "respawn_tickets_user_idx": { + "name": "respawn_tickets_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "respawn_tickets_updated_at_idx": { + "name": "respawn_tickets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "respawn_tickets_created_at_idx": { + "name": "respawn_tickets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "respawn_tickets_user_id_users_id_fk": { + "name": "respawn_tickets_user_id_users_id_fk", + "tableFrom": "respawn_tickets", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_minefields": { + "name": "custom_minefields", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rows": { + "name": "rows", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "cols": { + "name": "cols", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "mines": { + "name": "mines", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "mine_count": { + "name": "mine_count", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "published": { + "name": "published", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "expose_edge_mines": { + "name": "expose_edge_mines", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "play_count": { + "name": "play_count", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "creator_xp_bank": { + "name": "creator_xp_bank", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_minefields_author_idx": { + "name": "custom_minefields_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefields_updated_at_idx": { + "name": "custom_minefields_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefields_created_at_idx": { + "name": "custom_minefields_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_minefields_author_id_users_id_fk": { + "name": "custom_minefields_author_id_users_id_fk", + "tableFrom": "custom_minefields", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_minefield_scores": { + "name": "custom_minefield_scores", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "minefield_id": { + "name": "minefield_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "seconds": { + "name": "seconds", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "flags": { + "name": "flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "won": { + "name": "won", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_minefield_scores_minefield_idx": { + "name": "custom_minefield_scores_minefield_idx", + "columns": [ + { + "expression": "minefield_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_user_idx": { + "name": "custom_minefield_scores_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_updated_at_idx": { + "name": "custom_minefield_scores_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_created_at_idx": { + "name": "custom_minefield_scores_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_minefield_scores_minefield_id_custom_minefields_id_fk": { + "name": "custom_minefield_scores_minefield_id_custom_minefields_id_fk", + "tableFrom": "custom_minefield_scores", + "tableTo": "custom_minefields", + "columnsFrom": [ + "minefield_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "custom_minefield_scores_user_id_users_id_fk": { + "name": "custom_minefield_scores_user_id_users_id_fk", + "tableFrom": "custom_minefield_scores", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_radio_tests": { + "name": "custom_radio_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "messages": { + "name": "messages", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "message_count": { + "name": "message_count", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "enum_custom_radio_tests_order", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'fixed'" + }, + "published": { + "name": "published", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "play_count": { + "name": "play_count", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_radio_tests_author_idx": { + "name": "custom_radio_tests_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_tests_updated_at_idx": { + "name": "custom_radio_tests_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_tests_created_at_idx": { + "name": "custom_radio_tests_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_radio_tests_author_id_users_id_fk": { + "name": "custom_radio_tests_author_id_users_id_fk", + "tableFrom": "custom_radio_tests", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_radio_test_scores": { + "name": "custom_radio_test_scores", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_id": { + "name": "test_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "score": { + "name": "score", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "accuracy": { + "name": "accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "correct_messages": { + "name": "correct_messages", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "incorrect_messages": { + "name": "incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "mode": { + "name": "mode", + "type": "enum_custom_radio_test_scores_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "time_ms": { + "name": "time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_radio_test_scores_test_idx": { + "name": "custom_radio_test_scores_test_idx", + "columns": [ + { + "expression": "test_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_user_idx": { + "name": "custom_radio_test_scores_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_updated_at_idx": { + "name": "custom_radio_test_scores_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_created_at_idx": { + "name": "custom_radio_test_scores_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_radio_test_scores_test_id_custom_radio_tests_id_fk": { + "name": "custom_radio_test_scores_test_id_custom_radio_tests_id_fk", + "tableFrom": "custom_radio_test_scores", + "tableTo": "custom_radio_tests", + "columnsFrom": [ + "test_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "custom_radio_test_scores_user_id_users_id_fk": { + "name": "custom_radio_test_scores_user_id_users_id_fk", + "tableFrom": "custom_radio_test_scores", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_ai_instructions_images": { + "name": "plugin_ai_instructions_images", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "plugin_ai_instructions_images_order_idx": { + "name": "plugin_ai_instructions_images_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_images_parent_id_idx": { + "name": "plugin_ai_instructions_images_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_images_image_idx": { + "name": "plugin_ai_instructions_images_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "plugin_ai_instructions_images_image_id_media_id_fk": { + "name": "plugin_ai_instructions_images_image_id_media_id_fk", + "tableFrom": "plugin_ai_instructions_images", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "plugin_ai_instructions_images_parent_id_fk": { + "name": "plugin_ai_instructions_images_parent_id_fk", + "tableFrom": "plugin_ai_instructions_images", + "tableTo": "plugin_ai_instructions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_ai_instructions": { + "name": "plugin_ai_instructions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "schema_path": { + "name": "schema_path", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "field_type": { + "name": "field_type", + "type": "enum_plugin_ai_instructions_field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'text'" + }, + "relation_to": { + "name": "relation_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "model_id": { + "name": "model_id", + "type": "enum_plugin_ai_instructions_model_id", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "disabled": { + "name": "disabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "prompt": { + "name": "prompt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "system": { + "name": "system", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'INSTRUCTIONS:\nYou are a highly skilled and professional blog writer,\nrenowned for crafting engaging and well-organized articles.\nWhen given a title, you meticulously create blogs that are not only\ninformative and accurate but also captivating and beautifully structured.'" + }, + "layout": { + "name": "layout", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'[paragraph] - Write a concise introduction (2-3 sentences) that outlines the main topic.\n[horizontalrule] - Insert a horizontal rule to separate the introduction from the main content.\n[list] - Create a list with 3-5 items. Each list item should contain:\n a. [heading] - A brief, descriptive heading (up to 5 words)\n b. [paragraph] - A short explanation or elaboration (1-2 sentences)\n[horizontalrule] - Insert another horizontal rule to separate the main content from the conclusion.\n[paragraph] - Compose a brief conclusion (2-3 sentences) summarizing the key points.\n[quote] - Include a relevant quote from a famous person, directly related to the topic. Format: \"Quote text.\" - Author Name'" + }, + "unsloth_text_settings_model": { + "name": "unsloth_text_settings_model", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'unsloth/gemma-4-E4B-it-qat-GGUF'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "plugin_ai_instructions_schema_path_idx": { + "name": "plugin_ai_instructions_schema_path_idx", + "columns": [ + { + "expression": "schema_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_updated_at_idx": { + "name": "plugin_ai_instructions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_created_at_idx": { + "name": "plugin_ai_instructions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_mcp_api_keys": { + "name": "payload_mcp_api_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "media_find": { + "name": "media_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_create": { + "name": "media_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_update": { + "name": "media_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_delete": { + "name": "media_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_find": { + "name": "game_hard_resources_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_create": { + "name": "game_hard_resources_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_update": { + "name": "game_hard_resources_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_delete": { + "name": "game_hard_resources_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_find": { + "name": "game_structures_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_create": { + "name": "game_structures_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_update": { + "name": "game_structures_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_delete": { + "name": "game_structures_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_find": { + "name": "game_vehicles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_create": { + "name": "game_vehicles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_update": { + "name": "game_vehicles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_delete": { + "name": "game_vehicles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_find": { + "name": "game_npcs_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_create": { + "name": "game_npcs_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_update": { + "name": "game_npcs_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_delete": { + "name": "game_npcs_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_find": { + "name": "npc_staffing_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_create": { + "name": "npc_staffing_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_update": { + "name": "npc_staffing_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_delete": { + "name": "npc_staffing_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_find": { + "name": "labor_classifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_create": { + "name": "labor_classifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_update": { + "name": "labor_classifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_delete": { + "name": "labor_classifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_find": { + "name": "game_event_logs_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_create": { + "name": "game_event_logs_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_update": { + "name": "game_event_logs_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_delete": { + "name": "game_event_logs_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_find": { + "name": "users_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_create": { + "name": "users_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_update": { + "name": "users_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_delete": { + "name": "users_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_find": { + "name": "roles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_create": { + "name": "roles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_update": { + "name": "roles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_delete": { + "name": "roles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_find": { + "name": "ranks_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_create": { + "name": "ranks_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_update": { + "name": "ranks_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_delete": { + "name": "ranks_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_find": { + "name": "profiles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_create": { + "name": "profiles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_update": { + "name": "profiles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_delete": { + "name": "profiles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_find": { + "name": "awards_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_create": { + "name": "awards_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_update": { + "name": "awards_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_delete": { + "name": "awards_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_find": { + "name": "qualifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_create": { + "name": "qualifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_update": { + "name": "qualifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_delete": { + "name": "qualifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_find": { + "name": "assignments_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_create": { + "name": "assignments_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_update": { + "name": "assignments_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_delete": { + "name": "assignments_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_find": { + "name": "assignment_transfers_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_create": { + "name": "assignment_transfers_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_update": { + "name": "assignment_transfers_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_delete": { + "name": "assignment_transfers_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_find": { + "name": "experience_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_create": { + "name": "experience_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_update": { + "name": "experience_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_delete": { + "name": "experience_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_find": { + "name": "user_notifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_create": { + "name": "user_notifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_update": { + "name": "user_notifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_delete": { + "name": "user_notifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_find": { + "name": "evaluations_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_create": { + "name": "evaluations_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_update": { + "name": "evaluations_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_delete": { + "name": "evaluations_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_find": { + "name": "ribbon_submissions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_create": { + "name": "ribbon_submissions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_update": { + "name": "ribbon_submissions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_delete": { + "name": "ribbon_submissions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_find": { + "name": "missions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_create": { + "name": "missions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_update": { + "name": "missions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_delete": { + "name": "missions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_find": { + "name": "mission_attendances_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_create": { + "name": "mission_attendances_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_update": { + "name": "mission_attendances_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_delete": { + "name": "mission_attendances_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_find": { + "name": "campaigns_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_create": { + "name": "campaigns_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_update": { + "name": "campaigns_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_delete": { + "name": "campaigns_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_find": { + "name": "factions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_create": { + "name": "factions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_update": { + "name": "factions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_delete": { + "name": "factions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_find": { + "name": "technologies_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_create": { + "name": "technologies_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_update": { + "name": "technologies_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_delete": { + "name": "technologies_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_find": { + "name": "assets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_create": { + "name": "assets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_update": { + "name": "assets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_delete": { + "name": "assets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_find": { + "name": "resources_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_create": { + "name": "resources_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_update": { + "name": "resources_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_delete": { + "name": "resources_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_find": { + "name": "vehicles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_create": { + "name": "vehicles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_update": { + "name": "vehicles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_delete": { + "name": "vehicles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_find": { + "name": "structures_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_create": { + "name": "structures_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_update": { + "name": "structures_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_delete": { + "name": "structures_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_find": { + "name": "shipments_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_create": { + "name": "shipments_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_update": { + "name": "shipments_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_delete": { + "name": "shipments_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_find": { + "name": "bank_accounts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_create": { + "name": "bank_accounts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_update": { + "name": "bank_accounts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_delete": { + "name": "bank_accounts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_find": { + "name": "bank_transactions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_create": { + "name": "bank_transactions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_update": { + "name": "bank_transactions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_delete": { + "name": "bank_transactions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_find": { + "name": "ledger_entries_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_create": { + "name": "ledger_entries_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_update": { + "name": "ledger_entries_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_delete": { + "name": "ledger_entries_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_find": { + "name": "locker_storages_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_create": { + "name": "locker_storages_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_update": { + "name": "locker_storages_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_delete": { + "name": "locker_storages_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_find": { + "name": "loadouts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_create": { + "name": "loadouts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_update": { + "name": "loadouts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_delete": { + "name": "loadouts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_find": { + "name": "market_listings_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_create": { + "name": "market_listings_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_update": { + "name": "market_listings_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_delete": { + "name": "market_listings_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_find": { + "name": "market_negotiations_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_create": { + "name": "market_negotiations_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_update": { + "name": "market_negotiations_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_delete": { + "name": "market_negotiations_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_find": { + "name": "market_state_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_create": { + "name": "market_state_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_update": { + "name": "market_state_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_delete": { + "name": "market_state_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_find": { + "name": "voice_scripts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_create": { + "name": "voice_scripts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_update": { + "name": "voice_scripts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_delete": { + "name": "voice_scripts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_find": { + "name": "voice_submissions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_create": { + "name": "voice_submissions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_update": { + "name": "voice_submissions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_delete": { + "name": "voice_submissions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_find": { + "name": "tickets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_create": { + "name": "tickets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_update": { + "name": "tickets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_delete": { + "name": "tickets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_find": { + "name": "ticket_votes_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_create": { + "name": "ticket_votes_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_update": { + "name": "ticket_votes_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_delete": { + "name": "ticket_votes_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_find": { + "name": "wiki_pages_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_create": { + "name": "wiki_pages_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_update": { + "name": "wiki_pages_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_delete": { + "name": "wiki_pages_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_find": { + "name": "wiki_revisions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_create": { + "name": "wiki_revisions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_update": { + "name": "wiki_revisions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_delete": { + "name": "wiki_revisions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_find": { + "name": "wiki_templates_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_create": { + "name": "wiki_templates_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_update": { + "name": "wiki_templates_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_delete": { + "name": "wiki_templates_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_find": { + "name": "projects_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_create": { + "name": "projects_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_update": { + "name": "projects_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_delete": { + "name": "projects_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_find": { + "name": "sprints_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_create": { + "name": "sprints_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_update": { + "name": "sprints_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_delete": { + "name": "sprints_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_find": { + "name": "releases_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_create": { + "name": "releases_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_update": { + "name": "releases_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_delete": { + "name": "releases_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_find": { + "name": "labels_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_create": { + "name": "labels_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_update": { + "name": "labels_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_delete": { + "name": "labels_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_find": { + "name": "maps_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_create": { + "name": "maps_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_update": { + "name": "maps_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_delete": { + "name": "maps_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_find": { + "name": "map_roads_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_create": { + "name": "map_roads_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_update": { + "name": "map_roads_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_delete": { + "name": "map_roads_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_find": { + "name": "map_zones_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_create": { + "name": "map_zones_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_update": { + "name": "map_zones_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_delete": { + "name": "map_zones_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_find": { + "name": "resource_nodes_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_create": { + "name": "resource_nodes_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_update": { + "name": "resource_nodes_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_delete": { + "name": "resource_nodes_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_find": { + "name": "narrative_events_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_create": { + "name": "narrative_events_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_update": { + "name": "narrative_events_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_delete": { + "name": "narrative_events_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_find": { + "name": "story_beats_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_create": { + "name": "story_beats_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_update": { + "name": "story_beats_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_delete": { + "name": "story_beats_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_find": { + "name": "story_beat_states_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_create": { + "name": "story_beat_states_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_update": { + "name": "story_beat_states_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_delete": { + "name": "story_beat_states_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_find": { + "name": "mission_files_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_create": { + "name": "mission_files_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_update": { + "name": "mission_files_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_delete": { + "name": "mission_files_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_find": { + "name": "mod_lists_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_create": { + "name": "mod_lists_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_update": { + "name": "mod_lists_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_delete": { + "name": "mod_lists_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_find": { + "name": "game_servers_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_create": { + "name": "game_servers_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_update": { + "name": "game_servers_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_delete": { + "name": "game_servers_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_find": { + "name": "arma_sync_events_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_create": { + "name": "arma_sync_events_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_update": { + "name": "arma_sync_events_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_delete": { + "name": "arma_sync_events_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_find": { + "name": "arma_commands_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_create": { + "name": "arma_commands_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_update": { + "name": "arma_commands_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_delete": { + "name": "arma_commands_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_find": { + "name": "respawn_tickets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_create": { + "name": "respawn_tickets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_update": { + "name": "respawn_tickets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_delete": { + "name": "respawn_tickets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_find": { + "name": "custom_minefields_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_create": { + "name": "custom_minefields_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_update": { + "name": "custom_minefields_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_delete": { + "name": "custom_minefields_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_find": { + "name": "custom_minefield_scores_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_create": { + "name": "custom_minefield_scores_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_update": { + "name": "custom_minefield_scores_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_delete": { + "name": "custom_minefield_scores_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_find": { + "name": "custom_radio_tests_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_create": { + "name": "custom_radio_tests_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_update": { + "name": "custom_radio_tests_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_delete": { + "name": "custom_radio_tests_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_find": { + "name": "custom_radio_test_scores_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_create": { + "name": "custom_radio_test_scores_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_update": { + "name": "custom_radio_test_scores_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_delete": { + "name": "custom_radio_test_scores_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "enable_a_p_i_key": { + "name": "enable_a_p_i_key", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "api_key": { + "name": "api_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "api_key_index": { + "name": "api_key_index", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_mcp_api_keys_user_idx": { + "name": "payload_mcp_api_keys_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_mcp_api_keys_updated_at_idx": { + "name": "payload_mcp_api_keys_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_mcp_api_keys_created_at_idx": { + "name": "payload_mcp_api_keys_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_mcp_api_keys_user_id_users_id_fk": { + "name": "payload_mcp_api_keys_user_id_users_id_fk", + "tableFrom": "payload_mcp_api_keys", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_kv": { + "name": "payload_kv", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "payload_kv_key_idx": { + "name": "payload_kv_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents": { + "name": "payload_locked_documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "global_slug": { + "name": "global_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_locked_documents_global_slug_idx": { + "name": "payload_locked_documents_global_slug_idx", + "columns": [ + { + "expression": "global_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_updated_at_idx": { + "name": "payload_locked_documents_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_created_at_idx": { + "name": "payload_locked_documents_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents_rels": { + "name": "payload_locked_documents_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_hard_resources_id": { + "name": "game_hard_resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_structures_id": { + "name": "game_structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_vehicles_id": { + "name": "game_vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_npcs_id": { + "name": "game_npcs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "npc_staffing_id": { + "name": "npc_staffing_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "labor_classifications_id": { + "name": "labor_classifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_event_logs_id": { + "name": "game_event_logs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ranks_id": { + "name": "ranks_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "profiles_id": { + "name": "profiles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "awards_id": { + "name": "awards_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assignment_transfers_id": { + "name": "assignment_transfers_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "experience_id": { + "name": "experience_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "user_notifications_id": { + "name": "user_notifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "evaluations_id": { + "name": "evaluations_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ribbon_submissions_id": { + "name": "ribbon_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "missions_id": { + "name": "missions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mission_attendances_id": { + "name": "mission_attendances_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "factions_id": { + "name": "factions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shipments_id": { + "name": "shipments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bank_accounts_id": { + "name": "bank_accounts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bank_transactions_id": { + "name": "bank_transactions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ledger_entries_id": { + "name": "ledger_entries_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locker_storages_id": { + "name": "locker_storages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "loadouts_id": { + "name": "loadouts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_listings_id": { + "name": "market_listings_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_negotiations_id": { + "name": "market_negotiations_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_state_id": { + "name": "market_state_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voice_scripts_id": { + "name": "voice_scripts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voice_submissions_id": { + "name": "voice_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tickets_id": { + "name": "tickets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ticket_votes_id": { + "name": "ticket_votes_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_pages_id": { + "name": "wiki_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_revisions_id": { + "name": "wiki_revisions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_templates_id": { + "name": "wiki_templates_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "projects_id": { + "name": "projects_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sprints_id": { + "name": "sprints_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "releases_id": { + "name": "releases_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "labels_id": { + "name": "labels_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maps_id": { + "name": "maps_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_roads_id": { + "name": "map_roads_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_zones_id": { + "name": "map_zones_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resource_nodes_id": { + "name": "resource_nodes_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "narrative_events_id": { + "name": "narrative_events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "story_beats_id": { + "name": "story_beats_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "story_beat_states_id": { + "name": "story_beat_states_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mission_files_id": { + "name": "mission_files_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mod_lists_id": { + "name": "mod_lists_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_servers_id": { + "name": "game_servers_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "arma_sync_events_id": { + "name": "arma_sync_events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "arma_commands_id": { + "name": "arma_commands_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "respawn_tickets_id": { + "name": "respawn_tickets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_minefields_id": { + "name": "custom_minefields_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_minefield_scores_id": { + "name": "custom_minefield_scores_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_radio_tests_id": { + "name": "custom_radio_tests_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_radio_test_scores_id": { + "name": "custom_radio_test_scores_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "plugin_ai_instructions_id": { + "name": "plugin_ai_instructions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "payload_mcp_api_keys_id": { + "name": "payload_mcp_api_keys_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_locked_documents_rels_order_idx": { + "name": "payload_locked_documents_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_parent_idx": { + "name": "payload_locked_documents_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_path_idx": { + "name": "payload_locked_documents_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_media_id_idx": { + "name": "payload_locked_documents_rels_media_id_idx", + "columns": [ + { + "expression": "media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_hard_resources_id_idx": { + "name": "payload_locked_documents_rels_game_hard_resources_id_idx", + "columns": [ + { + "expression": "game_hard_resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_structures_id_idx": { + "name": "payload_locked_documents_rels_game_structures_id_idx", + "columns": [ + { + "expression": "game_structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_vehicles_id_idx": { + "name": "payload_locked_documents_rels_game_vehicles_id_idx", + "columns": [ + { + "expression": "game_vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_npcs_id_idx": { + "name": "payload_locked_documents_rels_game_npcs_id_idx", + "columns": [ + { + "expression": "game_npcs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_npc_staffing_id_idx": { + "name": "payload_locked_documents_rels_npc_staffing_id_idx", + "columns": [ + { + "expression": "npc_staffing_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_labor_classifications_id_idx": { + "name": "payload_locked_documents_rels_labor_classifications_id_idx", + "columns": [ + { + "expression": "labor_classifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_event_logs_id_idx": { + "name": "payload_locked_documents_rels_game_event_logs_id_idx", + "columns": [ + { + "expression": "game_event_logs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_users_id_idx": { + "name": "payload_locked_documents_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_roles_id_idx": { + "name": "payload_locked_documents_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ranks_id_idx": { + "name": "payload_locked_documents_rels_ranks_id_idx", + "columns": [ + { + "expression": "ranks_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_profiles_id_idx": { + "name": "payload_locked_documents_rels_profiles_id_idx", + "columns": [ + { + "expression": "profiles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_awards_id_idx": { + "name": "payload_locked_documents_rels_awards_id_idx", + "columns": [ + { + "expression": "awards_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_qualifications_id_idx": { + "name": "payload_locked_documents_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assignments_id_idx": { + "name": "payload_locked_documents_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assignment_transfers_id_idx": { + "name": "payload_locked_documents_rels_assignment_transfers_id_idx", + "columns": [ + { + "expression": "assignment_transfers_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_experience_id_idx": { + "name": "payload_locked_documents_rels_experience_id_idx", + "columns": [ + { + "expression": "experience_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_user_notifications_id_idx": { + "name": "payload_locked_documents_rels_user_notifications_id_idx", + "columns": [ + { + "expression": "user_notifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_evaluations_id_idx": { + "name": "payload_locked_documents_rels_evaluations_id_idx", + "columns": [ + { + "expression": "evaluations_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ribbon_submissions_id_idx": { + "name": "payload_locked_documents_rels_ribbon_submissions_id_idx", + "columns": [ + { + "expression": "ribbon_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_missions_id_idx": { + "name": "payload_locked_documents_rels_missions_id_idx", + "columns": [ + { + "expression": "missions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mission_attendances_id_idx": { + "name": "payload_locked_documents_rels_mission_attendances_id_idx", + "columns": [ + { + "expression": "mission_attendances_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_campaigns_id_idx": { + "name": "payload_locked_documents_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_factions_id_idx": { + "name": "payload_locked_documents_rels_factions_id_idx", + "columns": [ + { + "expression": "factions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_technologies_id_idx": { + "name": "payload_locked_documents_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assets_id_idx": { + "name": "payload_locked_documents_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_resources_id_idx": { + "name": "payload_locked_documents_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_vehicles_id_idx": { + "name": "payload_locked_documents_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_structures_id_idx": { + "name": "payload_locked_documents_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_shipments_id_idx": { + "name": "payload_locked_documents_rels_shipments_id_idx", + "columns": [ + { + "expression": "shipments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_bank_accounts_id_idx": { + "name": "payload_locked_documents_rels_bank_accounts_id_idx", + "columns": [ + { + "expression": "bank_accounts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_bank_transactions_id_idx": { + "name": "payload_locked_documents_rels_bank_transactions_id_idx", + "columns": [ + { + "expression": "bank_transactions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ledger_entries_id_idx": { + "name": "payload_locked_documents_rels_ledger_entries_id_idx", + "columns": [ + { + "expression": "ledger_entries_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_locker_storages_id_idx": { + "name": "payload_locked_documents_rels_locker_storages_id_idx", + "columns": [ + { + "expression": "locker_storages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_loadouts_id_idx": { + "name": "payload_locked_documents_rels_loadouts_id_idx", + "columns": [ + { + "expression": "loadouts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_listings_id_idx": { + "name": "payload_locked_documents_rels_market_listings_id_idx", + "columns": [ + { + "expression": "market_listings_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_negotiations_id_idx": { + "name": "payload_locked_documents_rels_market_negotiations_id_idx", + "columns": [ + { + "expression": "market_negotiations_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_state_id_idx": { + "name": "payload_locked_documents_rels_market_state_id_idx", + "columns": [ + { + "expression": "market_state_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_voice_scripts_id_idx": { + "name": "payload_locked_documents_rels_voice_scripts_id_idx", + "columns": [ + { + "expression": "voice_scripts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_voice_submissions_id_idx": { + "name": "payload_locked_documents_rels_voice_submissions_id_idx", + "columns": [ + { + "expression": "voice_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_tickets_id_idx": { + "name": "payload_locked_documents_rels_tickets_id_idx", + "columns": [ + { + "expression": "tickets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ticket_votes_id_idx": { + "name": "payload_locked_documents_rels_ticket_votes_id_idx", + "columns": [ + { + "expression": "ticket_votes_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_pages_id_idx": { + "name": "payload_locked_documents_rels_wiki_pages_id_idx", + "columns": [ + { + "expression": "wiki_pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_revisions_id_idx": { + "name": "payload_locked_documents_rels_wiki_revisions_id_idx", + "columns": [ + { + "expression": "wiki_revisions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_templates_id_idx": { + "name": "payload_locked_documents_rels_wiki_templates_id_idx", + "columns": [ + { + "expression": "wiki_templates_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_projects_id_idx": { + "name": "payload_locked_documents_rels_projects_id_idx", + "columns": [ + { + "expression": "projects_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_sprints_id_idx": { + "name": "payload_locked_documents_rels_sprints_id_idx", + "columns": [ + { + "expression": "sprints_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_releases_id_idx": { + "name": "payload_locked_documents_rels_releases_id_idx", + "columns": [ + { + "expression": "releases_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_labels_id_idx": { + "name": "payload_locked_documents_rels_labels_id_idx", + "columns": [ + { + "expression": "labels_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_maps_id_idx": { + "name": "payload_locked_documents_rels_maps_id_idx", + "columns": [ + { + "expression": "maps_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_map_roads_id_idx": { + "name": "payload_locked_documents_rels_map_roads_id_idx", + "columns": [ + { + "expression": "map_roads_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_map_zones_id_idx": { + "name": "payload_locked_documents_rels_map_zones_id_idx", + "columns": [ + { + "expression": "map_zones_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_resource_nodes_id_idx": { + "name": "payload_locked_documents_rels_resource_nodes_id_idx", + "columns": [ + { + "expression": "resource_nodes_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_narrative_events_id_idx": { + "name": "payload_locked_documents_rels_narrative_events_id_idx", + "columns": [ + { + "expression": "narrative_events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_story_beats_id_idx": { + "name": "payload_locked_documents_rels_story_beats_id_idx", + "columns": [ + { + "expression": "story_beats_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_story_beat_states_id_idx": { + "name": "payload_locked_documents_rels_story_beat_states_id_idx", + "columns": [ + { + "expression": "story_beat_states_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mission_files_id_idx": { + "name": "payload_locked_documents_rels_mission_files_id_idx", + "columns": [ + { + "expression": "mission_files_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mod_lists_id_idx": { + "name": "payload_locked_documents_rels_mod_lists_id_idx", + "columns": [ + { + "expression": "mod_lists_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_servers_id_idx": { + "name": "payload_locked_documents_rels_game_servers_id_idx", + "columns": [ + { + "expression": "game_servers_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_arma_sync_events_id_idx": { + "name": "payload_locked_documents_rels_arma_sync_events_id_idx", + "columns": [ + { + "expression": "arma_sync_events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_arma_commands_id_idx": { + "name": "payload_locked_documents_rels_arma_commands_id_idx", + "columns": [ + { + "expression": "arma_commands_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_respawn_tickets_id_idx": { + "name": "payload_locked_documents_rels_respawn_tickets_id_idx", + "columns": [ + { + "expression": "respawn_tickets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_minefields_id_idx": { + "name": "payload_locked_documents_rels_custom_minefields_id_idx", + "columns": [ + { + "expression": "custom_minefields_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_minefield_scores_id_idx": { + "name": "payload_locked_documents_rels_custom_minefield_scores_id_idx", + "columns": [ + { + "expression": "custom_minefield_scores_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_radio_tests_id_idx": { + "name": "payload_locked_documents_rels_custom_radio_tests_id_idx", + "columns": [ + { + "expression": "custom_radio_tests_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_radio_test_scores_i_idx": { + "name": "payload_locked_documents_rels_custom_radio_test_scores_i_idx", + "columns": [ + { + "expression": "custom_radio_test_scores_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_plugin_ai_instructions_id_idx": { + "name": "payload_locked_documents_rels_plugin_ai_instructions_id_idx", + "columns": [ + { + "expression": "plugin_ai_instructions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_payload_mcp_api_keys_id_idx": { + "name": "payload_locked_documents_rels_payload_mcp_api_keys_id_idx", + "columns": [ + { + "expression": "payload_mcp_api_keys_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_locked_documents_rels_parent_fk": { + "name": "payload_locked_documents_rels_parent_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_locked_documents", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_media_fk": { + "name": "payload_locked_documents_rels_media_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_hard_resources_fk": { + "name": "payload_locked_documents_rels_game_hard_resources_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_hard_resources", + "columnsFrom": [ + "game_hard_resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_structures_fk": { + "name": "payload_locked_documents_rels_game_structures_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_structures", + "columnsFrom": [ + "game_structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_vehicles_fk": { + "name": "payload_locked_documents_rels_game_vehicles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_vehicles", + "columnsFrom": [ + "game_vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_npcs_fk": { + "name": "payload_locked_documents_rels_game_npcs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_npcs", + "columnsFrom": [ + "game_npcs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_npc_staffing_fk": { + "name": "payload_locked_documents_rels_npc_staffing_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "npc_staffing", + "columnsFrom": [ + "npc_staffing_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_labor_classifications_fk": { + "name": "payload_locked_documents_rels_labor_classifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "labor_classifications", + "columnsFrom": [ + "labor_classifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_event_logs_fk": { + "name": "payload_locked_documents_rels_game_event_logs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_event_logs", + "columnsFrom": [ + "game_event_logs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_users_fk": { + "name": "payload_locked_documents_rels_users_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_roles_fk": { + "name": "payload_locked_documents_rels_roles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ranks_fk": { + "name": "payload_locked_documents_rels_ranks_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ranks", + "columnsFrom": [ + "ranks_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_profiles_fk": { + "name": "payload_locked_documents_rels_profiles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "profiles", + "columnsFrom": [ + "profiles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_awards_fk": { + "name": "payload_locked_documents_rels_awards_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "awards", + "columnsFrom": [ + "awards_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_qualifications_fk": { + "name": "payload_locked_documents_rels_qualifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assignments_fk": { + "name": "payload_locked_documents_rels_assignments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assignment_transfers_fk": { + "name": "payload_locked_documents_rels_assignment_transfers_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assignment_transfers", + "columnsFrom": [ + "assignment_transfers_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_experience_fk": { + "name": "payload_locked_documents_rels_experience_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "experience", + "columnsFrom": [ + "experience_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_user_notifications_fk": { + "name": "payload_locked_documents_rels_user_notifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "user_notifications", + "columnsFrom": [ + "user_notifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_evaluations_fk": { + "name": "payload_locked_documents_rels_evaluations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "evaluations", + "columnsFrom": [ + "evaluations_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ribbon_submissions_fk": { + "name": "payload_locked_documents_rels_ribbon_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ribbon_submissions", + "columnsFrom": [ + "ribbon_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_missions_fk": { + "name": "payload_locked_documents_rels_missions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "missions", + "columnsFrom": [ + "missions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mission_attendances_fk": { + "name": "payload_locked_documents_rels_mission_attendances_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mission_attendances", + "columnsFrom": [ + "mission_attendances_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_campaigns_fk": { + "name": "payload_locked_documents_rels_campaigns_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_factions_fk": { + "name": "payload_locked_documents_rels_factions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "factions", + "columnsFrom": [ + "factions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_technologies_fk": { + "name": "payload_locked_documents_rels_technologies_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assets_fk": { + "name": "payload_locked_documents_rels_assets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_resources_fk": { + "name": "payload_locked_documents_rels_resources_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_vehicles_fk": { + "name": "payload_locked_documents_rels_vehicles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_structures_fk": { + "name": "payload_locked_documents_rels_structures_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_shipments_fk": { + "name": "payload_locked_documents_rels_shipments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "shipments", + "columnsFrom": [ + "shipments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_bank_accounts_fk": { + "name": "payload_locked_documents_rels_bank_accounts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "bank_accounts", + "columnsFrom": [ + "bank_accounts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_bank_transactions_fk": { + "name": "payload_locked_documents_rels_bank_transactions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "bank_transactions", + "columnsFrom": [ + "bank_transactions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ledger_entries_fk": { + "name": "payload_locked_documents_rels_ledger_entries_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ledger_entries", + "columnsFrom": [ + "ledger_entries_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_locker_storages_fk": { + "name": "payload_locked_documents_rels_locker_storages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "locker_storages", + "columnsFrom": [ + "locker_storages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_loadouts_fk": { + "name": "payload_locked_documents_rels_loadouts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "loadouts", + "columnsFrom": [ + "loadouts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_listings_fk": { + "name": "payload_locked_documents_rels_market_listings_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_listings", + "columnsFrom": [ + "market_listings_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_negotiations_fk": { + "name": "payload_locked_documents_rels_market_negotiations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_negotiations", + "columnsFrom": [ + "market_negotiations_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_state_fk": { + "name": "payload_locked_documents_rels_market_state_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_state", + "columnsFrom": [ + "market_state_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_voice_scripts_fk": { + "name": "payload_locked_documents_rels_voice_scripts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "voice_scripts", + "columnsFrom": [ + "voice_scripts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_voice_submissions_fk": { + "name": "payload_locked_documents_rels_voice_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "voice_submissions", + "columnsFrom": [ + "voice_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_tickets_fk": { + "name": "payload_locked_documents_rels_tickets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "tickets", + "columnsFrom": [ + "tickets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ticket_votes_fk": { + "name": "payload_locked_documents_rels_ticket_votes_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ticket_votes", + "columnsFrom": [ + "ticket_votes_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_pages_fk": { + "name": "payload_locked_documents_rels_wiki_pages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_pages", + "columnsFrom": [ + "wiki_pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_revisions_fk": { + "name": "payload_locked_documents_rels_wiki_revisions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_revisions", + "columnsFrom": [ + "wiki_revisions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_templates_fk": { + "name": "payload_locked_documents_rels_wiki_templates_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_templates", + "columnsFrom": [ + "wiki_templates_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_projects_fk": { + "name": "payload_locked_documents_rels_projects_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "projects", + "columnsFrom": [ + "projects_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_sprints_fk": { + "name": "payload_locked_documents_rels_sprints_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "sprints", + "columnsFrom": [ + "sprints_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_releases_fk": { + "name": "payload_locked_documents_rels_releases_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "releases", + "columnsFrom": [ + "releases_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_labels_fk": { + "name": "payload_locked_documents_rels_labels_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "labels", + "columnsFrom": [ + "labels_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_maps_fk": { + "name": "payload_locked_documents_rels_maps_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "maps", + "columnsFrom": [ + "maps_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_map_roads_fk": { + "name": "payload_locked_documents_rels_map_roads_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "map_roads", + "columnsFrom": [ + "map_roads_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_map_zones_fk": { + "name": "payload_locked_documents_rels_map_zones_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "map_zones", + "columnsFrom": [ + "map_zones_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_resource_nodes_fk": { + "name": "payload_locked_documents_rels_resource_nodes_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "resource_nodes", + "columnsFrom": [ + "resource_nodes_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_narrative_events_fk": { + "name": "payload_locked_documents_rels_narrative_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "narrative_events", + "columnsFrom": [ + "narrative_events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_story_beats_fk": { + "name": "payload_locked_documents_rels_story_beats_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "story_beats", + "columnsFrom": [ + "story_beats_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_story_beat_states_fk": { + "name": "payload_locked_documents_rels_story_beat_states_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "story_beat_states", + "columnsFrom": [ + "story_beat_states_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mission_files_fk": { + "name": "payload_locked_documents_rels_mission_files_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mission_files", + "columnsFrom": [ + "mission_files_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mod_lists_fk": { + "name": "payload_locked_documents_rels_mod_lists_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mod_lists", + "columnsFrom": [ + "mod_lists_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_servers_fk": { + "name": "payload_locked_documents_rels_game_servers_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_servers", + "columnsFrom": [ + "game_servers_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_arma_sync_events_fk": { + "name": "payload_locked_documents_rels_arma_sync_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "arma_sync_events", + "columnsFrom": [ + "arma_sync_events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_arma_commands_fk": { + "name": "payload_locked_documents_rels_arma_commands_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "arma_commands", + "columnsFrom": [ + "arma_commands_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_respawn_tickets_fk": { + "name": "payload_locked_documents_rels_respawn_tickets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "respawn_tickets", + "columnsFrom": [ + "respawn_tickets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_minefields_fk": { + "name": "payload_locked_documents_rels_custom_minefields_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_minefields", + "columnsFrom": [ + "custom_minefields_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_minefield_scores_fk": { + "name": "payload_locked_documents_rels_custom_minefield_scores_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_minefield_scores", + "columnsFrom": [ + "custom_minefield_scores_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_radio_tests_fk": { + "name": "payload_locked_documents_rels_custom_radio_tests_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_radio_tests", + "columnsFrom": [ + "custom_radio_tests_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_radio_test_scores_fk": { + "name": "payload_locked_documents_rels_custom_radio_test_scores_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_radio_test_scores", + "columnsFrom": [ + "custom_radio_test_scores_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_plugin_ai_instructions_fk": { + "name": "payload_locked_documents_rels_plugin_ai_instructions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "plugin_ai_instructions", + "columnsFrom": [ + "plugin_ai_instructions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_payload_mcp_api_keys_fk": { + "name": "payload_locked_documents_rels_payload_mcp_api_keys_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_mcp_api_keys", + "columnsFrom": [ + "payload_mcp_api_keys_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences": { + "name": "payload_preferences", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "value": { + "name": "value", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_preferences_key_idx": { + "name": "payload_preferences_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_updated_at_idx": { + "name": "payload_preferences_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_created_at_idx": { + "name": "payload_preferences_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences_rels": { + "name": "payload_preferences_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "payload_mcp_api_keys_id": { + "name": "payload_mcp_api_keys_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_preferences_rels_order_idx": { + "name": "payload_preferences_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_parent_idx": { + "name": "payload_preferences_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_path_idx": { + "name": "payload_preferences_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_users_id_idx": { + "name": "payload_preferences_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_payload_mcp_api_keys_id_idx": { + "name": "payload_preferences_rels_payload_mcp_api_keys_id_idx", + "columns": [ + { + "expression": "payload_mcp_api_keys_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_preferences_rels_parent_fk": { + "name": "payload_preferences_rels_parent_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_preferences", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_users_fk": { + "name": "payload_preferences_rels_users_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_payload_mcp_api_keys_fk": { + "name": "payload_preferences_rels_payload_mcp_api_keys_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_mcp_api_keys", + "columnsFrom": [ + "payload_mcp_api_keys_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_migrations": { + "name": "payload_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "batch": { + "name": "batch", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_migrations_updated_at_idx": { + "name": "payload_migrations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_migrations_created_at_idx": { + "name": "payload_migrations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_rules": { + "name": "game_rules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "main_currency_id": { + "name": "main_currency_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "currency_name": { + "name": "currency_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_symbol": { + "name": "currency_symbol", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_singular": { + "name": "currency_singular", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_plural": { + "name": "currency_plural", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_denomination": { + "name": "currency_denomination", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "proximity_threshold": { + "name": "proximity_threshold", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1000 + }, + "game_tick_interval_minutes": { + "name": "game_tick_interval_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "locker_grid_width": { + "name": "locker_grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "locker_grid_height": { + "name": "locker_grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 6 + }, + "staff_hiring_enabled": { + "name": "staff_hiring_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "staff_hiring_disabled_message": { + "name": "staff_hiring_disabled_message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "economy_default_price_band": { + "name": "economy_default_price_band", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.5 + }, + "economy_real_demand_window_ticks": { + "name": "economy_real_demand_window_ticks", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 24 + }, + "economy_real_demand_decay": { + "name": "economy_real_demand_decay", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.5 + }, + "economy_artificial_demand_drift": { + "name": "economy_artificial_demand_drift", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.05 + }, + "economy_cold_start_observations": { + "name": "economy_cold_start_observations", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 5 + }, + "economy_tick_interval_hint_minutes": { + "name": "economy_tick_interval_hint_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 60 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_rules_main_currency_idx": { + "name": "game_rules_main_currency_idx", + "columns": [ + { + "expression": "main_currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_rules_main_currency_id_resources_id_fk": { + "name": "game_rules_main_currency_id_resources_id_fk", + "tableFrom": "game_rules", + "tableTo": "resources", + "columnsFrom": [ + "main_currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_rules_rels": { + "name": "game_rules_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_rules_rels_order_idx": { + "name": "game_rules_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_parent_idx": { + "name": "game_rules_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_path_idx": { + "name": "game_rules_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_assignments_id_idx": { + "name": "game_rules_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_rules_rels_parent_fk": { + "name": "game_rules_rels_parent_fk", + "tableFrom": "game_rules_rels", + "tableTo": "game_rules", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "game_rules_rels_assignments_fk": { + "name": "game_rules_rels_assignments_fk", + "tableFrom": "game_rules_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_shims_targeting_roles": { + "name": "shims_shims_targeting_roles", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_shims_shims_targeting_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "shims_shims_targeting_roles_order_idx": { + "name": "shims_shims_targeting_roles_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_targeting_roles_parent_idx": { + "name": "shims_shims_targeting_roles_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_shims_targeting_roles_parent_fk": { + "name": "shims_shims_targeting_roles_parent_fk", + "tableFrom": "shims_shims_targeting_roles", + "tableTo": "shims_shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_shims": { + "name": "shims_shims", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "type": { + "name": "type", + "type": "enum_shims_shims_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'css'" + }, + "content": { + "name": "content", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "targeting_audience": { + "name": "targeting_audience", + "type": "enum_shims_shims_targeting_audience", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'all'" + }, + "targeting_percentage": { + "name": "targeting_percentage", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "paths_match_type": { + "name": "paths_match_type", + "type": "enum_shims_shims_paths_match_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'all'" + } + }, + "indexes": { + "shims_shims_order_idx": { + "name": "shims_shims_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_parent_id_idx": { + "name": "shims_shims_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_name_idx": { + "name": "shims_shims_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_shims_parent_id_fk": { + "name": "shims_shims_parent_id_fk", + "tableFrom": "shims_shims", + "tableTo": "shims", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims": { + "name": "shims", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_texts": { + "name": "shims_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shims_texts_order_parent": { + "name": "shims_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_texts_parent_fk": { + "name": "shims_texts_parent_fk", + "tableFrom": "shims_texts", + "tableTo": "shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_rels": { + "name": "shims_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shims_rels_order_idx": { + "name": "shims_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_parent_idx": { + "name": "shims_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_path_idx": { + "name": "shims_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_users_id_idx": { + "name": "shims_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_rels_parent_fk": { + "name": "shims_rels_parent_fk", + "tableFrom": "shims_rels", + "tableTo": "shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shims_rels_users_fk": { + "name": "shims_rels_users_fk", + "tableFrom": "shims_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.enum_game_structures_staff_positions_position_type": { + "name": "enum_game_structures_staff_positions_position_type", + "schema": "public", + "values": [ + "administrative", + "technical", + "other" + ] + }, + "public.enum_game_structures_construction_status": { + "name": "enum_game_structures_construction_status", + "schema": "public", + "values": [ + "awaiting_materials", + "building", + "complete" + ] + }, + "public.enum_game_vehicles_status": { + "name": "enum_game_vehicles_status", + "schema": "public", + "values": [ + "idle", + "assigned", + "in_transit", + "damaged", + "destroyed" + ] + }, + "public.enum_npc_staffing_position_type": { + "name": "enum_npc_staffing_position_type", + "schema": "public", + "values": [ + "labor", + "administrative", + "technical", + "other" + ] + }, + "public.enum_npc_staffing_status": { + "name": "enum_npc_staffing_status", + "schema": "public", + "values": [ + "active", + "terminated" + ] + }, + "public.enum_game_event_logs_target_collection": { + "name": "enum_game_event_logs_target_collection", + "schema": "public", + "values": [ + "game-structures", + "game-vehicles", + "game-npcs", + "npc-staffing", + "structures", + "resources", + "assets", + "vehicles", + "factions", + "missions", + "campaigns", + "users", + "technologies", + "maps", + "shipments", + "bank-accounts", + "bank-transactions", + "ledger-entries", + "locker-storages", + "loadouts", + "market-listings", + "market-negotiations", + "market-state", + "evaluations", + "tickets", + "wiki-pages", + "wiki-revisions", + "wiki-templates", + "game-servers", + "assignment-transfers", + "voice-scripts", + "voice-submissions", + "story-beats", + "story-beat-states", + "custom-minefields", + "custom-minefield-scores", + "custom-radio-tests", + "custom-radio-test-scores", + "ribbon-submissions" + ] + }, + "public.enum_users_roles": { + "name": "enum_users_roles", + "schema": "public", + "values": [ + "guest", + "user", + "trusted", + "admin", + "developer" + ] + }, + "public.enum_users_preferences_notifications_muted_types": { + "name": "enum_users_preferences_notifications_muted_types", + "schema": "public", + "values": [ + "market:offer", + "market:counter", + "market:accept", + "market:reject", + "market:withdrawn", + "market:closed", + "market:sold", + "market:expired", + "award:granted", + "account:discord-request", + "finance:deposit", + "finance:withdraw", + "finance:transfer", + "shipment:completed", + "ticket:created", + "ticket:assigned", + "ticket:reply", + "ticket:status", + "poker:force-ended", + "poker:everyone-left", + "blackjack:force-ended", + "blackjack:everyone-left" + ] + }, + "public.enum_users_preferences_discord_muted_types": { + "name": "enum_users_preferences_discord_muted_types", + "schema": "public", + "values": [ + "market:offer", + "market:counter", + "market:accept", + "market:reject", + "market:withdrawn", + "market:closed", + "market:sold", + "market:expired", + "award:granted", + "account:discord-request", + "finance:deposit", + "finance:withdraw", + "finance:transfer", + "shipment:completed", + "ticket:created", + "ticket:assigned", + "ticket:reply", + "ticket:status", + "poker:force-ended", + "poker:everyone-left", + "blackjack:force-ended", + "blackjack:everyone-left" + ] + }, + "public.enum_users_preferences_display_lead_or_actual": { + "name": "enum_users_preferences_display_lead_or_actual", + "schema": "public", + "values": [ + "lead", + "actual" + ] + }, + "public.enum_roles_permissions": { + "name": "enum_roles_permissions", + "schema": "public", + "values": [ + "system:admin-access", + "media:create", + "media:read", + "media:update", + "media:delete", + "admin:media:manage", + "users:create", + "users:read", + "users:update", + "users:delete", + "users:unlock", + "users:assign-roles", + "admin:users:manage", + "roles:create", + "roles:read", + "roles:update", + "roles:delete", + "admin:roles:manage", + "ranks:create", + "ranks:read", + "ranks:update", + "ranks:delete", + "admin:ranks:manage", + "profiles:create", + "profiles:read", + "profiles:update", + "profiles:delete", + "admin:profiles:manage", + "awards:create", + "awards:read", + "awards:update", + "awards:delete", + "admin:awards:manage", + "qualifications:create", + "qualifications:read", + "qualifications:update", + "qualifications:delete", + "admin:qualifications:manage", + "assignments:create", + "assignments:read", + "assignments:update", + "assignments:delete", + "admin:assignments:manage", + "assignment-transfers:create", + "assignment-transfers:read", + "assignment-transfers:update", + "assignment-transfers:delete", + "admin:assignment-transfers:manage", + "experience:create", + "experience:read", + "experience:update", + "experience:delete", + "admin:experience:manage", + "user-notifications:create", + "user-notifications:read", + "user-notifications:update", + "user-notifications:delete", + "admin:user-notifications:manage", + "evaluations:create", + "evaluations:read", + "evaluations:update", + "evaluations:delete", + "admin:evaluations:manage", + "missions:create", + "missions:read", + "missions:update", + "missions:delete", + "missions:read-sensitive", + "admin:missions:manage", + "mission-attendances:create", + "mission-attendances:read", + "mission-attendances:update", + "mission-attendances:delete", + "admin:mission-attendances:manage", + "campaigns:create", + "campaigns:read", + "campaigns:update", + "campaigns:delete", + "admin:campaigns:manage", + "campaigns:manage", + "factions:create", + "factions:read", + "factions:update", + "factions:delete", + "admin:factions:manage", + "technologies:create", + "technologies:read", + "technologies:update", + "technologies:delete", + "admin:technologies:manage", + "assets:create", + "assets:read", + "assets:update", + "assets:delete", + "admin:assets:manage", + "resources:create", + "resources:read", + "resources:update", + "resources:delete", + "admin:resources:manage", + "vehicles:create", + "vehicles:read", + "vehicles:update", + "vehicles:delete", + "admin:vehicles:manage", + "structures:create", + "structures:read", + "structures:update", + "structures:delete", + "admin:structures:manage", + "shipments:create", + "shipments:read", + "shipments:update", + "shipments:delete", + "admin:shipments:manage", + "bank-accounts:create", + "bank-accounts:read", + "bank-accounts:update", + "bank-accounts:delete", + "admin:bank-accounts:manage", + "bank-transactions:create", + "bank-transactions:read", + "bank-transactions:update", + "bank-transactions:delete", + "admin:bank-transactions:manage", + "ledger-entries:create", + "ledger-entries:read", + "ledger-entries:update", + "ledger-entries:delete", + "admin:ledger-entries:manage", + "locker-storages:create", + "locker-storages:read", + "locker-storages:update", + "locker-storages:delete", + "admin:locker-storages:manage", + "loadouts:create", + "loadouts:read", + "loadouts:update", + "loadouts:delete", + "admin:loadouts:manage", + "market-listings:create", + "market-listings:read", + "market-listings:update", + "market-listings:delete", + "admin:market-listings:manage", + "market-negotiations:create", + "market-negotiations:read", + "market-negotiations:update", + "market-negotiations:delete", + "admin:market-negotiations:manage", + "market-state:create", + "market-state:read", + "market-state:update", + "market-state:delete", + "admin:market-state:manage", + "projects:create", + "projects:read", + "projects:update", + "projects:delete", + "admin:projects:manage", + "labels:create", + "labels:read", + "labels:update", + "labels:delete", + "admin:labels:manage", + "sprints:create", + "sprints:read", + "sprints:update", + "sprints:delete", + "admin:sprints:manage", + "releases:create", + "releases:read", + "releases:update", + "releases:delete", + "admin:releases:manage", + "tickets:create", + "tickets:read", + "tickets:update", + "tickets:delete", + "admin:tickets:manage", + "ticket-votes:create", + "ticket-votes:read", + "ticket-votes:update", + "ticket-votes:delete", + "admin:ticket-votes:manage", + "game-structures:create", + "game-structures:read", + "game-structures:update", + "game-structures:delete", + "admin:game-structures:manage", + "game-vehicles:create", + "game-vehicles:read", + "game-vehicles:update", + "game-vehicles:delete", + "admin:game-vehicles:manage", + "game-npcs:create", + "game-npcs:read", + "game-npcs:update", + "game-npcs:delete", + "admin:game-npcs:manage", + "game-hard-resources:create", + "game-hard-resources:read", + "game-hard-resources:update", + "game-hard-resources:delete", + "admin:game-hard-resources:manage", + "game-event-logs:create", + "game-event-logs:read", + "game-event-logs:update", + "game-event-logs:delete", + "admin:game-event-logs:manage", + "maps:create", + "maps:read", + "maps:update", + "maps:delete", + "admin:maps:manage", + "map-roads:read", + "admin:map-roads:manage", + "map-zones:read", + "admin:map-zones:manage", + "resource-nodes:read", + "admin:resource-nodes:manage", + "narrative-events:create", + "narrative-events:read", + "narrative-events:update", + "narrative-events:delete", + "admin:narrative-events:manage", + "mission-files:create", + "mission-files:read", + "mission-files:update", + "mission-files:delete", + "admin:mission-files:manage", + "mod-lists:create", + "mod-lists:read", + "mod-lists:update", + "mod-lists:delete", + "admin:mod-lists:manage", + "game-servers:create", + "game-servers:read", + "game-servers:update", + "game-servers:delete", + "admin:game-servers:manage", + "arma-sync-events:create", + "arma-sync-events:read", + "arma-sync-events:update", + "arma-sync-events:delete", + "admin:arma-sync-events:manage", + "arma-commands:create", + "arma-commands:read", + "arma-commands:update", + "arma-commands:delete", + "admin:arma-commands:manage", + "game-rules:read", + "game-rules:update", + "shims:read", + "shims:update", + "logistics:manage", + "intelligence:manage", + "profiles:intel_excerpt:update", + "banking:manage", + "tickets:staff", + "discord:staff", + "discord:announce", + "custom-minefields:update", + "custom-minefields:delete", + "custom-minefield-scores:delete", + "custom-radio-tests:update", + "custom-radio-tests:delete", + "custom-radio-test-scores:delete" + ] + }, + "public.enum_awards_grant_config_allowed_grantor_assignment_types": { + "name": "enum_awards_grant_config_allowed_grantor_assignment_types", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_awards_type": { + "name": "enum_awards_type", + "schema": "public", + "values": [ + "commendation", + "ribbon", + "medal" + ] + }, + "public.enum_awards_grant_config_recipient_scope": { + "name": "enum_awards_grant_config_recipient_scope", + "schema": "public", + "values": [ + "same_command", + "whitelist", + "anyone" + ] + }, + "public.enum_assignments_type": { + "name": "enum_assignments_type", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_assignment_transfers_status": { + "name": "enum_assignment_transfers_status", + "schema": "public", + "values": [ + "pending", + "rejected", + "awaiting_superuser", + "completed", + "cancelled", + "denied" + ] + }, + "public.enum_assignment_transfers_escalation_reason": { + "name": "enum_assignment_transfers_escalation_reason", + "schema": "public", + "values": [ + "no_leaders", + "appeal", + "leader_changed" + ] + }, + "public.enum_assignment_transfers_from_leader_decision": { + "name": "enum_assignment_transfers_from_leader_decision", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected", + "not_required" + ] + }, + "public.enum_assignment_transfers_to_leader_decision": { + "name": "enum_assignment_transfers_to_leader_decision", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected", + "not_required" + ] + }, + "public.enum_evaluations_kind": { + "name": "enum_evaluations_kind", + "schema": "public", + "values": [ + "leader-direct", + "leader-indirect", + "subordinate" + ] + }, + "public.enum_evaluations_level": { + "name": "enum_evaluations_level", + "schema": "public", + "values": [ + "exceptional", + "excellent", + "proficient", + "adequate", + "moderate", + "under-review" + ] + }, + "public.enum_ribbon_submissions_grantor_types": { + "name": "enum_ribbon_submissions_grantor_types", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_ribbon_submissions_status": { + "name": "enum_ribbon_submissions_status", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected" + ] + }, + "public.enum_ribbon_submissions_recipient_scope": { + "name": "enum_ribbon_submissions_recipient_scope", + "schema": "public", + "values": [ + "same_command", + "whitelist", + "anyone" + ] + }, + "public.enum_missions_factions_involved_threat_level": { + "name": "enum_missions_factions_involved_threat_level", + "schema": "public", + "values": [ + "ally", + "friendly", + "neutral", + "hostile" + ] + }, + "public.enum_missions_logistics_and_support_insertion": { + "name": "enum_missions_logistics_and_support_insertion", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_logistics_and_support_extraction": { + "name": "enum_missions_logistics_and_support_extraction", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_operation_type": { + "name": "enum_missions_operation_type", + "schema": "public", + "values": [ + "main", + "side", + "external" + ] + }, + "public.enum_missions_classification_mission_type": { + "name": "enum_missions_classification_mission_type", + "schema": "public", + "values": [ + "Zeus", + "PvE", + "PvP", + "PvPvE", + "Training", + "Special" + ] + }, + "public.enum_missions_ownership_and_status_status": { + "name": "enum_missions_ownership_and_status_status", + "schema": "public", + "values": [ + "Concept", + "Planning", + "Ready", + "Scheduled", + "Active", + "Completed", + "Cancelled" + ] + }, + "public.enum_missions_ownership_and_status_visibility": { + "name": "enum_missions_ownership_and_status_visibility", + "schema": "public", + "values": [ + "unit", + "leadership", + "intel", + "private" + ] + }, + "public.enum_missions_civilian_presence": { + "name": "enum_missions_civilian_presence", + "schema": "public", + "values": [ + "None", + "Low", + "Medium", + "High" + ] + }, + "public.enum_mission_attendances_response": { + "name": "enum_mission_attendances_response", + "schema": "public", + "values": [ + "yes", + "no", + "tentative" + ] + }, + "public.enum_campaigns_status": { + "name": "enum_campaigns_status", + "schema": "public", + "values": [ + "concept", + "inProgress", + "completed" + ] + }, + "public.enum_campaigns_campaign_mode": { + "name": "enum_campaigns_campaign_mode", + "schema": "public", + "values": [ + "official", + "custom" + ] + }, + "public.enum_factions_type": { + "name": "enum_factions_type", + "schema": "public", + "values": [ + "playerFaction", + "majorFaction", + "minorFaction", + "corporation", + "special" + ] + }, + "public.enum_technologies_approval_status": { + "name": "enum_technologies_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_technologies_type": { + "name": "enum_technologies_type", + "schema": "public", + "values": [ + "asset", + "upgrade" + ] + }, + "public.enum_assets_skin_configuration_applies_to_asset_types": { + "name": "enum_assets_skin_configuration_applies_to_asset_types", + "schema": "public", + "values": [ + "weapon", + "uniform", + "vest", + "backpack", + "helmet" + ] + }, + "public.enum_assets_approval_status": { + "name": "enum_assets_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_assets_asset_type": { + "name": "enum_assets_asset_type", + "schema": "public", + "values": [ + "weapon", + "magazine", + "optic", + "muzzle", + "bipod", + "uniform", + "vest", + "backpack", + "helmet", + "facewear", + "nvg", + "radio", + "medical", + "tool", + "explosive", + "skin", + "miscellaneous" + ] + }, + "public.enum_assets_weapon_configuration_slot_type": { + "name": "enum_assets_weapon_configuration_slot_type", + "schema": "public", + "values": [ + "primary", + "secondary", + "launcher" + ] + }, + "public.enum_assets_nightvision_configuration_nvg_generation": { + "name": "enum_assets_nightvision_configuration_nvg_generation", + "schema": "public", + "values": [ + "gen1", + "gen2", + "gen3" + ] + }, + "public.enum_assets_market_trading_rarity": { + "name": "enum_assets_market_trading_rarity", + "schema": "public", + "values": [ + "basic", + "common", + "uncommon", + "rare", + "veryRare", + "epic", + "legendary", + "unique" + ] + }, + "public.enum_resources_approval_status": { + "name": "enum_resources_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_resources_type": { + "name": "enum_resources_type", + "schema": "public", + "values": [ + "physical", + "fluid", + "energy", + "abstract" + ] + }, + "public.enum_resources_rarity": { + "name": "enum_resources_rarity", + "schema": "public", + "values": [ + "common", + "uncommon", + "rare", + "epic", + "legendary", + "exotic", + "unique" + ] + }, + "public.enum_vehicles_category": { + "name": "enum_vehicles_category", + "schema": "public", + "values": [ + "civilian", + "utility", + "transport", + "weaponized", + "military" + ] + }, + "public.enum_vehicles_pylons_pylon_type": { + "name": "enum_vehicles_pylons_pylon_type", + "schema": "public", + "values": [ + "mountedWeapon", + "pylon" + ] + }, + "public.enum_vehicles_approval_status": { + "name": "enum_vehicles_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_vehicles_transport_mode": { + "name": "enum_vehicles_transport_mode", + "schema": "public", + "values": [ + "ground", + "air", + "sea" + ] + }, + "public.enum_vehicles_armor_rating": { + "name": "enum_vehicles_armor_rating", + "schema": "public", + "values": [ + "none", + "light", + "medium", + "heavy", + "composite" + ] + }, + "public.enum_structures_staff_positions_position_type": { + "name": "enum_structures_staff_positions_position_type", + "schema": "public", + "values": [ + "administrative", + "technical", + "other" + ] + }, + "public.enum_structures_module_options_effects_type": { + "name": "enum_structures_module_options_effects_type", + "schema": "public", + "values": [ + "capacity_mass", + "production_multiplier", + "storage_slots" + ] + }, + "public.enum_structures_module_options_category": { + "name": "enum_structures_module_options_category", + "schema": "public", + "values": [ + "production", + "logistics", + "defense", + "utility" + ] + }, + "public.enum_structures_approval_status": { + "name": "enum_structures_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_structures_category": { + "name": "enum_structures_category", + "schema": "public", + "values": [ + "logistics", + "military", + "civilian" + ] + }, + "public.enum_structures_terrain_type": { + "name": "enum_structures_terrain_type", + "schema": "public", + "values": [ + "land", + "water" + ] + }, + "public.enum_structures_function_type": { + "name": "enum_structures_function_type", + "schema": "public", + "values": [ + "producer", + "storage", + "sensor", + "converter", + "defense", + "miscellaneous" + ] + }, + "public.enum_shipments_status": { + "name": "enum_shipments_status", + "schema": "public", + "values": [ + "pending", + "dispatched", + "in_transit", + "arrived", + "completed", + "cancelled", + "failed", + "stranded" + ] + }, + "public.enum_bank_accounts_account_type": { + "name": "enum_bank_accounts_account_type", + "schema": "public", + "values": [ + "treasury", + "faction", + "personal" + ] + }, + "public.enum_bank_accounts_status": { + "name": "enum_bank_accounts_status", + "schema": "public", + "values": [ + "open", + "frozen", + "closed" + ] + }, + "public.enum_bank_transactions_type": { + "name": "enum_bank_transactions_type", + "schema": "public", + "values": [ + "deposit", + "withdrawal", + "transfer", + "payment", + "fee", + "salary", + "adjustment" + ] + }, + "public.enum_bank_transactions_status": { + "name": "enum_bank_transactions_status", + "schema": "public", + "values": [ + "completed", + "reversed" + ] + }, + "public.enum_ledger_entries_type": { + "name": "enum_ledger_entries_type", + "schema": "public", + "values": [ + "deposit", + "withdrawal", + "transfer", + "payment", + "fee", + "salary", + "adjustment" + ] + }, + "public.enum_market_listings_status": { + "name": "enum_market_listings_status", + "schema": "public", + "values": [ + "active", + "sold", + "cancelled", + "expired" + ] + }, + "public.enum_market_negotiations_history_from": { + "name": "enum_market_negotiations_history_from", + "schema": "public", + "values": [ + "buyer", + "seller" + ] + }, + "public.enum_market_negotiations_status": { + "name": "enum_market_negotiations_status", + "schema": "public", + "values": [ + "open", + "accepted", + "rejected", + "closed", + "cancelled", + "expired" + ] + }, + "public.enum_market_negotiations_proposed_by": { + "name": "enum_market_negotiations_proposed_by", + "schema": "public", + "values": [ + "buyer", + "seller" + ] + }, + "public.enum_market_state_item_type": { + "name": "enum_market_state_item_type", + "schema": "public", + "values": [ + "resource", + "asset" + ] + }, + "public.enum_voice_scripts_status": { + "name": "enum_voice_scripts_status", + "schema": "public", + "values": [ + "draft", + "open", + "closed" + ] + }, + "public.enum_voice_submissions_status": { + "name": "enum_voice_submissions_status", + "schema": "public", + "values": [ + "pending", + "accepted", + "rejected" + ] + }, + "public.enum_tickets_activity_type": { + "name": "enum_tickets_activity_type", + "schema": "public", + "values": [ + "system", + "agent_message", + "client_message" + ] + }, + "public.enum_tickets_category": { + "name": "enum_tickets_category", + "schema": "public", + "values": [ + "bug_report", + "feature_request", + "support_request", + "other" + ] + }, + "public.enum_tickets_priority": { + "name": "enum_tickets_priority", + "schema": "public", + "values": [ + "low", + "medium", + "high", + "critical" + ] + }, + "public.enum_tickets_status": { + "name": "enum_tickets_status", + "schema": "public", + "values": [ + "open", + "in_review", + "planning", + "in_progress", + "waiting_on_reporter", + "in_testing", + "resolved", + "canceled", + "closed" + ] + }, + "public.enum_tickets_type": { + "name": "enum_tickets_type", + "schema": "public", + "values": [ + "task", + "bug", + "story", + "epic", + "improvement" + ] + }, + "public.enum_tickets_resolution": { + "name": "enum_tickets_resolution", + "schema": "public", + "values": [ + "fixed", + "wontfix", + "duplicate", + "invalid" + ] + }, + "public.enum_wiki_pages_category": { + "name": "enum_wiki_pages_category", + "schema": "public", + "values": [ + "Campaign", + "World", + "Lore", + "Characters", + "Plot", + "Media", + "Guides", + "Meta" + ] + }, + "public.enum_wiki_revisions_type": { + "name": "enum_wiki_revisions_type", + "schema": "public", + "values": [ + "create", + "edit", + "restore" + ] + }, + "public.enum_projects_status": { + "name": "enum_projects_status", + "schema": "public", + "values": [ + "active", + "archived" + ] + }, + "public.enum_sprints_status": { + "name": "enum_sprints_status", + "schema": "public", + "values": [ + "planning", + "active", + "completed" + ] + }, + "public.enum_releases_status": { + "name": "enum_releases_status", + "schema": "public", + "values": [ + "draft", + "in_progress", + "released" + ] + }, + "public.enum_maps_basemap_mode": { + "name": "enum_maps_basemap_mode", + "schema": "public", + "values": [ + "image", + "tiles" + ] + }, + "public.enum_map_roads_surface": { + "name": "enum_map_roads_surface", + "schema": "public", + "values": [ + "paved", + "dirt", + "trail" + ] + }, + "public.enum_map_roads_stroke_style": { + "name": "enum_map_roads_stroke_style", + "schema": "public", + "values": [ + "solid", + "dashed", + "dotted" + ] + }, + "public.enum_map_zones_type": { + "name": "enum_map_zones_type", + "schema": "public", + "values": [ + "water", + "land", + "territory", + "border", + "other" + ] + }, + "public.enum_narrative_events_triggers_type": { + "name": "enum_narrative_events_triggers_type", + "schema": "public", + "values": [ + "manual", + "mission_complete", + "timer", + "condition" + ] + }, + "public.enum_story_beats_status": { + "name": "enum_story_beats_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum_story_beat_states_reaction": { + "name": "enum_story_beat_states_reaction", + "schema": "public", + "values": [ + "like", + "heart", + "salute" + ] + }, + "public.enum_game_servers_status": { + "name": "enum_game_servers_status", + "schema": "public", + "values": [ + "online", + "offline" + ] + }, + "public.enum_arma_commands_status": { + "name": "enum_arma_commands_status", + "schema": "public", + "values": [ + "queued", + "delivered", + "succeeded", + "failed" + ] + }, + "public.enum_custom_radio_tests_order": { + "name": "enum_custom_radio_tests_order", + "schema": "public", + "values": [ + "fixed", + "shuffled" + ] + }, + "public.enum_custom_radio_test_scores_mode": { + "name": "enum_custom_radio_test_scores_mode", + "schema": "public", + "values": [ + "sprint", + "watch" + ] + }, + "public.enum_plugin_ai_instructions_field_type": { + "name": "enum_plugin_ai_instructions_field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "upload", + "richText" + ] + }, + "public.enum_plugin_ai_instructions_model_id": { + "name": "enum_plugin_ai_instructions_model_id", + "schema": "public", + "values": [ + "unsloth-text" + ] + }, + "public.enum_shims_shims_targeting_roles": { + "name": "enum_shims_shims_targeting_roles", + "schema": "public", + "values": [ + "guest", + "user", + "trusted", + "admin", + "developer" + ] + }, + "public.enum_shims_shims_type": { + "name": "enum_shims_shims_type", + "schema": "public", + "values": [ + "css", + "js" + ] + }, + "public.enum_shims_shims_targeting_audience": { + "name": "enum_shims_shims_targeting_audience", + "schema": "public", + "values": [ + "all", + "percentage", + "users", + "roles" + ] + }, + "public.enum_shims_shims_paths_match_type": { + "name": "enum_shims_shims_paths_match_type", + "schema": "public", + "values": [ + "all", + "include", + "exclude" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "id": "52f34521-46ec-4bbc-a5a9-b9d6de9d0026", + "prevId": "00000000-0000-0000-0000-000000000000" +} \ No newline at end of file diff --git a/src/migrations/20260918_061857_add_module_slots.ts b/src/migrations/20260918_061857_add_module_slots.ts new file mode 100644 index 0000000..3bcce48 --- /dev/null +++ b/src/migrations/20260918_061857_add_module_slots.ts @@ -0,0 +1,66 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres' + +export async function up({ db, payload, req }: MigrateUpArgs): Promise { + await db.execute(sql` + CREATE TYPE "public"."enum_structures_module_options_effects_type" AS ENUM('capacity_mass', 'production_multiplier', 'storage_slots'); + CREATE TYPE "public"."enum_structures_module_options_category" AS ENUM('production', 'logistics', 'defense', 'utility'); + CREATE TABLE "game_structures_installed_modules" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "installed_at" timestamp(3) with time zone + ); + + CREATE TABLE "structures_module_options_effects" ( + "_order" integer NOT NULL, + "_parent_id" varchar NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "type" "enum_structures_module_options_effects_type" NOT NULL, + "value" numeric NOT NULL + ); + + CREATE TABLE "structures_module_options_materials" ( + "_order" integer NOT NULL, + "_parent_id" varchar NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "resource_id" integer NOT NULL, + "amount" numeric NOT NULL + ); + + CREATE TABLE "structures_module_options" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "category" "enum_structures_module_options_category" DEFAULT 'utility' NOT NULL, + "description" varchar + ); + + ALTER TABLE "structures" ADD COLUMN "module_slots" numeric DEFAULT 0; + ALTER TABLE "game_structures_installed_modules" ADD CONSTRAINT "game_structures_installed_modules_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."game_structures"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_module_options_effects" ADD CONSTRAINT "structures_module_options_effects_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."structures_module_options"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_module_options_materials" ADD CONSTRAINT "structures_module_options_materials_resource_id_resources_id_fk" FOREIGN KEY ("resource_id") REFERENCES "public"."resources"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "structures_module_options_materials" ADD CONSTRAINT "structures_module_options_materials_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."structures_module_options"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "structures_module_options" ADD CONSTRAINT "structures_module_options_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."structures"("id") ON DELETE cascade ON UPDATE no action; + CREATE INDEX "game_structures_installed_modules_order_idx" ON "game_structures_installed_modules" USING btree ("_order"); + CREATE INDEX "game_structures_installed_modules_parent_id_idx" ON "game_structures_installed_modules" USING btree ("_parent_id"); + CREATE INDEX "structures_module_options_effects_order_idx" ON "structures_module_options_effects" USING btree ("_order"); + CREATE INDEX "structures_module_options_effects_parent_id_idx" ON "structures_module_options_effects" USING btree ("_parent_id"); + CREATE INDEX "structures_module_options_materials_order_idx" ON "structures_module_options_materials" USING btree ("_order"); + CREATE INDEX "structures_module_options_materials_parent_id_idx" ON "structures_module_options_materials" USING btree ("_parent_id"); + CREATE INDEX "structures_module_options_materials_resource_idx" ON "structures_module_options_materials" USING btree ("resource_id"); + CREATE INDEX "structures_module_options_order_idx" ON "structures_module_options" USING btree ("_order"); + CREATE INDEX "structures_module_options_parent_id_idx" ON "structures_module_options" USING btree ("_parent_id");`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.execute(sql` + DROP TABLE "game_structures_installed_modules" CASCADE; + DROP TABLE "structures_module_options_effects" CASCADE; + DROP TABLE "structures_module_options_materials" CASCADE; + DROP TABLE "structures_module_options" CASCADE; + ALTER TABLE "structures" DROP COLUMN "module_slots"; + DROP TYPE "public"."enum_structures_module_options_effects_type"; + DROP TYPE "public"."enum_structures_module_options_category";`) +} diff --git a/src/migrations/20260918_064326_add_compound_parent.json b/src/migrations/20260918_064326_add_compound_parent.json new file mode 100644 index 0000000..d24adaf --- /dev/null +++ b/src/migrations/20260918_064326_add_compound_parent.json @@ -0,0 +1,29075 @@ +{ + "version": "7", + "dialect": "postgresql", + "tables": { + "public.media": { + "name": "media", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "media_updated_at_idx": { + "name": "media_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_created_at_idx": { + "name": "media_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_filename_idx": { + "name": "media_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_hard_resources": { + "name": "game_hard_resources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_hard_resources_name_idx": { + "name": "game_hard_resources_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_hard_resources_updated_at_idx": { + "name": "game_hard_resources_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_hard_resources_created_at_idx": { + "name": "game_hard_resources_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_labor_requirements": { + "name": "game_structures_labor_requirements", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "classification_id": { + "name": "classification_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "required_headcount": { + "name": "required_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_headcount": { + "name": "max_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_labor_requirements_order_idx": { + "name": "game_structures_labor_requirements_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_labor_requirements_parent_id_idx": { + "name": "game_structures_labor_requirements_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_labor_requirements_classification_idx": { + "name": "game_structures_labor_requirements_classification_idx", + "columns": [ + { + "expression": "classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_labor_requirements_classification_id_labor_classifications_id_fk": { + "name": "game_structures_labor_requirements_classification_id_labor_classifications_id_fk", + "tableFrom": "game_structures_labor_requirements", + "tableTo": "labor_classifications", + "columnsFrom": [ + "classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_labor_requirements_parent_id_fk": { + "name": "game_structures_labor_requirements_parent_id_fk", + "tableFrom": "game_structures_labor_requirements", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_staff_positions": { + "name": "game_structures_staff_positions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_game_structures_staff_positions_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "max": { + "name": "max", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_staff_positions_order_idx": { + "name": "game_structures_staff_positions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_staff_positions_parent_id_idx": { + "name": "game_structures_staff_positions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_staff_positions_parent_id_fk": { + "name": "game_structures_staff_positions_parent_id_fk", + "tableFrom": "game_structures_staff_positions", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_production_inputs": { + "name": "game_structures_production_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "game_structures_production_inputs_order_idx": { + "name": "game_structures_production_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_inputs_parent_id_idx": { + "name": "game_structures_production_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_inputs_resource_idx": { + "name": "game_structures_production_inputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_production_inputs_resource_id_resources_id_fk": { + "name": "game_structures_production_inputs_resource_id_resources_id_fk", + "tableFrom": "game_structures_production_inputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_production_inputs_parent_id_fk": { + "name": "game_structures_production_inputs_parent_id_fk", + "tableFrom": "game_structures_production_inputs", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_production_outputs": { + "name": "game_structures_production_outputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "game_structures_production_outputs_order_idx": { + "name": "game_structures_production_outputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_outputs_parent_id_idx": { + "name": "game_structures_production_outputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_outputs_resource_idx": { + "name": "game_structures_production_outputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_production_outputs_resource_id_resources_id_fk": { + "name": "game_structures_production_outputs_resource_id_resources_id_fk", + "tableFrom": "game_structures_production_outputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_production_outputs_parent_id_fk": { + "name": "game_structures_production_outputs_parent_id_fk", + "tableFrom": "game_structures_production_outputs", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_installed_modules": { + "name": "game_structures_installed_modules", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "installed_at": { + "name": "installed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_installed_modules_order_idx": { + "name": "game_structures_installed_modules_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_installed_modules_parent_id_idx": { + "name": "game_structures_installed_modules_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_installed_modules_parent_id_fk": { + "name": "game_structures_installed_modules_parent_id_fk", + "tableFrom": "game_structures_installed_modules", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_stored_resources": { + "name": "game_structures_stored_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_structures_stored_resources_order_idx": { + "name": "game_structures_stored_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_stored_resources_parent_id_idx": { + "name": "game_structures_stored_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_stored_resources_resource_idx": { + "name": "game_structures_stored_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_stored_resources_resource_id_resources_id_fk": { + "name": "game_structures_stored_resources_resource_id_resources_id_fk", + "tableFrom": "game_structures_stored_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_stored_resources_parent_id_fk": { + "name": "game_structures_stored_resources_parent_id_fk", + "tableFrom": "game_structures_stored_resources", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_void_storage": { + "name": "game_structures_void_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_structures_void_storage_order_idx": { + "name": "game_structures_void_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_void_storage_parent_id_idx": { + "name": "game_structures_void_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_void_storage_resource_idx": { + "name": "game_structures_void_storage_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_void_storage_resource_id_resources_id_fk": { + "name": "game_structures_void_storage_resource_id_resources_id_fk", + "tableFrom": "game_structures_void_storage", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_void_storage_parent_id_fk": { + "name": "game_structures_void_storage_parent_id_fk", + "tableFrom": "game_structures_void_storage", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures": { + "name": "game_structures", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type_id": { + "name": "type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "construction_status": { + "name": "construction_status", + "type": "enum_game_structures_construction_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'complete'" + }, + "construction_started_at": { + "name": "construction_started_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "construction_completes_at": { + "name": "construction_completes_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "maintenance_cost": { + "name": "maintenance_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "production_paused": { + "name": "production_paused", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "last_production_at": { + "name": "last_production_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "production_stall_reason": { + "name": "production_stall_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "coordinates": { + "name": "coordinates", + "type": "geometry(Point)", + "primaryKey": false, + "notNull": false + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "label_priority": { + "name": "label_priority", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "parent_structure_id": { + "name": "parent_structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_structures_type_idx": { + "name": "game_structures_type_idx", + "columns": [ + { + "expression": "type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_faction_idx": { + "name": "game_structures_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_map_idx": { + "name": "game_structures_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_parent_structure_idx": { + "name": "game_structures_parent_structure_idx", + "columns": [ + { + "expression": "parent_structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_updated_at_idx": { + "name": "game_structures_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_created_at_idx": { + "name": "game_structures_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_type_id_structures_id_fk": { + "name": "game_structures_type_id_structures_id_fk", + "tableFrom": "game_structures", + "tableTo": "structures", + "columnsFrom": [ + "type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_faction_id_factions_id_fk": { + "name": "game_structures_faction_id_factions_id_fk", + "tableFrom": "game_structures", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_map_id_maps_id_fk": { + "name": "game_structures_map_id_maps_id_fk", + "tableFrom": "game_structures", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_parent_structure_id_game_structures_id_fk": { + "name": "game_structures_parent_structure_id_game_structures_id_fk", + "tableFrom": "game_structures", + "tableTo": "game_structures", + "columnsFrom": [ + "parent_structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles_stored_resources": { + "name": "game_vehicles_stored_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_vehicles_stored_resources_order_idx": { + "name": "game_vehicles_stored_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_stored_resources_parent_id_idx": { + "name": "game_vehicles_stored_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_stored_resources_resource_idx": { + "name": "game_vehicles_stored_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_stored_resources_resource_id_resources_id_fk": { + "name": "game_vehicles_stored_resources_resource_id_resources_id_fk", + "tableFrom": "game_vehicles_stored_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_stored_resources_parent_id_fk": { + "name": "game_vehicles_stored_resources_parent_id_fk", + "tableFrom": "game_vehicles_stored_resources", + "tableTo": "game_vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles_void_storage": { + "name": "game_vehicles_void_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_vehicles_void_storage_order_idx": { + "name": "game_vehicles_void_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_void_storage_parent_id_idx": { + "name": "game_vehicles_void_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_void_storage_resource_idx": { + "name": "game_vehicles_void_storage_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_void_storage_resource_id_resources_id_fk": { + "name": "game_vehicles_void_storage_resource_id_resources_id_fk", + "tableFrom": "game_vehicles_void_storage", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_void_storage_parent_id_fk": { + "name": "game_vehicles_void_storage_parent_id_fk", + "tableFrom": "game_vehicles_void_storage", + "tableTo": "game_vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles": { + "name": "game_vehicles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type_id": { + "name": "type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "deployed_at_id": { + "name": "deployed_at_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_game_vehicles_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'idle'" + }, + "current_fuel": { + "name": "current_fuel", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "current_health": { + "name": "current_health", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_vehicles_type_idx": { + "name": "game_vehicles_type_idx", + "columns": [ + { + "expression": "type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_deployed_at_idx": { + "name": "game_vehicles_deployed_at_idx", + "columns": [ + { + "expression": "deployed_at_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_faction_idx": { + "name": "game_vehicles_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_updated_at_idx": { + "name": "game_vehicles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_created_at_idx": { + "name": "game_vehicles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_type_id_vehicles_id_fk": { + "name": "game_vehicles_type_id_vehicles_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "vehicles", + "columnsFrom": [ + "type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_deployed_at_id_game_structures_id_fk": { + "name": "game_vehicles_deployed_at_id_game_structures_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "game_structures", + "columnsFrom": [ + "deployed_at_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_faction_id_factions_id_fk": { + "name": "game_vehicles_faction_id_factions_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_npcs": { + "name": "game_npcs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occupation": { + "name": "occupation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "location_id": { + "name": "location_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bio": { + "name": "bio", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "is_generated": { + "name": "is_generated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "is_in_game": { + "name": "is_in_game", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "vendor_enabled": { + "name": "vendor_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vendor_price_modifier": { + "name": "vendor_price_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_npcs_location_idx": { + "name": "game_npcs_location_idx", + "columns": [ + { + "expression": "location_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_faction_idx": { + "name": "game_npcs_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_updated_at_idx": { + "name": "game_npcs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_created_at_idx": { + "name": "game_npcs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_npcs_location_id_game_structures_id_fk": { + "name": "game_npcs_location_id_game_structures_id_fk", + "tableFrom": "game_npcs", + "tableTo": "game_structures", + "columnsFrom": [ + "location_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_npcs_faction_id_factions_id_fk": { + "name": "game_npcs_faction_id_factions_id_fk", + "tableFrom": "game_npcs", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_npcs_rels": { + "name": "game_npcs_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_npcs_rels_order_idx": { + "name": "game_npcs_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_parent_idx": { + "name": "game_npcs_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_path_idx": { + "name": "game_npcs_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_assets_id_idx": { + "name": "game_npcs_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_npcs_rels_parent_fk": { + "name": "game_npcs_rels_parent_fk", + "tableFrom": "game_npcs_rels", + "tableTo": "game_npcs", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "game_npcs_rels_assets_fk": { + "name": "game_npcs_rels_assets_fk", + "tableFrom": "game_npcs_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.npc_staffing": { + "name": "npc_staffing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "npc_id": { + "name": "npc_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_npc_staffing_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'labor'" + }, + "position_title": { + "name": "position_title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "headcount": { + "name": "headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "labor_classification_id": { + "name": "labor_classification_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "salary": { + "name": "salary", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_npc_staffing_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'active'" + }, + "hired_at": { + "name": "hired_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "terminated_at": { + "name": "terminated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "npc_staffing_npc_idx": { + "name": "npc_staffing_npc_idx", + "columns": [ + { + "expression": "npc_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_structure_idx": { + "name": "npc_staffing_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_labor_classification_idx": { + "name": "npc_staffing_labor_classification_idx", + "columns": [ + { + "expression": "labor_classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_updated_at_idx": { + "name": "npc_staffing_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_created_at_idx": { + "name": "npc_staffing_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "npc_staffing_npc_id_game_npcs_id_fk": { + "name": "npc_staffing_npc_id_game_npcs_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "game_npcs", + "columnsFrom": [ + "npc_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "npc_staffing_structure_id_game_structures_id_fk": { + "name": "npc_staffing_structure_id_game_structures_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "game_structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "npc_staffing_labor_classification_id_labor_classifications_id_fk": { + "name": "npc_staffing_labor_classification_id_labor_classifications_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "labor_classifications", + "columnsFrom": [ + "labor_classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labor_classifications": { + "name": "labor_classifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "default_unit_salary": { + "name": "default_unit_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "build_efficiency": { + "name": "build_efficiency", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "available_headcount": { + "name": "available_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "labor_classifications_name_idx": { + "name": "labor_classifications_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_key_idx": { + "name": "labor_classifications_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_updated_at_idx": { + "name": "labor_classifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_created_at_idx": { + "name": "labor_classifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_event_logs": { + "name": "game_event_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "system": { + "name": "system", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "actor_id": { + "name": "actor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "target_collection": { + "name": "target_collection", + "type": "enum_game_event_logs_target_collection", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "target_id": { + "name": "target_id", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_event_logs_type_idx": { + "name": "game_event_logs_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_actor_idx": { + "name": "game_event_logs_actor_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_structure_idx": { + "name": "game_event_logs_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_updated_at_idx": { + "name": "game_event_logs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_created_at_idx": { + "name": "game_event_logs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_event_logs_actor_id_users_id_fk": { + "name": "game_event_logs_actor_id_users_id_fk", + "tableFrom": "game_event_logs", + "tableTo": "users", + "columnsFrom": [ + "actor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_event_logs_structure_id_game_structures_id_fk": { + "name": "game_event_logs_structure_id_game_structures_id_fk", + "tableFrom": "game_event_logs", + "tableTo": "game_structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_roles": { + "name": "users_roles", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_roles_order_idx": { + "name": "users_roles_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_roles_parent_idx": { + "name": "users_roles_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_roles_parent_fk": { + "name": "users_roles_parent_fk", + "tableFrom": "users_roles", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_preferences_notifications_muted_types": { + "name": "users_preferences_notifications_muted_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_preferences_notifications_muted_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_preferences_notifications_muted_types_order_idx": { + "name": "users_preferences_notifications_muted_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_preferences_notifications_muted_types_parent_idx": { + "name": "users_preferences_notifications_muted_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_preferences_notifications_muted_types_parent_fk": { + "name": "users_preferences_notifications_muted_types_parent_fk", + "tableFrom": "users_preferences_notifications_muted_types", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_preferences_discord_muted_types": { + "name": "users_preferences_discord_muted_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_preferences_discord_muted_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_preferences_discord_muted_types_order_idx": { + "name": "users_preferences_discord_muted_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_preferences_discord_muted_types_parent_idx": { + "name": "users_preferences_discord_muted_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_preferences_discord_muted_types_parent_fk": { + "name": "users_preferences_discord_muted_types_parent_fk", + "tableFrom": "users_preferences_discord_muted_types", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_sessions": { + "name": "users_sessions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "users_sessions_order_idx": { + "name": "users_sessions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_sessions_parent_id_idx": { + "name": "users_sessions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_sessions_parent_id_fk": { + "name": "users_sessions_parent_id_fk", + "tableFrom": "users_sessions", + "tableTo": "users", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "discord_username": { + "name": "discord_username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "discord_id": { + "name": "discord_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "payload_display_name": { + "name": "payload_display_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "steam_id": { + "name": "steam_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "preferences_notifications_muted_all": { + "name": "preferences_notifications_muted_all", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_show_callsign": { + "name": "preferences_display_show_callsign", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_lead_or_actual": { + "name": "preferences_display_lead_or_actual", + "type": "enum_users_preferences_display_lead_or_actual", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'lead'" + }, + "preferences_display_show_version_overlay": { + "name": "preferences_display_show_version_overlay", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "preferences_display_xp_display_mini": { + "name": "preferences_display_xp_display_mini", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_show_background_texture": { + "name": "preferences_display_show_background_texture", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "preferences_discord_enabled": { + "name": "preferences_discord_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_dashboard_layout": { + "name": "preferences_dashboard_layout", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "reset_password_token": { + "name": "reset_password_token", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reset_password_expiration": { + "name": "reset_password_expiration", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "salt": { + "name": "salt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hash": { + "name": "hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "login_attempts": { + "name": "login_attempts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lock_until": { + "name": "lock_until", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_discord_username_idx": { + "name": "users_discord_username_idx", + "columns": [ + { + "expression": "discord_username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_discord_id_idx": { + "name": "users_discord_id_idx", + "columns": [ + { + "expression": "discord_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_updated_at_idx": { + "name": "users_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_created_at_idx": { + "name": "users_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_username_idx": { + "name": "users_username_idx", + "columns": [ + { + "expression": "username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_rels": { + "name": "users_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_rels_order_idx": { + "name": "users_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_parent_idx": { + "name": "users_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_path_idx": { + "name": "users_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_roles_id_idx": { + "name": "users_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_rels_parent_fk": { + "name": "users_rels_parent_fk", + "tableFrom": "users_rels", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "users_rels_roles_fk": { + "name": "users_rels_roles_fk", + "tableFrom": "users_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles_permissions": { + "name": "roles_permissions", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_roles_permissions", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "roles_permissions_order_idx": { + "name": "roles_permissions_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_permissions_parent_idx": { + "name": "roles_permissions_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "roles_permissions_parent_fk": { + "name": "roles_permissions_parent_fk", + "tableFrom": "roles_permissions", + "tableTo": "roles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles": { + "name": "roles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "is_system": { + "name": "is_system", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "is_superuser": { + "name": "is_superuser", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "roles_name_idx": { + "name": "roles_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_slug_idx": { + "name": "roles_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_updated_at_idx": { + "name": "roles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_created_at_idx": { + "name": "roles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles_rels": { + "name": "roles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "roles_rels_order_idx": { + "name": "roles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_parent_idx": { + "name": "roles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_path_idx": { + "name": "roles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_roles_id_idx": { + "name": "roles_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "roles_rels_parent_fk": { + "name": "roles_rels_parent_fk", + "tableFrom": "roles_rels", + "tableTo": "roles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "roles_rels_roles_fk": { + "name": "roles_rels_roles_fk", + "tableFrom": "roles_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ranks": { + "name": "ranks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_order": { + "name": "_order", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "abbreviation": { + "name": "abbreviation", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "insignia_id": { + "name": "insignia_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "promotion_ceiling_id": { + "name": "promotion_ceiling_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ranks__order_idx": { + "name": "ranks__order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_name_idx": { + "name": "ranks_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_abbreviation_idx": { + "name": "ranks_abbreviation_idx", + "columns": [ + { + "expression": "abbreviation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_insignia_idx": { + "name": "ranks_insignia_idx", + "columns": [ + { + "expression": "insignia_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_promotion_ceiling_idx": { + "name": "ranks_promotion_ceiling_idx", + "columns": [ + { + "expression": "promotion_ceiling_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_updated_at_idx": { + "name": "ranks_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_created_at_idx": { + "name": "ranks_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ranks_insignia_id_media_id_fk": { + "name": "ranks_insignia_id_media_id_fk", + "tableFrom": "ranks", + "tableTo": "media", + "columnsFrom": [ + "insignia_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ranks_promotion_ceiling_id_ranks_id_fk": { + "name": "ranks_promotion_ceiling_id_ranks_id_fk", + "tableFrom": "ranks", + "tableTo": "ranks", + "columnsFrom": [ + "promotion_ceiling_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles_progression_awards": { + "name": "profiles_progression_awards", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "award_id": { + "name": "award_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "awarded_by_id": { + "name": "awarded_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "awarded_at": { + "name": "awarded_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "award_reason": { + "name": "award_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "upgraded_from_id": { + "name": "upgraded_from_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "upgraded_at": { + "name": "upgraded_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "profiles_progression_awards_order_idx": { + "name": "profiles_progression_awards_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_parent_id_idx": { + "name": "profiles_progression_awards_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_award_idx": { + "name": "profiles_progression_awards_award_idx", + "columns": [ + { + "expression": "award_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_awarded_by_idx": { + "name": "profiles_progression_awards_awarded_by_idx", + "columns": [ + { + "expression": "awarded_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_upgraded_from_idx": { + "name": "profiles_progression_awards_upgraded_from_idx", + "columns": [ + { + "expression": "upgraded_from_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_progression_awards_award_id_awards_id_fk": { + "name": "profiles_progression_awards_award_id_awards_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "awards", + "columnsFrom": [ + "award_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_awarded_by_id_profiles_id_fk": { + "name": "profiles_progression_awards_awarded_by_id_profiles_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "profiles", + "columnsFrom": [ + "awarded_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_upgraded_from_id_awards_id_fk": { + "name": "profiles_progression_awards_upgraded_from_id_awards_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "awards", + "columnsFrom": [ + "upgraded_from_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_parent_id_fk": { + "name": "profiles_progression_awards_parent_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "profiles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles": { + "name": "profiles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rank_id": { + "name": "rank_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "dossier_enlistment_date": { + "name": "dossier_enlistment_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "dossier_personal_excerpt": { + "name": "dossier_personal_excerpt", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "dossier_intel_excerpt": { + "name": "dossier_intel_excerpt", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "progression_scoreboard_infantry_kills": { + "name": "progression_scoreboard_infantry_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_vehicle_kills": { + "name": "progression_scoreboard_vehicle_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_armor_kills": { + "name": "progression_scoreboard_armor_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_air_kills": { + "name": "progression_scoreboard_air_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_deaths": { + "name": "progression_scoreboard_deaths", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_games_played": { + "name": "progression_minigames_flappy_bird_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_total_passes": { + "name": "progression_minigames_flappy_bird_total_passes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_best_score": { + "name": "progression_minigames_flappy_bird_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_xp_earned": { + "name": "progression_minigames_flappy_bird_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_games_played": { + "name": "progression_minigames_eod_minesweeper_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_wins": { + "name": "progression_minigames_eod_minesweeper_wins", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_losses": { + "name": "progression_minigames_eod_minesweeper_losses", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_score": { + "name": "progression_minigames_eod_minesweeper_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_xp_earned": { + "name": "progression_minigames_eod_minesweeper_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_training_time": { + "name": "progression_minigames_eod_minesweeper_best_training_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_perimeter_time": { + "name": "progression_minigames_eod_minesweeper_best_perimeter_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_supply_road_time": { + "name": "progression_minigames_eod_minesweeper_best_supply_road_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_training_flags": { + "name": "progression_minigames_eod_minesweeper_best_training_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_perimeter_flags": { + "name": "progression_minigames_eod_minesweeper_best_perimeter_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_supply_road_flags": { + "name": "progression_minigames_eod_minesweeper_best_supply_road_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_games_played": { + "name": "progression_minigames_radio_traffic_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_total_messages": { + "name": "progression_minigames_radio_traffic_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_incorrect_messages": { + "name": "progression_minigames_radio_traffic_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_score": { + "name": "progression_minigames_radio_traffic_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_accuracy": { + "name": "progression_minigames_radio_traffic_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_sprint_time_ms": { + "name": "progression_minigames_radio_traffic_best_sprint_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_games_played": { + "name": "progression_minigames_radio_traffic_sprint_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_total_messages": { + "name": "progression_minigames_radio_traffic_sprint_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_incorrect_messages": { + "name": "progression_minigames_radio_traffic_sprint_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_best_score": { + "name": "progression_minigames_radio_traffic_sprint_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_best_accuracy": { + "name": "progression_minigames_radio_traffic_sprint_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_games_played": { + "name": "progression_minigames_radio_traffic_watch_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_total_messages": { + "name": "progression_minigames_radio_traffic_watch_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_incorrect_messages": { + "name": "progression_minigames_radio_traffic_watch_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_best_score": { + "name": "progression_minigames_radio_traffic_watch_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_best_accuracy": { + "name": "progression_minigames_radio_traffic_watch_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_xp_earned": { + "name": "progression_minigames_radio_traffic_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_games_played": { + "name": "progression_minigames_aim_trainer_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_best_score": { + "name": "progression_minigames_aim_trainer_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_recruit_best_score": { + "name": "progression_minigames_aim_trainer_recruit_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_veteran_best_score": { + "name": "progression_minigames_aim_trainer_veteran_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_elite_best_score": { + "name": "progression_minigames_aim_trainer_elite_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_recruit_best_accuracy": { + "name": "progression_minigames_aim_trainer_recruit_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_veteran_best_accuracy": { + "name": "progression_minigames_aim_trainer_veteran_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_elite_best_accuracy": { + "name": "progression_minigames_aim_trainer_elite_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_xp_earned": { + "name": "progression_minigames_aim_trainer_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_games_played": { + "name": "progression_minigames_opord_recall_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_best_score": { + "name": "progression_minigames_opord_recall_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_best_accuracy": { + "name": "progression_minigames_opord_recall_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_recruit_best_score": { + "name": "progression_minigames_opord_recall_recruit_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_veteran_best_score": { + "name": "progression_minigames_opord_recall_veteran_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_elite_best_score": { + "name": "progression_minigames_opord_recall_elite_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_recruit_best_time_ms": { + "name": "progression_minigames_opord_recall_recruit_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_veteran_best_time_ms": { + "name": "progression_minigames_opord_recall_veteran_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_elite_best_time_ms": { + "name": "progression_minigames_opord_recall_elite_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_xp_earned": { + "name": "progression_minigames_opord_recall_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_games_played": { + "name": "progression_minigames_poker_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_wins": { + "name": "progression_minigames_poker_wins", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_second_places": { + "name": "progression_minigames_poker_second_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_third_places": { + "name": "progression_minigames_poker_third_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_fourth_places": { + "name": "progression_minigames_poker_fourth_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_hands_won": { + "name": "progression_minigames_poker_hands_won", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_best_score": { + "name": "progression_minigames_poker_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_xp_earned": { + "name": "progression_minigames_poker_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_games_played": { + "name": "progression_minigames_blackjack_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_rounds_won": { + "name": "progression_minigames_blackjack_rounds_won", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_blackjacks_hit": { + "name": "progression_minigames_blackjack_blackjacks_hit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_best_score": { + "name": "progression_minigames_blackjack_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_xp_earned": { + "name": "progression_minigames_blackjack_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_chip_bank": { + "name": "progression_chip_bank", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_chip_bank_refilled_at": { + "name": "progression_chip_bank_refilled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "progression_voiceover_xp_earned": { + "name": "progression_voiceover_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "profiles_user_idx": { + "name": "profiles_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rank_idx": { + "name": "profiles_rank_idx", + "columns": [ + { + "expression": "rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_updated_at_idx": { + "name": "profiles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_created_at_idx": { + "name": "profiles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_user_id_users_id_fk": { + "name": "profiles_user_id_users_id_fk", + "tableFrom": "profiles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_rank_id_ranks_id_fk": { + "name": "profiles_rank_id_ranks_id_fk", + "tableFrom": "profiles", + "tableTo": "ranks", + "columnsFrom": [ + "rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles_rels": { + "name": "profiles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "profiles_rels_order_idx": { + "name": "profiles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_parent_idx": { + "name": "profiles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_path_idx": { + "name": "profiles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_qualifications_id_idx": { + "name": "profiles_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_rels_parent_fk": { + "name": "profiles_rels_parent_fk", + "tableFrom": "profiles_rels", + "tableTo": "profiles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "profiles_rels_qualifications_fk": { + "name": "profiles_rels_qualifications_fk", + "tableFrom": "profiles_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards_grant_config_allowed_grantor_assignment_types": { + "name": "awards_grant_config_allowed_grantor_assignment_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_awards_grant_config_allowed_grantor_assignment_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "awards_grant_config_allowed_grantor_assignment_types_order_idx": { + "name": "awards_grant_config_allowed_grantor_assignment_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_grant_config_allowed_grantor_assignment_types_parent_idx": { + "name": "awards_grant_config_allowed_grantor_assignment_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_grant_config_allowed_grantor_assignment_types_parent_fk": { + "name": "awards_grant_config_allowed_grantor_assignment_types_parent_fk", + "tableFrom": "awards_grant_config_allowed_grantor_assignment_types", + "tableTo": "awards", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards": { + "name": "awards", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_awards_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'commendation'" + }, + "commendation_color": { + "name": "commendation_color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#92400e'" + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "experience_points": { + "name": "experience_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "ribbon_design": { + "name": "ribbon_design", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "background_image_id": { + "name": "background_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "medal_design": { + "name": "medal_design", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "advancement_series_key": { + "name": "advancement_series_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "advancement_tier": { + "name": "advancement_tier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "grant_config_max_grants_per_grantor": { + "name": "grant_config_max_grants_per_grantor", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "grant_config_recipient_scope": { + "name": "grant_config_recipient_scope", + "type": "enum_awards_grant_config_recipient_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'same_command'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "awards_name_idx": { + "name": "awards_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_image_idx": { + "name": "awards_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_background_image_idx": { + "name": "awards_background_image_idx", + "columns": [ + { + "expression": "background_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_updated_at_idx": { + "name": "awards_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_created_at_idx": { + "name": "awards_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_image_id_media_id_fk": { + "name": "awards_image_id_media_id_fk", + "tableFrom": "awards", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "awards_background_image_id_media_id_fk": { + "name": "awards_background_image_id_media_id_fk", + "tableFrom": "awards", + "tableTo": "media", + "columnsFrom": [ + "background_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards_rels": { + "name": "awards_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "awards_rels_order_idx": { + "name": "awards_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_parent_idx": { + "name": "awards_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_path_idx": { + "name": "awards_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_assignments_id_idx": { + "name": "awards_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_rels_parent_fk": { + "name": "awards_rels_parent_fk", + "tableFrom": "awards_rels", + "tableTo": "awards", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "awards_rels_assignments_fk": { + "name": "awards_rels_assignments_fk", + "tableFrom": "awards_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.qualifications": { + "name": "qualifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "qualifications_name_idx": { + "name": "qualifications_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_updated_at_idx": { + "name": "qualifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_created_at_idx": { + "name": "qualifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments": { + "name": "assignments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_assignments_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "callsign": { + "name": "callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "leader_id": { + "name": "leader_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assignments_leader_idx": { + "name": "assignments_leader_idx", + "columns": [ + { + "expression": "leader_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_updated_at_idx": { + "name": "assignments_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_created_at_idx": { + "name": "assignments_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_leader_id_users_id_fk": { + "name": "assignments_leader_id_users_id_fk", + "tableFrom": "assignments", + "tableTo": "users", + "columnsFrom": [ + "leader_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments_rels": { + "name": "assignments_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assignments_rels_order_idx": { + "name": "assignments_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_parent_idx": { + "name": "assignments_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_path_idx": { + "name": "assignments_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_assignments_id_idx": { + "name": "assignments_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_users_id_idx": { + "name": "assignments_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_rels_parent_fk": { + "name": "assignments_rels_parent_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_assignments_fk": { + "name": "assignments_rels_assignments_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_users_fk": { + "name": "assignments_rels_users_fk", + "tableFrom": "assignments_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignment_transfers": { + "name": "assignment_transfers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "requester_id": { + "name": "requester_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "from_assignment_id": { + "name": "from_assignment_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "to_assignment_id": { + "name": "to_assignment_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_assignment_transfers_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "escalation_reason": { + "name": "escalation_reason", + "type": "enum_assignment_transfers_escalation_reason", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_leader_decision": { + "name": "from_leader_decision", + "type": "enum_assignment_transfers_from_leader_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "to_leader_decision": { + "name": "to_leader_decision", + "type": "enum_assignment_transfers_to_leader_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "from_decision_by_id": { + "name": "from_decision_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_decision_by_id": { + "name": "to_decision_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "from_decided_at": { + "name": "from_decided_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "to_decided_at": { + "name": "to_decided_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "from_leader_snapshot_id": { + "name": "from_leader_snapshot_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_leader_snapshot_id": { + "name": "to_leader_snapshot_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rejection_reason": { + "name": "rejection_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "request_note": { + "name": "request_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "appeal_note": { + "name": "appeal_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "resolved_by_id": { + "name": "resolved_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resolution_note": { + "name": "resolution_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "resolved_at": { + "name": "resolved_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "discord_from_leader_message_id": { + "name": "discord_from_leader_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_to_leader_message_id": { + "name": "discord_to_leader_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_requester_message_id": { + "name": "discord_requester_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "source_notified_to_user_id_id": { + "name": "source_notified_to_user_id_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "destination_notified_to_user_id_id": { + "name": "destination_notified_to_user_id_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "discord_delivered_keys": { + "name": "discord_delivered_keys", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assignment_transfers_requester_idx": { + "name": "assignment_transfers_requester_idx", + "columns": [ + { + "expression": "requester_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_assignment_idx": { + "name": "assignment_transfers_from_assignment_idx", + "columns": [ + { + "expression": "from_assignment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_assignment_idx": { + "name": "assignment_transfers_to_assignment_idx", + "columns": [ + { + "expression": "to_assignment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_status_idx": { + "name": "assignment_transfers_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_decision_by_idx": { + "name": "assignment_transfers_from_decision_by_idx", + "columns": [ + { + "expression": "from_decision_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_decision_by_idx": { + "name": "assignment_transfers_to_decision_by_idx", + "columns": [ + { + "expression": "to_decision_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_leader_snapshot_idx": { + "name": "assignment_transfers_from_leader_snapshot_idx", + "columns": [ + { + "expression": "from_leader_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_leader_snapshot_idx": { + "name": "assignment_transfers_to_leader_snapshot_idx", + "columns": [ + { + "expression": "to_leader_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_resolved_by_idx": { + "name": "assignment_transfers_resolved_by_idx", + "columns": [ + { + "expression": "resolved_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_source_notified_to_user_id_idx": { + "name": "assignment_transfers_source_notified_to_user_id_idx", + "columns": [ + { + "expression": "source_notified_to_user_id_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_destination_notified_to_user_id_idx": { + "name": "assignment_transfers_destination_notified_to_user_id_idx", + "columns": [ + { + "expression": "destination_notified_to_user_id_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_updated_at_idx": { + "name": "assignment_transfers_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_created_at_idx": { + "name": "assignment_transfers_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignment_transfers_requester_id_users_id_fk": { + "name": "assignment_transfers_requester_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "requester_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_assignment_id_assignments_id_fk": { + "name": "assignment_transfers_from_assignment_id_assignments_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "assignments", + "columnsFrom": [ + "from_assignment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_assignment_id_assignments_id_fk": { + "name": "assignment_transfers_to_assignment_id_assignments_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "assignments", + "columnsFrom": [ + "to_assignment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_decision_by_id_users_id_fk": { + "name": "assignment_transfers_from_decision_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "from_decision_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_decision_by_id_users_id_fk": { + "name": "assignment_transfers_to_decision_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "to_decision_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_leader_snapshot_id_users_id_fk": { + "name": "assignment_transfers_from_leader_snapshot_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "from_leader_snapshot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_leader_snapshot_id_users_id_fk": { + "name": "assignment_transfers_to_leader_snapshot_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "to_leader_snapshot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_resolved_by_id_users_id_fk": { + "name": "assignment_transfers_resolved_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "resolved_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_source_notified_to_user_id_id_users_id_fk": { + "name": "assignment_transfers_source_notified_to_user_id_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "source_notified_to_user_id_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_destination_notified_to_user_id_id_users_id_fk": { + "name": "assignment_transfers_destination_notified_to_user_id_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "destination_notified_to_user_id_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.experience": { + "name": "experience", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "required_points": { + "name": "required_points", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "experience_name_idx": { + "name": "experience_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "experience_updated_at_idx": { + "name": "experience_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "experience_created_at_idx": { + "name": "experience_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_notifications": { + "name": "user_notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link": { + "name": "link", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "read": { + "name": "read", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "user_notifications_user_idx": { + "name": "user_notifications_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_read_idx": { + "name": "user_notifications_read_idx", + "columns": [ + { + "expression": "read", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_updated_at_idx": { + "name": "user_notifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_created_at_idx": { + "name": "user_notifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_notifications_user_id_users_id_fk": { + "name": "user_notifications_user_id_users_id_fk", + "tableFrom": "user_notifications", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.evaluations": { + "name": "evaluations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "rater_id": { + "name": "rater_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ratee_id": { + "name": "ratee_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "enum_evaluations_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "level": { + "name": "level", + "type": "enum_evaluations_level", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "comment": { + "name": "comment", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "evaluations_rater_idx": { + "name": "evaluations_rater_idx", + "columns": [ + { + "expression": "rater_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_ratee_idx": { + "name": "evaluations_ratee_idx", + "columns": [ + { + "expression": "ratee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_mission_idx": { + "name": "evaluations_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_updated_at_idx": { + "name": "evaluations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_created_at_idx": { + "name": "evaluations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "evaluations_rater_id_users_id_fk": { + "name": "evaluations_rater_id_users_id_fk", + "tableFrom": "evaluations", + "tableTo": "users", + "columnsFrom": [ + "rater_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "evaluations_ratee_id_users_id_fk": { + "name": "evaluations_ratee_id_users_id_fk", + "tableFrom": "evaluations", + "tableTo": "users", + "columnsFrom": [ + "ratee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "evaluations_mission_id_missions_id_fk": { + "name": "evaluations_mission_id_missions_id_fk", + "tableFrom": "evaluations", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ribbon_submissions_grantor_types": { + "name": "ribbon_submissions_grantor_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_ribbon_submissions_grantor_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "ribbon_submissions_grantor_types_order_idx": { + "name": "ribbon_submissions_grantor_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_grantor_types_parent_idx": { + "name": "ribbon_submissions_grantor_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ribbon_submissions_grantor_types_parent_fk": { + "name": "ribbon_submissions_grantor_types_parent_fk", + "tableFrom": "ribbon_submissions_grantor_types", + "tableTo": "ribbon_submissions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ribbon_submissions": { + "name": "ribbon_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "design": { + "name": "design", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_ribbon_submissions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "review_note": { + "name": "review_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reviewed_by_id": { + "name": "reviewed_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reviewed_at": { + "name": "reviewed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "award_id": { + "name": "award_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "award_xp": { + "name": "award_xp", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "recipient_scope": { + "name": "recipient_scope", + "type": "enum_ribbon_submissions_recipient_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'same_command'" + }, + "max_grants_per_grantor": { + "name": "max_grants_per_grantor", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ribbon_submissions_user_idx": { + "name": "ribbon_submissions_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_reviewed_by_idx": { + "name": "ribbon_submissions_reviewed_by_idx", + "columns": [ + { + "expression": "reviewed_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_award_idx": { + "name": "ribbon_submissions_award_idx", + "columns": [ + { + "expression": "award_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_updated_at_idx": { + "name": "ribbon_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_created_at_idx": { + "name": "ribbon_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ribbon_submissions_user_id_users_id_fk": { + "name": "ribbon_submissions_user_id_users_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ribbon_submissions_reviewed_by_id_users_id_fk": { + "name": "ribbon_submissions_reviewed_by_id_users_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "users", + "columnsFrom": [ + "reviewed_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ribbon_submissions_award_id_awards_id_fk": { + "name": "ribbon_submissions_award_id_awards_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "awards", + "columnsFrom": [ + "award_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_roles_provided_roles": { + "name": "missions_mission_roles_provided_roles", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "role_name": { + "name": "role_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "minimum_rank_id": { + "name": "minimum_rank_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_mission_roles_provided_roles_order_idx": { + "name": "missions_mission_roles_provided_roles_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_parent_id_idx": { + "name": "missions_mission_roles_provided_roles_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_minimum_rank_idx": { + "name": "missions_mission_roles_provided_roles_minimum_rank_idx", + "columns": [ + { + "expression": "minimum_rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk": { + "name": "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "ranks", + "columnsFrom": [ + "minimum_rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_mission_roles_provided_roles_parent_id_fk": { + "name": "missions_mission_roles_provided_roles_parent_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_briefing": { + "name": "missions_briefing", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "section_name": { + "name": "section_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "details": { + "name": "details", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_briefing_order_idx": { + "name": "missions_briefing_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_briefing_parent_id_idx": { + "name": "missions_briefing_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_briefing_parent_id_fk": { + "name": "missions_briefing_parent_id_fk", + "tableFrom": "missions_briefing", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_objectives": { + "name": "missions_mission_objectives", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "success_or_fail_conditions": { + "name": "success_or_fail_conditions", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "redacted": { + "name": "redacted", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "missions_mission_objectives_order_idx": { + "name": "missions_mission_objectives_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_objectives_parent_id_idx": { + "name": "missions_mission_objectives_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_objectives_parent_id_fk": { + "name": "missions_mission_objectives_parent_id_fk", + "tableFrom": "missions_mission_objectives", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_factions_involved": { + "name": "missions_factions_involved", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "threat_level": { + "name": "threat_level", + "type": "enum_missions_factions_involved_threat_level", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'hostile'" + } + }, + "indexes": { + "missions_factions_involved_order_idx": { + "name": "missions_factions_involved_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_factions_involved_parent_id_idx": { + "name": "missions_factions_involved_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_factions_involved_faction_idx": { + "name": "missions_factions_involved_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_factions_involved_faction_id_factions_id_fk": { + "name": "missions_factions_involved_faction_id_factions_id_fk", + "tableFrom": "missions_factions_involved", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_factions_involved_parent_id_fk": { + "name": "missions_factions_involved_parent_id_fk", + "tableFrom": "missions_factions_involved", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_insertion": { + "name": "missions_logistics_and_support_insertion", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_insertion", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_insertion_order_idx": { + "name": "missions_logistics_and_support_insertion_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_insertion_parent_idx": { + "name": "missions_logistics_and_support_insertion_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_insertion_parent_fk": { + "name": "missions_logistics_and_support_insertion_parent_fk", + "tableFrom": "missions_logistics_and_support_insertion", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_extraction": { + "name": "missions_logistics_and_support_extraction", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_extraction", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_extraction_order_idx": { + "name": "missions_logistics_and_support_extraction_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_extraction_parent_idx": { + "name": "missions_logistics_and_support_extraction_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_extraction_parent_fk": { + "name": "missions_logistics_and_support_extraction_parent_fk", + "tableFrom": "missions_logistics_and_support_extraction", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_assets_available": { + "name": "missions_logistics_and_support_assets_available", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_type": { + "name": "asset_type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "asset_count": { + "name": "asset_count", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "does_respawn": { + "name": "does_respawn", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_callsign": { + "name": "asset_callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_logistics_and_support_assets_available_order_idx": { + "name": "missions_logistics_and_support_assets_available_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_assets_available_parent_id_idx": { + "name": "missions_logistics_and_support_assets_available_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_assets_available_parent_id_fk": { + "name": "missions_logistics_and_support_assets_available_parent_id_fk", + "tableFrom": "missions_logistics_and_support_assets_available", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_comms_and_docs_frequencies": { + "name": "missions_comms_and_docs_frequencies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "frequency": { + "name": "frequency", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "channel": { + "name": "channel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "net_name": { + "name": "net_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "freq_usage": { + "name": "freq_usage", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_comms_and_docs_frequencies_order_idx": { + "name": "missions_comms_and_docs_frequencies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_comms_and_docs_frequencies_parent_id_idx": { + "name": "missions_comms_and_docs_frequencies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_comms_and_docs_frequencies_parent_id_fk": { + "name": "missions_comms_and_docs_frequencies_parent_id_fk", + "tableFrom": "missions_comms_and_docs_frequencies", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions": { + "name": "missions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "operation_type": { + "name": "operation_type", + "type": "enum_missions_operation_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "discord_message_id": { + "name": "discord_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_attendance_hash": { + "name": "discord_attendance_hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_attendance_sent_at": { + "name": "discord_attendance_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "discord_modlist_hash": { + "name": "discord_modlist_hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_cancelled_at": { + "name": "discord_cancelled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "evaluation_reminders_sent_at": { + "name": "evaluation_reminders_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "ready_reminder_web_sent_at": { + "name": "ready_reminder_web_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "ready_reminder_dm_sent_at": { + "name": "ready_reminder_dm_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "tickets_settled_at": { + "name": "tickets_settled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by_id": { + "name": "created_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "classification_map_id": { + "name": "classification_map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "classification_mission_type": { + "name": "classification_mission_type", + "type": "enum_missions_classification_mission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Zeus'" + }, + "classification_campaign_id": { + "name": "classification_campaign_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "classification_custom_scripts": { + "name": "classification_custom_scripts", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "classification_start_date_time": { + "name": "classification_start_date_time", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "classification_estimated_duration": { + "name": "classification_estimated_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 240 + }, + "ownership_and_status_status": { + "name": "ownership_and_status_status", + "type": "enum_missions_ownership_and_status_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Concept'" + }, + "ownership_and_status_visibility": { + "name": "ownership_and_status_visibility", + "type": "enum_missions_ownership_and_status_visibility", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'leadership'" + }, + "ownership_and_status_completed_at": { + "name": "ownership_and_status_completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "mission_roles_max_players": { + "name": "mission_roles_max_players", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 32 + }, + "mission_roles_notes": { + "name": "mission_roles_notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "civilian_presence": { + "name": "civilian_presence", + "type": "enum_missions_civilian_presence", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'None'" + }, + "game_details_server_details_server_ip": { + "name": "game_details_server_details_server_ip", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'arma.onyxsimple.com'" + }, + "game_details_server_details_server_port": { + "name": "game_details_server_details_server_port", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 2302 + }, + "game_details_server_details_server_password": { + "name": "game_details_server_details_server_password", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'ptf313'" + }, + "game_details_game_setup_mission_file_id": { + "name": "game_details_game_setup_mission_file_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_details_game_setup_required_mods_id": { + "name": "game_details_game_setup_required_mods_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "comms_and_docs_radio_plan": { + "name": "comms_and_docs_radio_plan", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "missions_code_name_idx": { + "name": "missions_code_name_idx", + "columns": [ + { + "expression": "code_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_created_by_idx": { + "name": "missions_created_by_idx", + "columns": [ + { + "expression": "created_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_cover_image_idx": { + "name": "missions_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_map_idx": { + "name": "missions_classification_classification_map_idx", + "columns": [ + { + "expression": "classification_map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_campaign_idx": { + "name": "missions_classification_classification_campaign_idx", + "columns": [ + { + "expression": "classification_campaign_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_setup_idx": { + "name": "missions_game_details_game_setup_game_details_game_setup_idx", + "columns": [ + { + "expression": "game_details_game_setup_mission_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_set_1_idx": { + "name": "missions_game_details_game_setup_game_details_game_set_1_idx", + "columns": [ + { + "expression": "game_details_game_setup_required_mods_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_updated_at_idx": { + "name": "missions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_created_at_idx": { + "name": "missions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_created_by_id_users_id_fk": { + "name": "missions_created_by_id_users_id_fk", + "tableFrom": "missions", + "tableTo": "users", + "columnsFrom": [ + "created_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_cover_image_id_media_id_fk": { + "name": "missions_cover_image_id_media_id_fk", + "tableFrom": "missions", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_classification_map_id_maps_id_fk": { + "name": "missions_classification_map_id_maps_id_fk", + "tableFrom": "missions", + "tableTo": "maps", + "columnsFrom": [ + "classification_map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_classification_campaign_id_campaigns_id_fk": { + "name": "missions_classification_campaign_id_campaigns_id_fk", + "tableFrom": "missions", + "tableTo": "campaigns", + "columnsFrom": [ + "classification_campaign_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_mission_file_id_mission_files_id_fk": { + "name": "missions_game_details_game_setup_mission_file_id_mission_files_id_fk", + "tableFrom": "missions", + "tableTo": "mission_files", + "columnsFrom": [ + "game_details_game_setup_mission_file_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk": { + "name": "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk", + "tableFrom": "missions", + "tableTo": "mod_lists", + "columnsFrom": [ + "game_details_game_setup_required_mods_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_rels": { + "name": "missions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_rels_order_idx": { + "name": "missions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_parent_idx": { + "name": "missions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_path_idx": { + "name": "missions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_users_id_idx": { + "name": "missions_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_qualifications_id_idx": { + "name": "missions_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_rels_parent_fk": { + "name": "missions_rels_parent_fk", + "tableFrom": "missions_rels", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_users_fk": { + "name": "missions_rels_users_fk", + "tableFrom": "missions_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_qualifications_fk": { + "name": "missions_rels_qualifications_fk", + "tableFrom": "missions_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mission_attendances": { + "name": "mission_attendances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "response": { + "name": "response", + "type": "enum_mission_attendances_response", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mission_attendances_mission_idx": { + "name": "mission_attendances_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_user_idx": { + "name": "mission_attendances_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_updated_at_idx": { + "name": "mission_attendances_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_created_at_idx": { + "name": "mission_attendances_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mission_attendances_mission_id_missions_id_fk": { + "name": "mission_attendances_mission_id_missions_id_fk", + "tableFrom": "mission_attendances", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "mission_attendances_user_id_users_id_fk": { + "name": "mission_attendances_user_id_users_id_fk", + "tableFrom": "mission_attendances", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.campaigns": { + "name": "campaigns", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'An Arma 3 campaign.'" + }, + "status": { + "name": "status", + "type": "enum_campaigns_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'concept'" + }, + "campaign_mode": { + "name": "campaign_mode", + "type": "enum_campaigns_campaign_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'custom'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "owner_id": { + "name": "owner_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "campaigns_name_idx": { + "name": "campaigns_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_cover_image_idx": { + "name": "campaigns_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_owner_idx": { + "name": "campaigns_owner_idx", + "columns": [ + { + "expression": "owner_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_updated_at_idx": { + "name": "campaigns_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_created_at_idx": { + "name": "campaigns_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "campaigns_cover_image_id_media_id_fk": { + "name": "campaigns_cover_image_id_media_id_fk", + "tableFrom": "campaigns", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "campaigns_owner_id_users_id_fk": { + "name": "campaigns_owner_id_users_id_fk", + "tableFrom": "campaigns", + "tableTo": "users", + "columnsFrom": [ + "owner_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions_relationships": { + "name": "factions_relationships", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "target_faction_id": { + "name": "target_faction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "factions_relationships_order_idx": { + "name": "factions_relationships_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_relationships_parent_id_idx": { + "name": "factions_relationships_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_relationships_target_faction_idx": { + "name": "factions_relationships_target_faction_idx", + "columns": [ + { + "expression": "target_faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_relationships_target_faction_id_factions_id_fk": { + "name": "factions_relationships_target_faction_id_factions_id_fk", + "tableFrom": "factions_relationships", + "tableTo": "factions", + "columnsFrom": [ + "target_faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "factions_relationships_parent_id_fk": { + "name": "factions_relationships_parent_id_fk", + "tableFrom": "factions_relationships", + "tableTo": "factions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions": { + "name": "factions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_factions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'minorFaction'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "reputation": { + "name": "reputation", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "playable_faction": { + "name": "playable_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "starting_faction": { + "name": "starting_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "factions_name_idx": { + "name": "factions_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_cover_image_idx": { + "name": "factions_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_updated_at_idx": { + "name": "factions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_created_at_idx": { + "name": "factions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_cover_image_id_media_id_fk": { + "name": "factions_cover_image_id_media_id_fk", + "tableFrom": "factions", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions_rels": { + "name": "factions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "factions_rels_order_idx": { + "name": "factions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_parent_idx": { + "name": "factions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_path_idx": { + "name": "factions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_campaigns_id_idx": { + "name": "factions_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_rels_parent_fk": { + "name": "factions_rels_parent_fk", + "tableFrom": "factions_rels", + "tableTo": "factions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "factions_rels_campaigns_fk": { + "name": "factions_rels_campaigns_fk", + "tableFrom": "factions_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_requirements_prerequisite_technologies": { + "name": "technologies_requirements_prerequisite_technologies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "technologies_requirements_prerequisite_technologies_order_idx": { + "name": "technologies_requirements_prerequisite_technologies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_requirements_prerequisite_technologies_parent_id_idx": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_requirements_prerequisite_technologies_parent_id_fk": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_fk", + "tableFrom": "technologies_requirements_prerequisite_technologies", + "tableTo": "technologies", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_research_costs_resources": { + "name": "technologies_research_costs_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + } + }, + "indexes": { + "technologies_research_costs_resources_order_idx": { + "name": "technologies_research_costs_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_research_costs_resources_parent_id_idx": { + "name": "technologies_research_costs_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_research_costs_resources_resource_idx": { + "name": "technologies_research_costs_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_research_costs_resources_resource_id_resources_id_fk": { + "name": "technologies_research_costs_resources_resource_id_resources_id_fk", + "tableFrom": "technologies_research_costs_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "technologies_research_costs_resources_parent_id_fk": { + "name": "technologies_research_costs_resources_parent_id_fk", + "tableFrom": "technologies_research_costs_resources", + "tableTo": "technologies", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies": { + "name": "technologies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_technologies_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "type": { + "name": "type", + "type": "enum_technologies_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'upgrade'" + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "research_costs_minimum_research_duration": { + "name": "research_costs_minimum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "research_costs_maximum_research_duration": { + "name": "research_costs_maximum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "technologies_updated_at_idx": { + "name": "technologies_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_created_at_idx": { + "name": "technologies_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_rels": { + "name": "technologies_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "technologies_rels_order_idx": { + "name": "technologies_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_parent_idx": { + "name": "technologies_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_path_idx": { + "name": "technologies_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_technologies_id_idx": { + "name": "technologies_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_rels_parent_fk": { + "name": "technologies_rels_parent_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "technologies_rels_technologies_fk": { + "name": "technologies_rels_technologies_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_skin_configuration_applies_to_asset_types": { + "name": "assets_skin_configuration_applies_to_asset_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_assets_skin_configuration_applies_to_asset_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "assets_skin_configuration_applies_to_asset_types_order_idx": { + "name": "assets_skin_configuration_applies_to_asset_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_skin_configuration_applies_to_asset_types_parent_idx": { + "name": "assets_skin_configuration_applies_to_asset_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_skin_configuration_applies_to_asset_types_parent_fk": { + "name": "assets_skin_configuration_applies_to_asset_types_parent_fk", + "tableFrom": "assets_skin_configuration_applies_to_asset_types", + "tableTo": "assets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_inputs": { + "name": "assets_crafting_crafting_data_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "lended": { + "name": "lended", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_inputs_order_idx": { + "name": "assets_crafting_crafting_data_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_inputs_parent_id_idx": { + "name": "assets_crafting_crafting_data_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_inputs_parent_id_fk": { + "name": "assets_crafting_crafting_data_inputs_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_inputs", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_byproducts": { + "name": "assets_crafting_crafting_data_byproducts", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_byproducts_order_idx": { + "name": "assets_crafting_crafting_data_byproducts_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_byproducts_parent_id_idx": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_byproducts_parent_id_fk": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_byproducts", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_assets_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "class_name": { + "name": "class_name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "asset_type": { + "name": "asset_type", + "type": "enum_assets_asset_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'weapon'" + }, + "weapon_configuration_slot_type": { + "name": "weapon_configuration_slot_type", + "type": "enum_assets_weapon_configuration_slot_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_generation": { + "name": "nightvision_configuration_nvg_generation", + "type": "enum_assets_nightvision_configuration_nvg_generation", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_has_thermals": { + "name": "nightvision_configuration_nvg_has_thermals", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "container_configuration_capacity_kg": { + "name": "container_configuration_capacity_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "container_configuration_weight_kg": { + "name": "container_configuration_weight_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_round_capacity": { + "name": "magazine_configuration_round_capacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_ammo_type": { + "name": "magazine_configuration_ammo_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_greenmag_compatible": { + "name": "magazine_configuration_greenmag_compatible", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_mod": { + "name": "asset_metadata_mod", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_thumbnail_id": { + "name": "asset_metadata_thumbnail_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_game_description": { + "name": "asset_metadata_game_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "market_trading_rarity": { + "name": "market_trading_rarity", + "type": "enum_assets_market_trading_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_buy_price": { + "name": "market_trading_perceived_value_base_buy_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_sell_price": { + "name": "market_trading_perceived_value_base_sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "economy_baseline_supply": { + "name": "economy_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "economy_baseline_demand": { + "name": "economy_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "economy_max_modifier": { + "name": "economy_max_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "crafting_craftable": { + "name": "crafting_craftable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_blueprint_required": { + "name": "crafting_blueprint_required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_technology_required_to_use": { + "name": "crafting_technology_required_to_use", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_crafting_data_crafting_time_per_unit": { + "name": "crafting_crafting_data_crafting_time_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "crafting_crafting_data_batch_size": { + "name": "crafting_crafting_data_batch_size", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_grid_width": { + "name": "storage_dimensions_grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_grid_height": { + "name": "storage_dimensions_grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_stackable": { + "name": "storage_dimensions_stackable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "storage_dimensions_max_stack_size": { + "name": "storage_dimensions_max_stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "storage_dimensions_rotatable": { + "name": "storage_dimensions_rotatable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "is_live": { + "name": "is_live", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assets_asset_metadata_asset_metadata_thumbnail_idx": { + "name": "assets_asset_metadata_asset_metadata_thumbnail_idx", + "columns": [ + { + "expression": "asset_metadata_thumbnail_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_updated_at_idx": { + "name": "assets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_created_at_idx": { + "name": "assets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_asset_metadata_thumbnail_id_media_id_fk": { + "name": "assets_asset_metadata_thumbnail_id_media_id_fk", + "tableFrom": "assets", + "tableTo": "media", + "columnsFrom": [ + "asset_metadata_thumbnail_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_rels": { + "name": "assets_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_rels_order_idx": { + "name": "assets_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_parent_idx": { + "name": "assets_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_path_idx": { + "name": "assets_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_assets_id_idx": { + "name": "assets_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_technologies_id_idx": { + "name": "assets_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_resources_id_idx": { + "name": "assets_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_structures_id_idx": { + "name": "assets_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_rels_parent_fk": { + "name": "assets_rels_parent_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_assets_fk": { + "name": "assets_rels_assets_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_technologies_fk": { + "name": "assets_rels_technologies_fk", + "tableFrom": "assets_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_resources_fk": { + "name": "assets_rels_resources_fk", + "tableFrom": "assets_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_structures_fk": { + "name": "assets_rels_structures_fk", + "tableFrom": "assets_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resources": { + "name": "resources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_resources_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "type": { + "name": "type", + "type": "enum_resources_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'physical'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "icon_id": { + "name": "icon_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "base_value": { + "name": "base_value", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "rarity": { + "name": "rarity", + "type": "enum_resources_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'common'" + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "economy_baseline_supply": { + "name": "economy_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "economy_baseline_demand": { + "name": "economy_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "economy_max_modifier": { + "name": "economy_max_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "unit_of_measure": { + "name": "unit_of_measure", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mass_per_unit": { + "name": "mass_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "stack_size": { + "name": "stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "grid_width": { + "name": "grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "grid_height": { + "name": "grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "stackable": { + "name": "stackable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "max_stack_size": { + "name": "max_stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "rotatable": { + "name": "rotatable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resources_icon_idx": { + "name": "resources_icon_idx", + "columns": [ + { + "expression": "icon_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_updated_at_idx": { + "name": "resources_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_created_at_idx": { + "name": "resources_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resources_icon_id_media_id_fk": { + "name": "resources_icon_id_media_id_fk", + "tableFrom": "resources", + "tableTo": "media", + "columnsFrom": [ + "icon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_category": { + "name": "vehicles_category", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_vehicles_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "vehicles_category_order_idx": { + "name": "vehicles_category_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_category_parent_idx": { + "name": "vehicles_category_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_category_parent_fk": { + "name": "vehicles_category_parent_fk", + "tableFrom": "vehicles_category", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_materials": { + "name": "vehicles_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_materials_order_idx": { + "name": "vehicles_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_parent_id_idx": { + "name": "vehicles_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_resource_idx": { + "name": "vehicles_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_materials_resource_id_resources_id_fk": { + "name": "vehicles_materials_resource_id_resources_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_materials_parent_id_fk": { + "name": "vehicles_materials_parent_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_scrap_returns": { + "name": "vehicles_scrap_returns", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "chance": { + "name": "chance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + } + }, + "indexes": { + "vehicles_scrap_returns_order_idx": { + "name": "vehicles_scrap_returns_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_parent_id_idx": { + "name": "vehicles_scrap_returns_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_resource_idx": { + "name": "vehicles_scrap_returns_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_scrap_returns_resource_id_resources_id_fk": { + "name": "vehicles_scrap_returns_resource_id_resources_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_scrap_returns_parent_id_fk": { + "name": "vehicles_scrap_returns_parent_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_upkeep_costs": { + "name": "vehicles_upkeep_costs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_upkeep_costs_order_idx": { + "name": "vehicles_upkeep_costs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_parent_id_idx": { + "name": "vehicles_upkeep_costs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_resource_idx": { + "name": "vehicles_upkeep_costs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_upkeep_costs_resource_id_resources_id_fk": { + "name": "vehicles_upkeep_costs_resource_id_resources_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_upkeep_costs_parent_id_fk": { + "name": "vehicles_upkeep_costs_parent_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_allowed_virtual_cargo": { + "name": "vehicles_allowed_virtual_cargo", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_allowed_virtual_cargo_order_idx": { + "name": "vehicles_allowed_virtual_cargo_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_allowed_virtual_cargo_parent_id_idx": { + "name": "vehicles_allowed_virtual_cargo_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_allowed_virtual_cargo_parent_id_fk": { + "name": "vehicles_allowed_virtual_cargo_parent_id_fk", + "tableFrom": "vehicles_allowed_virtual_cargo", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_pylons": { + "name": "vehicles_pylons", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "pylon_name": { + "name": "pylon_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pylon_type": { + "name": "pylon_type", + "type": "enum_vehicles_pylons_pylon_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'mountedWeapon'" + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "ammo_type_id": { + "name": "ammo_type_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_pylons_order_idx": { + "name": "vehicles_pylons_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_parent_id_idx": { + "name": "vehicles_pylons_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_ammo_type_idx": { + "name": "vehicles_pylons_ammo_type_idx", + "columns": [ + { + "expression": "ammo_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_pylons_ammo_type_id_assets_id_fk": { + "name": "vehicles_pylons_ammo_type_id_assets_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "assets", + "columnsFrom": [ + "ammo_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_pylons_parent_id_fk": { + "name": "vehicles_pylons_parent_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles": { + "name": "vehicles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "classname": { + "name": "classname", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "approval_status": { + "name": "approval_status", + "type": "enum_vehicles_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "fuel_fuel_type_id": { + "name": "fuel_fuel_type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "fuel_fuel_capacity": { + "name": "fuel_fuel_capacity", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_fuel_consumption_rate": { + "name": "fuel_fuel_consumption_rate", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "construction_time": { + "name": "construction_time", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "transport_mode": { + "name": "transport_mode", + "type": "enum_vehicles_transport_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'ground'" + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_mass": { + "name": "max_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "ace_cargo_slots": { + "name": "ace_cargo_slots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "armor_rating": { + "name": "armor_rating", + "type": "enum_vehicles_armor_rating", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_speed_on_road": { + "name": "max_speed_on_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_speed_off_road": { + "name": "max_speed_off_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_airspeed": { + "name": "max_airspeed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_knots": { + "name": "max_knots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "vehicles_image_idx": { + "name": "vehicles_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_fuel_fuel_fuel_type_idx": { + "name": "vehicles_fuel_fuel_fuel_type_idx", + "columns": [ + { + "expression": "fuel_fuel_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_updated_at_idx": { + "name": "vehicles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_created_at_idx": { + "name": "vehicles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_image_id_media_id_fk": { + "name": "vehicles_image_id_media_id_fk", + "tableFrom": "vehicles", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_fuel_fuel_type_id_resources_id_fk": { + "name": "vehicles_fuel_fuel_type_id_resources_id_fk", + "tableFrom": "vehicles", + "tableTo": "resources", + "columnsFrom": [ + "fuel_fuel_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_rels": { + "name": "vehicles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_rels_order_idx": { + "name": "vehicles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_parent_idx": { + "name": "vehicles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_path_idx": { + "name": "vehicles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_technologies_id_idx": { + "name": "vehicles_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_assets_id_idx": { + "name": "vehicles_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_vehicles_id_idx": { + "name": "vehicles_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_resources_id_idx": { + "name": "vehicles_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_rels_parent_fk": { + "name": "vehicles_rels_parent_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_technologies_fk": { + "name": "vehicles_rels_technologies_fk", + "tableFrom": "vehicles_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_assets_fk": { + "name": "vehicles_rels_assets_fk", + "tableFrom": "vehicles_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_vehicles_fk": { + "name": "vehicles_rels_vehicles_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_resources_fk": { + "name": "vehicles_rels_resources_fk", + "tableFrom": "vehicles_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_materials": { + "name": "structures_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_materials_order_idx": { + "name": "structures_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_parent_id_idx": { + "name": "structures_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_resource_idx": { + "name": "structures_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_materials_resource_id_resources_id_fk": { + "name": "structures_materials_resource_id_resources_id_fk", + "tableFrom": "structures_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_materials_parent_id_fk": { + "name": "structures_materials_parent_id_fk", + "tableFrom": "structures_materials", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_resources_in_range": { + "name": "structures_resources_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_resources_in_range_order_idx": { + "name": "structures_resources_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_parent_id_idx": { + "name": "structures_resources_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_resource_idx": { + "name": "structures_resources_in_range_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_resources_in_range_resource_id_resources_id_fk": { + "name": "structures_resources_in_range_resource_id_resources_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_resources_in_range_parent_id_fk": { + "name": "structures_resources_in_range_parent_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_structures_in_range": { + "name": "structures_structures_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_structures_in_range_order_idx": { + "name": "structures_structures_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_parent_id_idx": { + "name": "structures_structures_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_structure_idx": { + "name": "structures_structures_in_range_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_structures_in_range_structure_id_structures_id_fk": { + "name": "structures_structures_in_range_structure_id_structures_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_structures_in_range_parent_id_fk": { + "name": "structures_structures_in_range_parent_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_upkeep": { + "name": "structures_upkeep", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_upkeep_order_idx": { + "name": "structures_upkeep_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_parent_id_idx": { + "name": "structures_upkeep_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_resource_idx": { + "name": "structures_upkeep_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_upkeep_resource_id_resources_id_fk": { + "name": "structures_upkeep_resource_id_resources_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upkeep_parent_id_fk": { + "name": "structures_upkeep_parent_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_labor_requirements": { + "name": "structures_labor_requirements", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "classification_id": { + "name": "classification_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "required_headcount": { + "name": "required_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_headcount": { + "name": "max_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_labor_requirements_order_idx": { + "name": "structures_labor_requirements_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_labor_requirements_parent_id_idx": { + "name": "structures_labor_requirements_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_labor_requirements_classification_idx": { + "name": "structures_labor_requirements_classification_idx", + "columns": [ + { + "expression": "classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_labor_requirements_classification_id_labor_classifications_id_fk": { + "name": "structures_labor_requirements_classification_id_labor_classifications_id_fk", + "tableFrom": "structures_labor_requirements", + "tableTo": "labor_classifications", + "columnsFrom": [ + "classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_labor_requirements_parent_id_fk": { + "name": "structures_labor_requirements_parent_id_fk", + "tableFrom": "structures_labor_requirements", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_staff_positions": { + "name": "structures_staff_positions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_structures_staff_positions_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "max": { + "name": "max", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_staff_positions_order_idx": { + "name": "structures_staff_positions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_staff_positions_parent_id_idx": { + "name": "structures_staff_positions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_staff_positions_parent_id_fk": { + "name": "structures_staff_positions_parent_id_fk", + "tableFrom": "structures_staff_positions", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_production_inputs": { + "name": "structures_production_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "structures_production_inputs_order_idx": { + "name": "structures_production_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_inputs_parent_id_idx": { + "name": "structures_production_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_inputs_resource_idx": { + "name": "structures_production_inputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_production_inputs_resource_id_resources_id_fk": { + "name": "structures_production_inputs_resource_id_resources_id_fk", + "tableFrom": "structures_production_inputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_production_inputs_parent_id_fk": { + "name": "structures_production_inputs_parent_id_fk", + "tableFrom": "structures_production_inputs", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_production_outputs": { + "name": "structures_production_outputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "structures_production_outputs_order_idx": { + "name": "structures_production_outputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_outputs_parent_id_idx": { + "name": "structures_production_outputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_outputs_resource_idx": { + "name": "structures_production_outputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_production_outputs_resource_id_resources_id_fk": { + "name": "structures_production_outputs_resource_id_resources_id_fk", + "tableFrom": "structures_production_outputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_production_outputs_parent_id_fk": { + "name": "structures_production_outputs_parent_id_fk", + "tableFrom": "structures_production_outputs", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_module_options_effects": { + "name": "structures_module_options_effects", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_structures_module_options_effects_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "numeric", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "structures_module_options_effects_order_idx": { + "name": "structures_module_options_effects_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_module_options_effects_parent_id_idx": { + "name": "structures_module_options_effects_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_module_options_effects_parent_id_fk": { + "name": "structures_module_options_effects_parent_id_fk", + "tableFrom": "structures_module_options_effects", + "tableTo": "structures_module_options", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_module_options_materials": { + "name": "structures_module_options_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "structures_module_options_materials_order_idx": { + "name": "structures_module_options_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_module_options_materials_parent_id_idx": { + "name": "structures_module_options_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_module_options_materials_resource_idx": { + "name": "structures_module_options_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_module_options_materials_resource_id_resources_id_fk": { + "name": "structures_module_options_materials_resource_id_resources_id_fk", + "tableFrom": "structures_module_options_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_module_options_materials_parent_id_fk": { + "name": "structures_module_options_materials_parent_id_fk", + "tableFrom": "structures_module_options_materials", + "tableTo": "structures_module_options", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_module_options": { + "name": "structures_module_options", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_structures_module_options_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'utility'" + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_module_options_order_idx": { + "name": "structures_module_options_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_module_options_parent_id_idx": { + "name": "structures_module_options_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_module_options_parent_id_fk": { + "name": "structures_module_options_parent_id_fk", + "tableFrom": "structures_module_options", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_auto_generated_resources": { + "name": "structures_auto_generated_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "min_amount": { + "name": "min_amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "max_amount": { + "name": "max_amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "min_frequency": { + "name": "min_frequency", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'1'" + }, + "max_frequency": { + "name": "max_frequency", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "produce_chance": { + "name": "produce_chance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + } + }, + "indexes": { + "structures_auto_generated_resources_order_idx": { + "name": "structures_auto_generated_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_parent_id_idx": { + "name": "structures_auto_generated_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_resource_idx": { + "name": "structures_auto_generated_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_auto_generated_resources_resource_id_resources_id_fk": { + "name": "structures_auto_generated_resources_resource_id_resources_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_auto_generated_resources_parent_id_fk": { + "name": "structures_auto_generated_resources_parent_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_allowed_storage": { + "name": "structures_allowed_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_allowed_storage_order_idx": { + "name": "structures_allowed_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_allowed_storage_parent_id_idx": { + "name": "structures_allowed_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_allowed_storage_parent_id_fk": { + "name": "structures_allowed_storage_parent_id_fk", + "tableFrom": "structures_allowed_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_prohibited_storage": { + "name": "structures_prohibited_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "structures_prohibited_storage_order_idx": { + "name": "structures_prohibited_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_prohibited_storage_parent_id_idx": { + "name": "structures_prohibited_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_prohibited_storage_parent_id_fk": { + "name": "structures_prohibited_storage_parent_id_fk", + "tableFrom": "structures_prohibited_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures": { + "name": "structures", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_structures_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "category": { + "name": "category", + "type": "enum_structures_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "construction_duration_minutes": { + "name": "construction_duration_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "construction_crew_required": { + "name": "construction_crew_required", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "requires_upgrade": { + "name": "requires_upgrade", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "upgrades_into_id": { + "name": "upgrades_into_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "upgrade_cost_multiplier": { + "name": "upgrade_cost_multiplier", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "terrain_type": { + "name": "terrain_type", + "type": "enum_structures_terrain_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "sell_price": { + "name": "sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "maintenance_cost": { + "name": "maintenance_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "module_slots": { + "name": "module_slots", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "function_type": { + "name": "function_type", + "type": "enum_structures_function_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_capacity_mass": { + "name": "max_capacity_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "restrict_to_allowed": { + "name": "restrict_to_allowed", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "x_size": { + "name": "x_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "y_size": { + "name": "y_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "repair_speed": { + "name": "repair_speed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "structures_image_idx": { + "name": "structures_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upgrades_into_idx": { + "name": "structures_upgrades_into_idx", + "columns": [ + { + "expression": "upgrades_into_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_updated_at_idx": { + "name": "structures_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_created_at_idx": { + "name": "structures_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_image_id_media_id_fk": { + "name": "structures_image_id_media_id_fk", + "tableFrom": "structures", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upgrades_into_id_structures_id_fk": { + "name": "structures_upgrades_into_id_structures_id_fk", + "tableFrom": "structures", + "tableTo": "structures", + "columnsFrom": [ + "upgrades_into_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_rels": { + "name": "structures_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_rels_order_idx": { + "name": "structures_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_parent_idx": { + "name": "structures_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_path_idx": { + "name": "structures_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_technologies_id_idx": { + "name": "structures_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_assets_id_idx": { + "name": "structures_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_vehicles_id_idx": { + "name": "structures_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_resources_id_idx": { + "name": "structures_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_rels_parent_fk": { + "name": "structures_rels_parent_fk", + "tableFrom": "structures_rels", + "tableTo": "structures", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_technologies_fk": { + "name": "structures_rels_technologies_fk", + "tableFrom": "structures_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_assets_fk": { + "name": "structures_rels_assets_fk", + "tableFrom": "structures_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_vehicles_fk": { + "name": "structures_rels_vehicles_fk", + "tableFrom": "structures_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_resources_fk": { + "name": "structures_rels_resources_fk", + "tableFrom": "structures_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments_cargo": { + "name": "shipments_cargo", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "shipments_cargo_order_idx": { + "name": "shipments_cargo_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_cargo_parent_id_idx": { + "name": "shipments_cargo_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_cargo_parent_id_fk": { + "name": "shipments_cargo_parent_id_fk", + "tableFrom": "shipments_cargo", + "tableTo": "shipments", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments": { + "name": "shipments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "origin_id": { + "name": "origin_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "destination_id": { + "name": "destination_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "route_path": { + "name": "route_path", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "transport_vehicle_id": { + "name": "transport_vehicle_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "distance": { + "name": "distance", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_cost": { + "name": "fuel_cost", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_consumed": { + "name": "fuel_consumed", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_shipments_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "dispatched_at": { + "name": "dispatched_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "estimated_arrival": { + "name": "estimated_arrival", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "auto_return": { + "name": "auto_return", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "created_by_id": { + "name": "created_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "shipments_origin_idx": { + "name": "shipments_origin_idx", + "columns": [ + { + "expression": "origin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_destination_idx": { + "name": "shipments_destination_idx", + "columns": [ + { + "expression": "destination_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_map_idx": { + "name": "shipments_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_transport_vehicle_idx": { + "name": "shipments_transport_vehicle_idx", + "columns": [ + { + "expression": "transport_vehicle_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_created_by_idx": { + "name": "shipments_created_by_idx", + "columns": [ + { + "expression": "created_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_updated_at_idx": { + "name": "shipments_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_created_at_idx": { + "name": "shipments_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_origin_id_game_structures_id_fk": { + "name": "shipments_origin_id_game_structures_id_fk", + "tableFrom": "shipments", + "tableTo": "game_structures", + "columnsFrom": [ + "origin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_destination_id_game_structures_id_fk": { + "name": "shipments_destination_id_game_structures_id_fk", + "tableFrom": "shipments", + "tableTo": "game_structures", + "columnsFrom": [ + "destination_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_map_id_maps_id_fk": { + "name": "shipments_map_id_maps_id_fk", + "tableFrom": "shipments", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_transport_vehicle_id_game_vehicles_id_fk": { + "name": "shipments_transport_vehicle_id_game_vehicles_id_fk", + "tableFrom": "shipments", + "tableTo": "game_vehicles", + "columnsFrom": [ + "transport_vehicle_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_created_by_id_users_id_fk": { + "name": "shipments_created_by_id_users_id_fk", + "tableFrom": "shipments", + "tableTo": "users", + "columnsFrom": [ + "created_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments_rels": { + "name": "shipments_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shipments_rels_order_idx": { + "name": "shipments_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_parent_idx": { + "name": "shipments_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_path_idx": { + "name": "shipments_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_resources_id_idx": { + "name": "shipments_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_assets_id_idx": { + "name": "shipments_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_vehicles_id_idx": { + "name": "shipments_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_rels_parent_fk": { + "name": "shipments_rels_parent_fk", + "tableFrom": "shipments_rels", + "tableTo": "shipments", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_resources_fk": { + "name": "shipments_rels_resources_fk", + "tableFrom": "shipments_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_assets_fk": { + "name": "shipments_rels_assets_fk", + "tableFrom": "shipments_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_vehicles_fk": { + "name": "shipments_rels_vehicles_fk", + "tableFrom": "shipments_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.bank_accounts": { + "name": "bank_accounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "account_type": { + "name": "account_type", + "type": "enum_bank_accounts_account_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'personal'" + }, + "owner_faction_id": { + "name": "owner_faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "currency_id": { + "name": "currency_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "balance": { + "name": "balance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_bank_accounts_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "bank_accounts_owner_faction_idx": { + "name": "bank_accounts_owner_faction_idx", + "columns": [ + { + "expression": "owner_faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_owner_user_idx": { + "name": "bank_accounts_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_currency_idx": { + "name": "bank_accounts_currency_idx", + "columns": [ + { + "expression": "currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_updated_at_idx": { + "name": "bank_accounts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "bank_accounts_owner_faction_id_factions_id_fk": { + "name": "bank_accounts_owner_faction_id_factions_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "factions", + "columnsFrom": [ + "owner_faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_accounts_owner_user_id_users_id_fk": { + "name": "bank_accounts_owner_user_id_users_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_accounts_currency_id_resources_id_fk": { + "name": "bank_accounts_currency_id_resources_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "resources", + "columnsFrom": [ + "currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.bank_transactions": { + "name": "bank_transactions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "transaction_number": { + "name": "transaction_number", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_bank_transactions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "from_account_id": { + "name": "from_account_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_account_id": { + "name": "to_account_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fee": { + "name": "fee", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "memo": { + "name": "memo", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "actor_id": { + "name": "actor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_bank_transactions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'completed'" + }, + "reference_id": { + "name": "reference_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "bank_transactions_transaction_number_idx": { + "name": "bank_transactions_transaction_number_idx", + "columns": [ + { + "expression": "transaction_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_from_account_idx": { + "name": "bank_transactions_from_account_idx", + "columns": [ + { + "expression": "from_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_to_account_idx": { + "name": "bank_transactions_to_account_idx", + "columns": [ + { + "expression": "to_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_actor_idx": { + "name": "bank_transactions_actor_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_reference_idx": { + "name": "bank_transactions_reference_idx", + "columns": [ + { + "expression": "reference_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_updated_at_idx": { + "name": "bank_transactions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_created_at_idx": { + "name": "bank_transactions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "bank_transactions_from_account_id_bank_accounts_id_fk": { + "name": "bank_transactions_from_account_id_bank_accounts_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_accounts", + "columnsFrom": [ + "from_account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_to_account_id_bank_accounts_id_fk": { + "name": "bank_transactions_to_account_id_bank_accounts_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_accounts", + "columnsFrom": [ + "to_account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_actor_id_users_id_fk": { + "name": "bank_transactions_actor_id_users_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "users", + "columnsFrom": [ + "actor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_reference_id_bank_transactions_id_fk": { + "name": "bank_transactions_reference_id_bank_transactions_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_transactions", + "columnsFrom": [ + "reference_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ledger_entries": { + "name": "ledger_entries", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "account_id": { + "name": "account_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "transaction_id": { + "name": "transaction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_ledger_entries_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "balance_after": { + "name": "balance_after", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "memo": { + "name": "memo", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ledger_entries_account_idx": { + "name": "ledger_entries_account_idx", + "columns": [ + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_transaction_idx": { + "name": "ledger_entries_transaction_idx", + "columns": [ + { + "expression": "transaction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_updated_at_idx": { + "name": "ledger_entries_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_created_at_idx": { + "name": "ledger_entries_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ledger_entries_account_id_bank_accounts_id_fk": { + "name": "ledger_entries_account_id_bank_accounts_id_fk", + "tableFrom": "ledger_entries", + "tableTo": "bank_accounts", + "columnsFrom": [ + "account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ledger_entries_transaction_id_bank_transactions_id_fk": { + "name": "ledger_entries_transaction_id_bank_transactions_id_fk", + "tableFrom": "ledger_entries", + "tableTo": "bank_transactions", + "columnsFrom": [ + "transaction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages_items_equipment_attachments": { + "name": "locker_storages_items_equipment_attachments", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "locker_storages_items_equipment_attachments_order_idx": { + "name": "locker_storages_items_equipment_attachments_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_attachments_parent_id_idx": { + "name": "locker_storages_items_equipment_attachments_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_attachments_asset_idx": { + "name": "locker_storages_items_equipment_attachments_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_items_equipment_attachments_asset_id_assets_id_fk": { + "name": "locker_storages_items_equipment_attachments_asset_id_assets_id_fk", + "tableFrom": "locker_storages_items_equipment_attachments", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_equipment_attachments_parent_id_fk": { + "name": "locker_storages_items_equipment_attachments_parent_id_fk", + "tableFrom": "locker_storages_items_equipment_attachments", + "tableTo": "locker_storages_items", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages_items": { + "name": "locker_storages_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "equipment_skin_id": { + "name": "equipment_skin_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "equipment_custom_name": { + "name": "equipment_custom_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "locker_storages_items_order_idx": { + "name": "locker_storages_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_parent_id_idx": { + "name": "locker_storages_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_asset_idx": { + "name": "locker_storages_items_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_equipment_skin_idx": { + "name": "locker_storages_items_equipment_equipment_skin_idx", + "columns": [ + { + "expression": "equipment_skin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_items_asset_id_assets_id_fk": { + "name": "locker_storages_items_asset_id_assets_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_equipment_skin_id_assets_id_fk": { + "name": "locker_storages_items_equipment_skin_id_assets_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "assets", + "columnsFrom": [ + "equipment_skin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_parent_id_fk": { + "name": "locker_storages_items_parent_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "locker_storages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages": { + "name": "locker_storages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Personal Locker'" + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "item_count": { + "name": "item_count", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "locker_storages_owner_user_idx": { + "name": "locker_storages_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_updated_at_idx": { + "name": "locker_storages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_created_at_idx": { + "name": "locker_storages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_owner_user_id_users_id_fk": { + "name": "locker_storages_owner_user_id_users_id_fk", + "tableFrom": "locker_storages", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.loadouts": { + "name": "loadouts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "equipped": { + "name": "equipped", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "slots_primary_id": { + "name": "slots_primary_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_secondary_id": { + "name": "slots_secondary_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_launcher_id": { + "name": "slots_launcher_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_uniform_id": { + "name": "slots_uniform_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_vest_id": { + "name": "slots_vest_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_backpack_id": { + "name": "slots_backpack_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_helmet_id": { + "name": "slots_helmet_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_facewear_id": { + "name": "slots_facewear_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_nvg_id": { + "name": "slots_nvg_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_radio_id": { + "name": "slots_radio_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_optic_id": { + "name": "slots_optic_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_muzzle_id": { + "name": "slots_muzzle_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_bipod_id": { + "name": "slots_bipod_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "loadouts_owner_user_idx": { + "name": "loadouts_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_primary_idx": { + "name": "loadouts_slots_slots_primary_idx", + "columns": [ + { + "expression": "slots_primary_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_secondary_idx": { + "name": "loadouts_slots_slots_secondary_idx", + "columns": [ + { + "expression": "slots_secondary_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_launcher_idx": { + "name": "loadouts_slots_slots_launcher_idx", + "columns": [ + { + "expression": "slots_launcher_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_uniform_idx": { + "name": "loadouts_slots_slots_uniform_idx", + "columns": [ + { + "expression": "slots_uniform_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_vest_idx": { + "name": "loadouts_slots_slots_vest_idx", + "columns": [ + { + "expression": "slots_vest_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_backpack_idx": { + "name": "loadouts_slots_slots_backpack_idx", + "columns": [ + { + "expression": "slots_backpack_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_helmet_idx": { + "name": "loadouts_slots_slots_helmet_idx", + "columns": [ + { + "expression": "slots_helmet_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_facewear_idx": { + "name": "loadouts_slots_slots_facewear_idx", + "columns": [ + { + "expression": "slots_facewear_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_nvg_idx": { + "name": "loadouts_slots_slots_nvg_idx", + "columns": [ + { + "expression": "slots_nvg_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_radio_idx": { + "name": "loadouts_slots_slots_radio_idx", + "columns": [ + { + "expression": "slots_radio_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_optic_idx": { + "name": "loadouts_slots_slots_optic_idx", + "columns": [ + { + "expression": "slots_optic_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_muzzle_idx": { + "name": "loadouts_slots_slots_muzzle_idx", + "columns": [ + { + "expression": "slots_muzzle_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_bipod_idx": { + "name": "loadouts_slots_slots_bipod_idx", + "columns": [ + { + "expression": "slots_bipod_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_updated_at_idx": { + "name": "loadouts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_created_at_idx": { + "name": "loadouts_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "loadouts_owner_user_id_users_id_fk": { + "name": "loadouts_owner_user_id_users_id_fk", + "tableFrom": "loadouts", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_primary_id_assets_id_fk": { + "name": "loadouts_slots_primary_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_primary_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_secondary_id_assets_id_fk": { + "name": "loadouts_slots_secondary_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_secondary_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_launcher_id_assets_id_fk": { + "name": "loadouts_slots_launcher_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_launcher_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_uniform_id_assets_id_fk": { + "name": "loadouts_slots_uniform_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_uniform_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_vest_id_assets_id_fk": { + "name": "loadouts_slots_vest_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_vest_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_backpack_id_assets_id_fk": { + "name": "loadouts_slots_backpack_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_backpack_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_helmet_id_assets_id_fk": { + "name": "loadouts_slots_helmet_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_helmet_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_facewear_id_assets_id_fk": { + "name": "loadouts_slots_facewear_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_facewear_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_nvg_id_assets_id_fk": { + "name": "loadouts_slots_nvg_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_nvg_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_radio_id_assets_id_fk": { + "name": "loadouts_slots_radio_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_radio_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_optic_id_assets_id_fk": { + "name": "loadouts_slots_optic_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_optic_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_muzzle_id_assets_id_fk": { + "name": "loadouts_slots_muzzle_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_muzzle_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_bipod_id_assets_id_fk": { + "name": "loadouts_slots_bipod_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_bipod_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_listings": { + "name": "market_listings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "seller_id": { + "name": "seller_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "npc_id": { + "name": "npc_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "price": { + "name": "price", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "desired_price": { + "name": "desired_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "min_price": { + "name": "min_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "currency_id": { + "name": "currency_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_market_listings_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "is_auto_generated": { + "name": "is_auto_generated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "listed_at": { + "name": "listed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "sold_at": { + "name": "sold_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "buyer_id": { + "name": "buyer_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_listings_asset_idx": { + "name": "market_listings_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_seller_idx": { + "name": "market_listings_seller_idx", + "columns": [ + { + "expression": "seller_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_npc_idx": { + "name": "market_listings_npc_idx", + "columns": [ + { + "expression": "npc_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_currency_idx": { + "name": "market_listings_currency_idx", + "columns": [ + { + "expression": "currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_status_idx": { + "name": "market_listings_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_buyer_idx": { + "name": "market_listings_buyer_idx", + "columns": [ + { + "expression": "buyer_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_updated_at_idx": { + "name": "market_listings_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_created_at_idx": { + "name": "market_listings_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_listings_asset_id_assets_id_fk": { + "name": "market_listings_asset_id_assets_id_fk", + "tableFrom": "market_listings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_seller_id_users_id_fk": { + "name": "market_listings_seller_id_users_id_fk", + "tableFrom": "market_listings", + "tableTo": "users", + "columnsFrom": [ + "seller_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_npc_id_game_npcs_id_fk": { + "name": "market_listings_npc_id_game_npcs_id_fk", + "tableFrom": "market_listings", + "tableTo": "game_npcs", + "columnsFrom": [ + "npc_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_currency_id_resources_id_fk": { + "name": "market_listings_currency_id_resources_id_fk", + "tableFrom": "market_listings", + "tableTo": "resources", + "columnsFrom": [ + "currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_buyer_id_users_id_fk": { + "name": "market_listings_buyer_id_users_id_fk", + "tableFrom": "market_listings", + "tableTo": "users", + "columnsFrom": [ + "buyer_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_negotiations_history": { + "name": "market_negotiations_history", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "from": { + "name": "from", + "type": "enum_market_negotiations_history_from", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "at": { + "name": "at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "market_negotiations_history_order_idx": { + "name": "market_negotiations_history_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_history_parent_id_idx": { + "name": "market_negotiations_history_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_negotiations_history_parent_id_fk": { + "name": "market_negotiations_history_parent_id_fk", + "tableFrom": "market_negotiations_history", + "tableTo": "market_negotiations", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_negotiations": { + "name": "market_negotiations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "listing_id": { + "name": "listing_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "buyer_id": { + "name": "buyer_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_market_negotiations_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "patience": { + "name": "patience", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "proposed_by": { + "name": "proposed_by", + "type": "enum_market_negotiations_proposed_by", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'buyer'" + }, + "accepted_price": { + "name": "accepted_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_negotiations_listing_idx": { + "name": "market_negotiations_listing_idx", + "columns": [ + { + "expression": "listing_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_buyer_idx": { + "name": "market_negotiations_buyer_idx", + "columns": [ + { + "expression": "buyer_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_status_idx": { + "name": "market_negotiations_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_updated_at_idx": { + "name": "market_negotiations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_created_at_idx": { + "name": "market_negotiations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_negotiations_listing_id_market_listings_id_fk": { + "name": "market_negotiations_listing_id_market_listings_id_fk", + "tableFrom": "market_negotiations", + "tableTo": "market_listings", + "columnsFrom": [ + "listing_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_negotiations_buyer_id_users_id_fk": { + "name": "market_negotiations_buyer_id_users_id_fk", + "tableFrom": "market_negotiations", + "tableTo": "users", + "columnsFrom": [ + "buyer_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_state": { + "name": "market_state", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "item_type": { + "name": "item_type", + "type": "enum_market_state_item_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "item_id": { + "name": "item_id", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "gm_baseline_supply": { + "name": "gm_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 100 + }, + "gm_baseline_demand": { + "name": "gm_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 50 + }, + "current_supply": { + "name": "current_supply", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 100 + }, + "artificial_demand": { + "name": "artificial_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 50 + }, + "real_demand": { + "name": "real_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "price_modifier": { + "name": "price_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "last_computed_at": { + "name": "last_computed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_state_item_type_idx": { + "name": "market_state_item_type_idx", + "columns": [ + { + "expression": "item_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_item_id_idx": { + "name": "market_state_item_id_idx", + "columns": [ + { + "expression": "item_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_updated_at_idx": { + "name": "market_state_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_created_at_idx": { + "name": "market_state_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "itemType_itemId_idx": { + "name": "itemType_itemId_idx", + "columns": [ + { + "expression": "item_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "item_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.voice_scripts": { + "name": "voice_scripts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "script": { + "name": "script", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "xp_amount": { + "name": "xp_amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 250 + }, + "spoiler": { + "name": "spoiler", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "status": { + "name": "status", + "type": "enum_voice_scripts_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'draft'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "voice_scripts_updated_at_idx": { + "name": "voice_scripts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_scripts_created_at_idx": { + "name": "voice_scripts_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.voice_submissions": { + "name": "voice_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "script_id": { + "name": "script_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_voice_submissions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "review_note": { + "name": "review_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "voice_submissions_script_idx": { + "name": "voice_submissions_script_idx", + "columns": [ + { + "expression": "script_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_user_idx": { + "name": "voice_submissions_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_updated_at_idx": { + "name": "voice_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_created_at_idx": { + "name": "voice_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_filename_idx": { + "name": "voice_submissions_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "voice_submissions_script_id_voice_scripts_id_fk": { + "name": "voice_submissions_script_id_voice_scripts_id_fk", + "tableFrom": "voice_submissions", + "tableTo": "voice_scripts", + "columnsFrom": [ + "script_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "voice_submissions_user_id_users_id_fk": { + "name": "voice_submissions_user_id_users_id_fk", + "tableFrom": "voice_submissions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_activity": { + "name": "tickets_activity", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_tickets_activity_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'system'" + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tickets_activity_order_idx": { + "name": "tickets_activity_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_activity_parent_id_idx": { + "name": "tickets_activity_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_activity_author_idx": { + "name": "tickets_activity_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_activity_author_id_users_id_fk": { + "name": "tickets_activity_author_id_users_id_fk", + "tableFrom": "tickets_activity", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_activity_parent_id_fk": { + "name": "tickets_activity_parent_id_fk", + "tableFrom": "tickets_activity", + "tableTo": "tickets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_edit_history": { + "name": "tickets_edit_history", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "before": { + "name": "before", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "after": { + "name": "after", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "edited_by_id": { + "name": "edited_by_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "edited_at": { + "name": "edited_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "tickets_edit_history_order_idx": { + "name": "tickets_edit_history_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_edit_history_parent_id_idx": { + "name": "tickets_edit_history_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_edit_history_edited_by_idx": { + "name": "tickets_edit_history_edited_by_idx", + "columns": [ + { + "expression": "edited_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_edit_history_edited_by_id_users_id_fk": { + "name": "tickets_edit_history_edited_by_id_users_id_fk", + "tableFrom": "tickets_edit_history", + "tableTo": "users", + "columnsFrom": [ + "edited_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_edit_history_parent_id_fk": { + "name": "tickets_edit_history_parent_id_fk", + "tableFrom": "tickets_edit_history", + "tableTo": "tickets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets": { + "name": "tickets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_tickets_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'support_request'" + }, + "priority": { + "name": "priority", + "type": "enum_tickets_priority", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'medium'" + }, + "status": { + "name": "status", + "type": "enum_tickets_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "reporter_id": { + "name": "reporter_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "assignee_id": { + "name": "assignee_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "closed_at": { + "name": "closed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sprint_id": { + "name": "sprint_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "release_id": { + "name": "release_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_ticket_id": { + "name": "parent_ticket_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "enum_tickets_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'task'" + }, + "story_points": { + "name": "story_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "estimate": { + "name": "estimate", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "due_date": { + "name": "due_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "resolution": { + "name": "resolution", + "type": "enum_tickets_resolution", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "tickets_category_idx": { + "name": "tickets_category_idx", + "columns": [ + { + "expression": "category", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_priority_idx": { + "name": "tickets_priority_idx", + "columns": [ + { + "expression": "priority", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_status_idx": { + "name": "tickets_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_reporter_idx": { + "name": "tickets_reporter_idx", + "columns": [ + { + "expression": "reporter_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_assignee_idx": { + "name": "tickets_assignee_idx", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_project_idx": { + "name": "tickets_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_sprint_idx": { + "name": "tickets_sprint_idx", + "columns": [ + { + "expression": "sprint_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_release_idx": { + "name": "tickets_release_idx", + "columns": [ + { + "expression": "release_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_parent_ticket_idx": { + "name": "tickets_parent_ticket_idx", + "columns": [ + { + "expression": "parent_ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_updated_at_idx": { + "name": "tickets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_created_at_idx": { + "name": "tickets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_reporter_id_users_id_fk": { + "name": "tickets_reporter_id_users_id_fk", + "tableFrom": "tickets", + "tableTo": "users", + "columnsFrom": [ + "reporter_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_assignee_id_users_id_fk": { + "name": "tickets_assignee_id_users_id_fk", + "tableFrom": "tickets", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_project_id_projects_id_fk": { + "name": "tickets_project_id_projects_id_fk", + "tableFrom": "tickets", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_sprint_id_sprints_id_fk": { + "name": "tickets_sprint_id_sprints_id_fk", + "tableFrom": "tickets", + "tableTo": "sprints", + "columnsFrom": [ + "sprint_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_release_id_releases_id_fk": { + "name": "tickets_release_id_releases_id_fk", + "tableFrom": "tickets", + "tableTo": "releases", + "columnsFrom": [ + "release_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_parent_ticket_id_tickets_id_fk": { + "name": "tickets_parent_ticket_id_tickets_id_fk", + "tableFrom": "tickets", + "tableTo": "tickets", + "columnsFrom": [ + "parent_ticket_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_rels": { + "name": "tickets_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "labels_id": { + "name": "labels_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tickets_rels_order_idx": { + "name": "tickets_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_parent_idx": { + "name": "tickets_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_path_idx": { + "name": "tickets_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_labels_id_idx": { + "name": "tickets_rels_labels_id_idx", + "columns": [ + { + "expression": "labels_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_rels_parent_fk": { + "name": "tickets_rels_parent_fk", + "tableFrom": "tickets_rels", + "tableTo": "tickets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tickets_rels_labels_fk": { + "name": "tickets_rels_labels_fk", + "tableFrom": "tickets_rels", + "tableTo": "labels", + "columnsFrom": [ + "labels_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ticket_votes": { + "name": "ticket_votes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "ticket_id": { + "name": "ticket_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ticket_votes_ticket_idx": { + "name": "ticket_votes_ticket_idx", + "columns": [ + { + "expression": "ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_user_idx": { + "name": "ticket_votes_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_updated_at_idx": { + "name": "ticket_votes_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_created_at_idx": { + "name": "ticket_votes_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_user_idx": { + "name": "ticket_user_idx", + "columns": [ + { + "expression": "ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ticket_votes_ticket_id_tickets_id_fk": { + "name": "ticket_votes_ticket_id_tickets_id_fk", + "tableFrom": "ticket_votes", + "tableTo": "tickets", + "columnsFrom": [ + "ticket_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ticket_votes_user_id_users_id_fk": { + "name": "ticket_votes_user_id_users_id_fk", + "tableFrom": "ticket_votes", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages": { + "name": "wiki_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_wiki_pages_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "body": { + "name": "body", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "lockdown": { + "name": "lockdown", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locked_by_id": { + "name": "locked_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locked_at": { + "name": "locked_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "last_editor_id": { + "name": "last_editor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_pages_slug_idx": { + "name": "wiki_pages_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_category_idx": { + "name": "wiki_pages_category_idx", + "columns": [ + { + "expression": "category", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_locked_by_idx": { + "name": "wiki_pages_locked_by_idx", + "columns": [ + { + "expression": "locked_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_last_editor_idx": { + "name": "wiki_pages_last_editor_idx", + "columns": [ + { + "expression": "last_editor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_updated_at_idx": { + "name": "wiki_pages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_created_at_idx": { + "name": "wiki_pages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_locked_by_id_users_id_fk": { + "name": "wiki_pages_locked_by_id_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "locked_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "wiki_pages_last_editor_id_users_id_fk": { + "name": "wiki_pages_last_editor_id_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "last_editor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages_texts": { + "name": "wiki_pages_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_pages_texts_order_parent": { + "name": "wiki_pages_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_texts_parent_fk": { + "name": "wiki_pages_texts_parent_fk", + "tableFrom": "wiki_pages_texts", + "tableTo": "wiki_pages", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_revisions": { + "name": "wiki_revisions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "page_id": { + "name": "page_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "revision_number": { + "name": "revision_number", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "title_snapshot": { + "name": "title_snapshot", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "content_snapshot": { + "name": "content_snapshot", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "editor_id": { + "name": "editor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "enum_wiki_revisions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "restored_from_revision": { + "name": "restored_from_revision", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_revisions_page_idx": { + "name": "wiki_revisions_page_idx", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_editor_idx": { + "name": "wiki_revisions_editor_idx", + "columns": [ + { + "expression": "editor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_updated_at_idx": { + "name": "wiki_revisions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_created_at_idx": { + "name": "wiki_revisions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_revisions_page_id_wiki_pages_id_fk": { + "name": "wiki_revisions_page_id_wiki_pages_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "wiki_pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "wiki_revisions_editor_id_users_id_fk": { + "name": "wiki_revisions_editor_id_users_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "users", + "columnsFrom": [ + "editor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_templates": { + "name": "wiki_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "body": { + "name": "body", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "css": { + "name": "css", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "html": { + "name": "html", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_templates_name_idx": { + "name": "wiki_templates_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_templates_updated_at_idx": { + "name": "wiki_templates_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_templates_created_at_idx": { + "name": "wiki_templates_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "lead_id": { + "name": "lead_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_projects_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'active'" + }, + "default_assignee_id": { + "name": "default_assignee_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "projects_key_idx": { + "name": "projects_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_lead_idx": { + "name": "projects_lead_idx", + "columns": [ + { + "expression": "lead_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_default_assignee_idx": { + "name": "projects_default_assignee_idx", + "columns": [ + { + "expression": "default_assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_updated_at_idx": { + "name": "projects_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_created_at_idx": { + "name": "projects_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_lead_id_users_id_fk": { + "name": "projects_lead_id_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "lead_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "projects_default_assignee_id_users_id_fk": { + "name": "projects_default_assignee_id_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "default_assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sprints": { + "name": "sprints", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "goal": { + "name": "goal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_sprints_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'planning'" + }, + "capacity": { + "name": "capacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sprints_project_idx": { + "name": "sprints_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sprints_updated_at_idx": { + "name": "sprints_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sprints_created_at_idx": { + "name": "sprints_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sprints_project_id_projects_id_fk": { + "name": "sprints_project_id_projects_id_fk", + "tableFrom": "sprints", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.releases": { + "name": "releases", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_releases_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "release_date": { + "name": "release_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "target_version": { + "name": "target_version", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "releases_project_idx": { + "name": "releases_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "releases_updated_at_idx": { + "name": "releases_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "releases_created_at_idx": { + "name": "releases_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "releases_project_id_projects_id_fk": { + "name": "releases_project_id_projects_id_fk", + "tableFrom": "releases", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labels": { + "name": "labels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#6366f1'" + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "labels_project_idx": { + "name": "labels_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labels_updated_at_idx": { + "name": "labels_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labels_created_at_idx": { + "name": "labels_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "labels_project_id_projects_id_fk": { + "name": "labels_project_id_projects_id_fk", + "tableFrom": "labels", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maps": { + "name": "maps", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "world_size_width": { + "name": "world_size_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 8192 + }, + "world_size_height": { + "name": "world_size_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 8192 + }, + "basemap_mode": { + "name": "basemap_mode", + "type": "enum_maps_basemap_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'image'" + }, + "basemap_image_id": { + "name": "basemap_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tile_url_template": { + "name": "tile_url_template", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "min_zoom": { + "name": "min_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "max_zoom": { + "name": "max_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 12 + }, + "default_center_x": { + "name": "default_center_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_center_y": { + "name": "default_center_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_zoom": { + "name": "default_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 2 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "maps_name_idx": { + "name": "maps_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_basemap_image_idx": { + "name": "maps_basemap_image_idx", + "columns": [ + { + "expression": "basemap_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_updated_at_idx": { + "name": "maps_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_created_at_idx": { + "name": "maps_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maps_basemap_image_id_media_id_fk": { + "name": "maps_basemap_image_id_media_id_fk", + "tableFrom": "maps", + "tableTo": "media", + "columnsFrom": [ + "basemap_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_roads": { + "name": "map_roads", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "surface": { + "name": "surface", + "type": "enum_map_roads_surface", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'paved'" + }, + "speed_multiplier": { + "name": "speed_multiplier", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "stroke_color": { + "name": "stroke_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stroke_weight": { + "name": "stroke_weight", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 2 + }, + "stroke_style": { + "name": "stroke_style", + "type": "enum_map_roads_stroke_style", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'solid'" + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "points": { + "name": "points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "map_roads_map_idx": { + "name": "map_roads_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_roads_updated_at_idx": { + "name": "map_roads_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_roads_created_at_idx": { + "name": "map_roads_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_roads_map_id_maps_id_fk": { + "name": "map_roads_map_id_maps_id_fk", + "tableFrom": "map_roads", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_zones": { + "name": "map_zones", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_map_zones_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "fill_color": { + "name": "fill_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stroke_color": { + "name": "stroke_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "fill_opacity": { + "name": "fill_opacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "stroke_weight": { + "name": "stroke_weight", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "points": { + "name": "points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "map_zones_map_idx": { + "name": "map_zones_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_updated_at_idx": { + "name": "map_zones_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_created_at_idx": { + "name": "map_zones_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_zones_map_id_maps_id_fk": { + "name": "map_zones_map_id_maps_id_fk", + "tableFrom": "map_zones", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_zones_rels": { + "name": "map_zones_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "map_zones_rels_order_idx": { + "name": "map_zones_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_parent_idx": { + "name": "map_zones_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_path_idx": { + "name": "map_zones_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_resources_id_idx": { + "name": "map_zones_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_zones_rels_parent_fk": { + "name": "map_zones_rels_parent_fk", + "tableFrom": "map_zones_rels", + "tableTo": "map_zones", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "map_zones_rels_resources_fk": { + "name": "map_zones_rels_resources_fk", + "tableFrom": "map_zones_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_nodes": { + "name": "resource_nodes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "position": { + "name": "position", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "richness": { + "name": "richness", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resource_nodes_map_idx": { + "name": "resource_nodes_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_updated_at_idx": { + "name": "resource_nodes_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_created_at_idx": { + "name": "resource_nodes_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_nodes_map_id_maps_id_fk": { + "name": "resource_nodes_map_id_maps_id_fk", + "tableFrom": "resource_nodes", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_nodes_rels": { + "name": "resource_nodes_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "resource_nodes_rels_order_idx": { + "name": "resource_nodes_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_parent_idx": { + "name": "resource_nodes_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_path_idx": { + "name": "resource_nodes_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_resources_id_idx": { + "name": "resource_nodes_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_nodes_rels_parent_fk": { + "name": "resource_nodes_rels_parent_fk", + "tableFrom": "resource_nodes_rels", + "tableTo": "resource_nodes", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "resource_nodes_rels_resources_fk": { + "name": "resource_nodes_rels_resources_fk", + "tableFrom": "resource_nodes_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.narrative_events": { + "name": "narrative_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "flow_data": { + "name": "flow_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "triggers_type": { + "name": "triggers_type", + "type": "enum_narrative_events_triggers_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'manual'" + }, + "triggers_condition": { + "name": "triggers_condition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "narrative_events_updated_at_idx": { + "name": "narrative_events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "narrative_events_created_at_idx": { + "name": "narrative_events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.story_beats": { + "name": "story_beats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occurred_at": { + "name": "occurred_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_story_beats_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'draft'" + }, + "body": { + "name": "body", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "story_beats_status_idx": { + "name": "story_beats_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_mission_idx": { + "name": "story_beats_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_updated_at_idx": { + "name": "story_beats_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_created_at_idx": { + "name": "story_beats_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "story_beats_mission_id_missions_id_fk": { + "name": "story_beats_mission_id_missions_id_fk", + "tableFrom": "story_beats", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.story_beat_states": { + "name": "story_beat_states", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "beat_id": { + "name": "beat_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "read_at": { + "name": "read_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "reaction": { + "name": "reaction", + "type": "enum_story_beat_states_reaction", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "story_beat_states_user_idx": { + "name": "story_beat_states_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_beat_idx": { + "name": "story_beat_states_beat_idx", + "columns": [ + { + "expression": "beat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_updated_at_idx": { + "name": "story_beat_states_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_created_at_idx": { + "name": "story_beat_states_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "story_beat_states_user_id_users_id_fk": { + "name": "story_beat_states_user_id_users_id_fk", + "tableFrom": "story_beat_states", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "story_beat_states_beat_id_story_beats_id_fk": { + "name": "story_beat_states_beat_id_story_beats_id_fk", + "tableFrom": "story_beat_states", + "tableTo": "story_beats", + "columnsFrom": [ + "beat_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mission_files": { + "name": "mission_files", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mission_file_name": { + "name": "mission_file_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mission_files_author_idx": { + "name": "mission_files_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_updated_at_idx": { + "name": "mission_files_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_created_at_idx": { + "name": "mission_files_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_filename_idx": { + "name": "mission_files_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mission_files_author_id_users_id_fk": { + "name": "mission_files_author_id_users_id_fk", + "tableFrom": "mission_files", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mod_lists": { + "name": "mod_lists", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "modlist_name": { + "name": "modlist_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mod_lists_author_idx": { + "name": "mod_lists_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_updated_at_idx": { + "name": "mod_lists_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_created_at_idx": { + "name": "mod_lists_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_filename_idx": { + "name": "mod_lists_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mod_lists_author_id_users_id_fk": { + "name": "mod_lists_author_id_users_id_fk", + "tableFrom": "mod_lists", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_servers": { + "name": "game_servers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_game_servers_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'offline'" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_servers_server_id_idx": { + "name": "game_servers_server_id_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_servers_updated_at_idx": { + "name": "game_servers_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_servers_created_at_idx": { + "name": "game_servers_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.arma_sync_events": { + "name": "arma_sync_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "event_id": { + "name": "event_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occurred_at": { + "name": "occurred_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "arma_sync_events_event_id_idx": { + "name": "arma_sync_events_event_id_idx", + "columns": [ + { + "expression": "event_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_server_idx": { + "name": "arma_sync_events_server_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_type_idx": { + "name": "arma_sync_events_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_updated_at_idx": { + "name": "arma_sync_events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_created_at_idx": { + "name": "arma_sync_events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "arma_sync_events_server_id_game_servers_id_fk": { + "name": "arma_sync_events_server_id_game_servers_id_fk", + "tableFrom": "arma_sync_events", + "tableTo": "game_servers", + "columnsFrom": [ + "server_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.arma_commands": { + "name": "arma_commands", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "command_id": { + "name": "command_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_arma_commands_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'queued'" + }, + "result": { + "name": "result", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "delivered_at": { + "name": "delivered_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "arma_commands_command_id_idx": { + "name": "arma_commands_command_id_idx", + "columns": [ + { + "expression": "command_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_server_idx": { + "name": "arma_commands_server_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_updated_at_idx": { + "name": "arma_commands_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_created_at_idx": { + "name": "arma_commands_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "arma_commands_server_id_game_servers_id_fk": { + "name": "arma_commands_server_id_game_servers_id_fk", + "tableFrom": "arma_commands", + "tableTo": "game_servers", + "columnsFrom": [ + "server_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.respawn_tickets": { + "name": "respawn_tickets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "balance": { + "name": "balance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "respawn_tickets_user_idx": { + "name": "respawn_tickets_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "respawn_tickets_updated_at_idx": { + "name": "respawn_tickets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "respawn_tickets_created_at_idx": { + "name": "respawn_tickets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "respawn_tickets_user_id_users_id_fk": { + "name": "respawn_tickets_user_id_users_id_fk", + "tableFrom": "respawn_tickets", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_minefields": { + "name": "custom_minefields", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rows": { + "name": "rows", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "cols": { + "name": "cols", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "mines": { + "name": "mines", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "mine_count": { + "name": "mine_count", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "published": { + "name": "published", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "expose_edge_mines": { + "name": "expose_edge_mines", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "play_count": { + "name": "play_count", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "creator_xp_bank": { + "name": "creator_xp_bank", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_minefields_author_idx": { + "name": "custom_minefields_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefields_updated_at_idx": { + "name": "custom_minefields_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefields_created_at_idx": { + "name": "custom_minefields_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_minefields_author_id_users_id_fk": { + "name": "custom_minefields_author_id_users_id_fk", + "tableFrom": "custom_minefields", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_minefield_scores": { + "name": "custom_minefield_scores", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "minefield_id": { + "name": "minefield_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "seconds": { + "name": "seconds", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "flags": { + "name": "flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "won": { + "name": "won", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_minefield_scores_minefield_idx": { + "name": "custom_minefield_scores_minefield_idx", + "columns": [ + { + "expression": "minefield_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_user_idx": { + "name": "custom_minefield_scores_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_updated_at_idx": { + "name": "custom_minefield_scores_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_created_at_idx": { + "name": "custom_minefield_scores_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_minefield_scores_minefield_id_custom_minefields_id_fk": { + "name": "custom_minefield_scores_minefield_id_custom_minefields_id_fk", + "tableFrom": "custom_minefield_scores", + "tableTo": "custom_minefields", + "columnsFrom": [ + "minefield_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "custom_minefield_scores_user_id_users_id_fk": { + "name": "custom_minefield_scores_user_id_users_id_fk", + "tableFrom": "custom_minefield_scores", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_radio_tests": { + "name": "custom_radio_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "messages": { + "name": "messages", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "message_count": { + "name": "message_count", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "enum_custom_radio_tests_order", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'fixed'" + }, + "published": { + "name": "published", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "play_count": { + "name": "play_count", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_radio_tests_author_idx": { + "name": "custom_radio_tests_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_tests_updated_at_idx": { + "name": "custom_radio_tests_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_tests_created_at_idx": { + "name": "custom_radio_tests_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_radio_tests_author_id_users_id_fk": { + "name": "custom_radio_tests_author_id_users_id_fk", + "tableFrom": "custom_radio_tests", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_radio_test_scores": { + "name": "custom_radio_test_scores", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_id": { + "name": "test_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "score": { + "name": "score", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "accuracy": { + "name": "accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "correct_messages": { + "name": "correct_messages", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "incorrect_messages": { + "name": "incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "mode": { + "name": "mode", + "type": "enum_custom_radio_test_scores_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "time_ms": { + "name": "time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_radio_test_scores_test_idx": { + "name": "custom_radio_test_scores_test_idx", + "columns": [ + { + "expression": "test_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_user_idx": { + "name": "custom_radio_test_scores_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_updated_at_idx": { + "name": "custom_radio_test_scores_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_created_at_idx": { + "name": "custom_radio_test_scores_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_radio_test_scores_test_id_custom_radio_tests_id_fk": { + "name": "custom_radio_test_scores_test_id_custom_radio_tests_id_fk", + "tableFrom": "custom_radio_test_scores", + "tableTo": "custom_radio_tests", + "columnsFrom": [ + "test_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "custom_radio_test_scores_user_id_users_id_fk": { + "name": "custom_radio_test_scores_user_id_users_id_fk", + "tableFrom": "custom_radio_test_scores", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_ai_instructions_images": { + "name": "plugin_ai_instructions_images", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "plugin_ai_instructions_images_order_idx": { + "name": "plugin_ai_instructions_images_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_images_parent_id_idx": { + "name": "plugin_ai_instructions_images_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_images_image_idx": { + "name": "plugin_ai_instructions_images_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "plugin_ai_instructions_images_image_id_media_id_fk": { + "name": "plugin_ai_instructions_images_image_id_media_id_fk", + "tableFrom": "plugin_ai_instructions_images", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "plugin_ai_instructions_images_parent_id_fk": { + "name": "plugin_ai_instructions_images_parent_id_fk", + "tableFrom": "plugin_ai_instructions_images", + "tableTo": "plugin_ai_instructions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_ai_instructions": { + "name": "plugin_ai_instructions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "schema_path": { + "name": "schema_path", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "field_type": { + "name": "field_type", + "type": "enum_plugin_ai_instructions_field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'text'" + }, + "relation_to": { + "name": "relation_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "model_id": { + "name": "model_id", + "type": "enum_plugin_ai_instructions_model_id", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "disabled": { + "name": "disabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "prompt": { + "name": "prompt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "system": { + "name": "system", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'INSTRUCTIONS:\nYou are a highly skilled and professional blog writer,\nrenowned for crafting engaging and well-organized articles.\nWhen given a title, you meticulously create blogs that are not only\ninformative and accurate but also captivating and beautifully structured.'" + }, + "layout": { + "name": "layout", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'[paragraph] - Write a concise introduction (2-3 sentences) that outlines the main topic.\n[horizontalrule] - Insert a horizontal rule to separate the introduction from the main content.\n[list] - Create a list with 3-5 items. Each list item should contain:\n a. [heading] - A brief, descriptive heading (up to 5 words)\n b. [paragraph] - A short explanation or elaboration (1-2 sentences)\n[horizontalrule] - Insert another horizontal rule to separate the main content from the conclusion.\n[paragraph] - Compose a brief conclusion (2-3 sentences) summarizing the key points.\n[quote] - Include a relevant quote from a famous person, directly related to the topic. Format: \"Quote text.\" - Author Name'" + }, + "unsloth_text_settings_model": { + "name": "unsloth_text_settings_model", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'unsloth/gemma-4-E4B-it-qat-GGUF'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "plugin_ai_instructions_schema_path_idx": { + "name": "plugin_ai_instructions_schema_path_idx", + "columns": [ + { + "expression": "schema_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_updated_at_idx": { + "name": "plugin_ai_instructions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_created_at_idx": { + "name": "plugin_ai_instructions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_mcp_api_keys": { + "name": "payload_mcp_api_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "media_find": { + "name": "media_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_create": { + "name": "media_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_update": { + "name": "media_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_delete": { + "name": "media_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_find": { + "name": "game_hard_resources_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_create": { + "name": "game_hard_resources_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_update": { + "name": "game_hard_resources_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_delete": { + "name": "game_hard_resources_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_find": { + "name": "game_structures_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_create": { + "name": "game_structures_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_update": { + "name": "game_structures_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_delete": { + "name": "game_structures_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_find": { + "name": "game_vehicles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_create": { + "name": "game_vehicles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_update": { + "name": "game_vehicles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_delete": { + "name": "game_vehicles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_find": { + "name": "game_npcs_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_create": { + "name": "game_npcs_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_update": { + "name": "game_npcs_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_delete": { + "name": "game_npcs_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_find": { + "name": "npc_staffing_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_create": { + "name": "npc_staffing_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_update": { + "name": "npc_staffing_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_delete": { + "name": "npc_staffing_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_find": { + "name": "labor_classifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_create": { + "name": "labor_classifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_update": { + "name": "labor_classifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_delete": { + "name": "labor_classifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_find": { + "name": "game_event_logs_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_create": { + "name": "game_event_logs_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_update": { + "name": "game_event_logs_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_delete": { + "name": "game_event_logs_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_find": { + "name": "users_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_create": { + "name": "users_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_update": { + "name": "users_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_delete": { + "name": "users_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_find": { + "name": "roles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_create": { + "name": "roles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_update": { + "name": "roles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_delete": { + "name": "roles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_find": { + "name": "ranks_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_create": { + "name": "ranks_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_update": { + "name": "ranks_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_delete": { + "name": "ranks_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_find": { + "name": "profiles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_create": { + "name": "profiles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_update": { + "name": "profiles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_delete": { + "name": "profiles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_find": { + "name": "awards_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_create": { + "name": "awards_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_update": { + "name": "awards_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_delete": { + "name": "awards_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_find": { + "name": "qualifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_create": { + "name": "qualifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_update": { + "name": "qualifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_delete": { + "name": "qualifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_find": { + "name": "assignments_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_create": { + "name": "assignments_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_update": { + "name": "assignments_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_delete": { + "name": "assignments_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_find": { + "name": "assignment_transfers_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_create": { + "name": "assignment_transfers_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_update": { + "name": "assignment_transfers_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_delete": { + "name": "assignment_transfers_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_find": { + "name": "experience_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_create": { + "name": "experience_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_update": { + "name": "experience_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_delete": { + "name": "experience_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_find": { + "name": "user_notifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_create": { + "name": "user_notifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_update": { + "name": "user_notifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_delete": { + "name": "user_notifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_find": { + "name": "evaluations_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_create": { + "name": "evaluations_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_update": { + "name": "evaluations_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_delete": { + "name": "evaluations_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_find": { + "name": "ribbon_submissions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_create": { + "name": "ribbon_submissions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_update": { + "name": "ribbon_submissions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_delete": { + "name": "ribbon_submissions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_find": { + "name": "missions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_create": { + "name": "missions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_update": { + "name": "missions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_delete": { + "name": "missions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_find": { + "name": "mission_attendances_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_create": { + "name": "mission_attendances_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_update": { + "name": "mission_attendances_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_delete": { + "name": "mission_attendances_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_find": { + "name": "campaigns_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_create": { + "name": "campaigns_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_update": { + "name": "campaigns_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_delete": { + "name": "campaigns_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_find": { + "name": "factions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_create": { + "name": "factions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_update": { + "name": "factions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_delete": { + "name": "factions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_find": { + "name": "technologies_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_create": { + "name": "technologies_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_update": { + "name": "technologies_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_delete": { + "name": "technologies_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_find": { + "name": "assets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_create": { + "name": "assets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_update": { + "name": "assets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_delete": { + "name": "assets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_find": { + "name": "resources_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_create": { + "name": "resources_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_update": { + "name": "resources_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_delete": { + "name": "resources_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_find": { + "name": "vehicles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_create": { + "name": "vehicles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_update": { + "name": "vehicles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_delete": { + "name": "vehicles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_find": { + "name": "structures_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_create": { + "name": "structures_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_update": { + "name": "structures_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_delete": { + "name": "structures_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_find": { + "name": "shipments_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_create": { + "name": "shipments_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_update": { + "name": "shipments_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_delete": { + "name": "shipments_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_find": { + "name": "bank_accounts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_create": { + "name": "bank_accounts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_update": { + "name": "bank_accounts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_delete": { + "name": "bank_accounts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_find": { + "name": "bank_transactions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_create": { + "name": "bank_transactions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_update": { + "name": "bank_transactions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_delete": { + "name": "bank_transactions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_find": { + "name": "ledger_entries_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_create": { + "name": "ledger_entries_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_update": { + "name": "ledger_entries_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_delete": { + "name": "ledger_entries_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_find": { + "name": "locker_storages_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_create": { + "name": "locker_storages_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_update": { + "name": "locker_storages_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_delete": { + "name": "locker_storages_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_find": { + "name": "loadouts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_create": { + "name": "loadouts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_update": { + "name": "loadouts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_delete": { + "name": "loadouts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_find": { + "name": "market_listings_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_create": { + "name": "market_listings_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_update": { + "name": "market_listings_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_delete": { + "name": "market_listings_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_find": { + "name": "market_negotiations_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_create": { + "name": "market_negotiations_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_update": { + "name": "market_negotiations_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_delete": { + "name": "market_negotiations_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_find": { + "name": "market_state_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_create": { + "name": "market_state_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_update": { + "name": "market_state_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_delete": { + "name": "market_state_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_find": { + "name": "voice_scripts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_create": { + "name": "voice_scripts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_update": { + "name": "voice_scripts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_delete": { + "name": "voice_scripts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_find": { + "name": "voice_submissions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_create": { + "name": "voice_submissions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_update": { + "name": "voice_submissions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_delete": { + "name": "voice_submissions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_find": { + "name": "tickets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_create": { + "name": "tickets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_update": { + "name": "tickets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_delete": { + "name": "tickets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_find": { + "name": "ticket_votes_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_create": { + "name": "ticket_votes_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_update": { + "name": "ticket_votes_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_delete": { + "name": "ticket_votes_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_find": { + "name": "wiki_pages_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_create": { + "name": "wiki_pages_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_update": { + "name": "wiki_pages_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_delete": { + "name": "wiki_pages_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_find": { + "name": "wiki_revisions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_create": { + "name": "wiki_revisions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_update": { + "name": "wiki_revisions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_delete": { + "name": "wiki_revisions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_find": { + "name": "wiki_templates_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_create": { + "name": "wiki_templates_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_update": { + "name": "wiki_templates_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_delete": { + "name": "wiki_templates_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_find": { + "name": "projects_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_create": { + "name": "projects_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_update": { + "name": "projects_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_delete": { + "name": "projects_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_find": { + "name": "sprints_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_create": { + "name": "sprints_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_update": { + "name": "sprints_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_delete": { + "name": "sprints_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_find": { + "name": "releases_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_create": { + "name": "releases_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_update": { + "name": "releases_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_delete": { + "name": "releases_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_find": { + "name": "labels_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_create": { + "name": "labels_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_update": { + "name": "labels_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_delete": { + "name": "labels_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_find": { + "name": "maps_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_create": { + "name": "maps_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_update": { + "name": "maps_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_delete": { + "name": "maps_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_find": { + "name": "map_roads_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_create": { + "name": "map_roads_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_update": { + "name": "map_roads_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_delete": { + "name": "map_roads_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_find": { + "name": "map_zones_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_create": { + "name": "map_zones_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_update": { + "name": "map_zones_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_delete": { + "name": "map_zones_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_find": { + "name": "resource_nodes_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_create": { + "name": "resource_nodes_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_update": { + "name": "resource_nodes_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_delete": { + "name": "resource_nodes_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_find": { + "name": "narrative_events_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_create": { + "name": "narrative_events_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_update": { + "name": "narrative_events_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_delete": { + "name": "narrative_events_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_find": { + "name": "story_beats_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_create": { + "name": "story_beats_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_update": { + "name": "story_beats_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_delete": { + "name": "story_beats_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_find": { + "name": "story_beat_states_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_create": { + "name": "story_beat_states_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_update": { + "name": "story_beat_states_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_delete": { + "name": "story_beat_states_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_find": { + "name": "mission_files_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_create": { + "name": "mission_files_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_update": { + "name": "mission_files_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_delete": { + "name": "mission_files_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_find": { + "name": "mod_lists_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_create": { + "name": "mod_lists_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_update": { + "name": "mod_lists_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_delete": { + "name": "mod_lists_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_find": { + "name": "game_servers_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_create": { + "name": "game_servers_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_update": { + "name": "game_servers_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_delete": { + "name": "game_servers_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_find": { + "name": "arma_sync_events_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_create": { + "name": "arma_sync_events_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_update": { + "name": "arma_sync_events_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_delete": { + "name": "arma_sync_events_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_find": { + "name": "arma_commands_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_create": { + "name": "arma_commands_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_update": { + "name": "arma_commands_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_delete": { + "name": "arma_commands_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_find": { + "name": "respawn_tickets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_create": { + "name": "respawn_tickets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_update": { + "name": "respawn_tickets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_delete": { + "name": "respawn_tickets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_find": { + "name": "custom_minefields_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_create": { + "name": "custom_minefields_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_update": { + "name": "custom_minefields_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_delete": { + "name": "custom_minefields_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_find": { + "name": "custom_minefield_scores_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_create": { + "name": "custom_minefield_scores_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_update": { + "name": "custom_minefield_scores_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_delete": { + "name": "custom_minefield_scores_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_find": { + "name": "custom_radio_tests_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_create": { + "name": "custom_radio_tests_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_update": { + "name": "custom_radio_tests_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_delete": { + "name": "custom_radio_tests_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_find": { + "name": "custom_radio_test_scores_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_create": { + "name": "custom_radio_test_scores_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_update": { + "name": "custom_radio_test_scores_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_delete": { + "name": "custom_radio_test_scores_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "enable_a_p_i_key": { + "name": "enable_a_p_i_key", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "api_key": { + "name": "api_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "api_key_index": { + "name": "api_key_index", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_mcp_api_keys_user_idx": { + "name": "payload_mcp_api_keys_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_mcp_api_keys_updated_at_idx": { + "name": "payload_mcp_api_keys_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_mcp_api_keys_created_at_idx": { + "name": "payload_mcp_api_keys_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_mcp_api_keys_user_id_users_id_fk": { + "name": "payload_mcp_api_keys_user_id_users_id_fk", + "tableFrom": "payload_mcp_api_keys", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_kv": { + "name": "payload_kv", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "payload_kv_key_idx": { + "name": "payload_kv_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents": { + "name": "payload_locked_documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "global_slug": { + "name": "global_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_locked_documents_global_slug_idx": { + "name": "payload_locked_documents_global_slug_idx", + "columns": [ + { + "expression": "global_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_updated_at_idx": { + "name": "payload_locked_documents_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_created_at_idx": { + "name": "payload_locked_documents_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents_rels": { + "name": "payload_locked_documents_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_hard_resources_id": { + "name": "game_hard_resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_structures_id": { + "name": "game_structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_vehicles_id": { + "name": "game_vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_npcs_id": { + "name": "game_npcs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "npc_staffing_id": { + "name": "npc_staffing_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "labor_classifications_id": { + "name": "labor_classifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_event_logs_id": { + "name": "game_event_logs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ranks_id": { + "name": "ranks_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "profiles_id": { + "name": "profiles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "awards_id": { + "name": "awards_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assignment_transfers_id": { + "name": "assignment_transfers_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "experience_id": { + "name": "experience_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "user_notifications_id": { + "name": "user_notifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "evaluations_id": { + "name": "evaluations_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ribbon_submissions_id": { + "name": "ribbon_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "missions_id": { + "name": "missions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mission_attendances_id": { + "name": "mission_attendances_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "factions_id": { + "name": "factions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shipments_id": { + "name": "shipments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bank_accounts_id": { + "name": "bank_accounts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bank_transactions_id": { + "name": "bank_transactions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ledger_entries_id": { + "name": "ledger_entries_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locker_storages_id": { + "name": "locker_storages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "loadouts_id": { + "name": "loadouts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_listings_id": { + "name": "market_listings_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_negotiations_id": { + "name": "market_negotiations_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_state_id": { + "name": "market_state_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voice_scripts_id": { + "name": "voice_scripts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voice_submissions_id": { + "name": "voice_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tickets_id": { + "name": "tickets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ticket_votes_id": { + "name": "ticket_votes_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_pages_id": { + "name": "wiki_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_revisions_id": { + "name": "wiki_revisions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_templates_id": { + "name": "wiki_templates_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "projects_id": { + "name": "projects_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sprints_id": { + "name": "sprints_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "releases_id": { + "name": "releases_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "labels_id": { + "name": "labels_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maps_id": { + "name": "maps_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_roads_id": { + "name": "map_roads_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_zones_id": { + "name": "map_zones_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resource_nodes_id": { + "name": "resource_nodes_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "narrative_events_id": { + "name": "narrative_events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "story_beats_id": { + "name": "story_beats_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "story_beat_states_id": { + "name": "story_beat_states_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mission_files_id": { + "name": "mission_files_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mod_lists_id": { + "name": "mod_lists_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_servers_id": { + "name": "game_servers_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "arma_sync_events_id": { + "name": "arma_sync_events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "arma_commands_id": { + "name": "arma_commands_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "respawn_tickets_id": { + "name": "respawn_tickets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_minefields_id": { + "name": "custom_minefields_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_minefield_scores_id": { + "name": "custom_minefield_scores_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_radio_tests_id": { + "name": "custom_radio_tests_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_radio_test_scores_id": { + "name": "custom_radio_test_scores_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "plugin_ai_instructions_id": { + "name": "plugin_ai_instructions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "payload_mcp_api_keys_id": { + "name": "payload_mcp_api_keys_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_locked_documents_rels_order_idx": { + "name": "payload_locked_documents_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_parent_idx": { + "name": "payload_locked_documents_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_path_idx": { + "name": "payload_locked_documents_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_media_id_idx": { + "name": "payload_locked_documents_rels_media_id_idx", + "columns": [ + { + "expression": "media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_hard_resources_id_idx": { + "name": "payload_locked_documents_rels_game_hard_resources_id_idx", + "columns": [ + { + "expression": "game_hard_resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_structures_id_idx": { + "name": "payload_locked_documents_rels_game_structures_id_idx", + "columns": [ + { + "expression": "game_structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_vehicles_id_idx": { + "name": "payload_locked_documents_rels_game_vehicles_id_idx", + "columns": [ + { + "expression": "game_vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_npcs_id_idx": { + "name": "payload_locked_documents_rels_game_npcs_id_idx", + "columns": [ + { + "expression": "game_npcs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_npc_staffing_id_idx": { + "name": "payload_locked_documents_rels_npc_staffing_id_idx", + "columns": [ + { + "expression": "npc_staffing_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_labor_classifications_id_idx": { + "name": "payload_locked_documents_rels_labor_classifications_id_idx", + "columns": [ + { + "expression": "labor_classifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_event_logs_id_idx": { + "name": "payload_locked_documents_rels_game_event_logs_id_idx", + "columns": [ + { + "expression": "game_event_logs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_users_id_idx": { + "name": "payload_locked_documents_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_roles_id_idx": { + "name": "payload_locked_documents_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ranks_id_idx": { + "name": "payload_locked_documents_rels_ranks_id_idx", + "columns": [ + { + "expression": "ranks_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_profiles_id_idx": { + "name": "payload_locked_documents_rels_profiles_id_idx", + "columns": [ + { + "expression": "profiles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_awards_id_idx": { + "name": "payload_locked_documents_rels_awards_id_idx", + "columns": [ + { + "expression": "awards_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_qualifications_id_idx": { + "name": "payload_locked_documents_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assignments_id_idx": { + "name": "payload_locked_documents_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assignment_transfers_id_idx": { + "name": "payload_locked_documents_rels_assignment_transfers_id_idx", + "columns": [ + { + "expression": "assignment_transfers_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_experience_id_idx": { + "name": "payload_locked_documents_rels_experience_id_idx", + "columns": [ + { + "expression": "experience_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_user_notifications_id_idx": { + "name": "payload_locked_documents_rels_user_notifications_id_idx", + "columns": [ + { + "expression": "user_notifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_evaluations_id_idx": { + "name": "payload_locked_documents_rels_evaluations_id_idx", + "columns": [ + { + "expression": "evaluations_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ribbon_submissions_id_idx": { + "name": "payload_locked_documents_rels_ribbon_submissions_id_idx", + "columns": [ + { + "expression": "ribbon_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_missions_id_idx": { + "name": "payload_locked_documents_rels_missions_id_idx", + "columns": [ + { + "expression": "missions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mission_attendances_id_idx": { + "name": "payload_locked_documents_rels_mission_attendances_id_idx", + "columns": [ + { + "expression": "mission_attendances_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_campaigns_id_idx": { + "name": "payload_locked_documents_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_factions_id_idx": { + "name": "payload_locked_documents_rels_factions_id_idx", + "columns": [ + { + "expression": "factions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_technologies_id_idx": { + "name": "payload_locked_documents_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assets_id_idx": { + "name": "payload_locked_documents_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_resources_id_idx": { + "name": "payload_locked_documents_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_vehicles_id_idx": { + "name": "payload_locked_documents_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_structures_id_idx": { + "name": "payload_locked_documents_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_shipments_id_idx": { + "name": "payload_locked_documents_rels_shipments_id_idx", + "columns": [ + { + "expression": "shipments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_bank_accounts_id_idx": { + "name": "payload_locked_documents_rels_bank_accounts_id_idx", + "columns": [ + { + "expression": "bank_accounts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_bank_transactions_id_idx": { + "name": "payload_locked_documents_rels_bank_transactions_id_idx", + "columns": [ + { + "expression": "bank_transactions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ledger_entries_id_idx": { + "name": "payload_locked_documents_rels_ledger_entries_id_idx", + "columns": [ + { + "expression": "ledger_entries_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_locker_storages_id_idx": { + "name": "payload_locked_documents_rels_locker_storages_id_idx", + "columns": [ + { + "expression": "locker_storages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_loadouts_id_idx": { + "name": "payload_locked_documents_rels_loadouts_id_idx", + "columns": [ + { + "expression": "loadouts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_listings_id_idx": { + "name": "payload_locked_documents_rels_market_listings_id_idx", + "columns": [ + { + "expression": "market_listings_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_negotiations_id_idx": { + "name": "payload_locked_documents_rels_market_negotiations_id_idx", + "columns": [ + { + "expression": "market_negotiations_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_state_id_idx": { + "name": "payload_locked_documents_rels_market_state_id_idx", + "columns": [ + { + "expression": "market_state_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_voice_scripts_id_idx": { + "name": "payload_locked_documents_rels_voice_scripts_id_idx", + "columns": [ + { + "expression": "voice_scripts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_voice_submissions_id_idx": { + "name": "payload_locked_documents_rels_voice_submissions_id_idx", + "columns": [ + { + "expression": "voice_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_tickets_id_idx": { + "name": "payload_locked_documents_rels_tickets_id_idx", + "columns": [ + { + "expression": "tickets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ticket_votes_id_idx": { + "name": "payload_locked_documents_rels_ticket_votes_id_idx", + "columns": [ + { + "expression": "ticket_votes_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_pages_id_idx": { + "name": "payload_locked_documents_rels_wiki_pages_id_idx", + "columns": [ + { + "expression": "wiki_pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_revisions_id_idx": { + "name": "payload_locked_documents_rels_wiki_revisions_id_idx", + "columns": [ + { + "expression": "wiki_revisions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_templates_id_idx": { + "name": "payload_locked_documents_rels_wiki_templates_id_idx", + "columns": [ + { + "expression": "wiki_templates_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_projects_id_idx": { + "name": "payload_locked_documents_rels_projects_id_idx", + "columns": [ + { + "expression": "projects_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_sprints_id_idx": { + "name": "payload_locked_documents_rels_sprints_id_idx", + "columns": [ + { + "expression": "sprints_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_releases_id_idx": { + "name": "payload_locked_documents_rels_releases_id_idx", + "columns": [ + { + "expression": "releases_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_labels_id_idx": { + "name": "payload_locked_documents_rels_labels_id_idx", + "columns": [ + { + "expression": "labels_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_maps_id_idx": { + "name": "payload_locked_documents_rels_maps_id_idx", + "columns": [ + { + "expression": "maps_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_map_roads_id_idx": { + "name": "payload_locked_documents_rels_map_roads_id_idx", + "columns": [ + { + "expression": "map_roads_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_map_zones_id_idx": { + "name": "payload_locked_documents_rels_map_zones_id_idx", + "columns": [ + { + "expression": "map_zones_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_resource_nodes_id_idx": { + "name": "payload_locked_documents_rels_resource_nodes_id_idx", + "columns": [ + { + "expression": "resource_nodes_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_narrative_events_id_idx": { + "name": "payload_locked_documents_rels_narrative_events_id_idx", + "columns": [ + { + "expression": "narrative_events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_story_beats_id_idx": { + "name": "payload_locked_documents_rels_story_beats_id_idx", + "columns": [ + { + "expression": "story_beats_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_story_beat_states_id_idx": { + "name": "payload_locked_documents_rels_story_beat_states_id_idx", + "columns": [ + { + "expression": "story_beat_states_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mission_files_id_idx": { + "name": "payload_locked_documents_rels_mission_files_id_idx", + "columns": [ + { + "expression": "mission_files_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mod_lists_id_idx": { + "name": "payload_locked_documents_rels_mod_lists_id_idx", + "columns": [ + { + "expression": "mod_lists_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_servers_id_idx": { + "name": "payload_locked_documents_rels_game_servers_id_idx", + "columns": [ + { + "expression": "game_servers_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_arma_sync_events_id_idx": { + "name": "payload_locked_documents_rels_arma_sync_events_id_idx", + "columns": [ + { + "expression": "arma_sync_events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_arma_commands_id_idx": { + "name": "payload_locked_documents_rels_arma_commands_id_idx", + "columns": [ + { + "expression": "arma_commands_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_respawn_tickets_id_idx": { + "name": "payload_locked_documents_rels_respawn_tickets_id_idx", + "columns": [ + { + "expression": "respawn_tickets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_minefields_id_idx": { + "name": "payload_locked_documents_rels_custom_minefields_id_idx", + "columns": [ + { + "expression": "custom_minefields_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_minefield_scores_id_idx": { + "name": "payload_locked_documents_rels_custom_minefield_scores_id_idx", + "columns": [ + { + "expression": "custom_minefield_scores_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_radio_tests_id_idx": { + "name": "payload_locked_documents_rels_custom_radio_tests_id_idx", + "columns": [ + { + "expression": "custom_radio_tests_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_radio_test_scores_i_idx": { + "name": "payload_locked_documents_rels_custom_radio_test_scores_i_idx", + "columns": [ + { + "expression": "custom_radio_test_scores_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_plugin_ai_instructions_id_idx": { + "name": "payload_locked_documents_rels_plugin_ai_instructions_id_idx", + "columns": [ + { + "expression": "plugin_ai_instructions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_payload_mcp_api_keys_id_idx": { + "name": "payload_locked_documents_rels_payload_mcp_api_keys_id_idx", + "columns": [ + { + "expression": "payload_mcp_api_keys_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_locked_documents_rels_parent_fk": { + "name": "payload_locked_documents_rels_parent_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_locked_documents", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_media_fk": { + "name": "payload_locked_documents_rels_media_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_hard_resources_fk": { + "name": "payload_locked_documents_rels_game_hard_resources_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_hard_resources", + "columnsFrom": [ + "game_hard_resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_structures_fk": { + "name": "payload_locked_documents_rels_game_structures_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_structures", + "columnsFrom": [ + "game_structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_vehicles_fk": { + "name": "payload_locked_documents_rels_game_vehicles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_vehicles", + "columnsFrom": [ + "game_vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_npcs_fk": { + "name": "payload_locked_documents_rels_game_npcs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_npcs", + "columnsFrom": [ + "game_npcs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_npc_staffing_fk": { + "name": "payload_locked_documents_rels_npc_staffing_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "npc_staffing", + "columnsFrom": [ + "npc_staffing_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_labor_classifications_fk": { + "name": "payload_locked_documents_rels_labor_classifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "labor_classifications", + "columnsFrom": [ + "labor_classifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_event_logs_fk": { + "name": "payload_locked_documents_rels_game_event_logs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_event_logs", + "columnsFrom": [ + "game_event_logs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_users_fk": { + "name": "payload_locked_documents_rels_users_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_roles_fk": { + "name": "payload_locked_documents_rels_roles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ranks_fk": { + "name": "payload_locked_documents_rels_ranks_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ranks", + "columnsFrom": [ + "ranks_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_profiles_fk": { + "name": "payload_locked_documents_rels_profiles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "profiles", + "columnsFrom": [ + "profiles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_awards_fk": { + "name": "payload_locked_documents_rels_awards_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "awards", + "columnsFrom": [ + "awards_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_qualifications_fk": { + "name": "payload_locked_documents_rels_qualifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assignments_fk": { + "name": "payload_locked_documents_rels_assignments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assignment_transfers_fk": { + "name": "payload_locked_documents_rels_assignment_transfers_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assignment_transfers", + "columnsFrom": [ + "assignment_transfers_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_experience_fk": { + "name": "payload_locked_documents_rels_experience_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "experience", + "columnsFrom": [ + "experience_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_user_notifications_fk": { + "name": "payload_locked_documents_rels_user_notifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "user_notifications", + "columnsFrom": [ + "user_notifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_evaluations_fk": { + "name": "payload_locked_documents_rels_evaluations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "evaluations", + "columnsFrom": [ + "evaluations_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ribbon_submissions_fk": { + "name": "payload_locked_documents_rels_ribbon_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ribbon_submissions", + "columnsFrom": [ + "ribbon_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_missions_fk": { + "name": "payload_locked_documents_rels_missions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "missions", + "columnsFrom": [ + "missions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mission_attendances_fk": { + "name": "payload_locked_documents_rels_mission_attendances_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mission_attendances", + "columnsFrom": [ + "mission_attendances_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_campaigns_fk": { + "name": "payload_locked_documents_rels_campaigns_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_factions_fk": { + "name": "payload_locked_documents_rels_factions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "factions", + "columnsFrom": [ + "factions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_technologies_fk": { + "name": "payload_locked_documents_rels_technologies_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assets_fk": { + "name": "payload_locked_documents_rels_assets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_resources_fk": { + "name": "payload_locked_documents_rels_resources_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_vehicles_fk": { + "name": "payload_locked_documents_rels_vehicles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_structures_fk": { + "name": "payload_locked_documents_rels_structures_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_shipments_fk": { + "name": "payload_locked_documents_rels_shipments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "shipments", + "columnsFrom": [ + "shipments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_bank_accounts_fk": { + "name": "payload_locked_documents_rels_bank_accounts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "bank_accounts", + "columnsFrom": [ + "bank_accounts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_bank_transactions_fk": { + "name": "payload_locked_documents_rels_bank_transactions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "bank_transactions", + "columnsFrom": [ + "bank_transactions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ledger_entries_fk": { + "name": "payload_locked_documents_rels_ledger_entries_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ledger_entries", + "columnsFrom": [ + "ledger_entries_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_locker_storages_fk": { + "name": "payload_locked_documents_rels_locker_storages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "locker_storages", + "columnsFrom": [ + "locker_storages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_loadouts_fk": { + "name": "payload_locked_documents_rels_loadouts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "loadouts", + "columnsFrom": [ + "loadouts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_listings_fk": { + "name": "payload_locked_documents_rels_market_listings_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_listings", + "columnsFrom": [ + "market_listings_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_negotiations_fk": { + "name": "payload_locked_documents_rels_market_negotiations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_negotiations", + "columnsFrom": [ + "market_negotiations_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_state_fk": { + "name": "payload_locked_documents_rels_market_state_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_state", + "columnsFrom": [ + "market_state_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_voice_scripts_fk": { + "name": "payload_locked_documents_rels_voice_scripts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "voice_scripts", + "columnsFrom": [ + "voice_scripts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_voice_submissions_fk": { + "name": "payload_locked_documents_rels_voice_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "voice_submissions", + "columnsFrom": [ + "voice_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_tickets_fk": { + "name": "payload_locked_documents_rels_tickets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "tickets", + "columnsFrom": [ + "tickets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ticket_votes_fk": { + "name": "payload_locked_documents_rels_ticket_votes_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ticket_votes", + "columnsFrom": [ + "ticket_votes_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_pages_fk": { + "name": "payload_locked_documents_rels_wiki_pages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_pages", + "columnsFrom": [ + "wiki_pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_revisions_fk": { + "name": "payload_locked_documents_rels_wiki_revisions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_revisions", + "columnsFrom": [ + "wiki_revisions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_templates_fk": { + "name": "payload_locked_documents_rels_wiki_templates_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_templates", + "columnsFrom": [ + "wiki_templates_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_projects_fk": { + "name": "payload_locked_documents_rels_projects_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "projects", + "columnsFrom": [ + "projects_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_sprints_fk": { + "name": "payload_locked_documents_rels_sprints_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "sprints", + "columnsFrom": [ + "sprints_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_releases_fk": { + "name": "payload_locked_documents_rels_releases_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "releases", + "columnsFrom": [ + "releases_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_labels_fk": { + "name": "payload_locked_documents_rels_labels_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "labels", + "columnsFrom": [ + "labels_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_maps_fk": { + "name": "payload_locked_documents_rels_maps_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "maps", + "columnsFrom": [ + "maps_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_map_roads_fk": { + "name": "payload_locked_documents_rels_map_roads_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "map_roads", + "columnsFrom": [ + "map_roads_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_map_zones_fk": { + "name": "payload_locked_documents_rels_map_zones_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "map_zones", + "columnsFrom": [ + "map_zones_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_resource_nodes_fk": { + "name": "payload_locked_documents_rels_resource_nodes_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "resource_nodes", + "columnsFrom": [ + "resource_nodes_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_narrative_events_fk": { + "name": "payload_locked_documents_rels_narrative_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "narrative_events", + "columnsFrom": [ + "narrative_events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_story_beats_fk": { + "name": "payload_locked_documents_rels_story_beats_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "story_beats", + "columnsFrom": [ + "story_beats_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_story_beat_states_fk": { + "name": "payload_locked_documents_rels_story_beat_states_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "story_beat_states", + "columnsFrom": [ + "story_beat_states_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mission_files_fk": { + "name": "payload_locked_documents_rels_mission_files_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mission_files", + "columnsFrom": [ + "mission_files_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mod_lists_fk": { + "name": "payload_locked_documents_rels_mod_lists_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mod_lists", + "columnsFrom": [ + "mod_lists_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_servers_fk": { + "name": "payload_locked_documents_rels_game_servers_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_servers", + "columnsFrom": [ + "game_servers_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_arma_sync_events_fk": { + "name": "payload_locked_documents_rels_arma_sync_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "arma_sync_events", + "columnsFrom": [ + "arma_sync_events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_arma_commands_fk": { + "name": "payload_locked_documents_rels_arma_commands_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "arma_commands", + "columnsFrom": [ + "arma_commands_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_respawn_tickets_fk": { + "name": "payload_locked_documents_rels_respawn_tickets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "respawn_tickets", + "columnsFrom": [ + "respawn_tickets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_minefields_fk": { + "name": "payload_locked_documents_rels_custom_minefields_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_minefields", + "columnsFrom": [ + "custom_minefields_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_minefield_scores_fk": { + "name": "payload_locked_documents_rels_custom_minefield_scores_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_minefield_scores", + "columnsFrom": [ + "custom_minefield_scores_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_radio_tests_fk": { + "name": "payload_locked_documents_rels_custom_radio_tests_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_radio_tests", + "columnsFrom": [ + "custom_radio_tests_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_radio_test_scores_fk": { + "name": "payload_locked_documents_rels_custom_radio_test_scores_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_radio_test_scores", + "columnsFrom": [ + "custom_radio_test_scores_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_plugin_ai_instructions_fk": { + "name": "payload_locked_documents_rels_plugin_ai_instructions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "plugin_ai_instructions", + "columnsFrom": [ + "plugin_ai_instructions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_payload_mcp_api_keys_fk": { + "name": "payload_locked_documents_rels_payload_mcp_api_keys_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_mcp_api_keys", + "columnsFrom": [ + "payload_mcp_api_keys_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences": { + "name": "payload_preferences", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "value": { + "name": "value", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_preferences_key_idx": { + "name": "payload_preferences_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_updated_at_idx": { + "name": "payload_preferences_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_created_at_idx": { + "name": "payload_preferences_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences_rels": { + "name": "payload_preferences_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "payload_mcp_api_keys_id": { + "name": "payload_mcp_api_keys_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_preferences_rels_order_idx": { + "name": "payload_preferences_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_parent_idx": { + "name": "payload_preferences_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_path_idx": { + "name": "payload_preferences_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_users_id_idx": { + "name": "payload_preferences_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_payload_mcp_api_keys_id_idx": { + "name": "payload_preferences_rels_payload_mcp_api_keys_id_idx", + "columns": [ + { + "expression": "payload_mcp_api_keys_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_preferences_rels_parent_fk": { + "name": "payload_preferences_rels_parent_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_preferences", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_users_fk": { + "name": "payload_preferences_rels_users_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_payload_mcp_api_keys_fk": { + "name": "payload_preferences_rels_payload_mcp_api_keys_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_mcp_api_keys", + "columnsFrom": [ + "payload_mcp_api_keys_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_migrations": { + "name": "payload_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "batch": { + "name": "batch", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_migrations_updated_at_idx": { + "name": "payload_migrations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_migrations_created_at_idx": { + "name": "payload_migrations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_rules": { + "name": "game_rules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "main_currency_id": { + "name": "main_currency_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "currency_name": { + "name": "currency_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_symbol": { + "name": "currency_symbol", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_singular": { + "name": "currency_singular", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_plural": { + "name": "currency_plural", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_denomination": { + "name": "currency_denomination", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "proximity_threshold": { + "name": "proximity_threshold", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1000 + }, + "game_tick_interval_minutes": { + "name": "game_tick_interval_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "locker_grid_width": { + "name": "locker_grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "locker_grid_height": { + "name": "locker_grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 6 + }, + "staff_hiring_enabled": { + "name": "staff_hiring_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "staff_hiring_disabled_message": { + "name": "staff_hiring_disabled_message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "economy_default_price_band": { + "name": "economy_default_price_band", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.5 + }, + "economy_real_demand_window_ticks": { + "name": "economy_real_demand_window_ticks", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 24 + }, + "economy_real_demand_decay": { + "name": "economy_real_demand_decay", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.5 + }, + "economy_artificial_demand_drift": { + "name": "economy_artificial_demand_drift", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.05 + }, + "economy_cold_start_observations": { + "name": "economy_cold_start_observations", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 5 + }, + "economy_tick_interval_hint_minutes": { + "name": "economy_tick_interval_hint_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 60 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_rules_main_currency_idx": { + "name": "game_rules_main_currency_idx", + "columns": [ + { + "expression": "main_currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_rules_main_currency_id_resources_id_fk": { + "name": "game_rules_main_currency_id_resources_id_fk", + "tableFrom": "game_rules", + "tableTo": "resources", + "columnsFrom": [ + "main_currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_rules_rels": { + "name": "game_rules_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_rules_rels_order_idx": { + "name": "game_rules_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_parent_idx": { + "name": "game_rules_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_path_idx": { + "name": "game_rules_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_assignments_id_idx": { + "name": "game_rules_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_rules_rels_parent_fk": { + "name": "game_rules_rels_parent_fk", + "tableFrom": "game_rules_rels", + "tableTo": "game_rules", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "game_rules_rels_assignments_fk": { + "name": "game_rules_rels_assignments_fk", + "tableFrom": "game_rules_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_shims_targeting_roles": { + "name": "shims_shims_targeting_roles", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_shims_shims_targeting_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "shims_shims_targeting_roles_order_idx": { + "name": "shims_shims_targeting_roles_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_targeting_roles_parent_idx": { + "name": "shims_shims_targeting_roles_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_shims_targeting_roles_parent_fk": { + "name": "shims_shims_targeting_roles_parent_fk", + "tableFrom": "shims_shims_targeting_roles", + "tableTo": "shims_shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_shims": { + "name": "shims_shims", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "type": { + "name": "type", + "type": "enum_shims_shims_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'css'" + }, + "content": { + "name": "content", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "targeting_audience": { + "name": "targeting_audience", + "type": "enum_shims_shims_targeting_audience", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'all'" + }, + "targeting_percentage": { + "name": "targeting_percentage", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "paths_match_type": { + "name": "paths_match_type", + "type": "enum_shims_shims_paths_match_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'all'" + } + }, + "indexes": { + "shims_shims_order_idx": { + "name": "shims_shims_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_parent_id_idx": { + "name": "shims_shims_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_name_idx": { + "name": "shims_shims_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_shims_parent_id_fk": { + "name": "shims_shims_parent_id_fk", + "tableFrom": "shims_shims", + "tableTo": "shims", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims": { + "name": "shims", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_texts": { + "name": "shims_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shims_texts_order_parent": { + "name": "shims_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_texts_parent_fk": { + "name": "shims_texts_parent_fk", + "tableFrom": "shims_texts", + "tableTo": "shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_rels": { + "name": "shims_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shims_rels_order_idx": { + "name": "shims_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_parent_idx": { + "name": "shims_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_path_idx": { + "name": "shims_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_users_id_idx": { + "name": "shims_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_rels_parent_fk": { + "name": "shims_rels_parent_fk", + "tableFrom": "shims_rels", + "tableTo": "shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shims_rels_users_fk": { + "name": "shims_rels_users_fk", + "tableFrom": "shims_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.enum_game_structures_staff_positions_position_type": { + "name": "enum_game_structures_staff_positions_position_type", + "schema": "public", + "values": [ + "administrative", + "technical", + "other" + ] + }, + "public.enum_game_structures_construction_status": { + "name": "enum_game_structures_construction_status", + "schema": "public", + "values": [ + "awaiting_materials", + "building", + "complete" + ] + }, + "public.enum_game_vehicles_status": { + "name": "enum_game_vehicles_status", + "schema": "public", + "values": [ + "idle", + "assigned", + "in_transit", + "damaged", + "destroyed" + ] + }, + "public.enum_npc_staffing_position_type": { + "name": "enum_npc_staffing_position_type", + "schema": "public", + "values": [ + "labor", + "administrative", + "technical", + "other" + ] + }, + "public.enum_npc_staffing_status": { + "name": "enum_npc_staffing_status", + "schema": "public", + "values": [ + "active", + "terminated" + ] + }, + "public.enum_game_event_logs_target_collection": { + "name": "enum_game_event_logs_target_collection", + "schema": "public", + "values": [ + "game-structures", + "game-vehicles", + "game-npcs", + "npc-staffing", + "structures", + "resources", + "assets", + "vehicles", + "factions", + "missions", + "campaigns", + "users", + "technologies", + "maps", + "shipments", + "bank-accounts", + "bank-transactions", + "ledger-entries", + "locker-storages", + "loadouts", + "market-listings", + "market-negotiations", + "market-state", + "evaluations", + "tickets", + "wiki-pages", + "wiki-revisions", + "wiki-templates", + "game-servers", + "assignment-transfers", + "voice-scripts", + "voice-submissions", + "story-beats", + "story-beat-states", + "custom-minefields", + "custom-minefield-scores", + "custom-radio-tests", + "custom-radio-test-scores", + "ribbon-submissions" + ] + }, + "public.enum_users_roles": { + "name": "enum_users_roles", + "schema": "public", + "values": [ + "guest", + "user", + "trusted", + "admin", + "developer" + ] + }, + "public.enum_users_preferences_notifications_muted_types": { + "name": "enum_users_preferences_notifications_muted_types", + "schema": "public", + "values": [ + "market:offer", + "market:counter", + "market:accept", + "market:reject", + "market:withdrawn", + "market:closed", + "market:sold", + "market:expired", + "award:granted", + "account:discord-request", + "finance:deposit", + "finance:withdraw", + "finance:transfer", + "shipment:completed", + "ticket:created", + "ticket:assigned", + "ticket:reply", + "ticket:status", + "poker:force-ended", + "poker:everyone-left", + "blackjack:force-ended", + "blackjack:everyone-left" + ] + }, + "public.enum_users_preferences_discord_muted_types": { + "name": "enum_users_preferences_discord_muted_types", + "schema": "public", + "values": [ + "market:offer", + "market:counter", + "market:accept", + "market:reject", + "market:withdrawn", + "market:closed", + "market:sold", + "market:expired", + "award:granted", + "account:discord-request", + "finance:deposit", + "finance:withdraw", + "finance:transfer", + "shipment:completed", + "ticket:created", + "ticket:assigned", + "ticket:reply", + "ticket:status", + "poker:force-ended", + "poker:everyone-left", + "blackjack:force-ended", + "blackjack:everyone-left" + ] + }, + "public.enum_users_preferences_display_lead_or_actual": { + "name": "enum_users_preferences_display_lead_or_actual", + "schema": "public", + "values": [ + "lead", + "actual" + ] + }, + "public.enum_roles_permissions": { + "name": "enum_roles_permissions", + "schema": "public", + "values": [ + "system:admin-access", + "media:create", + "media:read", + "media:update", + "media:delete", + "admin:media:manage", + "users:create", + "users:read", + "users:update", + "users:delete", + "users:unlock", + "users:assign-roles", + "admin:users:manage", + "roles:create", + "roles:read", + "roles:update", + "roles:delete", + "admin:roles:manage", + "ranks:create", + "ranks:read", + "ranks:update", + "ranks:delete", + "admin:ranks:manage", + "profiles:create", + "profiles:read", + "profiles:update", + "profiles:delete", + "admin:profiles:manage", + "awards:create", + "awards:read", + "awards:update", + "awards:delete", + "admin:awards:manage", + "qualifications:create", + "qualifications:read", + "qualifications:update", + "qualifications:delete", + "admin:qualifications:manage", + "assignments:create", + "assignments:read", + "assignments:update", + "assignments:delete", + "admin:assignments:manage", + "assignment-transfers:create", + "assignment-transfers:read", + "assignment-transfers:update", + "assignment-transfers:delete", + "admin:assignment-transfers:manage", + "experience:create", + "experience:read", + "experience:update", + "experience:delete", + "admin:experience:manage", + "user-notifications:create", + "user-notifications:read", + "user-notifications:update", + "user-notifications:delete", + "admin:user-notifications:manage", + "evaluations:create", + "evaluations:read", + "evaluations:update", + "evaluations:delete", + "admin:evaluations:manage", + "missions:create", + "missions:read", + "missions:update", + "missions:delete", + "missions:read-sensitive", + "admin:missions:manage", + "mission-attendances:create", + "mission-attendances:read", + "mission-attendances:update", + "mission-attendances:delete", + "admin:mission-attendances:manage", + "campaigns:create", + "campaigns:read", + "campaigns:update", + "campaigns:delete", + "admin:campaigns:manage", + "campaigns:manage", + "factions:create", + "factions:read", + "factions:update", + "factions:delete", + "admin:factions:manage", + "technologies:create", + "technologies:read", + "technologies:update", + "technologies:delete", + "admin:technologies:manage", + "assets:create", + "assets:read", + "assets:update", + "assets:delete", + "admin:assets:manage", + "resources:create", + "resources:read", + "resources:update", + "resources:delete", + "admin:resources:manage", + "vehicles:create", + "vehicles:read", + "vehicles:update", + "vehicles:delete", + "admin:vehicles:manage", + "structures:create", + "structures:read", + "structures:update", + "structures:delete", + "admin:structures:manage", + "shipments:create", + "shipments:read", + "shipments:update", + "shipments:delete", + "admin:shipments:manage", + "bank-accounts:create", + "bank-accounts:read", + "bank-accounts:update", + "bank-accounts:delete", + "admin:bank-accounts:manage", + "bank-transactions:create", + "bank-transactions:read", + "bank-transactions:update", + "bank-transactions:delete", + "admin:bank-transactions:manage", + "ledger-entries:create", + "ledger-entries:read", + "ledger-entries:update", + "ledger-entries:delete", + "admin:ledger-entries:manage", + "locker-storages:create", + "locker-storages:read", + "locker-storages:update", + "locker-storages:delete", + "admin:locker-storages:manage", + "loadouts:create", + "loadouts:read", + "loadouts:update", + "loadouts:delete", + "admin:loadouts:manage", + "market-listings:create", + "market-listings:read", + "market-listings:update", + "market-listings:delete", + "admin:market-listings:manage", + "market-negotiations:create", + "market-negotiations:read", + "market-negotiations:update", + "market-negotiations:delete", + "admin:market-negotiations:manage", + "market-state:create", + "market-state:read", + "market-state:update", + "market-state:delete", + "admin:market-state:manage", + "projects:create", + "projects:read", + "projects:update", + "projects:delete", + "admin:projects:manage", + "labels:create", + "labels:read", + "labels:update", + "labels:delete", + "admin:labels:manage", + "sprints:create", + "sprints:read", + "sprints:update", + "sprints:delete", + "admin:sprints:manage", + "releases:create", + "releases:read", + "releases:update", + "releases:delete", + "admin:releases:manage", + "tickets:create", + "tickets:read", + "tickets:update", + "tickets:delete", + "admin:tickets:manage", + "ticket-votes:create", + "ticket-votes:read", + "ticket-votes:update", + "ticket-votes:delete", + "admin:ticket-votes:manage", + "game-structures:create", + "game-structures:read", + "game-structures:update", + "game-structures:delete", + "admin:game-structures:manage", + "game-vehicles:create", + "game-vehicles:read", + "game-vehicles:update", + "game-vehicles:delete", + "admin:game-vehicles:manage", + "game-npcs:create", + "game-npcs:read", + "game-npcs:update", + "game-npcs:delete", + "admin:game-npcs:manage", + "game-hard-resources:create", + "game-hard-resources:read", + "game-hard-resources:update", + "game-hard-resources:delete", + "admin:game-hard-resources:manage", + "game-event-logs:create", + "game-event-logs:read", + "game-event-logs:update", + "game-event-logs:delete", + "admin:game-event-logs:manage", + "maps:create", + "maps:read", + "maps:update", + "maps:delete", + "admin:maps:manage", + "map-roads:read", + "admin:map-roads:manage", + "map-zones:read", + "admin:map-zones:manage", + "resource-nodes:read", + "admin:resource-nodes:manage", + "narrative-events:create", + "narrative-events:read", + "narrative-events:update", + "narrative-events:delete", + "admin:narrative-events:manage", + "mission-files:create", + "mission-files:read", + "mission-files:update", + "mission-files:delete", + "admin:mission-files:manage", + "mod-lists:create", + "mod-lists:read", + "mod-lists:update", + "mod-lists:delete", + "admin:mod-lists:manage", + "game-servers:create", + "game-servers:read", + "game-servers:update", + "game-servers:delete", + "admin:game-servers:manage", + "arma-sync-events:create", + "arma-sync-events:read", + "arma-sync-events:update", + "arma-sync-events:delete", + "admin:arma-sync-events:manage", + "arma-commands:create", + "arma-commands:read", + "arma-commands:update", + "arma-commands:delete", + "admin:arma-commands:manage", + "game-rules:read", + "game-rules:update", + "shims:read", + "shims:update", + "logistics:manage", + "intelligence:manage", + "profiles:intel_excerpt:update", + "banking:manage", + "tickets:staff", + "discord:staff", + "discord:announce", + "custom-minefields:update", + "custom-minefields:delete", + "custom-minefield-scores:delete", + "custom-radio-tests:update", + "custom-radio-tests:delete", + "custom-radio-test-scores:delete" + ] + }, + "public.enum_awards_grant_config_allowed_grantor_assignment_types": { + "name": "enum_awards_grant_config_allowed_grantor_assignment_types", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_awards_type": { + "name": "enum_awards_type", + "schema": "public", + "values": [ + "commendation", + "ribbon", + "medal" + ] + }, + "public.enum_awards_grant_config_recipient_scope": { + "name": "enum_awards_grant_config_recipient_scope", + "schema": "public", + "values": [ + "same_command", + "whitelist", + "anyone" + ] + }, + "public.enum_assignments_type": { + "name": "enum_assignments_type", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_assignment_transfers_status": { + "name": "enum_assignment_transfers_status", + "schema": "public", + "values": [ + "pending", + "rejected", + "awaiting_superuser", + "completed", + "cancelled", + "denied" + ] + }, + "public.enum_assignment_transfers_escalation_reason": { + "name": "enum_assignment_transfers_escalation_reason", + "schema": "public", + "values": [ + "no_leaders", + "appeal", + "leader_changed" + ] + }, + "public.enum_assignment_transfers_from_leader_decision": { + "name": "enum_assignment_transfers_from_leader_decision", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected", + "not_required" + ] + }, + "public.enum_assignment_transfers_to_leader_decision": { + "name": "enum_assignment_transfers_to_leader_decision", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected", + "not_required" + ] + }, + "public.enum_evaluations_kind": { + "name": "enum_evaluations_kind", + "schema": "public", + "values": [ + "leader-direct", + "leader-indirect", + "subordinate" + ] + }, + "public.enum_evaluations_level": { + "name": "enum_evaluations_level", + "schema": "public", + "values": [ + "exceptional", + "excellent", + "proficient", + "adequate", + "moderate", + "under-review" + ] + }, + "public.enum_ribbon_submissions_grantor_types": { + "name": "enum_ribbon_submissions_grantor_types", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_ribbon_submissions_status": { + "name": "enum_ribbon_submissions_status", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected" + ] + }, + "public.enum_ribbon_submissions_recipient_scope": { + "name": "enum_ribbon_submissions_recipient_scope", + "schema": "public", + "values": [ + "same_command", + "whitelist", + "anyone" + ] + }, + "public.enum_missions_factions_involved_threat_level": { + "name": "enum_missions_factions_involved_threat_level", + "schema": "public", + "values": [ + "ally", + "friendly", + "neutral", + "hostile" + ] + }, + "public.enum_missions_logistics_and_support_insertion": { + "name": "enum_missions_logistics_and_support_insertion", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_logistics_and_support_extraction": { + "name": "enum_missions_logistics_and_support_extraction", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_operation_type": { + "name": "enum_missions_operation_type", + "schema": "public", + "values": [ + "main", + "side", + "external" + ] + }, + "public.enum_missions_classification_mission_type": { + "name": "enum_missions_classification_mission_type", + "schema": "public", + "values": [ + "Zeus", + "PvE", + "PvP", + "PvPvE", + "Training", + "Special" + ] + }, + "public.enum_missions_ownership_and_status_status": { + "name": "enum_missions_ownership_and_status_status", + "schema": "public", + "values": [ + "Concept", + "Planning", + "Ready", + "Scheduled", + "Active", + "Completed", + "Cancelled" + ] + }, + "public.enum_missions_ownership_and_status_visibility": { + "name": "enum_missions_ownership_and_status_visibility", + "schema": "public", + "values": [ + "unit", + "leadership", + "intel", + "private" + ] + }, + "public.enum_missions_civilian_presence": { + "name": "enum_missions_civilian_presence", + "schema": "public", + "values": [ + "None", + "Low", + "Medium", + "High" + ] + }, + "public.enum_mission_attendances_response": { + "name": "enum_mission_attendances_response", + "schema": "public", + "values": [ + "yes", + "no", + "tentative" + ] + }, + "public.enum_campaigns_status": { + "name": "enum_campaigns_status", + "schema": "public", + "values": [ + "concept", + "inProgress", + "completed" + ] + }, + "public.enum_campaigns_campaign_mode": { + "name": "enum_campaigns_campaign_mode", + "schema": "public", + "values": [ + "official", + "custom" + ] + }, + "public.enum_factions_type": { + "name": "enum_factions_type", + "schema": "public", + "values": [ + "playerFaction", + "majorFaction", + "minorFaction", + "corporation", + "special" + ] + }, + "public.enum_technologies_approval_status": { + "name": "enum_technologies_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_technologies_type": { + "name": "enum_technologies_type", + "schema": "public", + "values": [ + "asset", + "upgrade" + ] + }, + "public.enum_assets_skin_configuration_applies_to_asset_types": { + "name": "enum_assets_skin_configuration_applies_to_asset_types", + "schema": "public", + "values": [ + "weapon", + "uniform", + "vest", + "backpack", + "helmet" + ] + }, + "public.enum_assets_approval_status": { + "name": "enum_assets_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_assets_asset_type": { + "name": "enum_assets_asset_type", + "schema": "public", + "values": [ + "weapon", + "magazine", + "optic", + "muzzle", + "bipod", + "uniform", + "vest", + "backpack", + "helmet", + "facewear", + "nvg", + "radio", + "medical", + "tool", + "explosive", + "skin", + "miscellaneous" + ] + }, + "public.enum_assets_weapon_configuration_slot_type": { + "name": "enum_assets_weapon_configuration_slot_type", + "schema": "public", + "values": [ + "primary", + "secondary", + "launcher" + ] + }, + "public.enum_assets_nightvision_configuration_nvg_generation": { + "name": "enum_assets_nightvision_configuration_nvg_generation", + "schema": "public", + "values": [ + "gen1", + "gen2", + "gen3" + ] + }, + "public.enum_assets_market_trading_rarity": { + "name": "enum_assets_market_trading_rarity", + "schema": "public", + "values": [ + "basic", + "common", + "uncommon", + "rare", + "veryRare", + "epic", + "legendary", + "unique" + ] + }, + "public.enum_resources_approval_status": { + "name": "enum_resources_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_resources_type": { + "name": "enum_resources_type", + "schema": "public", + "values": [ + "physical", + "fluid", + "energy", + "abstract" + ] + }, + "public.enum_resources_rarity": { + "name": "enum_resources_rarity", + "schema": "public", + "values": [ + "common", + "uncommon", + "rare", + "epic", + "legendary", + "exotic", + "unique" + ] + }, + "public.enum_vehicles_category": { + "name": "enum_vehicles_category", + "schema": "public", + "values": [ + "civilian", + "utility", + "transport", + "weaponized", + "military" + ] + }, + "public.enum_vehicles_pylons_pylon_type": { + "name": "enum_vehicles_pylons_pylon_type", + "schema": "public", + "values": [ + "mountedWeapon", + "pylon" + ] + }, + "public.enum_vehicles_approval_status": { + "name": "enum_vehicles_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_vehicles_transport_mode": { + "name": "enum_vehicles_transport_mode", + "schema": "public", + "values": [ + "ground", + "air", + "sea" + ] + }, + "public.enum_vehicles_armor_rating": { + "name": "enum_vehicles_armor_rating", + "schema": "public", + "values": [ + "none", + "light", + "medium", + "heavy", + "composite" + ] + }, + "public.enum_structures_staff_positions_position_type": { + "name": "enum_structures_staff_positions_position_type", + "schema": "public", + "values": [ + "administrative", + "technical", + "other" + ] + }, + "public.enum_structures_module_options_effects_type": { + "name": "enum_structures_module_options_effects_type", + "schema": "public", + "values": [ + "capacity_mass", + "production_multiplier", + "storage_slots" + ] + }, + "public.enum_structures_module_options_category": { + "name": "enum_structures_module_options_category", + "schema": "public", + "values": [ + "production", + "logistics", + "defense", + "utility" + ] + }, + "public.enum_structures_approval_status": { + "name": "enum_structures_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_structures_category": { + "name": "enum_structures_category", + "schema": "public", + "values": [ + "logistics", + "military", + "civilian" + ] + }, + "public.enum_structures_terrain_type": { + "name": "enum_structures_terrain_type", + "schema": "public", + "values": [ + "land", + "water" + ] + }, + "public.enum_structures_function_type": { + "name": "enum_structures_function_type", + "schema": "public", + "values": [ + "producer", + "storage", + "sensor", + "converter", + "defense", + "miscellaneous" + ] + }, + "public.enum_shipments_status": { + "name": "enum_shipments_status", + "schema": "public", + "values": [ + "pending", + "dispatched", + "in_transit", + "arrived", + "completed", + "cancelled", + "failed", + "stranded" + ] + }, + "public.enum_bank_accounts_account_type": { + "name": "enum_bank_accounts_account_type", + "schema": "public", + "values": [ + "treasury", + "faction", + "personal" + ] + }, + "public.enum_bank_accounts_status": { + "name": "enum_bank_accounts_status", + "schema": "public", + "values": [ + "open", + "frozen", + "closed" + ] + }, + "public.enum_bank_transactions_type": { + "name": "enum_bank_transactions_type", + "schema": "public", + "values": [ + "deposit", + "withdrawal", + "transfer", + "payment", + "fee", + "salary", + "adjustment" + ] + }, + "public.enum_bank_transactions_status": { + "name": "enum_bank_transactions_status", + "schema": "public", + "values": [ + "completed", + "reversed" + ] + }, + "public.enum_ledger_entries_type": { + "name": "enum_ledger_entries_type", + "schema": "public", + "values": [ + "deposit", + "withdrawal", + "transfer", + "payment", + "fee", + "salary", + "adjustment" + ] + }, + "public.enum_market_listings_status": { + "name": "enum_market_listings_status", + "schema": "public", + "values": [ + "active", + "sold", + "cancelled", + "expired" + ] + }, + "public.enum_market_negotiations_history_from": { + "name": "enum_market_negotiations_history_from", + "schema": "public", + "values": [ + "buyer", + "seller" + ] + }, + "public.enum_market_negotiations_status": { + "name": "enum_market_negotiations_status", + "schema": "public", + "values": [ + "open", + "accepted", + "rejected", + "closed", + "cancelled", + "expired" + ] + }, + "public.enum_market_negotiations_proposed_by": { + "name": "enum_market_negotiations_proposed_by", + "schema": "public", + "values": [ + "buyer", + "seller" + ] + }, + "public.enum_market_state_item_type": { + "name": "enum_market_state_item_type", + "schema": "public", + "values": [ + "resource", + "asset" + ] + }, + "public.enum_voice_scripts_status": { + "name": "enum_voice_scripts_status", + "schema": "public", + "values": [ + "draft", + "open", + "closed" + ] + }, + "public.enum_voice_submissions_status": { + "name": "enum_voice_submissions_status", + "schema": "public", + "values": [ + "pending", + "accepted", + "rejected" + ] + }, + "public.enum_tickets_activity_type": { + "name": "enum_tickets_activity_type", + "schema": "public", + "values": [ + "system", + "agent_message", + "client_message" + ] + }, + "public.enum_tickets_category": { + "name": "enum_tickets_category", + "schema": "public", + "values": [ + "bug_report", + "feature_request", + "support_request", + "other" + ] + }, + "public.enum_tickets_priority": { + "name": "enum_tickets_priority", + "schema": "public", + "values": [ + "low", + "medium", + "high", + "critical" + ] + }, + "public.enum_tickets_status": { + "name": "enum_tickets_status", + "schema": "public", + "values": [ + "open", + "in_review", + "planning", + "in_progress", + "waiting_on_reporter", + "in_testing", + "resolved", + "canceled", + "closed" + ] + }, + "public.enum_tickets_type": { + "name": "enum_tickets_type", + "schema": "public", + "values": [ + "task", + "bug", + "story", + "epic", + "improvement" + ] + }, + "public.enum_tickets_resolution": { + "name": "enum_tickets_resolution", + "schema": "public", + "values": [ + "fixed", + "wontfix", + "duplicate", + "invalid" + ] + }, + "public.enum_wiki_pages_category": { + "name": "enum_wiki_pages_category", + "schema": "public", + "values": [ + "Campaign", + "World", + "Lore", + "Characters", + "Plot", + "Media", + "Guides", + "Meta" + ] + }, + "public.enum_wiki_revisions_type": { + "name": "enum_wiki_revisions_type", + "schema": "public", + "values": [ + "create", + "edit", + "restore" + ] + }, + "public.enum_projects_status": { + "name": "enum_projects_status", + "schema": "public", + "values": [ + "active", + "archived" + ] + }, + "public.enum_sprints_status": { + "name": "enum_sprints_status", + "schema": "public", + "values": [ + "planning", + "active", + "completed" + ] + }, + "public.enum_releases_status": { + "name": "enum_releases_status", + "schema": "public", + "values": [ + "draft", + "in_progress", + "released" + ] + }, + "public.enum_maps_basemap_mode": { + "name": "enum_maps_basemap_mode", + "schema": "public", + "values": [ + "image", + "tiles" + ] + }, + "public.enum_map_roads_surface": { + "name": "enum_map_roads_surface", + "schema": "public", + "values": [ + "paved", + "dirt", + "trail" + ] + }, + "public.enum_map_roads_stroke_style": { + "name": "enum_map_roads_stroke_style", + "schema": "public", + "values": [ + "solid", + "dashed", + "dotted" + ] + }, + "public.enum_map_zones_type": { + "name": "enum_map_zones_type", + "schema": "public", + "values": [ + "water", + "land", + "territory", + "border", + "other" + ] + }, + "public.enum_narrative_events_triggers_type": { + "name": "enum_narrative_events_triggers_type", + "schema": "public", + "values": [ + "manual", + "mission_complete", + "timer", + "condition" + ] + }, + "public.enum_story_beats_status": { + "name": "enum_story_beats_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum_story_beat_states_reaction": { + "name": "enum_story_beat_states_reaction", + "schema": "public", + "values": [ + "like", + "heart", + "salute" + ] + }, + "public.enum_game_servers_status": { + "name": "enum_game_servers_status", + "schema": "public", + "values": [ + "online", + "offline" + ] + }, + "public.enum_arma_commands_status": { + "name": "enum_arma_commands_status", + "schema": "public", + "values": [ + "queued", + "delivered", + "succeeded", + "failed" + ] + }, + "public.enum_custom_radio_tests_order": { + "name": "enum_custom_radio_tests_order", + "schema": "public", + "values": [ + "fixed", + "shuffled" + ] + }, + "public.enum_custom_radio_test_scores_mode": { + "name": "enum_custom_radio_test_scores_mode", + "schema": "public", + "values": [ + "sprint", + "watch" + ] + }, + "public.enum_plugin_ai_instructions_field_type": { + "name": "enum_plugin_ai_instructions_field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "upload", + "richText" + ] + }, + "public.enum_plugin_ai_instructions_model_id": { + "name": "enum_plugin_ai_instructions_model_id", + "schema": "public", + "values": [ + "unsloth-text" + ] + }, + "public.enum_shims_shims_targeting_roles": { + "name": "enum_shims_shims_targeting_roles", + "schema": "public", + "values": [ + "guest", + "user", + "trusted", + "admin", + "developer" + ] + }, + "public.enum_shims_shims_type": { + "name": "enum_shims_shims_type", + "schema": "public", + "values": [ + "css", + "js" + ] + }, + "public.enum_shims_shims_targeting_audience": { + "name": "enum_shims_shims_targeting_audience", + "schema": "public", + "values": [ + "all", + "percentage", + "users", + "roles" + ] + }, + "public.enum_shims_shims_paths_match_type": { + "name": "enum_shims_shims_paths_match_type", + "schema": "public", + "values": [ + "all", + "include", + "exclude" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "id": "0c1ce659-badc-40d8-90c5-f78476f2599a", + "prevId": "00000000-0000-0000-0000-000000000000" +} \ No newline at end of file diff --git a/src/migrations/20260918_064326_add_compound_parent.ts b/src/migrations/20260918_064326_add_compound_parent.ts new file mode 100644 index 0000000..46379f0 --- /dev/null +++ b/src/migrations/20260918_064326_add_compound_parent.ts @@ -0,0 +1,16 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres' + +export async function up({ db, payload, req }: MigrateUpArgs): Promise { + await db.execute(sql` + ALTER TABLE "game_structures" ADD COLUMN "parent_structure_id" integer; + ALTER TABLE "game_structures" ADD CONSTRAINT "game_structures_parent_structure_id_game_structures_id_fk" FOREIGN KEY ("parent_structure_id") REFERENCES "public"."game_structures"("id") ON DELETE set null ON UPDATE no action; + CREATE INDEX "game_structures_parent_structure_idx" ON "game_structures" USING btree ("parent_structure_id");`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.execute(sql` + ALTER TABLE "game_structures" DROP CONSTRAINT "game_structures_parent_structure_id_game_structures_id_fk"; + + DROP INDEX "game_structures_parent_structure_idx"; + ALTER TABLE "game_structures" DROP COLUMN "parent_structure_id";`) +} diff --git a/src/migrations/20260918_070328_add_blueprint_aura.json b/src/migrations/20260918_070328_add_blueprint_aura.json new file mode 100644 index 0000000..ceb8833 --- /dev/null +++ b/src/migrations/20260918_070328_add_blueprint_aura.json @@ -0,0 +1,29103 @@ +{ + "version": "7", + "dialect": "postgresql", + "tables": { + "public.media": { + "name": "media", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "media_updated_at_idx": { + "name": "media_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_created_at_idx": { + "name": "media_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_filename_idx": { + "name": "media_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_hard_resources": { + "name": "game_hard_resources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_hard_resources_name_idx": { + "name": "game_hard_resources_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_hard_resources_updated_at_idx": { + "name": "game_hard_resources_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_hard_resources_created_at_idx": { + "name": "game_hard_resources_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_labor_requirements": { + "name": "game_structures_labor_requirements", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "classification_id": { + "name": "classification_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "required_headcount": { + "name": "required_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_headcount": { + "name": "max_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_labor_requirements_order_idx": { + "name": "game_structures_labor_requirements_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_labor_requirements_parent_id_idx": { + "name": "game_structures_labor_requirements_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_labor_requirements_classification_idx": { + "name": "game_structures_labor_requirements_classification_idx", + "columns": [ + { + "expression": "classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_labor_requirements_classification_id_labor_classifications_id_fk": { + "name": "game_structures_labor_requirements_classification_id_labor_classifications_id_fk", + "tableFrom": "game_structures_labor_requirements", + "tableTo": "labor_classifications", + "columnsFrom": [ + "classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_labor_requirements_parent_id_fk": { + "name": "game_structures_labor_requirements_parent_id_fk", + "tableFrom": "game_structures_labor_requirements", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_staff_positions": { + "name": "game_structures_staff_positions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_game_structures_staff_positions_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "max": { + "name": "max", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_staff_positions_order_idx": { + "name": "game_structures_staff_positions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_staff_positions_parent_id_idx": { + "name": "game_structures_staff_positions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_staff_positions_parent_id_fk": { + "name": "game_structures_staff_positions_parent_id_fk", + "tableFrom": "game_structures_staff_positions", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_production_inputs": { + "name": "game_structures_production_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "game_structures_production_inputs_order_idx": { + "name": "game_structures_production_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_inputs_parent_id_idx": { + "name": "game_structures_production_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_inputs_resource_idx": { + "name": "game_structures_production_inputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_production_inputs_resource_id_resources_id_fk": { + "name": "game_structures_production_inputs_resource_id_resources_id_fk", + "tableFrom": "game_structures_production_inputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_production_inputs_parent_id_fk": { + "name": "game_structures_production_inputs_parent_id_fk", + "tableFrom": "game_structures_production_inputs", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_production_outputs": { + "name": "game_structures_production_outputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "game_structures_production_outputs_order_idx": { + "name": "game_structures_production_outputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_outputs_parent_id_idx": { + "name": "game_structures_production_outputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_production_outputs_resource_idx": { + "name": "game_structures_production_outputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_production_outputs_resource_id_resources_id_fk": { + "name": "game_structures_production_outputs_resource_id_resources_id_fk", + "tableFrom": "game_structures_production_outputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_production_outputs_parent_id_fk": { + "name": "game_structures_production_outputs_parent_id_fk", + "tableFrom": "game_structures_production_outputs", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_installed_modules": { + "name": "game_structures_installed_modules", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "installed_at": { + "name": "installed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_structures_installed_modules_order_idx": { + "name": "game_structures_installed_modules_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_installed_modules_parent_id_idx": { + "name": "game_structures_installed_modules_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_installed_modules_parent_id_fk": { + "name": "game_structures_installed_modules_parent_id_fk", + "tableFrom": "game_structures_installed_modules", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_stored_resources": { + "name": "game_structures_stored_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_structures_stored_resources_order_idx": { + "name": "game_structures_stored_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_stored_resources_parent_id_idx": { + "name": "game_structures_stored_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_stored_resources_resource_idx": { + "name": "game_structures_stored_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_stored_resources_resource_id_resources_id_fk": { + "name": "game_structures_stored_resources_resource_id_resources_id_fk", + "tableFrom": "game_structures_stored_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_stored_resources_parent_id_fk": { + "name": "game_structures_stored_resources_parent_id_fk", + "tableFrom": "game_structures_stored_resources", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures_void_storage": { + "name": "game_structures_void_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_structures_void_storage_order_idx": { + "name": "game_structures_void_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_void_storage_parent_id_idx": { + "name": "game_structures_void_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_void_storage_resource_idx": { + "name": "game_structures_void_storage_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_void_storage_resource_id_resources_id_fk": { + "name": "game_structures_void_storage_resource_id_resources_id_fk", + "tableFrom": "game_structures_void_storage", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_void_storage_parent_id_fk": { + "name": "game_structures_void_storage_parent_id_fk", + "tableFrom": "game_structures_void_storage", + "tableTo": "game_structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_structures": { + "name": "game_structures", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type_id": { + "name": "type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "construction_status": { + "name": "construction_status", + "type": "enum_game_structures_construction_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'complete'" + }, + "construction_started_at": { + "name": "construction_started_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "construction_completes_at": { + "name": "construction_completes_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "maintenance_cost": { + "name": "maintenance_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "production_paused": { + "name": "production_paused", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "last_production_at": { + "name": "last_production_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "production_stall_reason": { + "name": "production_stall_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "coordinates": { + "name": "coordinates", + "type": "geometry(Point)", + "primaryKey": false, + "notNull": false + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "label_priority": { + "name": "label_priority", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "parent_structure_id": { + "name": "parent_structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_structures_type_idx": { + "name": "game_structures_type_idx", + "columns": [ + { + "expression": "type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_faction_idx": { + "name": "game_structures_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_map_idx": { + "name": "game_structures_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_parent_structure_idx": { + "name": "game_structures_parent_structure_idx", + "columns": [ + { + "expression": "parent_structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_updated_at_idx": { + "name": "game_structures_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_structures_created_at_idx": { + "name": "game_structures_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_structures_type_id_structures_id_fk": { + "name": "game_structures_type_id_structures_id_fk", + "tableFrom": "game_structures", + "tableTo": "structures", + "columnsFrom": [ + "type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_faction_id_factions_id_fk": { + "name": "game_structures_faction_id_factions_id_fk", + "tableFrom": "game_structures", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_map_id_maps_id_fk": { + "name": "game_structures_map_id_maps_id_fk", + "tableFrom": "game_structures", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_structures_parent_structure_id_game_structures_id_fk": { + "name": "game_structures_parent_structure_id_game_structures_id_fk", + "tableFrom": "game_structures", + "tableTo": "game_structures", + "columnsFrom": [ + "parent_structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles_stored_resources": { + "name": "game_vehicles_stored_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_vehicles_stored_resources_order_idx": { + "name": "game_vehicles_stored_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_stored_resources_parent_id_idx": { + "name": "game_vehicles_stored_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_stored_resources_resource_idx": { + "name": "game_vehicles_stored_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_stored_resources_resource_id_resources_id_fk": { + "name": "game_vehicles_stored_resources_resource_id_resources_id_fk", + "tableFrom": "game_vehicles_stored_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_stored_resources_parent_id_fk": { + "name": "game_vehicles_stored_resources_parent_id_fk", + "tableFrom": "game_vehicles_stored_resources", + "tableTo": "game_vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles_void_storage": { + "name": "game_vehicles_void_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "game_vehicles_void_storage_order_idx": { + "name": "game_vehicles_void_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_void_storage_parent_id_idx": { + "name": "game_vehicles_void_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_void_storage_resource_idx": { + "name": "game_vehicles_void_storage_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_void_storage_resource_id_resources_id_fk": { + "name": "game_vehicles_void_storage_resource_id_resources_id_fk", + "tableFrom": "game_vehicles_void_storage", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_void_storage_parent_id_fk": { + "name": "game_vehicles_void_storage_parent_id_fk", + "tableFrom": "game_vehicles_void_storage", + "tableTo": "game_vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_vehicles": { + "name": "game_vehicles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type_id": { + "name": "type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "deployed_at_id": { + "name": "deployed_at_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_game_vehicles_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'idle'" + }, + "current_fuel": { + "name": "current_fuel", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "current_health": { + "name": "current_health", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_vehicles_type_idx": { + "name": "game_vehicles_type_idx", + "columns": [ + { + "expression": "type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_deployed_at_idx": { + "name": "game_vehicles_deployed_at_idx", + "columns": [ + { + "expression": "deployed_at_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_faction_idx": { + "name": "game_vehicles_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_updated_at_idx": { + "name": "game_vehicles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_vehicles_created_at_idx": { + "name": "game_vehicles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_vehicles_type_id_vehicles_id_fk": { + "name": "game_vehicles_type_id_vehicles_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "vehicles", + "columnsFrom": [ + "type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_deployed_at_id_game_structures_id_fk": { + "name": "game_vehicles_deployed_at_id_game_structures_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "game_structures", + "columnsFrom": [ + "deployed_at_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_vehicles_faction_id_factions_id_fk": { + "name": "game_vehicles_faction_id_factions_id_fk", + "tableFrom": "game_vehicles", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_npcs": { + "name": "game_npcs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occupation": { + "name": "occupation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "location_id": { + "name": "location_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bio": { + "name": "bio", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "is_generated": { + "name": "is_generated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "is_in_game": { + "name": "is_in_game", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "vendor_enabled": { + "name": "vendor_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vendor_price_modifier": { + "name": "vendor_price_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_npcs_location_idx": { + "name": "game_npcs_location_idx", + "columns": [ + { + "expression": "location_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_faction_idx": { + "name": "game_npcs_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_updated_at_idx": { + "name": "game_npcs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_created_at_idx": { + "name": "game_npcs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_npcs_location_id_game_structures_id_fk": { + "name": "game_npcs_location_id_game_structures_id_fk", + "tableFrom": "game_npcs", + "tableTo": "game_structures", + "columnsFrom": [ + "location_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_npcs_faction_id_factions_id_fk": { + "name": "game_npcs_faction_id_factions_id_fk", + "tableFrom": "game_npcs", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_npcs_rels": { + "name": "game_npcs_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_npcs_rels_order_idx": { + "name": "game_npcs_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_parent_idx": { + "name": "game_npcs_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_path_idx": { + "name": "game_npcs_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_npcs_rels_assets_id_idx": { + "name": "game_npcs_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_npcs_rels_parent_fk": { + "name": "game_npcs_rels_parent_fk", + "tableFrom": "game_npcs_rels", + "tableTo": "game_npcs", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "game_npcs_rels_assets_fk": { + "name": "game_npcs_rels_assets_fk", + "tableFrom": "game_npcs_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.npc_staffing": { + "name": "npc_staffing", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "npc_id": { + "name": "npc_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_npc_staffing_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'labor'" + }, + "position_title": { + "name": "position_title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "headcount": { + "name": "headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "labor_classification_id": { + "name": "labor_classification_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "salary": { + "name": "salary", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_npc_staffing_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'active'" + }, + "hired_at": { + "name": "hired_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "terminated_at": { + "name": "terminated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "npc_staffing_npc_idx": { + "name": "npc_staffing_npc_idx", + "columns": [ + { + "expression": "npc_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_structure_idx": { + "name": "npc_staffing_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_labor_classification_idx": { + "name": "npc_staffing_labor_classification_idx", + "columns": [ + { + "expression": "labor_classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_updated_at_idx": { + "name": "npc_staffing_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "npc_staffing_created_at_idx": { + "name": "npc_staffing_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "npc_staffing_npc_id_game_npcs_id_fk": { + "name": "npc_staffing_npc_id_game_npcs_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "game_npcs", + "columnsFrom": [ + "npc_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "npc_staffing_structure_id_game_structures_id_fk": { + "name": "npc_staffing_structure_id_game_structures_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "game_structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "npc_staffing_labor_classification_id_labor_classifications_id_fk": { + "name": "npc_staffing_labor_classification_id_labor_classifications_id_fk", + "tableFrom": "npc_staffing", + "tableTo": "labor_classifications", + "columnsFrom": [ + "labor_classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labor_classifications": { + "name": "labor_classifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "default_unit_salary": { + "name": "default_unit_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "build_efficiency": { + "name": "build_efficiency", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "available_headcount": { + "name": "available_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "labor_classifications_name_idx": { + "name": "labor_classifications_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_key_idx": { + "name": "labor_classifications_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_updated_at_idx": { + "name": "labor_classifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labor_classifications_created_at_idx": { + "name": "labor_classifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_event_logs": { + "name": "game_event_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "system": { + "name": "system", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "actor_id": { + "name": "actor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "target_collection": { + "name": "target_collection", + "type": "enum_game_event_logs_target_collection", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "target_id": { + "name": "target_id", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_event_logs_type_idx": { + "name": "game_event_logs_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_actor_idx": { + "name": "game_event_logs_actor_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_structure_idx": { + "name": "game_event_logs_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_updated_at_idx": { + "name": "game_event_logs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_event_logs_created_at_idx": { + "name": "game_event_logs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_event_logs_actor_id_users_id_fk": { + "name": "game_event_logs_actor_id_users_id_fk", + "tableFrom": "game_event_logs", + "tableTo": "users", + "columnsFrom": [ + "actor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "game_event_logs_structure_id_game_structures_id_fk": { + "name": "game_event_logs_structure_id_game_structures_id_fk", + "tableFrom": "game_event_logs", + "tableTo": "game_structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_roles": { + "name": "users_roles", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_roles_order_idx": { + "name": "users_roles_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_roles_parent_idx": { + "name": "users_roles_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_roles_parent_fk": { + "name": "users_roles_parent_fk", + "tableFrom": "users_roles", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_preferences_notifications_muted_types": { + "name": "users_preferences_notifications_muted_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_preferences_notifications_muted_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_preferences_notifications_muted_types_order_idx": { + "name": "users_preferences_notifications_muted_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_preferences_notifications_muted_types_parent_idx": { + "name": "users_preferences_notifications_muted_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_preferences_notifications_muted_types_parent_fk": { + "name": "users_preferences_notifications_muted_types_parent_fk", + "tableFrom": "users_preferences_notifications_muted_types", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_preferences_discord_muted_types": { + "name": "users_preferences_discord_muted_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_users_preferences_discord_muted_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "users_preferences_discord_muted_types_order_idx": { + "name": "users_preferences_discord_muted_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_preferences_discord_muted_types_parent_idx": { + "name": "users_preferences_discord_muted_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_preferences_discord_muted_types_parent_fk": { + "name": "users_preferences_discord_muted_types_parent_fk", + "tableFrom": "users_preferences_discord_muted_types", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_sessions": { + "name": "users_sessions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "users_sessions_order_idx": { + "name": "users_sessions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_sessions_parent_id_idx": { + "name": "users_sessions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_sessions_parent_id_fk": { + "name": "users_sessions_parent_id_fk", + "tableFrom": "users_sessions", + "tableTo": "users", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "discord_username": { + "name": "discord_username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "discord_id": { + "name": "discord_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "payload_display_name": { + "name": "payload_display_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "steam_id": { + "name": "steam_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "preferences_notifications_muted_all": { + "name": "preferences_notifications_muted_all", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_show_callsign": { + "name": "preferences_display_show_callsign", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_lead_or_actual": { + "name": "preferences_display_lead_or_actual", + "type": "enum_users_preferences_display_lead_or_actual", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'lead'" + }, + "preferences_display_show_version_overlay": { + "name": "preferences_display_show_version_overlay", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "preferences_display_xp_display_mini": { + "name": "preferences_display_xp_display_mini", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_display_show_background_texture": { + "name": "preferences_display_show_background_texture", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "preferences_discord_enabled": { + "name": "preferences_discord_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "preferences_dashboard_layout": { + "name": "preferences_dashboard_layout", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "reset_password_token": { + "name": "reset_password_token", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reset_password_expiration": { + "name": "reset_password_expiration", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "salt": { + "name": "salt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hash": { + "name": "hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "login_attempts": { + "name": "login_attempts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lock_until": { + "name": "lock_until", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_discord_username_idx": { + "name": "users_discord_username_idx", + "columns": [ + { + "expression": "discord_username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_discord_id_idx": { + "name": "users_discord_id_idx", + "columns": [ + { + "expression": "discord_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_updated_at_idx": { + "name": "users_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_created_at_idx": { + "name": "users_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_username_idx": { + "name": "users_username_idx", + "columns": [ + { + "expression": "username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_rels": { + "name": "users_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_rels_order_idx": { + "name": "users_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_parent_idx": { + "name": "users_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_path_idx": { + "name": "users_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_roles_id_idx": { + "name": "users_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_rels_parent_fk": { + "name": "users_rels_parent_fk", + "tableFrom": "users_rels", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "users_rels_roles_fk": { + "name": "users_rels_roles_fk", + "tableFrom": "users_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles_permissions": { + "name": "roles_permissions", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_roles_permissions", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "roles_permissions_order_idx": { + "name": "roles_permissions_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_permissions_parent_idx": { + "name": "roles_permissions_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "roles_permissions_parent_fk": { + "name": "roles_permissions_parent_fk", + "tableFrom": "roles_permissions", + "tableTo": "roles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles": { + "name": "roles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "is_system": { + "name": "is_system", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "is_superuser": { + "name": "is_superuser", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "roles_name_idx": { + "name": "roles_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_slug_idx": { + "name": "roles_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_updated_at_idx": { + "name": "roles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_created_at_idx": { + "name": "roles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles_rels": { + "name": "roles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "roles_rels_order_idx": { + "name": "roles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_parent_idx": { + "name": "roles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_path_idx": { + "name": "roles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "roles_rels_roles_id_idx": { + "name": "roles_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "roles_rels_parent_fk": { + "name": "roles_rels_parent_fk", + "tableFrom": "roles_rels", + "tableTo": "roles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "roles_rels_roles_fk": { + "name": "roles_rels_roles_fk", + "tableFrom": "roles_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ranks": { + "name": "ranks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_order": { + "name": "_order", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "abbreviation": { + "name": "abbreviation", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "insignia_id": { + "name": "insignia_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "promotion_ceiling_id": { + "name": "promotion_ceiling_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ranks__order_idx": { + "name": "ranks__order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_name_idx": { + "name": "ranks_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_abbreviation_idx": { + "name": "ranks_abbreviation_idx", + "columns": [ + { + "expression": "abbreviation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_insignia_idx": { + "name": "ranks_insignia_idx", + "columns": [ + { + "expression": "insignia_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_promotion_ceiling_idx": { + "name": "ranks_promotion_ceiling_idx", + "columns": [ + { + "expression": "promotion_ceiling_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_updated_at_idx": { + "name": "ranks_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ranks_created_at_idx": { + "name": "ranks_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ranks_insignia_id_media_id_fk": { + "name": "ranks_insignia_id_media_id_fk", + "tableFrom": "ranks", + "tableTo": "media", + "columnsFrom": [ + "insignia_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ranks_promotion_ceiling_id_ranks_id_fk": { + "name": "ranks_promotion_ceiling_id_ranks_id_fk", + "tableFrom": "ranks", + "tableTo": "ranks", + "columnsFrom": [ + "promotion_ceiling_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles_progression_awards": { + "name": "profiles_progression_awards", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "award_id": { + "name": "award_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "awarded_by_id": { + "name": "awarded_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "awarded_at": { + "name": "awarded_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "award_reason": { + "name": "award_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "upgraded_from_id": { + "name": "upgraded_from_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "upgraded_at": { + "name": "upgraded_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "profiles_progression_awards_order_idx": { + "name": "profiles_progression_awards_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_parent_id_idx": { + "name": "profiles_progression_awards_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_award_idx": { + "name": "profiles_progression_awards_award_idx", + "columns": [ + { + "expression": "award_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_awarded_by_idx": { + "name": "profiles_progression_awards_awarded_by_idx", + "columns": [ + { + "expression": "awarded_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_progression_awards_upgraded_from_idx": { + "name": "profiles_progression_awards_upgraded_from_idx", + "columns": [ + { + "expression": "upgraded_from_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_progression_awards_award_id_awards_id_fk": { + "name": "profiles_progression_awards_award_id_awards_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "awards", + "columnsFrom": [ + "award_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_awarded_by_id_profiles_id_fk": { + "name": "profiles_progression_awards_awarded_by_id_profiles_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "profiles", + "columnsFrom": [ + "awarded_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_upgraded_from_id_awards_id_fk": { + "name": "profiles_progression_awards_upgraded_from_id_awards_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "awards", + "columnsFrom": [ + "upgraded_from_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_progression_awards_parent_id_fk": { + "name": "profiles_progression_awards_parent_id_fk", + "tableFrom": "profiles_progression_awards", + "tableTo": "profiles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles": { + "name": "profiles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rank_id": { + "name": "rank_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "dossier_enlistment_date": { + "name": "dossier_enlistment_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "dossier_personal_excerpt": { + "name": "dossier_personal_excerpt", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "dossier_intel_excerpt": { + "name": "dossier_intel_excerpt", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "progression_scoreboard_infantry_kills": { + "name": "progression_scoreboard_infantry_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_vehicle_kills": { + "name": "progression_scoreboard_vehicle_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_armor_kills": { + "name": "progression_scoreboard_armor_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_air_kills": { + "name": "progression_scoreboard_air_kills", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_scoreboard_deaths": { + "name": "progression_scoreboard_deaths", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_games_played": { + "name": "progression_minigames_flappy_bird_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_total_passes": { + "name": "progression_minigames_flappy_bird_total_passes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_best_score": { + "name": "progression_minigames_flappy_bird_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_flappy_bird_xp_earned": { + "name": "progression_minigames_flappy_bird_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_games_played": { + "name": "progression_minigames_eod_minesweeper_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_wins": { + "name": "progression_minigames_eod_minesweeper_wins", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_losses": { + "name": "progression_minigames_eod_minesweeper_losses", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_score": { + "name": "progression_minigames_eod_minesweeper_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_xp_earned": { + "name": "progression_minigames_eod_minesweeper_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_training_time": { + "name": "progression_minigames_eod_minesweeper_best_training_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_perimeter_time": { + "name": "progression_minigames_eod_minesweeper_best_perimeter_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_supply_road_time": { + "name": "progression_minigames_eod_minesweeper_best_supply_road_time", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_training_flags": { + "name": "progression_minigames_eod_minesweeper_best_training_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_perimeter_flags": { + "name": "progression_minigames_eod_minesweeper_best_perimeter_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_eod_minesweeper_best_supply_road_flags": { + "name": "progression_minigames_eod_minesweeper_best_supply_road_flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_games_played": { + "name": "progression_minigames_radio_traffic_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_total_messages": { + "name": "progression_minigames_radio_traffic_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_incorrect_messages": { + "name": "progression_minigames_radio_traffic_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_score": { + "name": "progression_minigames_radio_traffic_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_accuracy": { + "name": "progression_minigames_radio_traffic_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_best_sprint_time_ms": { + "name": "progression_minigames_radio_traffic_best_sprint_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_games_played": { + "name": "progression_minigames_radio_traffic_sprint_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_total_messages": { + "name": "progression_minigames_radio_traffic_sprint_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_incorrect_messages": { + "name": "progression_minigames_radio_traffic_sprint_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_best_score": { + "name": "progression_minigames_radio_traffic_sprint_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_sprint_best_accuracy": { + "name": "progression_minigames_radio_traffic_sprint_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_games_played": { + "name": "progression_minigames_radio_traffic_watch_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_total_messages": { + "name": "progression_minigames_radio_traffic_watch_total_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_incorrect_messages": { + "name": "progression_minigames_radio_traffic_watch_incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_best_score": { + "name": "progression_minigames_radio_traffic_watch_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_watch_best_accuracy": { + "name": "progression_minigames_radio_traffic_watch_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_radio_traffic_xp_earned": { + "name": "progression_minigames_radio_traffic_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_games_played": { + "name": "progression_minigames_aim_trainer_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_best_score": { + "name": "progression_minigames_aim_trainer_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_recruit_best_score": { + "name": "progression_minigames_aim_trainer_recruit_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_veteran_best_score": { + "name": "progression_minigames_aim_trainer_veteran_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_elite_best_score": { + "name": "progression_minigames_aim_trainer_elite_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_recruit_best_accuracy": { + "name": "progression_minigames_aim_trainer_recruit_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_veteran_best_accuracy": { + "name": "progression_minigames_aim_trainer_veteran_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_elite_best_accuracy": { + "name": "progression_minigames_aim_trainer_elite_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_aim_trainer_xp_earned": { + "name": "progression_minigames_aim_trainer_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_games_played": { + "name": "progression_minigames_opord_recall_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_best_score": { + "name": "progression_minigames_opord_recall_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_best_accuracy": { + "name": "progression_minigames_opord_recall_best_accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_recruit_best_score": { + "name": "progression_minigames_opord_recall_recruit_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_veteran_best_score": { + "name": "progression_minigames_opord_recall_veteran_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_elite_best_score": { + "name": "progression_minigames_opord_recall_elite_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_opord_recall_recruit_best_time_ms": { + "name": "progression_minigames_opord_recall_recruit_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_veteran_best_time_ms": { + "name": "progression_minigames_opord_recall_veteran_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_elite_best_time_ms": { + "name": "progression_minigames_opord_recall_elite_best_time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "progression_minigames_opord_recall_xp_earned": { + "name": "progression_minigames_opord_recall_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_games_played": { + "name": "progression_minigames_poker_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_wins": { + "name": "progression_minigames_poker_wins", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_second_places": { + "name": "progression_minigames_poker_second_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_third_places": { + "name": "progression_minigames_poker_third_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_fourth_places": { + "name": "progression_minigames_poker_fourth_places", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_hands_won": { + "name": "progression_minigames_poker_hands_won", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_best_score": { + "name": "progression_minigames_poker_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_poker_xp_earned": { + "name": "progression_minigames_poker_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_games_played": { + "name": "progression_minigames_blackjack_games_played", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_rounds_won": { + "name": "progression_minigames_blackjack_rounds_won", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_blackjacks_hit": { + "name": "progression_minigames_blackjack_blackjacks_hit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_best_score": { + "name": "progression_minigames_blackjack_best_score", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_minigames_blackjack_xp_earned": { + "name": "progression_minigames_blackjack_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_chip_bank": { + "name": "progression_chip_bank", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "progression_chip_bank_refilled_at": { + "name": "progression_chip_bank_refilled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "progression_voiceover_xp_earned": { + "name": "progression_voiceover_xp_earned", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "profiles_user_idx": { + "name": "profiles_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rank_idx": { + "name": "profiles_rank_idx", + "columns": [ + { + "expression": "rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_updated_at_idx": { + "name": "profiles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_created_at_idx": { + "name": "profiles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_user_id_users_id_fk": { + "name": "profiles_user_id_users_id_fk", + "tableFrom": "profiles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "profiles_rank_id_ranks_id_fk": { + "name": "profiles_rank_id_ranks_id_fk", + "tableFrom": "profiles", + "tableTo": "ranks", + "columnsFrom": [ + "rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.profiles_rels": { + "name": "profiles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "profiles_rels_order_idx": { + "name": "profiles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_parent_idx": { + "name": "profiles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_path_idx": { + "name": "profiles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "profiles_rels_qualifications_id_idx": { + "name": "profiles_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "profiles_rels_parent_fk": { + "name": "profiles_rels_parent_fk", + "tableFrom": "profiles_rels", + "tableTo": "profiles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "profiles_rels_qualifications_fk": { + "name": "profiles_rels_qualifications_fk", + "tableFrom": "profiles_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards_grant_config_allowed_grantor_assignment_types": { + "name": "awards_grant_config_allowed_grantor_assignment_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_awards_grant_config_allowed_grantor_assignment_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "awards_grant_config_allowed_grantor_assignment_types_order_idx": { + "name": "awards_grant_config_allowed_grantor_assignment_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_grant_config_allowed_grantor_assignment_types_parent_idx": { + "name": "awards_grant_config_allowed_grantor_assignment_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_grant_config_allowed_grantor_assignment_types_parent_fk": { + "name": "awards_grant_config_allowed_grantor_assignment_types_parent_fk", + "tableFrom": "awards_grant_config_allowed_grantor_assignment_types", + "tableTo": "awards", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards": { + "name": "awards", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_awards_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'commendation'" + }, + "commendation_color": { + "name": "commendation_color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#92400e'" + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "experience_points": { + "name": "experience_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "ribbon_design": { + "name": "ribbon_design", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "background_image_id": { + "name": "background_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "medal_design": { + "name": "medal_design", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "advancement_series_key": { + "name": "advancement_series_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "advancement_tier": { + "name": "advancement_tier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "grant_config_max_grants_per_grantor": { + "name": "grant_config_max_grants_per_grantor", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "grant_config_recipient_scope": { + "name": "grant_config_recipient_scope", + "type": "enum_awards_grant_config_recipient_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'same_command'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "awards_name_idx": { + "name": "awards_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_image_idx": { + "name": "awards_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_background_image_idx": { + "name": "awards_background_image_idx", + "columns": [ + { + "expression": "background_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_updated_at_idx": { + "name": "awards_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_created_at_idx": { + "name": "awards_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_image_id_media_id_fk": { + "name": "awards_image_id_media_id_fk", + "tableFrom": "awards", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "awards_background_image_id_media_id_fk": { + "name": "awards_background_image_id_media_id_fk", + "tableFrom": "awards", + "tableTo": "media", + "columnsFrom": [ + "background_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.awards_rels": { + "name": "awards_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "awards_rels_order_idx": { + "name": "awards_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_parent_idx": { + "name": "awards_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_path_idx": { + "name": "awards_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "awards_rels_assignments_id_idx": { + "name": "awards_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "awards_rels_parent_fk": { + "name": "awards_rels_parent_fk", + "tableFrom": "awards_rels", + "tableTo": "awards", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "awards_rels_assignments_fk": { + "name": "awards_rels_assignments_fk", + "tableFrom": "awards_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.qualifications": { + "name": "qualifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "qualifications_name_idx": { + "name": "qualifications_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_updated_at_idx": { + "name": "qualifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "qualifications_created_at_idx": { + "name": "qualifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments": { + "name": "assignments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_assignments_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "callsign": { + "name": "callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "leader_id": { + "name": "leader_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assignments_leader_idx": { + "name": "assignments_leader_idx", + "columns": [ + { + "expression": "leader_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_updated_at_idx": { + "name": "assignments_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_created_at_idx": { + "name": "assignments_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_leader_id_users_id_fk": { + "name": "assignments_leader_id_users_id_fk", + "tableFrom": "assignments", + "tableTo": "users", + "columnsFrom": [ + "leader_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignments_rels": { + "name": "assignments_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assignments_rels_order_idx": { + "name": "assignments_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_parent_idx": { + "name": "assignments_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_path_idx": { + "name": "assignments_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_assignments_id_idx": { + "name": "assignments_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignments_rels_users_id_idx": { + "name": "assignments_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignments_rels_parent_fk": { + "name": "assignments_rels_parent_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_assignments_fk": { + "name": "assignments_rels_assignments_fk", + "tableFrom": "assignments_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assignments_rels_users_fk": { + "name": "assignments_rels_users_fk", + "tableFrom": "assignments_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assignment_transfers": { + "name": "assignment_transfers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "requester_id": { + "name": "requester_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "from_assignment_id": { + "name": "from_assignment_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "to_assignment_id": { + "name": "to_assignment_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_assignment_transfers_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "escalation_reason": { + "name": "escalation_reason", + "type": "enum_assignment_transfers_escalation_reason", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "from_leader_decision": { + "name": "from_leader_decision", + "type": "enum_assignment_transfers_from_leader_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "to_leader_decision": { + "name": "to_leader_decision", + "type": "enum_assignment_transfers_to_leader_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "from_decision_by_id": { + "name": "from_decision_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_decision_by_id": { + "name": "to_decision_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "from_decided_at": { + "name": "from_decided_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "to_decided_at": { + "name": "to_decided_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "from_leader_snapshot_id": { + "name": "from_leader_snapshot_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_leader_snapshot_id": { + "name": "to_leader_snapshot_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rejection_reason": { + "name": "rejection_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "request_note": { + "name": "request_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "appeal_note": { + "name": "appeal_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "resolved_by_id": { + "name": "resolved_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resolution_note": { + "name": "resolution_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "resolved_at": { + "name": "resolved_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "discord_from_leader_message_id": { + "name": "discord_from_leader_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_to_leader_message_id": { + "name": "discord_to_leader_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_requester_message_id": { + "name": "discord_requester_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "source_notified_to_user_id_id": { + "name": "source_notified_to_user_id_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "destination_notified_to_user_id_id": { + "name": "destination_notified_to_user_id_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "discord_delivered_keys": { + "name": "discord_delivered_keys", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assignment_transfers_requester_idx": { + "name": "assignment_transfers_requester_idx", + "columns": [ + { + "expression": "requester_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_assignment_idx": { + "name": "assignment_transfers_from_assignment_idx", + "columns": [ + { + "expression": "from_assignment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_assignment_idx": { + "name": "assignment_transfers_to_assignment_idx", + "columns": [ + { + "expression": "to_assignment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_status_idx": { + "name": "assignment_transfers_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_decision_by_idx": { + "name": "assignment_transfers_from_decision_by_idx", + "columns": [ + { + "expression": "from_decision_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_decision_by_idx": { + "name": "assignment_transfers_to_decision_by_idx", + "columns": [ + { + "expression": "to_decision_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_from_leader_snapshot_idx": { + "name": "assignment_transfers_from_leader_snapshot_idx", + "columns": [ + { + "expression": "from_leader_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_to_leader_snapshot_idx": { + "name": "assignment_transfers_to_leader_snapshot_idx", + "columns": [ + { + "expression": "to_leader_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_resolved_by_idx": { + "name": "assignment_transfers_resolved_by_idx", + "columns": [ + { + "expression": "resolved_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_source_notified_to_user_id_idx": { + "name": "assignment_transfers_source_notified_to_user_id_idx", + "columns": [ + { + "expression": "source_notified_to_user_id_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_destination_notified_to_user_id_idx": { + "name": "assignment_transfers_destination_notified_to_user_id_idx", + "columns": [ + { + "expression": "destination_notified_to_user_id_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_updated_at_idx": { + "name": "assignment_transfers_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assignment_transfers_created_at_idx": { + "name": "assignment_transfers_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assignment_transfers_requester_id_users_id_fk": { + "name": "assignment_transfers_requester_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "requester_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_assignment_id_assignments_id_fk": { + "name": "assignment_transfers_from_assignment_id_assignments_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "assignments", + "columnsFrom": [ + "from_assignment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_assignment_id_assignments_id_fk": { + "name": "assignment_transfers_to_assignment_id_assignments_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "assignments", + "columnsFrom": [ + "to_assignment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_decision_by_id_users_id_fk": { + "name": "assignment_transfers_from_decision_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "from_decision_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_decision_by_id_users_id_fk": { + "name": "assignment_transfers_to_decision_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "to_decision_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_from_leader_snapshot_id_users_id_fk": { + "name": "assignment_transfers_from_leader_snapshot_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "from_leader_snapshot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_to_leader_snapshot_id_users_id_fk": { + "name": "assignment_transfers_to_leader_snapshot_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "to_leader_snapshot_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_resolved_by_id_users_id_fk": { + "name": "assignment_transfers_resolved_by_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "resolved_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_source_notified_to_user_id_id_users_id_fk": { + "name": "assignment_transfers_source_notified_to_user_id_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "source_notified_to_user_id_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "assignment_transfers_destination_notified_to_user_id_id_users_id_fk": { + "name": "assignment_transfers_destination_notified_to_user_id_id_users_id_fk", + "tableFrom": "assignment_transfers", + "tableTo": "users", + "columnsFrom": [ + "destination_notified_to_user_id_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.experience": { + "name": "experience", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "required_points": { + "name": "required_points", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "experience_name_idx": { + "name": "experience_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "experience_updated_at_idx": { + "name": "experience_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "experience_created_at_idx": { + "name": "experience_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_notifications": { + "name": "user_notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link": { + "name": "link", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "read": { + "name": "read", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "user_notifications_user_idx": { + "name": "user_notifications_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_read_idx": { + "name": "user_notifications_read_idx", + "columns": [ + { + "expression": "read", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_updated_at_idx": { + "name": "user_notifications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_notifications_created_at_idx": { + "name": "user_notifications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_notifications_user_id_users_id_fk": { + "name": "user_notifications_user_id_users_id_fk", + "tableFrom": "user_notifications", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.evaluations": { + "name": "evaluations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "rater_id": { + "name": "rater_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ratee_id": { + "name": "ratee_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "enum_evaluations_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "level": { + "name": "level", + "type": "enum_evaluations_level", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "comment": { + "name": "comment", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "evaluations_rater_idx": { + "name": "evaluations_rater_idx", + "columns": [ + { + "expression": "rater_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_ratee_idx": { + "name": "evaluations_ratee_idx", + "columns": [ + { + "expression": "ratee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_mission_idx": { + "name": "evaluations_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_updated_at_idx": { + "name": "evaluations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "evaluations_created_at_idx": { + "name": "evaluations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "evaluations_rater_id_users_id_fk": { + "name": "evaluations_rater_id_users_id_fk", + "tableFrom": "evaluations", + "tableTo": "users", + "columnsFrom": [ + "rater_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "evaluations_ratee_id_users_id_fk": { + "name": "evaluations_ratee_id_users_id_fk", + "tableFrom": "evaluations", + "tableTo": "users", + "columnsFrom": [ + "ratee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "evaluations_mission_id_missions_id_fk": { + "name": "evaluations_mission_id_missions_id_fk", + "tableFrom": "evaluations", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ribbon_submissions_grantor_types": { + "name": "ribbon_submissions_grantor_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_ribbon_submissions_grantor_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "ribbon_submissions_grantor_types_order_idx": { + "name": "ribbon_submissions_grantor_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_grantor_types_parent_idx": { + "name": "ribbon_submissions_grantor_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ribbon_submissions_grantor_types_parent_fk": { + "name": "ribbon_submissions_grantor_types_parent_fk", + "tableFrom": "ribbon_submissions_grantor_types", + "tableTo": "ribbon_submissions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ribbon_submissions": { + "name": "ribbon_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "design": { + "name": "design", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_ribbon_submissions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "review_note": { + "name": "review_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reviewed_by_id": { + "name": "reviewed_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reviewed_at": { + "name": "reviewed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "award_id": { + "name": "award_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "award_xp": { + "name": "award_xp", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "recipient_scope": { + "name": "recipient_scope", + "type": "enum_ribbon_submissions_recipient_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'same_command'" + }, + "max_grants_per_grantor": { + "name": "max_grants_per_grantor", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ribbon_submissions_user_idx": { + "name": "ribbon_submissions_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_reviewed_by_idx": { + "name": "ribbon_submissions_reviewed_by_idx", + "columns": [ + { + "expression": "reviewed_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_award_idx": { + "name": "ribbon_submissions_award_idx", + "columns": [ + { + "expression": "award_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_updated_at_idx": { + "name": "ribbon_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ribbon_submissions_created_at_idx": { + "name": "ribbon_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ribbon_submissions_user_id_users_id_fk": { + "name": "ribbon_submissions_user_id_users_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ribbon_submissions_reviewed_by_id_users_id_fk": { + "name": "ribbon_submissions_reviewed_by_id_users_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "users", + "columnsFrom": [ + "reviewed_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ribbon_submissions_award_id_awards_id_fk": { + "name": "ribbon_submissions_award_id_awards_id_fk", + "tableFrom": "ribbon_submissions", + "tableTo": "awards", + "columnsFrom": [ + "award_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_roles_provided_roles": { + "name": "missions_mission_roles_provided_roles", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "role_name": { + "name": "role_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "minimum_rank_id": { + "name": "minimum_rank_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_mission_roles_provided_roles_order_idx": { + "name": "missions_mission_roles_provided_roles_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_parent_id_idx": { + "name": "missions_mission_roles_provided_roles_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_roles_provided_roles_minimum_rank_idx": { + "name": "missions_mission_roles_provided_roles_minimum_rank_idx", + "columns": [ + { + "expression": "minimum_rank_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk": { + "name": "missions_mission_roles_provided_roles_minimum_rank_id_ranks_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "ranks", + "columnsFrom": [ + "minimum_rank_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_mission_roles_provided_roles_parent_id_fk": { + "name": "missions_mission_roles_provided_roles_parent_id_fk", + "tableFrom": "missions_mission_roles_provided_roles", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_briefing": { + "name": "missions_briefing", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "section_name": { + "name": "section_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "details": { + "name": "details", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_briefing_order_idx": { + "name": "missions_briefing_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_briefing_parent_id_idx": { + "name": "missions_briefing_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_briefing_parent_id_fk": { + "name": "missions_briefing_parent_id_fk", + "tableFrom": "missions_briefing", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_mission_objectives": { + "name": "missions_mission_objectives", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mission_critical": { + "name": "mission_critical", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "success_or_fail_conditions": { + "name": "success_or_fail_conditions", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "redacted": { + "name": "redacted", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "missions_mission_objectives_order_idx": { + "name": "missions_mission_objectives_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_mission_objectives_parent_id_idx": { + "name": "missions_mission_objectives_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_mission_objectives_parent_id_fk": { + "name": "missions_mission_objectives_parent_id_fk", + "tableFrom": "missions_mission_objectives", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_factions_involved": { + "name": "missions_factions_involved", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "faction_id": { + "name": "faction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "threat_level": { + "name": "threat_level", + "type": "enum_missions_factions_involved_threat_level", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'hostile'" + } + }, + "indexes": { + "missions_factions_involved_order_idx": { + "name": "missions_factions_involved_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_factions_involved_parent_id_idx": { + "name": "missions_factions_involved_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_factions_involved_faction_idx": { + "name": "missions_factions_involved_faction_idx", + "columns": [ + { + "expression": "faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_factions_involved_faction_id_factions_id_fk": { + "name": "missions_factions_involved_faction_id_factions_id_fk", + "tableFrom": "missions_factions_involved", + "tableTo": "factions", + "columnsFrom": [ + "faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_factions_involved_parent_id_fk": { + "name": "missions_factions_involved_parent_id_fk", + "tableFrom": "missions_factions_involved", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_insertion": { + "name": "missions_logistics_and_support_insertion", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_insertion", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_insertion_order_idx": { + "name": "missions_logistics_and_support_insertion_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_insertion_parent_idx": { + "name": "missions_logistics_and_support_insertion_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_insertion_parent_fk": { + "name": "missions_logistics_and_support_insertion_parent_fk", + "tableFrom": "missions_logistics_and_support_insertion", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_extraction": { + "name": "missions_logistics_and_support_extraction", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_missions_logistics_and_support_extraction", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "missions_logistics_and_support_extraction_order_idx": { + "name": "missions_logistics_and_support_extraction_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_extraction_parent_idx": { + "name": "missions_logistics_and_support_extraction_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_extraction_parent_fk": { + "name": "missions_logistics_and_support_extraction_parent_fk", + "tableFrom": "missions_logistics_and_support_extraction", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_logistics_and_support_assets_available": { + "name": "missions_logistics_and_support_assets_available", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_type": { + "name": "asset_type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "asset_count": { + "name": "asset_count", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "does_respawn": { + "name": "does_respawn", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_callsign": { + "name": "asset_callsign", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_logistics_and_support_assets_available_order_idx": { + "name": "missions_logistics_and_support_assets_available_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_logistics_and_support_assets_available_parent_id_idx": { + "name": "missions_logistics_and_support_assets_available_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_logistics_and_support_assets_available_parent_id_fk": { + "name": "missions_logistics_and_support_assets_available_parent_id_fk", + "tableFrom": "missions_logistics_and_support_assets_available", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_comms_and_docs_frequencies": { + "name": "missions_comms_and_docs_frequencies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "frequency": { + "name": "frequency", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "channel": { + "name": "channel", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "net_name": { + "name": "net_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "freq_usage": { + "name": "freq_usage", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "missions_comms_and_docs_frequencies_order_idx": { + "name": "missions_comms_and_docs_frequencies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_comms_and_docs_frequencies_parent_id_idx": { + "name": "missions_comms_and_docs_frequencies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_comms_and_docs_frequencies_parent_id_fk": { + "name": "missions_comms_and_docs_frequencies_parent_id_fk", + "tableFrom": "missions_comms_and_docs_frequencies", + "tableTo": "missions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions": { + "name": "missions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "operation_type": { + "name": "operation_type", + "type": "enum_missions_operation_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "discord_message_id": { + "name": "discord_message_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_attendance_hash": { + "name": "discord_attendance_hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_attendance_sent_at": { + "name": "discord_attendance_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "discord_modlist_hash": { + "name": "discord_modlist_hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "discord_cancelled_at": { + "name": "discord_cancelled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "evaluation_reminders_sent_at": { + "name": "evaluation_reminders_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "ready_reminder_web_sent_at": { + "name": "ready_reminder_web_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "ready_reminder_dm_sent_at": { + "name": "ready_reminder_dm_sent_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "tickets_settled_at": { + "name": "tickets_settled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_by_id": { + "name": "created_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "classification_map_id": { + "name": "classification_map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "classification_mission_type": { + "name": "classification_mission_type", + "type": "enum_missions_classification_mission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Zeus'" + }, + "classification_campaign_id": { + "name": "classification_campaign_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "classification_custom_scripts": { + "name": "classification_custom_scripts", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "classification_start_date_time": { + "name": "classification_start_date_time", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "classification_estimated_duration": { + "name": "classification_estimated_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 240 + }, + "ownership_and_status_status": { + "name": "ownership_and_status_status", + "type": "enum_missions_ownership_and_status_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'Concept'" + }, + "ownership_and_status_visibility": { + "name": "ownership_and_status_visibility", + "type": "enum_missions_ownership_and_status_visibility", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'leadership'" + }, + "ownership_and_status_completed_at": { + "name": "ownership_and_status_completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "mission_roles_max_players": { + "name": "mission_roles_max_players", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 32 + }, + "mission_roles_notes": { + "name": "mission_roles_notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "civilian_presence": { + "name": "civilian_presence", + "type": "enum_missions_civilian_presence", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'None'" + }, + "game_details_server_details_server_ip": { + "name": "game_details_server_details_server_ip", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'arma.onyxsimple.com'" + }, + "game_details_server_details_server_port": { + "name": "game_details_server_details_server_port", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 2302 + }, + "game_details_server_details_server_password": { + "name": "game_details_server_details_server_password", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'ptf313'" + }, + "game_details_game_setup_mission_file_id": { + "name": "game_details_game_setup_mission_file_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_details_game_setup_required_mods_id": { + "name": "game_details_game_setup_required_mods_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "comms_and_docs_radio_plan": { + "name": "comms_and_docs_radio_plan", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "missions_code_name_idx": { + "name": "missions_code_name_idx", + "columns": [ + { + "expression": "code_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_created_by_idx": { + "name": "missions_created_by_idx", + "columns": [ + { + "expression": "created_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_cover_image_idx": { + "name": "missions_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_map_idx": { + "name": "missions_classification_classification_map_idx", + "columns": [ + { + "expression": "classification_map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_classification_classification_campaign_idx": { + "name": "missions_classification_classification_campaign_idx", + "columns": [ + { + "expression": "classification_campaign_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_setup_idx": { + "name": "missions_game_details_game_setup_game_details_game_setup_idx", + "columns": [ + { + "expression": "game_details_game_setup_mission_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_game_details_game_setup_game_details_game_set_1_idx": { + "name": "missions_game_details_game_setup_game_details_game_set_1_idx", + "columns": [ + { + "expression": "game_details_game_setup_required_mods_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_updated_at_idx": { + "name": "missions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_created_at_idx": { + "name": "missions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_created_by_id_users_id_fk": { + "name": "missions_created_by_id_users_id_fk", + "tableFrom": "missions", + "tableTo": "users", + "columnsFrom": [ + "created_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_cover_image_id_media_id_fk": { + "name": "missions_cover_image_id_media_id_fk", + "tableFrom": "missions", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_classification_map_id_maps_id_fk": { + "name": "missions_classification_map_id_maps_id_fk", + "tableFrom": "missions", + "tableTo": "maps", + "columnsFrom": [ + "classification_map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_classification_campaign_id_campaigns_id_fk": { + "name": "missions_classification_campaign_id_campaigns_id_fk", + "tableFrom": "missions", + "tableTo": "campaigns", + "columnsFrom": [ + "classification_campaign_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_mission_file_id_mission_files_id_fk": { + "name": "missions_game_details_game_setup_mission_file_id_mission_files_id_fk", + "tableFrom": "missions", + "tableTo": "mission_files", + "columnsFrom": [ + "game_details_game_setup_mission_file_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk": { + "name": "missions_game_details_game_setup_required_mods_id_mod_lists_id_fk", + "tableFrom": "missions", + "tableTo": "mod_lists", + "columnsFrom": [ + "game_details_game_setup_required_mods_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.missions_rels": { + "name": "missions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "missions_rels_order_idx": { + "name": "missions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_parent_idx": { + "name": "missions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_path_idx": { + "name": "missions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_users_id_idx": { + "name": "missions_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "missions_rels_qualifications_id_idx": { + "name": "missions_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "missions_rels_parent_fk": { + "name": "missions_rels_parent_fk", + "tableFrom": "missions_rels", + "tableTo": "missions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_users_fk": { + "name": "missions_rels_users_fk", + "tableFrom": "missions_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "missions_rels_qualifications_fk": { + "name": "missions_rels_qualifications_fk", + "tableFrom": "missions_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mission_attendances": { + "name": "mission_attendances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "response": { + "name": "response", + "type": "enum_mission_attendances_response", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mission_attendances_mission_idx": { + "name": "mission_attendances_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_user_idx": { + "name": "mission_attendances_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_updated_at_idx": { + "name": "mission_attendances_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_attendances_created_at_idx": { + "name": "mission_attendances_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mission_attendances_mission_id_missions_id_fk": { + "name": "mission_attendances_mission_id_missions_id_fk", + "tableFrom": "mission_attendances", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "mission_attendances_user_id_users_id_fk": { + "name": "mission_attendances_user_id_users_id_fk", + "tableFrom": "mission_attendances", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.campaigns": { + "name": "campaigns", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'An Arma 3 campaign.'" + }, + "status": { + "name": "status", + "type": "enum_campaigns_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'concept'" + }, + "campaign_mode": { + "name": "campaign_mode", + "type": "enum_campaigns_campaign_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'custom'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "owner_id": { + "name": "owner_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "campaigns_name_idx": { + "name": "campaigns_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_cover_image_idx": { + "name": "campaigns_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_owner_idx": { + "name": "campaigns_owner_idx", + "columns": [ + { + "expression": "owner_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_updated_at_idx": { + "name": "campaigns_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "campaigns_created_at_idx": { + "name": "campaigns_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "campaigns_cover_image_id_media_id_fk": { + "name": "campaigns_cover_image_id_media_id_fk", + "tableFrom": "campaigns", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "campaigns_owner_id_users_id_fk": { + "name": "campaigns_owner_id_users_id_fk", + "tableFrom": "campaigns", + "tableTo": "users", + "columnsFrom": [ + "owner_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions_relationships": { + "name": "factions_relationships", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "target_faction_id": { + "name": "target_faction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "factions_relationships_order_idx": { + "name": "factions_relationships_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_relationships_parent_id_idx": { + "name": "factions_relationships_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_relationships_target_faction_idx": { + "name": "factions_relationships_target_faction_idx", + "columns": [ + { + "expression": "target_faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_relationships_target_faction_id_factions_id_fk": { + "name": "factions_relationships_target_faction_id_factions_id_fk", + "tableFrom": "factions_relationships", + "tableTo": "factions", + "columnsFrom": [ + "target_faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "factions_relationships_parent_id_fk": { + "name": "factions_relationships_parent_id_fk", + "tableFrom": "factions_relationships", + "tableTo": "factions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions": { + "name": "factions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_factions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'minorFaction'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "reputation": { + "name": "reputation", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "playable_faction": { + "name": "playable_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "starting_faction": { + "name": "starting_faction", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "cover_image_id": { + "name": "cover_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "factions_name_idx": { + "name": "factions_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_cover_image_idx": { + "name": "factions_cover_image_idx", + "columns": [ + { + "expression": "cover_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_updated_at_idx": { + "name": "factions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_created_at_idx": { + "name": "factions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_cover_image_id_media_id_fk": { + "name": "factions_cover_image_id_media_id_fk", + "tableFrom": "factions", + "tableTo": "media", + "columnsFrom": [ + "cover_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.factions_rels": { + "name": "factions_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "factions_rels_order_idx": { + "name": "factions_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_parent_idx": { + "name": "factions_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_path_idx": { + "name": "factions_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "factions_rels_campaigns_id_idx": { + "name": "factions_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "factions_rels_parent_fk": { + "name": "factions_rels_parent_fk", + "tableFrom": "factions_rels", + "tableTo": "factions", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "factions_rels_campaigns_fk": { + "name": "factions_rels_campaigns_fk", + "tableFrom": "factions_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_requirements_prerequisite_technologies": { + "name": "technologies_requirements_prerequisite_technologies", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "technologies_requirements_prerequisite_technologies_order_idx": { + "name": "technologies_requirements_prerequisite_technologies_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_requirements_prerequisite_technologies_parent_id_idx": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_requirements_prerequisite_technologies_parent_id_fk": { + "name": "technologies_requirements_prerequisite_technologies_parent_id_fk", + "tableFrom": "technologies_requirements_prerequisite_technologies", + "tableTo": "technologies", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_research_costs_resources": { + "name": "technologies_research_costs_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + } + }, + "indexes": { + "technologies_research_costs_resources_order_idx": { + "name": "technologies_research_costs_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_research_costs_resources_parent_id_idx": { + "name": "technologies_research_costs_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_research_costs_resources_resource_idx": { + "name": "technologies_research_costs_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_research_costs_resources_resource_id_resources_id_fk": { + "name": "technologies_research_costs_resources_resource_id_resources_id_fk", + "tableFrom": "technologies_research_costs_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "technologies_research_costs_resources_parent_id_fk": { + "name": "technologies_research_costs_resources_parent_id_fk", + "tableFrom": "technologies_research_costs_resources", + "tableTo": "technologies", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies": { + "name": "technologies", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_technologies_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "type": { + "name": "type", + "type": "enum_technologies_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'upgrade'" + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "research_costs_minimum_research_duration": { + "name": "research_costs_minimum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "research_costs_maximum_research_duration": { + "name": "research_costs_maximum_research_duration", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "technologies_updated_at_idx": { + "name": "technologies_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_created_at_idx": { + "name": "technologies_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.technologies_rels": { + "name": "technologies_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "technologies_rels_order_idx": { + "name": "technologies_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_parent_idx": { + "name": "technologies_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_path_idx": { + "name": "technologies_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "technologies_rels_technologies_id_idx": { + "name": "technologies_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "technologies_rels_parent_fk": { + "name": "technologies_rels_parent_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "technologies_rels_technologies_fk": { + "name": "technologies_rels_technologies_fk", + "tableFrom": "technologies_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_skin_configuration_applies_to_asset_types": { + "name": "assets_skin_configuration_applies_to_asset_types", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_assets_skin_configuration_applies_to_asset_types", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "assets_skin_configuration_applies_to_asset_types_order_idx": { + "name": "assets_skin_configuration_applies_to_asset_types_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_skin_configuration_applies_to_asset_types_parent_idx": { + "name": "assets_skin_configuration_applies_to_asset_types_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_skin_configuration_applies_to_asset_types_parent_fk": { + "name": "assets_skin_configuration_applies_to_asset_types_parent_fk", + "tableFrom": "assets_skin_configuration_applies_to_asset_types", + "tableTo": "assets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_inputs": { + "name": "assets_crafting_crafting_data_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "lended": { + "name": "lended", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_inputs_order_idx": { + "name": "assets_crafting_crafting_data_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_inputs_parent_id_idx": { + "name": "assets_crafting_crafting_data_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_inputs_parent_id_fk": { + "name": "assets_crafting_crafting_data_inputs_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_inputs", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_crafting_crafting_data_byproducts": { + "name": "assets_crafting_crafting_data_byproducts", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_crafting_crafting_data_byproducts_order_idx": { + "name": "assets_crafting_crafting_data_byproducts_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_crafting_crafting_data_byproducts_parent_id_idx": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_crafting_crafting_data_byproducts_parent_id_fk": { + "name": "assets_crafting_crafting_data_byproducts_parent_id_fk", + "tableFrom": "assets_crafting_crafting_data_byproducts", + "tableTo": "assets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets": { + "name": "assets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_assets_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "class_name": { + "name": "class_name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "asset_type": { + "name": "asset_type", + "type": "enum_assets_asset_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'weapon'" + }, + "weapon_configuration_slot_type": { + "name": "weapon_configuration_slot_type", + "type": "enum_assets_weapon_configuration_slot_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_generation": { + "name": "nightvision_configuration_nvg_generation", + "type": "enum_assets_nightvision_configuration_nvg_generation", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "nightvision_configuration_nvg_has_thermals": { + "name": "nightvision_configuration_nvg_has_thermals", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "container_configuration_capacity_kg": { + "name": "container_configuration_capacity_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "container_configuration_weight_kg": { + "name": "container_configuration_weight_kg", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_round_capacity": { + "name": "magazine_configuration_round_capacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_ammo_type": { + "name": "magazine_configuration_ammo_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "magazine_configuration_greenmag_compatible": { + "name": "magazine_configuration_greenmag_compatible", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_mod": { + "name": "asset_metadata_mod", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_thumbnail_id": { + "name": "asset_metadata_thumbnail_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "asset_metadata_game_description": { + "name": "asset_metadata_game_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "market_trading_rarity": { + "name": "market_trading_rarity", + "type": "enum_assets_market_trading_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_buy_price": { + "name": "market_trading_perceived_value_base_buy_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "market_trading_perceived_value_base_sell_price": { + "name": "market_trading_perceived_value_base_sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "economy_baseline_supply": { + "name": "economy_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "economy_baseline_demand": { + "name": "economy_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "economy_max_modifier": { + "name": "economy_max_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "crafting_craftable": { + "name": "crafting_craftable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_blueprint_required": { + "name": "crafting_blueprint_required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_technology_required_to_use": { + "name": "crafting_technology_required_to_use", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "crafting_crafting_data_crafting_time_per_unit": { + "name": "crafting_crafting_data_crafting_time_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "crafting_crafting_data_batch_size": { + "name": "crafting_crafting_data_batch_size", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_grid_width": { + "name": "storage_dimensions_grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_grid_height": { + "name": "storage_dimensions_grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "storage_dimensions_stackable": { + "name": "storage_dimensions_stackable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "storage_dimensions_max_stack_size": { + "name": "storage_dimensions_max_stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "storage_dimensions_rotatable": { + "name": "storage_dimensions_rotatable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "is_live": { + "name": "is_live", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assets_asset_metadata_asset_metadata_thumbnail_idx": { + "name": "assets_asset_metadata_asset_metadata_thumbnail_idx", + "columns": [ + { + "expression": "asset_metadata_thumbnail_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_updated_at_idx": { + "name": "assets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_created_at_idx": { + "name": "assets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_asset_metadata_thumbnail_id_media_id_fk": { + "name": "assets_asset_metadata_thumbnail_id_media_id_fk", + "tableFrom": "assets", + "tableTo": "media", + "columnsFrom": [ + "asset_metadata_thumbnail_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.assets_rels": { + "name": "assets_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "assets_rels_order_idx": { + "name": "assets_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_parent_idx": { + "name": "assets_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_path_idx": { + "name": "assets_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_assets_id_idx": { + "name": "assets_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_technologies_id_idx": { + "name": "assets_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_resources_id_idx": { + "name": "assets_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assets_rels_structures_id_idx": { + "name": "assets_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assets_rels_parent_fk": { + "name": "assets_rels_parent_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_assets_fk": { + "name": "assets_rels_assets_fk", + "tableFrom": "assets_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_technologies_fk": { + "name": "assets_rels_technologies_fk", + "tableFrom": "assets_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_resources_fk": { + "name": "assets_rels_resources_fk", + "tableFrom": "assets_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assets_rels_structures_fk": { + "name": "assets_rels_structures_fk", + "tableFrom": "assets_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resources": { + "name": "resources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_resources_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "type": { + "name": "type", + "type": "enum_resources_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'physical'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "icon_id": { + "name": "icon_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "base_value": { + "name": "base_value", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "tradeable": { + "name": "tradeable", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "rarity": { + "name": "rarity", + "type": "enum_resources_rarity", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'common'" + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "economy_baseline_supply": { + "name": "economy_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "economy_baseline_demand": { + "name": "economy_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "economy_max_modifier": { + "name": "economy_max_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "unit_of_measure": { + "name": "unit_of_measure", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "mass_per_unit": { + "name": "mass_per_unit", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "stack_size": { + "name": "stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "grid_width": { + "name": "grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "grid_height": { + "name": "grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "stackable": { + "name": "stackable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "max_stack_size": { + "name": "max_stack_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "rotatable": { + "name": "rotatable", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resources_icon_idx": { + "name": "resources_icon_idx", + "columns": [ + { + "expression": "icon_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_updated_at_idx": { + "name": "resources_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resources_created_at_idx": { + "name": "resources_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resources_icon_id_media_id_fk": { + "name": "resources_icon_id_media_id_fk", + "tableFrom": "resources", + "tableTo": "media", + "columnsFrom": [ + "icon_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_category": { + "name": "vehicles_category", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_vehicles_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "vehicles_category_order_idx": { + "name": "vehicles_category_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_category_parent_idx": { + "name": "vehicles_category_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_category_parent_fk": { + "name": "vehicles_category_parent_fk", + "tableFrom": "vehicles_category", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_materials": { + "name": "vehicles_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_materials_order_idx": { + "name": "vehicles_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_parent_id_idx": { + "name": "vehicles_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_materials_resource_idx": { + "name": "vehicles_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_materials_resource_id_resources_id_fk": { + "name": "vehicles_materials_resource_id_resources_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_materials_parent_id_fk": { + "name": "vehicles_materials_parent_id_fk", + "tableFrom": "vehicles_materials", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_scrap_returns": { + "name": "vehicles_scrap_returns", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "chance": { + "name": "chance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + } + }, + "indexes": { + "vehicles_scrap_returns_order_idx": { + "name": "vehicles_scrap_returns_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_parent_id_idx": { + "name": "vehicles_scrap_returns_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_scrap_returns_resource_idx": { + "name": "vehicles_scrap_returns_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_scrap_returns_resource_id_resources_id_fk": { + "name": "vehicles_scrap_returns_resource_id_resources_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_scrap_returns_parent_id_fk": { + "name": "vehicles_scrap_returns_parent_id_fk", + "tableFrom": "vehicles_scrap_returns", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_upkeep_costs": { + "name": "vehicles_upkeep_costs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_upkeep_costs_order_idx": { + "name": "vehicles_upkeep_costs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_parent_id_idx": { + "name": "vehicles_upkeep_costs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_upkeep_costs_resource_idx": { + "name": "vehicles_upkeep_costs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_upkeep_costs_resource_id_resources_id_fk": { + "name": "vehicles_upkeep_costs_resource_id_resources_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_upkeep_costs_parent_id_fk": { + "name": "vehicles_upkeep_costs_parent_id_fk", + "tableFrom": "vehicles_upkeep_costs", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_allowed_virtual_cargo": { + "name": "vehicles_allowed_virtual_cargo", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + } + }, + "indexes": { + "vehicles_allowed_virtual_cargo_order_idx": { + "name": "vehicles_allowed_virtual_cargo_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_allowed_virtual_cargo_parent_id_idx": { + "name": "vehicles_allowed_virtual_cargo_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_allowed_virtual_cargo_parent_id_fk": { + "name": "vehicles_allowed_virtual_cargo_parent_id_fk", + "tableFrom": "vehicles_allowed_virtual_cargo", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_pylons": { + "name": "vehicles_pylons", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "pylon_name": { + "name": "pylon_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pylon_type": { + "name": "pylon_type", + "type": "enum_vehicles_pylons_pylon_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'mountedWeapon'" + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "ammo_type_id": { + "name": "ammo_type_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_pylons_order_idx": { + "name": "vehicles_pylons_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_parent_id_idx": { + "name": "vehicles_pylons_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_pylons_ammo_type_idx": { + "name": "vehicles_pylons_ammo_type_idx", + "columns": [ + { + "expression": "ammo_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_pylons_ammo_type_id_assets_id_fk": { + "name": "vehicles_pylons_ammo_type_id_assets_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "assets", + "columnsFrom": [ + "ammo_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_pylons_parent_id_fk": { + "name": "vehicles_pylons_parent_id_fk", + "tableFrom": "vehicles_pylons", + "tableTo": "vehicles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles": { + "name": "vehicles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "classname": { + "name": "classname", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "approval_status": { + "name": "approval_status", + "type": "enum_vehicles_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "fuel_fuel_type_id": { + "name": "fuel_fuel_type_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "fuel_fuel_capacity": { + "name": "fuel_fuel_capacity", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_fuel_consumption_rate": { + "name": "fuel_fuel_consumption_rate", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "construction_time": { + "name": "construction_time", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "transport_mode": { + "name": "transport_mode", + "type": "enum_vehicles_transport_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'ground'" + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_mass": { + "name": "max_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "ace_cargo_slots": { + "name": "ace_cargo_slots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "armor_rating": { + "name": "armor_rating", + "type": "enum_vehicles_armor_rating", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_speed_on_road": { + "name": "max_speed_on_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_speed_off_road": { + "name": "max_speed_off_road", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_airspeed": { + "name": "max_airspeed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_knots": { + "name": "max_knots", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "vehicles_image_idx": { + "name": "vehicles_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_fuel_fuel_fuel_type_idx": { + "name": "vehicles_fuel_fuel_fuel_type_idx", + "columns": [ + { + "expression": "fuel_fuel_type_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_updated_at_idx": { + "name": "vehicles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_created_at_idx": { + "name": "vehicles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_image_id_media_id_fk": { + "name": "vehicles_image_id_media_id_fk", + "tableFrom": "vehicles", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "vehicles_fuel_fuel_type_id_resources_id_fk": { + "name": "vehicles_fuel_fuel_type_id_resources_id_fk", + "tableFrom": "vehicles", + "tableTo": "resources", + "columnsFrom": [ + "fuel_fuel_type_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vehicles_rels": { + "name": "vehicles_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "vehicles_rels_order_idx": { + "name": "vehicles_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_parent_idx": { + "name": "vehicles_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_path_idx": { + "name": "vehicles_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_technologies_id_idx": { + "name": "vehicles_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_assets_id_idx": { + "name": "vehicles_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_vehicles_id_idx": { + "name": "vehicles_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "vehicles_rels_resources_id_idx": { + "name": "vehicles_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vehicles_rels_parent_fk": { + "name": "vehicles_rels_parent_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_technologies_fk": { + "name": "vehicles_rels_technologies_fk", + "tableFrom": "vehicles_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_assets_fk": { + "name": "vehicles_rels_assets_fk", + "tableFrom": "vehicles_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_vehicles_fk": { + "name": "vehicles_rels_vehicles_fk", + "tableFrom": "vehicles_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vehicles_rels_resources_fk": { + "name": "vehicles_rels_resources_fk", + "tableFrom": "vehicles_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_materials": { + "name": "structures_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_materials_order_idx": { + "name": "structures_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_parent_id_idx": { + "name": "structures_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_materials_resource_idx": { + "name": "structures_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_materials_resource_id_resources_id_fk": { + "name": "structures_materials_resource_id_resources_id_fk", + "tableFrom": "structures_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_materials_parent_id_fk": { + "name": "structures_materials_parent_id_fk", + "tableFrom": "structures_materials", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_resources_in_range": { + "name": "structures_resources_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_resources_in_range_order_idx": { + "name": "structures_resources_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_parent_id_idx": { + "name": "structures_resources_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_resources_in_range_resource_idx": { + "name": "structures_resources_in_range_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_resources_in_range_resource_id_resources_id_fk": { + "name": "structures_resources_in_range_resource_id_resources_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_resources_in_range_parent_id_fk": { + "name": "structures_resources_in_range_parent_id_fk", + "tableFrom": "structures_resources_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_structures_in_range": { + "name": "structures_structures_in_range", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "structure_id": { + "name": "structure_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "range": { + "name": "range", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_structures_in_range_order_idx": { + "name": "structures_structures_in_range_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_parent_id_idx": { + "name": "structures_structures_in_range_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_structures_in_range_structure_idx": { + "name": "structures_structures_in_range_structure_idx", + "columns": [ + { + "expression": "structure_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_structures_in_range_structure_id_structures_id_fk": { + "name": "structures_structures_in_range_structure_id_structures_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "structure_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_structures_in_range_parent_id_fk": { + "name": "structures_structures_in_range_parent_id_fk", + "tableFrom": "structures_structures_in_range", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_upkeep": { + "name": "structures_upkeep", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_upkeep_order_idx": { + "name": "structures_upkeep_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_parent_id_idx": { + "name": "structures_upkeep_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upkeep_resource_idx": { + "name": "structures_upkeep_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_upkeep_resource_id_resources_id_fk": { + "name": "structures_upkeep_resource_id_resources_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upkeep_parent_id_fk": { + "name": "structures_upkeep_parent_id_fk", + "tableFrom": "structures_upkeep", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_labor_requirements": { + "name": "structures_labor_requirements", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "classification_id": { + "name": "classification_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "required_headcount": { + "name": "required_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_headcount": { + "name": "max_headcount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_labor_requirements_order_idx": { + "name": "structures_labor_requirements_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_labor_requirements_parent_id_idx": { + "name": "structures_labor_requirements_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_labor_requirements_classification_idx": { + "name": "structures_labor_requirements_classification_idx", + "columns": [ + { + "expression": "classification_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_labor_requirements_classification_id_labor_classifications_id_fk": { + "name": "structures_labor_requirements_classification_id_labor_classifications_id_fk", + "tableFrom": "structures_labor_requirements", + "tableTo": "labor_classifications", + "columnsFrom": [ + "classification_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_labor_requirements_parent_id_fk": { + "name": "structures_labor_requirements_parent_id_fk", + "tableFrom": "structures_labor_requirements", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_staff_positions": { + "name": "structures_staff_positions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "position_type": { + "name": "position_type", + "type": "enum_structures_staff_positions_position_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "max": { + "name": "max", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "enforced_salary": { + "name": "enforced_salary", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_staff_positions_order_idx": { + "name": "structures_staff_positions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_staff_positions_parent_id_idx": { + "name": "structures_staff_positions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_staff_positions_parent_id_fk": { + "name": "structures_staff_positions_parent_id_fk", + "tableFrom": "structures_staff_positions", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_production_inputs": { + "name": "structures_production_inputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "structures_production_inputs_order_idx": { + "name": "structures_production_inputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_inputs_parent_id_idx": { + "name": "structures_production_inputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_inputs_resource_idx": { + "name": "structures_production_inputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_production_inputs_resource_id_resources_id_fk": { + "name": "structures_production_inputs_resource_id_resources_id_fk", + "tableFrom": "structures_production_inputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_production_inputs_parent_id_fk": { + "name": "structures_production_inputs_parent_id_fk", + "tableFrom": "structures_production_inputs", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_production_outputs": { + "name": "structures_production_outputs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount_per_hour": { + "name": "amount_per_hour", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "structures_production_outputs_order_idx": { + "name": "structures_production_outputs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_outputs_parent_id_idx": { + "name": "structures_production_outputs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_production_outputs_resource_idx": { + "name": "structures_production_outputs_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_production_outputs_resource_id_resources_id_fk": { + "name": "structures_production_outputs_resource_id_resources_id_fk", + "tableFrom": "structures_production_outputs", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_production_outputs_parent_id_fk": { + "name": "structures_production_outputs_parent_id_fk", + "tableFrom": "structures_production_outputs", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_module_options_effects": { + "name": "structures_module_options_effects", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_structures_module_options_effects_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "numeric", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "structures_module_options_effects_order_idx": { + "name": "structures_module_options_effects_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_module_options_effects_parent_id_idx": { + "name": "structures_module_options_effects_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_module_options_effects_parent_id_fk": { + "name": "structures_module_options_effects_parent_id_fk", + "tableFrom": "structures_module_options_effects", + "tableTo": "structures_module_options", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_module_options_materials": { + "name": "structures_module_options_materials", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "structures_module_options_materials_order_idx": { + "name": "structures_module_options_materials_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_module_options_materials_parent_id_idx": { + "name": "structures_module_options_materials_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_module_options_materials_resource_idx": { + "name": "structures_module_options_materials_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_module_options_materials_resource_id_resources_id_fk": { + "name": "structures_module_options_materials_resource_id_resources_id_fk", + "tableFrom": "structures_module_options_materials", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_module_options_materials_parent_id_fk": { + "name": "structures_module_options_materials_parent_id_fk", + "tableFrom": "structures_module_options_materials", + "tableTo": "structures_module_options", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_module_options": { + "name": "structures_module_options", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_structures_module_options_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'utility'" + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_module_options_order_idx": { + "name": "structures_module_options_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_module_options_parent_id_idx": { + "name": "structures_module_options_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_module_options_parent_id_fk": { + "name": "structures_module_options_parent_id_fk", + "tableFrom": "structures_module_options", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_auto_generated_resources": { + "name": "structures_auto_generated_resources", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "min_amount": { + "name": "min_amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "max_amount": { + "name": "max_amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "min_frequency": { + "name": "min_frequency", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'1'" + }, + "max_frequency": { + "name": "max_frequency", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "produce_chance": { + "name": "produce_chance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + } + }, + "indexes": { + "structures_auto_generated_resources_order_idx": { + "name": "structures_auto_generated_resources_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_parent_id_idx": { + "name": "structures_auto_generated_resources_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_auto_generated_resources_resource_idx": { + "name": "structures_auto_generated_resources_resource_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_auto_generated_resources_resource_id_resources_id_fk": { + "name": "structures_auto_generated_resources_resource_id_resources_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "resources", + "columnsFrom": [ + "resource_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_auto_generated_resources_parent_id_fk": { + "name": "structures_auto_generated_resources_parent_id_fk", + "tableFrom": "structures_auto_generated_resources", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_allowed_storage": { + "name": "structures_allowed_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_allowed_storage_order_idx": { + "name": "structures_allowed_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_allowed_storage_parent_id_idx": { + "name": "structures_allowed_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_allowed_storage_parent_id_fk": { + "name": "structures_allowed_storage_parent_id_fk", + "tableFrom": "structures_allowed_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_prohibited_storage": { + "name": "structures_prohibited_storage", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "structures_prohibited_storage_order_idx": { + "name": "structures_prohibited_storage_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_prohibited_storage_parent_id_idx": { + "name": "structures_prohibited_storage_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_prohibited_storage_parent_id_fk": { + "name": "structures_prohibited_storage_parent_id_fk", + "tableFrom": "structures_prohibited_storage", + "tableTo": "structures", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures": { + "name": "structures", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "code_name": { + "name": "code_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "approval_status": { + "name": "approval_status", + "type": "enum_structures_approval_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'in_progress'" + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "category": { + "name": "category", + "type": "enum_structures_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "construction_duration_minutes": { + "name": "construction_duration_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "construction_crew_required": { + "name": "construction_crew_required", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "requires_upgrade": { + "name": "requires_upgrade", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "upgrades_into_id": { + "name": "upgrades_into_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "upgrade_cost_multiplier": { + "name": "upgrade_cost_multiplier", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "terrain_type": { + "name": "terrain_type", + "type": "enum_structures_terrain_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "sell_price": { + "name": "sell_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "maintenance_cost": { + "name": "maintenance_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "module_slots": { + "name": "module_slots", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "aura_effect_type": { + "name": "aura_effect_type", + "type": "enum_structures_aura_effect_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "aura_value": { + "name": "aura_value", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "aura_range_meters": { + "name": "aura_range_meters", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "function_type": { + "name": "function_type", + "type": "enum_structures_function_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "max_capacity_mass": { + "name": "max_capacity_mass", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "restrict_to_allowed": { + "name": "restrict_to_allowed", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "x_size": { + "name": "x_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "y_size": { + "name": "y_size", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "max_health": { + "name": "max_health", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "repair_speed": { + "name": "repair_speed", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "structures_image_idx": { + "name": "structures_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_upgrades_into_idx": { + "name": "structures_upgrades_into_idx", + "columns": [ + { + "expression": "upgrades_into_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_updated_at_idx": { + "name": "structures_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_created_at_idx": { + "name": "structures_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_image_id_media_id_fk": { + "name": "structures_image_id_media_id_fk", + "tableFrom": "structures", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "structures_upgrades_into_id_structures_id_fk": { + "name": "structures_upgrades_into_id_structures_id_fk", + "tableFrom": "structures", + "tableTo": "structures", + "columnsFrom": [ + "upgrades_into_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.structures_rels": { + "name": "structures_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "structures_rels_order_idx": { + "name": "structures_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_parent_idx": { + "name": "structures_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_path_idx": { + "name": "structures_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_technologies_id_idx": { + "name": "structures_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_assets_id_idx": { + "name": "structures_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_vehicles_id_idx": { + "name": "structures_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "structures_rels_resources_id_idx": { + "name": "structures_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "structures_rels_parent_fk": { + "name": "structures_rels_parent_fk", + "tableFrom": "structures_rels", + "tableTo": "structures", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_technologies_fk": { + "name": "structures_rels_technologies_fk", + "tableFrom": "structures_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_assets_fk": { + "name": "structures_rels_assets_fk", + "tableFrom": "structures_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_vehicles_fk": { + "name": "structures_rels_vehicles_fk", + "tableFrom": "structures_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "structures_rels_resources_fk": { + "name": "structures_rels_resources_fk", + "tableFrom": "structures_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments_cargo": { + "name": "shipments_cargo", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "shipments_cargo_order_idx": { + "name": "shipments_cargo_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_cargo_parent_id_idx": { + "name": "shipments_cargo_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_cargo_parent_id_fk": { + "name": "shipments_cargo_parent_id_fk", + "tableFrom": "shipments_cargo", + "tableTo": "shipments", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments": { + "name": "shipments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "origin_id": { + "name": "origin_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "destination_id": { + "name": "destination_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "route_path": { + "name": "route_path", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "transport_vehicle_id": { + "name": "transport_vehicle_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "distance": { + "name": "distance", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_cost": { + "name": "fuel_cost", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fuel_consumed": { + "name": "fuel_consumed", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_shipments_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "dispatched_at": { + "name": "dispatched_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "estimated_arrival": { + "name": "estimated_arrival", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "auto_return": { + "name": "auto_return", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "created_by_id": { + "name": "created_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "shipments_origin_idx": { + "name": "shipments_origin_idx", + "columns": [ + { + "expression": "origin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_destination_idx": { + "name": "shipments_destination_idx", + "columns": [ + { + "expression": "destination_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_map_idx": { + "name": "shipments_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_transport_vehicle_idx": { + "name": "shipments_transport_vehicle_idx", + "columns": [ + { + "expression": "transport_vehicle_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_created_by_idx": { + "name": "shipments_created_by_idx", + "columns": [ + { + "expression": "created_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_updated_at_idx": { + "name": "shipments_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_created_at_idx": { + "name": "shipments_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_origin_id_game_structures_id_fk": { + "name": "shipments_origin_id_game_structures_id_fk", + "tableFrom": "shipments", + "tableTo": "game_structures", + "columnsFrom": [ + "origin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_destination_id_game_structures_id_fk": { + "name": "shipments_destination_id_game_structures_id_fk", + "tableFrom": "shipments", + "tableTo": "game_structures", + "columnsFrom": [ + "destination_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_map_id_maps_id_fk": { + "name": "shipments_map_id_maps_id_fk", + "tableFrom": "shipments", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_transport_vehicle_id_game_vehicles_id_fk": { + "name": "shipments_transport_vehicle_id_game_vehicles_id_fk", + "tableFrom": "shipments", + "tableTo": "game_vehicles", + "columnsFrom": [ + "transport_vehicle_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "shipments_created_by_id_users_id_fk": { + "name": "shipments_created_by_id_users_id_fk", + "tableFrom": "shipments", + "tableTo": "users", + "columnsFrom": [ + "created_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shipments_rels": { + "name": "shipments_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shipments_rels_order_idx": { + "name": "shipments_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_parent_idx": { + "name": "shipments_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_path_idx": { + "name": "shipments_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_resources_id_idx": { + "name": "shipments_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_assets_id_idx": { + "name": "shipments_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shipments_rels_vehicles_id_idx": { + "name": "shipments_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shipments_rels_parent_fk": { + "name": "shipments_rels_parent_fk", + "tableFrom": "shipments_rels", + "tableTo": "shipments", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_resources_fk": { + "name": "shipments_rels_resources_fk", + "tableFrom": "shipments_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_assets_fk": { + "name": "shipments_rels_assets_fk", + "tableFrom": "shipments_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shipments_rels_vehicles_fk": { + "name": "shipments_rels_vehicles_fk", + "tableFrom": "shipments_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.bank_accounts": { + "name": "bank_accounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "account_type": { + "name": "account_type", + "type": "enum_bank_accounts_account_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'personal'" + }, + "owner_faction_id": { + "name": "owner_faction_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "currency_id": { + "name": "currency_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "balance": { + "name": "balance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "status": { + "name": "status", + "type": "enum_bank_accounts_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "bank_accounts_owner_faction_idx": { + "name": "bank_accounts_owner_faction_idx", + "columns": [ + { + "expression": "owner_faction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_owner_user_idx": { + "name": "bank_accounts_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_currency_idx": { + "name": "bank_accounts_currency_idx", + "columns": [ + { + "expression": "currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_accounts_updated_at_idx": { + "name": "bank_accounts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "bank_accounts_owner_faction_id_factions_id_fk": { + "name": "bank_accounts_owner_faction_id_factions_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "factions", + "columnsFrom": [ + "owner_faction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_accounts_owner_user_id_users_id_fk": { + "name": "bank_accounts_owner_user_id_users_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_accounts_currency_id_resources_id_fk": { + "name": "bank_accounts_currency_id_resources_id_fk", + "tableFrom": "bank_accounts", + "tableTo": "resources", + "columnsFrom": [ + "currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.bank_transactions": { + "name": "bank_transactions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "transaction_number": { + "name": "transaction_number", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_bank_transactions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "from_account_id": { + "name": "from_account_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "to_account_id": { + "name": "to_account_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "fee": { + "name": "fee", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "memo": { + "name": "memo", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "actor_id": { + "name": "actor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_bank_transactions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'completed'" + }, + "reference_id": { + "name": "reference_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "bank_transactions_transaction_number_idx": { + "name": "bank_transactions_transaction_number_idx", + "columns": [ + { + "expression": "transaction_number", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_from_account_idx": { + "name": "bank_transactions_from_account_idx", + "columns": [ + { + "expression": "from_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_to_account_idx": { + "name": "bank_transactions_to_account_idx", + "columns": [ + { + "expression": "to_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_actor_idx": { + "name": "bank_transactions_actor_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_reference_idx": { + "name": "bank_transactions_reference_idx", + "columns": [ + { + "expression": "reference_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_updated_at_idx": { + "name": "bank_transactions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "bank_transactions_created_at_idx": { + "name": "bank_transactions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "bank_transactions_from_account_id_bank_accounts_id_fk": { + "name": "bank_transactions_from_account_id_bank_accounts_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_accounts", + "columnsFrom": [ + "from_account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_to_account_id_bank_accounts_id_fk": { + "name": "bank_transactions_to_account_id_bank_accounts_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_accounts", + "columnsFrom": [ + "to_account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_actor_id_users_id_fk": { + "name": "bank_transactions_actor_id_users_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "users", + "columnsFrom": [ + "actor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "bank_transactions_reference_id_bank_transactions_id_fk": { + "name": "bank_transactions_reference_id_bank_transactions_id_fk", + "tableFrom": "bank_transactions", + "tableTo": "bank_transactions", + "columnsFrom": [ + "reference_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ledger_entries": { + "name": "ledger_entries", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "account_id": { + "name": "account_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "transaction_id": { + "name": "transaction_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_ledger_entries_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "balance_after": { + "name": "balance_after", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "memo": { + "name": "memo", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ledger_entries_account_idx": { + "name": "ledger_entries_account_idx", + "columns": [ + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_transaction_idx": { + "name": "ledger_entries_transaction_idx", + "columns": [ + { + "expression": "transaction_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_updated_at_idx": { + "name": "ledger_entries_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ledger_entries_created_at_idx": { + "name": "ledger_entries_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ledger_entries_account_id_bank_accounts_id_fk": { + "name": "ledger_entries_account_id_bank_accounts_id_fk", + "tableFrom": "ledger_entries", + "tableTo": "bank_accounts", + "columnsFrom": [ + "account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ledger_entries_transaction_id_bank_transactions_id_fk": { + "name": "ledger_entries_transaction_id_bank_transactions_id_fk", + "tableFrom": "ledger_entries", + "tableTo": "bank_transactions", + "columnsFrom": [ + "transaction_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages_items_equipment_attachments": { + "name": "locker_storages_items_equipment_attachments", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "locker_storages_items_equipment_attachments_order_idx": { + "name": "locker_storages_items_equipment_attachments_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_attachments_parent_id_idx": { + "name": "locker_storages_items_equipment_attachments_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_attachments_asset_idx": { + "name": "locker_storages_items_equipment_attachments_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_items_equipment_attachments_asset_id_assets_id_fk": { + "name": "locker_storages_items_equipment_attachments_asset_id_assets_id_fk", + "tableFrom": "locker_storages_items_equipment_attachments", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_equipment_attachments_parent_id_fk": { + "name": "locker_storages_items_equipment_attachments_parent_id_fk", + "tableFrom": "locker_storages_items_equipment_attachments", + "tableTo": "locker_storages_items", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages_items": { + "name": "locker_storages_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "grid_x": { + "name": "grid_x", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "grid_y": { + "name": "grid_y", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "rotated": { + "name": "rotated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "equipment_skin_id": { + "name": "equipment_skin_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "equipment_custom_name": { + "name": "equipment_custom_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "locker_storages_items_order_idx": { + "name": "locker_storages_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_parent_id_idx": { + "name": "locker_storages_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_asset_idx": { + "name": "locker_storages_items_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_items_equipment_equipment_skin_idx": { + "name": "locker_storages_items_equipment_equipment_skin_idx", + "columns": [ + { + "expression": "equipment_skin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_items_asset_id_assets_id_fk": { + "name": "locker_storages_items_asset_id_assets_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_equipment_skin_id_assets_id_fk": { + "name": "locker_storages_items_equipment_skin_id_assets_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "assets", + "columnsFrom": [ + "equipment_skin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "locker_storages_items_parent_id_fk": { + "name": "locker_storages_items_parent_id_fk", + "tableFrom": "locker_storages_items", + "tableTo": "locker_storages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locker_storages": { + "name": "locker_storages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Personal Locker'" + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "item_count": { + "name": "item_count", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "locker_storages_owner_user_idx": { + "name": "locker_storages_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_updated_at_idx": { + "name": "locker_storages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locker_storages_created_at_idx": { + "name": "locker_storages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "locker_storages_owner_user_id_users_id_fk": { + "name": "locker_storages_owner_user_id_users_id_fk", + "tableFrom": "locker_storages", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.loadouts": { + "name": "loadouts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "equipped": { + "name": "equipped", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "slots_primary_id": { + "name": "slots_primary_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_secondary_id": { + "name": "slots_secondary_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_launcher_id": { + "name": "slots_launcher_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_uniform_id": { + "name": "slots_uniform_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_vest_id": { + "name": "slots_vest_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_backpack_id": { + "name": "slots_backpack_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_helmet_id": { + "name": "slots_helmet_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_facewear_id": { + "name": "slots_facewear_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_nvg_id": { + "name": "slots_nvg_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_radio_id": { + "name": "slots_radio_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_optic_id": { + "name": "slots_optic_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_muzzle_id": { + "name": "slots_muzzle_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slots_bipod_id": { + "name": "slots_bipod_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "loadouts_owner_user_idx": { + "name": "loadouts_owner_user_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_primary_idx": { + "name": "loadouts_slots_slots_primary_idx", + "columns": [ + { + "expression": "slots_primary_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_secondary_idx": { + "name": "loadouts_slots_slots_secondary_idx", + "columns": [ + { + "expression": "slots_secondary_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_launcher_idx": { + "name": "loadouts_slots_slots_launcher_idx", + "columns": [ + { + "expression": "slots_launcher_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_uniform_idx": { + "name": "loadouts_slots_slots_uniform_idx", + "columns": [ + { + "expression": "slots_uniform_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_vest_idx": { + "name": "loadouts_slots_slots_vest_idx", + "columns": [ + { + "expression": "slots_vest_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_backpack_idx": { + "name": "loadouts_slots_slots_backpack_idx", + "columns": [ + { + "expression": "slots_backpack_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_helmet_idx": { + "name": "loadouts_slots_slots_helmet_idx", + "columns": [ + { + "expression": "slots_helmet_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_facewear_idx": { + "name": "loadouts_slots_slots_facewear_idx", + "columns": [ + { + "expression": "slots_facewear_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_nvg_idx": { + "name": "loadouts_slots_slots_nvg_idx", + "columns": [ + { + "expression": "slots_nvg_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_radio_idx": { + "name": "loadouts_slots_slots_radio_idx", + "columns": [ + { + "expression": "slots_radio_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_optic_idx": { + "name": "loadouts_slots_slots_optic_idx", + "columns": [ + { + "expression": "slots_optic_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_muzzle_idx": { + "name": "loadouts_slots_slots_muzzle_idx", + "columns": [ + { + "expression": "slots_muzzle_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_slots_slots_bipod_idx": { + "name": "loadouts_slots_slots_bipod_idx", + "columns": [ + { + "expression": "slots_bipod_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_updated_at_idx": { + "name": "loadouts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "loadouts_created_at_idx": { + "name": "loadouts_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "loadouts_owner_user_id_users_id_fk": { + "name": "loadouts_owner_user_id_users_id_fk", + "tableFrom": "loadouts", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_primary_id_assets_id_fk": { + "name": "loadouts_slots_primary_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_primary_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_secondary_id_assets_id_fk": { + "name": "loadouts_slots_secondary_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_secondary_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_launcher_id_assets_id_fk": { + "name": "loadouts_slots_launcher_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_launcher_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_uniform_id_assets_id_fk": { + "name": "loadouts_slots_uniform_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_uniform_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_vest_id_assets_id_fk": { + "name": "loadouts_slots_vest_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_vest_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_backpack_id_assets_id_fk": { + "name": "loadouts_slots_backpack_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_backpack_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_helmet_id_assets_id_fk": { + "name": "loadouts_slots_helmet_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_helmet_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_facewear_id_assets_id_fk": { + "name": "loadouts_slots_facewear_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_facewear_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_nvg_id_assets_id_fk": { + "name": "loadouts_slots_nvg_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_nvg_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_radio_id_assets_id_fk": { + "name": "loadouts_slots_radio_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_radio_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_optic_id_assets_id_fk": { + "name": "loadouts_slots_optic_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_optic_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_muzzle_id_assets_id_fk": { + "name": "loadouts_slots_muzzle_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_muzzle_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "loadouts_slots_bipod_id_assets_id_fk": { + "name": "loadouts_slots_bipod_id_assets_id_fk", + "tableFrom": "loadouts", + "tableTo": "assets", + "columnsFrom": [ + "slots_bipod_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_listings": { + "name": "market_listings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "asset_id": { + "name": "asset_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "seller_id": { + "name": "seller_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "npc_id": { + "name": "npc_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "price": { + "name": "price", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "desired_price": { + "name": "desired_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "min_price": { + "name": "min_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "currency_id": { + "name": "currency_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_market_listings_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "is_auto_generated": { + "name": "is_auto_generated", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "listed_at": { + "name": "listed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "sold_at": { + "name": "sold_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "buyer_id": { + "name": "buyer_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_listings_asset_idx": { + "name": "market_listings_asset_idx", + "columns": [ + { + "expression": "asset_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_seller_idx": { + "name": "market_listings_seller_idx", + "columns": [ + { + "expression": "seller_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_npc_idx": { + "name": "market_listings_npc_idx", + "columns": [ + { + "expression": "npc_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_currency_idx": { + "name": "market_listings_currency_idx", + "columns": [ + { + "expression": "currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_status_idx": { + "name": "market_listings_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_buyer_idx": { + "name": "market_listings_buyer_idx", + "columns": [ + { + "expression": "buyer_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_updated_at_idx": { + "name": "market_listings_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_listings_created_at_idx": { + "name": "market_listings_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_listings_asset_id_assets_id_fk": { + "name": "market_listings_asset_id_assets_id_fk", + "tableFrom": "market_listings", + "tableTo": "assets", + "columnsFrom": [ + "asset_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_seller_id_users_id_fk": { + "name": "market_listings_seller_id_users_id_fk", + "tableFrom": "market_listings", + "tableTo": "users", + "columnsFrom": [ + "seller_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_npc_id_game_npcs_id_fk": { + "name": "market_listings_npc_id_game_npcs_id_fk", + "tableFrom": "market_listings", + "tableTo": "game_npcs", + "columnsFrom": [ + "npc_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_currency_id_resources_id_fk": { + "name": "market_listings_currency_id_resources_id_fk", + "tableFrom": "market_listings", + "tableTo": "resources", + "columnsFrom": [ + "currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_listings_buyer_id_users_id_fk": { + "name": "market_listings_buyer_id_users_id_fk", + "tableFrom": "market_listings", + "tableTo": "users", + "columnsFrom": [ + "buyer_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_negotiations_history": { + "name": "market_negotiations_history", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "from": { + "name": "from", + "type": "enum_market_negotiations_history_from", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "at": { + "name": "at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "market_negotiations_history_order_idx": { + "name": "market_negotiations_history_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_history_parent_id_idx": { + "name": "market_negotiations_history_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_negotiations_history_parent_id_fk": { + "name": "market_negotiations_history_parent_id_fk", + "tableFrom": "market_negotiations_history", + "tableTo": "market_negotiations", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_negotiations": { + "name": "market_negotiations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "listing_id": { + "name": "listing_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "buyer_id": { + "name": "buyer_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_market_negotiations_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "patience": { + "name": "patience", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "quantity": { + "name": "quantity", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "amount": { + "name": "amount", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "proposed_by": { + "name": "proposed_by", + "type": "enum_market_negotiations_proposed_by", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'buyer'" + }, + "accepted_price": { + "name": "accepted_price", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_negotiations_listing_idx": { + "name": "market_negotiations_listing_idx", + "columns": [ + { + "expression": "listing_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_buyer_idx": { + "name": "market_negotiations_buyer_idx", + "columns": [ + { + "expression": "buyer_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_status_idx": { + "name": "market_negotiations_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_updated_at_idx": { + "name": "market_negotiations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_negotiations_created_at_idx": { + "name": "market_negotiations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "market_negotiations_listing_id_market_listings_id_fk": { + "name": "market_negotiations_listing_id_market_listings_id_fk", + "tableFrom": "market_negotiations", + "tableTo": "market_listings", + "columnsFrom": [ + "listing_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "market_negotiations_buyer_id_users_id_fk": { + "name": "market_negotiations_buyer_id_users_id_fk", + "tableFrom": "market_negotiations", + "tableTo": "users", + "columnsFrom": [ + "buyer_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.market_state": { + "name": "market_state", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "item_type": { + "name": "item_type", + "type": "enum_market_state_item_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "item_id": { + "name": "item_id", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "gm_baseline_supply": { + "name": "gm_baseline_supply", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 100 + }, + "gm_baseline_demand": { + "name": "gm_baseline_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 50 + }, + "current_supply": { + "name": "current_supply", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 100 + }, + "artificial_demand": { + "name": "artificial_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 50 + }, + "real_demand": { + "name": "real_demand", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "price_modifier": { + "name": "price_modifier", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "last_computed_at": { + "name": "last_computed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "market_state_item_type_idx": { + "name": "market_state_item_type_idx", + "columns": [ + { + "expression": "item_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_item_id_idx": { + "name": "market_state_item_id_idx", + "columns": [ + { + "expression": "item_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_updated_at_idx": { + "name": "market_state_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "market_state_created_at_idx": { + "name": "market_state_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "itemType_itemId_idx": { + "name": "itemType_itemId_idx", + "columns": [ + { + "expression": "item_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "item_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.voice_scripts": { + "name": "voice_scripts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "script": { + "name": "script", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "xp_amount": { + "name": "xp_amount", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 250 + }, + "spoiler": { + "name": "spoiler", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "status": { + "name": "status", + "type": "enum_voice_scripts_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'draft'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "voice_scripts_updated_at_idx": { + "name": "voice_scripts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_scripts_created_at_idx": { + "name": "voice_scripts_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.voice_submissions": { + "name": "voice_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "script_id": { + "name": "script_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_voice_submissions_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "review_note": { + "name": "review_note", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "voice_submissions_script_idx": { + "name": "voice_submissions_script_idx", + "columns": [ + { + "expression": "script_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_user_idx": { + "name": "voice_submissions_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_updated_at_idx": { + "name": "voice_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_created_at_idx": { + "name": "voice_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "voice_submissions_filename_idx": { + "name": "voice_submissions_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "voice_submissions_script_id_voice_scripts_id_fk": { + "name": "voice_submissions_script_id_voice_scripts_id_fk", + "tableFrom": "voice_submissions", + "tableTo": "voice_scripts", + "columnsFrom": [ + "script_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "voice_submissions_user_id_users_id_fk": { + "name": "voice_submissions_user_id_users_id_fk", + "tableFrom": "voice_submissions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_activity": { + "name": "tickets_activity", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_tickets_activity_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'system'" + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tickets_activity_order_idx": { + "name": "tickets_activity_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_activity_parent_id_idx": { + "name": "tickets_activity_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_activity_author_idx": { + "name": "tickets_activity_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_activity_author_id_users_id_fk": { + "name": "tickets_activity_author_id_users_id_fk", + "tableFrom": "tickets_activity", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_activity_parent_id_fk": { + "name": "tickets_activity_parent_id_fk", + "tableFrom": "tickets_activity", + "tableTo": "tickets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_edit_history": { + "name": "tickets_edit_history", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "before": { + "name": "before", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "after": { + "name": "after", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "edited_by_id": { + "name": "edited_by_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "edited_at": { + "name": "edited_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "tickets_edit_history_order_idx": { + "name": "tickets_edit_history_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_edit_history_parent_id_idx": { + "name": "tickets_edit_history_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_edit_history_edited_by_idx": { + "name": "tickets_edit_history_edited_by_idx", + "columns": [ + { + "expression": "edited_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_edit_history_edited_by_id_users_id_fk": { + "name": "tickets_edit_history_edited_by_id_users_id_fk", + "tableFrom": "tickets_edit_history", + "tableTo": "users", + "columnsFrom": [ + "edited_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_edit_history_parent_id_fk": { + "name": "tickets_edit_history_parent_id_fk", + "tableFrom": "tickets_edit_history", + "tableTo": "tickets", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets": { + "name": "tickets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_tickets_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'support_request'" + }, + "priority": { + "name": "priority", + "type": "enum_tickets_priority", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'medium'" + }, + "status": { + "name": "status", + "type": "enum_tickets_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'open'" + }, + "reporter_id": { + "name": "reporter_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "assignee_id": { + "name": "assignee_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "closed_at": { + "name": "closed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sprint_id": { + "name": "sprint_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "release_id": { + "name": "release_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_ticket_id": { + "name": "parent_ticket_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "enum_tickets_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'task'" + }, + "story_points": { + "name": "story_points", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "estimate": { + "name": "estimate", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "due_date": { + "name": "due_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "resolution": { + "name": "resolution", + "type": "enum_tickets_resolution", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "tickets_category_idx": { + "name": "tickets_category_idx", + "columns": [ + { + "expression": "category", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_priority_idx": { + "name": "tickets_priority_idx", + "columns": [ + { + "expression": "priority", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_status_idx": { + "name": "tickets_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_reporter_idx": { + "name": "tickets_reporter_idx", + "columns": [ + { + "expression": "reporter_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_assignee_idx": { + "name": "tickets_assignee_idx", + "columns": [ + { + "expression": "assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_project_idx": { + "name": "tickets_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_sprint_idx": { + "name": "tickets_sprint_idx", + "columns": [ + { + "expression": "sprint_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_release_idx": { + "name": "tickets_release_idx", + "columns": [ + { + "expression": "release_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_parent_ticket_idx": { + "name": "tickets_parent_ticket_idx", + "columns": [ + { + "expression": "parent_ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_updated_at_idx": { + "name": "tickets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_created_at_idx": { + "name": "tickets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_reporter_id_users_id_fk": { + "name": "tickets_reporter_id_users_id_fk", + "tableFrom": "tickets", + "tableTo": "users", + "columnsFrom": [ + "reporter_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_assignee_id_users_id_fk": { + "name": "tickets_assignee_id_users_id_fk", + "tableFrom": "tickets", + "tableTo": "users", + "columnsFrom": [ + "assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_project_id_projects_id_fk": { + "name": "tickets_project_id_projects_id_fk", + "tableFrom": "tickets", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_sprint_id_sprints_id_fk": { + "name": "tickets_sprint_id_sprints_id_fk", + "tableFrom": "tickets", + "tableTo": "sprints", + "columnsFrom": [ + "sprint_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_release_id_releases_id_fk": { + "name": "tickets_release_id_releases_id_fk", + "tableFrom": "tickets", + "tableTo": "releases", + "columnsFrom": [ + "release_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "tickets_parent_ticket_id_tickets_id_fk": { + "name": "tickets_parent_ticket_id_tickets_id_fk", + "tableFrom": "tickets", + "tableTo": "tickets", + "columnsFrom": [ + "parent_ticket_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tickets_rels": { + "name": "tickets_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "labels_id": { + "name": "labels_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "tickets_rels_order_idx": { + "name": "tickets_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_parent_idx": { + "name": "tickets_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_path_idx": { + "name": "tickets_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "tickets_rels_labels_id_idx": { + "name": "tickets_rels_labels_id_idx", + "columns": [ + { + "expression": "labels_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "tickets_rels_parent_fk": { + "name": "tickets_rels_parent_fk", + "tableFrom": "tickets_rels", + "tableTo": "tickets", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tickets_rels_labels_fk": { + "name": "tickets_rels_labels_fk", + "tableFrom": "tickets_rels", + "tableTo": "labels", + "columnsFrom": [ + "labels_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ticket_votes": { + "name": "ticket_votes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "ticket_id": { + "name": "ticket_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "ticket_votes_ticket_idx": { + "name": "ticket_votes_ticket_idx", + "columns": [ + { + "expression": "ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_user_idx": { + "name": "ticket_votes_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_updated_at_idx": { + "name": "ticket_votes_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_votes_created_at_idx": { + "name": "ticket_votes_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ticket_user_idx": { + "name": "ticket_user_idx", + "columns": [ + { + "expression": "ticket_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ticket_votes_ticket_id_tickets_id_fk": { + "name": "ticket_votes_ticket_id_tickets_id_fk", + "tableFrom": "ticket_votes", + "tableTo": "tickets", + "columnsFrom": [ + "ticket_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ticket_votes_user_id_users_id_fk": { + "name": "ticket_votes_user_id_users_id_fk", + "tableFrom": "ticket_votes", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages": { + "name": "wiki_pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "enum_wiki_pages_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "body": { + "name": "body", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "lockdown": { + "name": "lockdown", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locked_by_id": { + "name": "locked_by_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locked_at": { + "name": "locked_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "last_editor_id": { + "name": "last_editor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_pages_slug_idx": { + "name": "wiki_pages_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_category_idx": { + "name": "wiki_pages_category_idx", + "columns": [ + { + "expression": "category", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_locked_by_idx": { + "name": "wiki_pages_locked_by_idx", + "columns": [ + { + "expression": "locked_by_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_last_editor_idx": { + "name": "wiki_pages_last_editor_idx", + "columns": [ + { + "expression": "last_editor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_updated_at_idx": { + "name": "wiki_pages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_pages_created_at_idx": { + "name": "wiki_pages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_locked_by_id_users_id_fk": { + "name": "wiki_pages_locked_by_id_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "locked_by_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "wiki_pages_last_editor_id_users_id_fk": { + "name": "wiki_pages_last_editor_id_users_id_fk", + "tableFrom": "wiki_pages", + "tableTo": "users", + "columnsFrom": [ + "last_editor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_pages_texts": { + "name": "wiki_pages_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "wiki_pages_texts_order_parent": { + "name": "wiki_pages_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_pages_texts_parent_fk": { + "name": "wiki_pages_texts_parent_fk", + "tableFrom": "wiki_pages_texts", + "tableTo": "wiki_pages", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_revisions": { + "name": "wiki_revisions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "page_id": { + "name": "page_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "revision_number": { + "name": "revision_number", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "title_snapshot": { + "name": "title_snapshot", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "content_snapshot": { + "name": "content_snapshot", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "editor_id": { + "name": "editor_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "enum_wiki_revisions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "restored_from_revision": { + "name": "restored_from_revision", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_revisions_page_idx": { + "name": "wiki_revisions_page_idx", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_editor_idx": { + "name": "wiki_revisions_editor_idx", + "columns": [ + { + "expression": "editor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_updated_at_idx": { + "name": "wiki_revisions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_revisions_created_at_idx": { + "name": "wiki_revisions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "wiki_revisions_page_id_wiki_pages_id_fk": { + "name": "wiki_revisions_page_id_wiki_pages_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "wiki_pages", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "wiki_revisions_editor_id_users_id_fk": { + "name": "wiki_revisions_editor_id_users_id_fk", + "tableFrom": "wiki_revisions", + "tableTo": "users", + "columnsFrom": [ + "editor_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.wiki_templates": { + "name": "wiki_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "body": { + "name": "body", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "css": { + "name": "css", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "html": { + "name": "html", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "wiki_templates_name_idx": { + "name": "wiki_templates_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_templates_updated_at_idx": { + "name": "wiki_templates_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "wiki_templates_created_at_idx": { + "name": "wiki_templates_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.projects": { + "name": "projects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "lead_id": { + "name": "lead_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_projects_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'active'" + }, + "default_assignee_id": { + "name": "default_assignee_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "projects_key_idx": { + "name": "projects_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_lead_idx": { + "name": "projects_lead_idx", + "columns": [ + { + "expression": "lead_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_default_assignee_idx": { + "name": "projects_default_assignee_idx", + "columns": [ + { + "expression": "default_assignee_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_updated_at_idx": { + "name": "projects_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "projects_created_at_idx": { + "name": "projects_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "projects_lead_id_users_id_fk": { + "name": "projects_lead_id_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "lead_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "projects_default_assignee_id_users_id_fk": { + "name": "projects_default_assignee_id_users_id_fk", + "tableFrom": "projects", + "tableTo": "users", + "columnsFrom": [ + "default_assignee_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sprints": { + "name": "sprints", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "goal": { + "name": "goal", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_sprints_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'planning'" + }, + "capacity": { + "name": "capacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sprints_project_idx": { + "name": "sprints_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sprints_updated_at_idx": { + "name": "sprints_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sprints_created_at_idx": { + "name": "sprints_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sprints_project_id_projects_id_fk": { + "name": "sprints_project_id_projects_id_fk", + "tableFrom": "sprints", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.releases": { + "name": "releases", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_releases_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "release_date": { + "name": "release_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "target_version": { + "name": "target_version", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "releases_project_idx": { + "name": "releases_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "releases_updated_at_idx": { + "name": "releases_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "releases_created_at_idx": { + "name": "releases_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "releases_project_id_projects_id_fk": { + "name": "releases_project_id_projects_id_fk", + "tableFrom": "releases", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.labels": { + "name": "labels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'#6366f1'" + }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "labels_project_idx": { + "name": "labels_project_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labels_updated_at_idx": { + "name": "labels_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "labels_created_at_idx": { + "name": "labels_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "labels_project_id_projects_id_fk": { + "name": "labels_project_id_projects_id_fk", + "tableFrom": "labels", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.maps": { + "name": "maps", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "world_size_width": { + "name": "world_size_width", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 8192 + }, + "world_size_height": { + "name": "world_size_height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 8192 + }, + "basemap_mode": { + "name": "basemap_mode", + "type": "enum_maps_basemap_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'image'" + }, + "basemap_image_id": { + "name": "basemap_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tile_url_template": { + "name": "tile_url_template", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "min_zoom": { + "name": "min_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "max_zoom": { + "name": "max_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 12 + }, + "default_center_x": { + "name": "default_center_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_center_y": { + "name": "default_center_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_zoom": { + "name": "default_zoom", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 2 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "maps_name_idx": { + "name": "maps_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_basemap_image_idx": { + "name": "maps_basemap_image_idx", + "columns": [ + { + "expression": "basemap_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_updated_at_idx": { + "name": "maps_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_created_at_idx": { + "name": "maps_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "maps_basemap_image_id_media_id_fk": { + "name": "maps_basemap_image_id_media_id_fk", + "tableFrom": "maps", + "tableTo": "media", + "columnsFrom": [ + "basemap_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_roads": { + "name": "map_roads", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "surface": { + "name": "surface", + "type": "enum_map_roads_surface", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'paved'" + }, + "speed_multiplier": { + "name": "speed_multiplier", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "stroke_color": { + "name": "stroke_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stroke_weight": { + "name": "stroke_weight", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 2 + }, + "stroke_style": { + "name": "stroke_style", + "type": "enum_map_roads_stroke_style", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'solid'" + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "points": { + "name": "points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "map_roads_map_idx": { + "name": "map_roads_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_roads_updated_at_idx": { + "name": "map_roads_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_roads_created_at_idx": { + "name": "map_roads_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_roads_map_id_maps_id_fk": { + "name": "map_roads_map_id_maps_id_fk", + "tableFrom": "map_roads", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_zones": { + "name": "map_zones", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_map_zones_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "fill_color": { + "name": "fill_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "stroke_color": { + "name": "stroke_color", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "fill_opacity": { + "name": "fill_opacity", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "stroke_weight": { + "name": "stroke_weight", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "label_visible": { + "name": "label_visible", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "points": { + "name": "points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "map_zones_map_idx": { + "name": "map_zones_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_updated_at_idx": { + "name": "map_zones_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_created_at_idx": { + "name": "map_zones_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_zones_map_id_maps_id_fk": { + "name": "map_zones_map_id_maps_id_fk", + "tableFrom": "map_zones", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.map_zones_rels": { + "name": "map_zones_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "map_zones_rels_order_idx": { + "name": "map_zones_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_parent_idx": { + "name": "map_zones_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_path_idx": { + "name": "map_zones_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "map_zones_rels_resources_id_idx": { + "name": "map_zones_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "map_zones_rels_parent_fk": { + "name": "map_zones_rels_parent_fk", + "tableFrom": "map_zones_rels", + "tableTo": "map_zones", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "map_zones_rels_resources_fk": { + "name": "map_zones_rels_resources_fk", + "tableFrom": "map_zones_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_nodes": { + "name": "resource_nodes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "map_id": { + "name": "map_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "position": { + "name": "position", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "richness": { + "name": "richness", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 100 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resource_nodes_map_idx": { + "name": "resource_nodes_map_idx", + "columns": [ + { + "expression": "map_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_updated_at_idx": { + "name": "resource_nodes_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_created_at_idx": { + "name": "resource_nodes_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_nodes_map_id_maps_id_fk": { + "name": "resource_nodes_map_id_maps_id_fk", + "tableFrom": "resource_nodes", + "tableTo": "maps", + "columnsFrom": [ + "map_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_nodes_rels": { + "name": "resource_nodes_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "resource_nodes_rels_order_idx": { + "name": "resource_nodes_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_parent_idx": { + "name": "resource_nodes_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_path_idx": { + "name": "resource_nodes_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_nodes_rels_resources_id_idx": { + "name": "resource_nodes_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_nodes_rels_parent_fk": { + "name": "resource_nodes_rels_parent_fk", + "tableFrom": "resource_nodes_rels", + "tableTo": "resource_nodes", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "resource_nodes_rels_resources_fk": { + "name": "resource_nodes_rels_resources_fk", + "tableFrom": "resource_nodes_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.narrative_events": { + "name": "narrative_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "flow_data": { + "name": "flow_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "triggers_type": { + "name": "triggers_type", + "type": "enum_narrative_events_triggers_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'manual'" + }, + "triggers_condition": { + "name": "triggers_condition", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "narrative_events_updated_at_idx": { + "name": "narrative_events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "narrative_events_created_at_idx": { + "name": "narrative_events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.story_beats": { + "name": "story_beats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occurred_at": { + "name": "occurred_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "enum_story_beats_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'draft'" + }, + "body": { + "name": "body", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "mission_id": { + "name": "mission_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "story_beats_status_idx": { + "name": "story_beats_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_mission_idx": { + "name": "story_beats_mission_idx", + "columns": [ + { + "expression": "mission_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_updated_at_idx": { + "name": "story_beats_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beats_created_at_idx": { + "name": "story_beats_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "story_beats_mission_id_missions_id_fk": { + "name": "story_beats_mission_id_missions_id_fk", + "tableFrom": "story_beats", + "tableTo": "missions", + "columnsFrom": [ + "mission_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.story_beat_states": { + "name": "story_beat_states", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "beat_id": { + "name": "beat_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "read_at": { + "name": "read_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "reaction": { + "name": "reaction", + "type": "enum_story_beat_states_reaction", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "story_beat_states_user_idx": { + "name": "story_beat_states_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_beat_idx": { + "name": "story_beat_states_beat_idx", + "columns": [ + { + "expression": "beat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_updated_at_idx": { + "name": "story_beat_states_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "story_beat_states_created_at_idx": { + "name": "story_beat_states_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "story_beat_states_user_id_users_id_fk": { + "name": "story_beat_states_user_id_users_id_fk", + "tableFrom": "story_beat_states", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "story_beat_states_beat_id_story_beats_id_fk": { + "name": "story_beat_states_beat_id_story_beats_id_fk", + "tableFrom": "story_beat_states", + "tableTo": "story_beats", + "columnsFrom": [ + "beat_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mission_files": { + "name": "mission_files", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "mission_file_name": { + "name": "mission_file_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mission_files_author_idx": { + "name": "mission_files_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_updated_at_idx": { + "name": "mission_files_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_created_at_idx": { + "name": "mission_files_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mission_files_filename_idx": { + "name": "mission_files_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mission_files_author_id_users_id_fk": { + "name": "mission_files_author_id_users_id_fk", + "tableFrom": "mission_files", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mod_lists": { + "name": "mod_lists", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "modlist_name": { + "name": "modlist_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "mod_lists_author_idx": { + "name": "mod_lists_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_updated_at_idx": { + "name": "mod_lists_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_created_at_idx": { + "name": "mod_lists_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mod_lists_filename_idx": { + "name": "mod_lists_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mod_lists_author_id_users_id_fk": { + "name": "mod_lists_author_id_users_id_fk", + "tableFrom": "mod_lists", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_servers": { + "name": "game_servers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_game_servers_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'offline'" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "game_servers_server_id_idx": { + "name": "game_servers_server_id_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_servers_updated_at_idx": { + "name": "game_servers_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_servers_created_at_idx": { + "name": "game_servers_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.arma_sync_events": { + "name": "arma_sync_events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "event_id": { + "name": "event_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occurred_at": { + "name": "occurred_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "arma_sync_events_event_id_idx": { + "name": "arma_sync_events_event_id_idx", + "columns": [ + { + "expression": "event_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_server_idx": { + "name": "arma_sync_events_server_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_type_idx": { + "name": "arma_sync_events_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_updated_at_idx": { + "name": "arma_sync_events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_sync_events_created_at_idx": { + "name": "arma_sync_events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "arma_sync_events_server_id_game_servers_id_fk": { + "name": "arma_sync_events_server_id_game_servers_id_fk", + "tableFrom": "arma_sync_events", + "tableTo": "game_servers", + "columnsFrom": [ + "server_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.arma_commands": { + "name": "arma_commands", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "command_id": { + "name": "command_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "enum_arma_commands_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'queued'" + }, + "result": { + "name": "result", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "delivered_at": { + "name": "delivered_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "arma_commands_command_id_idx": { + "name": "arma_commands_command_id_idx", + "columns": [ + { + "expression": "command_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_server_idx": { + "name": "arma_commands_server_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_updated_at_idx": { + "name": "arma_commands_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "arma_commands_created_at_idx": { + "name": "arma_commands_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "arma_commands_server_id_game_servers_id_fk": { + "name": "arma_commands_server_id_game_servers_id_fk", + "tableFrom": "arma_commands", + "tableTo": "game_servers", + "columnsFrom": [ + "server_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.respawn_tickets": { + "name": "respawn_tickets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "balance": { + "name": "balance", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "respawn_tickets_user_idx": { + "name": "respawn_tickets_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "respawn_tickets_updated_at_idx": { + "name": "respawn_tickets_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "respawn_tickets_created_at_idx": { + "name": "respawn_tickets_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "respawn_tickets_user_id_users_id_fk": { + "name": "respawn_tickets_user_id_users_id_fk", + "tableFrom": "respawn_tickets", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_minefields": { + "name": "custom_minefields", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "rows": { + "name": "rows", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "cols": { + "name": "cols", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "mines": { + "name": "mines", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "mine_count": { + "name": "mine_count", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "published": { + "name": "published", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "expose_edge_mines": { + "name": "expose_edge_mines", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "play_count": { + "name": "play_count", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "creator_xp_bank": { + "name": "creator_xp_bank", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_minefields_author_idx": { + "name": "custom_minefields_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefields_updated_at_idx": { + "name": "custom_minefields_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefields_created_at_idx": { + "name": "custom_minefields_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_minefields_author_id_users_id_fk": { + "name": "custom_minefields_author_id_users_id_fk", + "tableFrom": "custom_minefields", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_minefield_scores": { + "name": "custom_minefield_scores", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "minefield_id": { + "name": "minefield_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "seconds": { + "name": "seconds", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "flags": { + "name": "flags", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "won": { + "name": "won", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_minefield_scores_minefield_idx": { + "name": "custom_minefield_scores_minefield_idx", + "columns": [ + { + "expression": "minefield_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_user_idx": { + "name": "custom_minefield_scores_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_updated_at_idx": { + "name": "custom_minefield_scores_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_minefield_scores_created_at_idx": { + "name": "custom_minefield_scores_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_minefield_scores_minefield_id_custom_minefields_id_fk": { + "name": "custom_minefield_scores_minefield_id_custom_minefields_id_fk", + "tableFrom": "custom_minefield_scores", + "tableTo": "custom_minefields", + "columnsFrom": [ + "minefield_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "custom_minefield_scores_user_id_users_id_fk": { + "name": "custom_minefield_scores_user_id_users_id_fk", + "tableFrom": "custom_minefield_scores", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_radio_tests": { + "name": "custom_radio_tests", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author_id": { + "name": "author_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "messages": { + "name": "messages", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "message_count": { + "name": "message_count", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "enum_custom_radio_tests_order", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'fixed'" + }, + "published": { + "name": "published", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "play_count": { + "name": "play_count", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_radio_tests_author_idx": { + "name": "custom_radio_tests_author_idx", + "columns": [ + { + "expression": "author_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_tests_updated_at_idx": { + "name": "custom_radio_tests_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_tests_created_at_idx": { + "name": "custom_radio_tests_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_radio_tests_author_id_users_id_fk": { + "name": "custom_radio_tests_author_id_users_id_fk", + "tableFrom": "custom_radio_tests", + "tableTo": "users", + "columnsFrom": [ + "author_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_radio_test_scores": { + "name": "custom_radio_test_scores", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "test_id": { + "name": "test_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "score": { + "name": "score", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "accuracy": { + "name": "accuracy", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "correct_messages": { + "name": "correct_messages", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "incorrect_messages": { + "name": "incorrect_messages", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "mode": { + "name": "mode", + "type": "enum_custom_radio_test_scores_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "time_ms": { + "name": "time_ms", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_radio_test_scores_test_idx": { + "name": "custom_radio_test_scores_test_idx", + "columns": [ + { + "expression": "test_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_user_idx": { + "name": "custom_radio_test_scores_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_updated_at_idx": { + "name": "custom_radio_test_scores_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_radio_test_scores_created_at_idx": { + "name": "custom_radio_test_scores_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_radio_test_scores_test_id_custom_radio_tests_id_fk": { + "name": "custom_radio_test_scores_test_id_custom_radio_tests_id_fk", + "tableFrom": "custom_radio_test_scores", + "tableTo": "custom_radio_tests", + "columnsFrom": [ + "test_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "custom_radio_test_scores_user_id_users_id_fk": { + "name": "custom_radio_test_scores_user_id_users_id_fk", + "tableFrom": "custom_radio_test_scores", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_ai_instructions_images": { + "name": "plugin_ai_instructions_images", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "plugin_ai_instructions_images_order_idx": { + "name": "plugin_ai_instructions_images_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_images_parent_id_idx": { + "name": "plugin_ai_instructions_images_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_images_image_idx": { + "name": "plugin_ai_instructions_images_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "plugin_ai_instructions_images_image_id_media_id_fk": { + "name": "plugin_ai_instructions_images_image_id_media_id_fk", + "tableFrom": "plugin_ai_instructions_images", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "plugin_ai_instructions_images_parent_id_fk": { + "name": "plugin_ai_instructions_images_parent_id_fk", + "tableFrom": "plugin_ai_instructions_images", + "tableTo": "plugin_ai_instructions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_ai_instructions": { + "name": "plugin_ai_instructions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "schema_path": { + "name": "schema_path", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "field_type": { + "name": "field_type", + "type": "enum_plugin_ai_instructions_field_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'text'" + }, + "relation_to": { + "name": "relation_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "model_id": { + "name": "model_id", + "type": "enum_plugin_ai_instructions_model_id", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "disabled": { + "name": "disabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "prompt": { + "name": "prompt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "system": { + "name": "system", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'INSTRUCTIONS:\nYou are a highly skilled and professional blog writer,\nrenowned for crafting engaging and well-organized articles.\nWhen given a title, you meticulously create blogs that are not only\ninformative and accurate but also captivating and beautifully structured.'" + }, + "layout": { + "name": "layout", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'[paragraph] - Write a concise introduction (2-3 sentences) that outlines the main topic.\n[horizontalrule] - Insert a horizontal rule to separate the introduction from the main content.\n[list] - Create a list with 3-5 items. Each list item should contain:\n a. [heading] - A brief, descriptive heading (up to 5 words)\n b. [paragraph] - A short explanation or elaboration (1-2 sentences)\n[horizontalrule] - Insert another horizontal rule to separate the main content from the conclusion.\n[paragraph] - Compose a brief conclusion (2-3 sentences) summarizing the key points.\n[quote] - Include a relevant quote from a famous person, directly related to the topic. Format: \"Quote text.\" - Author Name'" + }, + "unsloth_text_settings_model": { + "name": "unsloth_text_settings_model", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'unsloth/gemma-4-E4B-it-qat-GGUF'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "plugin_ai_instructions_schema_path_idx": { + "name": "plugin_ai_instructions_schema_path_idx", + "columns": [ + { + "expression": "schema_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_updated_at_idx": { + "name": "plugin_ai_instructions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "plugin_ai_instructions_created_at_idx": { + "name": "plugin_ai_instructions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_mcp_api_keys": { + "name": "payload_mcp_api_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "media_find": { + "name": "media_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_create": { + "name": "media_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_update": { + "name": "media_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "media_delete": { + "name": "media_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_find": { + "name": "game_hard_resources_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_create": { + "name": "game_hard_resources_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_update": { + "name": "game_hard_resources_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_hard_resources_delete": { + "name": "game_hard_resources_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_find": { + "name": "game_structures_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_create": { + "name": "game_structures_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_update": { + "name": "game_structures_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_structures_delete": { + "name": "game_structures_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_find": { + "name": "game_vehicles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_create": { + "name": "game_vehicles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_update": { + "name": "game_vehicles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_vehicles_delete": { + "name": "game_vehicles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_find": { + "name": "game_npcs_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_create": { + "name": "game_npcs_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_update": { + "name": "game_npcs_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_npcs_delete": { + "name": "game_npcs_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_find": { + "name": "npc_staffing_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_create": { + "name": "npc_staffing_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_update": { + "name": "npc_staffing_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "npc_staffing_delete": { + "name": "npc_staffing_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_find": { + "name": "labor_classifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_create": { + "name": "labor_classifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_update": { + "name": "labor_classifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labor_classifications_delete": { + "name": "labor_classifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_find": { + "name": "game_event_logs_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_create": { + "name": "game_event_logs_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_update": { + "name": "game_event_logs_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_event_logs_delete": { + "name": "game_event_logs_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_find": { + "name": "users_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_create": { + "name": "users_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_update": { + "name": "users_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "users_delete": { + "name": "users_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_find": { + "name": "roles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_create": { + "name": "roles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_update": { + "name": "roles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "roles_delete": { + "name": "roles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_find": { + "name": "ranks_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_create": { + "name": "ranks_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_update": { + "name": "ranks_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ranks_delete": { + "name": "ranks_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_find": { + "name": "profiles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_create": { + "name": "profiles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_update": { + "name": "profiles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "profiles_delete": { + "name": "profiles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_find": { + "name": "awards_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_create": { + "name": "awards_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_update": { + "name": "awards_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "awards_delete": { + "name": "awards_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_find": { + "name": "qualifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_create": { + "name": "qualifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_update": { + "name": "qualifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "qualifications_delete": { + "name": "qualifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_find": { + "name": "assignments_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_create": { + "name": "assignments_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_update": { + "name": "assignments_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignments_delete": { + "name": "assignments_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_find": { + "name": "assignment_transfers_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_create": { + "name": "assignment_transfers_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_update": { + "name": "assignment_transfers_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assignment_transfers_delete": { + "name": "assignment_transfers_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_find": { + "name": "experience_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_create": { + "name": "experience_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_update": { + "name": "experience_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "experience_delete": { + "name": "experience_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_find": { + "name": "user_notifications_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_create": { + "name": "user_notifications_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_update": { + "name": "user_notifications_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "user_notifications_delete": { + "name": "user_notifications_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_find": { + "name": "evaluations_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_create": { + "name": "evaluations_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_update": { + "name": "evaluations_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "evaluations_delete": { + "name": "evaluations_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_find": { + "name": "ribbon_submissions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_create": { + "name": "ribbon_submissions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_update": { + "name": "ribbon_submissions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ribbon_submissions_delete": { + "name": "ribbon_submissions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_find": { + "name": "missions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_create": { + "name": "missions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_update": { + "name": "missions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "missions_delete": { + "name": "missions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_find": { + "name": "mission_attendances_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_create": { + "name": "mission_attendances_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_update": { + "name": "mission_attendances_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_attendances_delete": { + "name": "mission_attendances_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_find": { + "name": "campaigns_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_create": { + "name": "campaigns_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_update": { + "name": "campaigns_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "campaigns_delete": { + "name": "campaigns_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_find": { + "name": "factions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_create": { + "name": "factions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_update": { + "name": "factions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "factions_delete": { + "name": "factions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_find": { + "name": "technologies_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_create": { + "name": "technologies_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_update": { + "name": "technologies_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "technologies_delete": { + "name": "technologies_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_find": { + "name": "assets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_create": { + "name": "assets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_update": { + "name": "assets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "assets_delete": { + "name": "assets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_find": { + "name": "resources_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_create": { + "name": "resources_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_update": { + "name": "resources_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resources_delete": { + "name": "resources_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_find": { + "name": "vehicles_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_create": { + "name": "vehicles_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_update": { + "name": "vehicles_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vehicles_delete": { + "name": "vehicles_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_find": { + "name": "structures_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_create": { + "name": "structures_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_update": { + "name": "structures_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "structures_delete": { + "name": "structures_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_find": { + "name": "shipments_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_create": { + "name": "shipments_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_update": { + "name": "shipments_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "shipments_delete": { + "name": "shipments_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_find": { + "name": "bank_accounts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_create": { + "name": "bank_accounts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_update": { + "name": "bank_accounts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_accounts_delete": { + "name": "bank_accounts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_find": { + "name": "bank_transactions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_create": { + "name": "bank_transactions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_update": { + "name": "bank_transactions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "bank_transactions_delete": { + "name": "bank_transactions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_find": { + "name": "ledger_entries_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_create": { + "name": "ledger_entries_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_update": { + "name": "ledger_entries_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ledger_entries_delete": { + "name": "ledger_entries_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_find": { + "name": "locker_storages_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_create": { + "name": "locker_storages_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_update": { + "name": "locker_storages_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "locker_storages_delete": { + "name": "locker_storages_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_find": { + "name": "loadouts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_create": { + "name": "loadouts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_update": { + "name": "loadouts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "loadouts_delete": { + "name": "loadouts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_find": { + "name": "market_listings_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_create": { + "name": "market_listings_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_update": { + "name": "market_listings_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_listings_delete": { + "name": "market_listings_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_find": { + "name": "market_negotiations_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_create": { + "name": "market_negotiations_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_update": { + "name": "market_negotiations_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_negotiations_delete": { + "name": "market_negotiations_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_find": { + "name": "market_state_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_create": { + "name": "market_state_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_update": { + "name": "market_state_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "market_state_delete": { + "name": "market_state_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_find": { + "name": "voice_scripts_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_create": { + "name": "voice_scripts_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_update": { + "name": "voice_scripts_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_scripts_delete": { + "name": "voice_scripts_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_find": { + "name": "voice_submissions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_create": { + "name": "voice_submissions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_update": { + "name": "voice_submissions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "voice_submissions_delete": { + "name": "voice_submissions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_find": { + "name": "tickets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_create": { + "name": "tickets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_update": { + "name": "tickets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "tickets_delete": { + "name": "tickets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_find": { + "name": "ticket_votes_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_create": { + "name": "ticket_votes_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_update": { + "name": "ticket_votes_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ticket_votes_delete": { + "name": "ticket_votes_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_find": { + "name": "wiki_pages_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_create": { + "name": "wiki_pages_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_update": { + "name": "wiki_pages_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_pages_delete": { + "name": "wiki_pages_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_find": { + "name": "wiki_revisions_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_create": { + "name": "wiki_revisions_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_update": { + "name": "wiki_revisions_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_revisions_delete": { + "name": "wiki_revisions_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_find": { + "name": "wiki_templates_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_create": { + "name": "wiki_templates_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_update": { + "name": "wiki_templates_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "wiki_templates_delete": { + "name": "wiki_templates_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_find": { + "name": "projects_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_create": { + "name": "projects_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_update": { + "name": "projects_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "projects_delete": { + "name": "projects_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_find": { + "name": "sprints_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_create": { + "name": "sprints_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_update": { + "name": "sprints_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "sprints_delete": { + "name": "sprints_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_find": { + "name": "releases_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_create": { + "name": "releases_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_update": { + "name": "releases_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "releases_delete": { + "name": "releases_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_find": { + "name": "labels_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_create": { + "name": "labels_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_update": { + "name": "labels_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "labels_delete": { + "name": "labels_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_find": { + "name": "maps_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_create": { + "name": "maps_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_update": { + "name": "maps_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "maps_delete": { + "name": "maps_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_find": { + "name": "map_roads_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_create": { + "name": "map_roads_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_update": { + "name": "map_roads_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_roads_delete": { + "name": "map_roads_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_find": { + "name": "map_zones_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_create": { + "name": "map_zones_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_update": { + "name": "map_zones_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "map_zones_delete": { + "name": "map_zones_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_find": { + "name": "resource_nodes_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_create": { + "name": "resource_nodes_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_update": { + "name": "resource_nodes_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "resource_nodes_delete": { + "name": "resource_nodes_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_find": { + "name": "narrative_events_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_create": { + "name": "narrative_events_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_update": { + "name": "narrative_events_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "narrative_events_delete": { + "name": "narrative_events_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_find": { + "name": "story_beats_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_create": { + "name": "story_beats_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_update": { + "name": "story_beats_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beats_delete": { + "name": "story_beats_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_find": { + "name": "story_beat_states_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_create": { + "name": "story_beat_states_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_update": { + "name": "story_beat_states_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "story_beat_states_delete": { + "name": "story_beat_states_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_find": { + "name": "mission_files_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_create": { + "name": "mission_files_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_update": { + "name": "mission_files_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mission_files_delete": { + "name": "mission_files_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_find": { + "name": "mod_lists_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_create": { + "name": "mod_lists_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_update": { + "name": "mod_lists_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "mod_lists_delete": { + "name": "mod_lists_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_find": { + "name": "game_servers_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_create": { + "name": "game_servers_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_update": { + "name": "game_servers_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "game_servers_delete": { + "name": "game_servers_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_find": { + "name": "arma_sync_events_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_create": { + "name": "arma_sync_events_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_update": { + "name": "arma_sync_events_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_sync_events_delete": { + "name": "arma_sync_events_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_find": { + "name": "arma_commands_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_create": { + "name": "arma_commands_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_update": { + "name": "arma_commands_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "arma_commands_delete": { + "name": "arma_commands_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_find": { + "name": "respawn_tickets_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_create": { + "name": "respawn_tickets_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_update": { + "name": "respawn_tickets_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "respawn_tickets_delete": { + "name": "respawn_tickets_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_find": { + "name": "custom_minefields_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_create": { + "name": "custom_minefields_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_update": { + "name": "custom_minefields_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefields_delete": { + "name": "custom_minefields_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_find": { + "name": "custom_minefield_scores_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_create": { + "name": "custom_minefield_scores_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_update": { + "name": "custom_minefield_scores_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_minefield_scores_delete": { + "name": "custom_minefield_scores_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_find": { + "name": "custom_radio_tests_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_create": { + "name": "custom_radio_tests_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_update": { + "name": "custom_radio_tests_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_tests_delete": { + "name": "custom_radio_tests_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_find": { + "name": "custom_radio_test_scores_find", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_create": { + "name": "custom_radio_test_scores_create", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_update": { + "name": "custom_radio_test_scores_update", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "custom_radio_test_scores_delete": { + "name": "custom_radio_test_scores_delete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "enable_a_p_i_key": { + "name": "enable_a_p_i_key", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "api_key": { + "name": "api_key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "api_key_index": { + "name": "api_key_index", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_mcp_api_keys_user_idx": { + "name": "payload_mcp_api_keys_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_mcp_api_keys_updated_at_idx": { + "name": "payload_mcp_api_keys_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_mcp_api_keys_created_at_idx": { + "name": "payload_mcp_api_keys_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_mcp_api_keys_user_id_users_id_fk": { + "name": "payload_mcp_api_keys_user_id_users_id_fk", + "tableFrom": "payload_mcp_api_keys", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_kv": { + "name": "payload_kv", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "payload_kv_key_idx": { + "name": "payload_kv_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents": { + "name": "payload_locked_documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "global_slug": { + "name": "global_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_locked_documents_global_slug_idx": { + "name": "payload_locked_documents_global_slug_idx", + "columns": [ + { + "expression": "global_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_updated_at_idx": { + "name": "payload_locked_documents_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_created_at_idx": { + "name": "payload_locked_documents_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents_rels": { + "name": "payload_locked_documents_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_hard_resources_id": { + "name": "game_hard_resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_structures_id": { + "name": "game_structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_vehicles_id": { + "name": "game_vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_npcs_id": { + "name": "game_npcs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "npc_staffing_id": { + "name": "npc_staffing_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "labor_classifications_id": { + "name": "labor_classifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_event_logs_id": { + "name": "game_event_logs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "roles_id": { + "name": "roles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ranks_id": { + "name": "ranks_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "profiles_id": { + "name": "profiles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "awards_id": { + "name": "awards_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "qualifications_id": { + "name": "qualifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assignment_transfers_id": { + "name": "assignment_transfers_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "experience_id": { + "name": "experience_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "user_notifications_id": { + "name": "user_notifications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "evaluations_id": { + "name": "evaluations_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ribbon_submissions_id": { + "name": "ribbon_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "missions_id": { + "name": "missions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mission_attendances_id": { + "name": "mission_attendances_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "campaigns_id": { + "name": "campaigns_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "factions_id": { + "name": "factions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "technologies_id": { + "name": "technologies_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "assets_id": { + "name": "assets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resources_id": { + "name": "resources_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vehicles_id": { + "name": "vehicles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "structures_id": { + "name": "structures_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shipments_id": { + "name": "shipments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bank_accounts_id": { + "name": "bank_accounts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "bank_transactions_id": { + "name": "bank_transactions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ledger_entries_id": { + "name": "ledger_entries_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "locker_storages_id": { + "name": "locker_storages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "loadouts_id": { + "name": "loadouts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_listings_id": { + "name": "market_listings_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_negotiations_id": { + "name": "market_negotiations_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "market_state_id": { + "name": "market_state_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voice_scripts_id": { + "name": "voice_scripts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "voice_submissions_id": { + "name": "voice_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tickets_id": { + "name": "tickets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "ticket_votes_id": { + "name": "ticket_votes_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_pages_id": { + "name": "wiki_pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_revisions_id": { + "name": "wiki_revisions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "wiki_templates_id": { + "name": "wiki_templates_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "projects_id": { + "name": "projects_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sprints_id": { + "name": "sprints_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "releases_id": { + "name": "releases_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "labels_id": { + "name": "labels_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maps_id": { + "name": "maps_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_roads_id": { + "name": "map_roads_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "map_zones_id": { + "name": "map_zones_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "resource_nodes_id": { + "name": "resource_nodes_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "narrative_events_id": { + "name": "narrative_events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "story_beats_id": { + "name": "story_beats_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "story_beat_states_id": { + "name": "story_beat_states_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mission_files_id": { + "name": "mission_files_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "mod_lists_id": { + "name": "mod_lists_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "game_servers_id": { + "name": "game_servers_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "arma_sync_events_id": { + "name": "arma_sync_events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "arma_commands_id": { + "name": "arma_commands_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "respawn_tickets_id": { + "name": "respawn_tickets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_minefields_id": { + "name": "custom_minefields_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_minefield_scores_id": { + "name": "custom_minefield_scores_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_radio_tests_id": { + "name": "custom_radio_tests_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "custom_radio_test_scores_id": { + "name": "custom_radio_test_scores_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "plugin_ai_instructions_id": { + "name": "plugin_ai_instructions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "payload_mcp_api_keys_id": { + "name": "payload_mcp_api_keys_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_locked_documents_rels_order_idx": { + "name": "payload_locked_documents_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_parent_idx": { + "name": "payload_locked_documents_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_path_idx": { + "name": "payload_locked_documents_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_media_id_idx": { + "name": "payload_locked_documents_rels_media_id_idx", + "columns": [ + { + "expression": "media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_hard_resources_id_idx": { + "name": "payload_locked_documents_rels_game_hard_resources_id_idx", + "columns": [ + { + "expression": "game_hard_resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_structures_id_idx": { + "name": "payload_locked_documents_rels_game_structures_id_idx", + "columns": [ + { + "expression": "game_structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_vehicles_id_idx": { + "name": "payload_locked_documents_rels_game_vehicles_id_idx", + "columns": [ + { + "expression": "game_vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_npcs_id_idx": { + "name": "payload_locked_documents_rels_game_npcs_id_idx", + "columns": [ + { + "expression": "game_npcs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_npc_staffing_id_idx": { + "name": "payload_locked_documents_rels_npc_staffing_id_idx", + "columns": [ + { + "expression": "npc_staffing_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_labor_classifications_id_idx": { + "name": "payload_locked_documents_rels_labor_classifications_id_idx", + "columns": [ + { + "expression": "labor_classifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_event_logs_id_idx": { + "name": "payload_locked_documents_rels_game_event_logs_id_idx", + "columns": [ + { + "expression": "game_event_logs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_users_id_idx": { + "name": "payload_locked_documents_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_roles_id_idx": { + "name": "payload_locked_documents_rels_roles_id_idx", + "columns": [ + { + "expression": "roles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ranks_id_idx": { + "name": "payload_locked_documents_rels_ranks_id_idx", + "columns": [ + { + "expression": "ranks_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_profiles_id_idx": { + "name": "payload_locked_documents_rels_profiles_id_idx", + "columns": [ + { + "expression": "profiles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_awards_id_idx": { + "name": "payload_locked_documents_rels_awards_id_idx", + "columns": [ + { + "expression": "awards_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_qualifications_id_idx": { + "name": "payload_locked_documents_rels_qualifications_id_idx", + "columns": [ + { + "expression": "qualifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assignments_id_idx": { + "name": "payload_locked_documents_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assignment_transfers_id_idx": { + "name": "payload_locked_documents_rels_assignment_transfers_id_idx", + "columns": [ + { + "expression": "assignment_transfers_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_experience_id_idx": { + "name": "payload_locked_documents_rels_experience_id_idx", + "columns": [ + { + "expression": "experience_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_user_notifications_id_idx": { + "name": "payload_locked_documents_rels_user_notifications_id_idx", + "columns": [ + { + "expression": "user_notifications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_evaluations_id_idx": { + "name": "payload_locked_documents_rels_evaluations_id_idx", + "columns": [ + { + "expression": "evaluations_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ribbon_submissions_id_idx": { + "name": "payload_locked_documents_rels_ribbon_submissions_id_idx", + "columns": [ + { + "expression": "ribbon_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_missions_id_idx": { + "name": "payload_locked_documents_rels_missions_id_idx", + "columns": [ + { + "expression": "missions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mission_attendances_id_idx": { + "name": "payload_locked_documents_rels_mission_attendances_id_idx", + "columns": [ + { + "expression": "mission_attendances_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_campaigns_id_idx": { + "name": "payload_locked_documents_rels_campaigns_id_idx", + "columns": [ + { + "expression": "campaigns_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_factions_id_idx": { + "name": "payload_locked_documents_rels_factions_id_idx", + "columns": [ + { + "expression": "factions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_technologies_id_idx": { + "name": "payload_locked_documents_rels_technologies_id_idx", + "columns": [ + { + "expression": "technologies_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_assets_id_idx": { + "name": "payload_locked_documents_rels_assets_id_idx", + "columns": [ + { + "expression": "assets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_resources_id_idx": { + "name": "payload_locked_documents_rels_resources_id_idx", + "columns": [ + { + "expression": "resources_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_vehicles_id_idx": { + "name": "payload_locked_documents_rels_vehicles_id_idx", + "columns": [ + { + "expression": "vehicles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_structures_id_idx": { + "name": "payload_locked_documents_rels_structures_id_idx", + "columns": [ + { + "expression": "structures_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_shipments_id_idx": { + "name": "payload_locked_documents_rels_shipments_id_idx", + "columns": [ + { + "expression": "shipments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_bank_accounts_id_idx": { + "name": "payload_locked_documents_rels_bank_accounts_id_idx", + "columns": [ + { + "expression": "bank_accounts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_bank_transactions_id_idx": { + "name": "payload_locked_documents_rels_bank_transactions_id_idx", + "columns": [ + { + "expression": "bank_transactions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ledger_entries_id_idx": { + "name": "payload_locked_documents_rels_ledger_entries_id_idx", + "columns": [ + { + "expression": "ledger_entries_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_locker_storages_id_idx": { + "name": "payload_locked_documents_rels_locker_storages_id_idx", + "columns": [ + { + "expression": "locker_storages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_loadouts_id_idx": { + "name": "payload_locked_documents_rels_loadouts_id_idx", + "columns": [ + { + "expression": "loadouts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_listings_id_idx": { + "name": "payload_locked_documents_rels_market_listings_id_idx", + "columns": [ + { + "expression": "market_listings_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_negotiations_id_idx": { + "name": "payload_locked_documents_rels_market_negotiations_id_idx", + "columns": [ + { + "expression": "market_negotiations_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_market_state_id_idx": { + "name": "payload_locked_documents_rels_market_state_id_idx", + "columns": [ + { + "expression": "market_state_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_voice_scripts_id_idx": { + "name": "payload_locked_documents_rels_voice_scripts_id_idx", + "columns": [ + { + "expression": "voice_scripts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_voice_submissions_id_idx": { + "name": "payload_locked_documents_rels_voice_submissions_id_idx", + "columns": [ + { + "expression": "voice_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_tickets_id_idx": { + "name": "payload_locked_documents_rels_tickets_id_idx", + "columns": [ + { + "expression": "tickets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_ticket_votes_id_idx": { + "name": "payload_locked_documents_rels_ticket_votes_id_idx", + "columns": [ + { + "expression": "ticket_votes_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_pages_id_idx": { + "name": "payload_locked_documents_rels_wiki_pages_id_idx", + "columns": [ + { + "expression": "wiki_pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_revisions_id_idx": { + "name": "payload_locked_documents_rels_wiki_revisions_id_idx", + "columns": [ + { + "expression": "wiki_revisions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_wiki_templates_id_idx": { + "name": "payload_locked_documents_rels_wiki_templates_id_idx", + "columns": [ + { + "expression": "wiki_templates_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_projects_id_idx": { + "name": "payload_locked_documents_rels_projects_id_idx", + "columns": [ + { + "expression": "projects_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_sprints_id_idx": { + "name": "payload_locked_documents_rels_sprints_id_idx", + "columns": [ + { + "expression": "sprints_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_releases_id_idx": { + "name": "payload_locked_documents_rels_releases_id_idx", + "columns": [ + { + "expression": "releases_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_labels_id_idx": { + "name": "payload_locked_documents_rels_labels_id_idx", + "columns": [ + { + "expression": "labels_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_maps_id_idx": { + "name": "payload_locked_documents_rels_maps_id_idx", + "columns": [ + { + "expression": "maps_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_map_roads_id_idx": { + "name": "payload_locked_documents_rels_map_roads_id_idx", + "columns": [ + { + "expression": "map_roads_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_map_zones_id_idx": { + "name": "payload_locked_documents_rels_map_zones_id_idx", + "columns": [ + { + "expression": "map_zones_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_resource_nodes_id_idx": { + "name": "payload_locked_documents_rels_resource_nodes_id_idx", + "columns": [ + { + "expression": "resource_nodes_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_narrative_events_id_idx": { + "name": "payload_locked_documents_rels_narrative_events_id_idx", + "columns": [ + { + "expression": "narrative_events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_story_beats_id_idx": { + "name": "payload_locked_documents_rels_story_beats_id_idx", + "columns": [ + { + "expression": "story_beats_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_story_beat_states_id_idx": { + "name": "payload_locked_documents_rels_story_beat_states_id_idx", + "columns": [ + { + "expression": "story_beat_states_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mission_files_id_idx": { + "name": "payload_locked_documents_rels_mission_files_id_idx", + "columns": [ + { + "expression": "mission_files_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_mod_lists_id_idx": { + "name": "payload_locked_documents_rels_mod_lists_id_idx", + "columns": [ + { + "expression": "mod_lists_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_game_servers_id_idx": { + "name": "payload_locked_documents_rels_game_servers_id_idx", + "columns": [ + { + "expression": "game_servers_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_arma_sync_events_id_idx": { + "name": "payload_locked_documents_rels_arma_sync_events_id_idx", + "columns": [ + { + "expression": "arma_sync_events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_arma_commands_id_idx": { + "name": "payload_locked_documents_rels_arma_commands_id_idx", + "columns": [ + { + "expression": "arma_commands_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_respawn_tickets_id_idx": { + "name": "payload_locked_documents_rels_respawn_tickets_id_idx", + "columns": [ + { + "expression": "respawn_tickets_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_minefields_id_idx": { + "name": "payload_locked_documents_rels_custom_minefields_id_idx", + "columns": [ + { + "expression": "custom_minefields_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_minefield_scores_id_idx": { + "name": "payload_locked_documents_rels_custom_minefield_scores_id_idx", + "columns": [ + { + "expression": "custom_minefield_scores_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_radio_tests_id_idx": { + "name": "payload_locked_documents_rels_custom_radio_tests_id_idx", + "columns": [ + { + "expression": "custom_radio_tests_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_custom_radio_test_scores_i_idx": { + "name": "payload_locked_documents_rels_custom_radio_test_scores_i_idx", + "columns": [ + { + "expression": "custom_radio_test_scores_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_plugin_ai_instructions_id_idx": { + "name": "payload_locked_documents_rels_plugin_ai_instructions_id_idx", + "columns": [ + { + "expression": "plugin_ai_instructions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_payload_mcp_api_keys_id_idx": { + "name": "payload_locked_documents_rels_payload_mcp_api_keys_id_idx", + "columns": [ + { + "expression": "payload_mcp_api_keys_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_locked_documents_rels_parent_fk": { + "name": "payload_locked_documents_rels_parent_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_locked_documents", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_media_fk": { + "name": "payload_locked_documents_rels_media_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_hard_resources_fk": { + "name": "payload_locked_documents_rels_game_hard_resources_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_hard_resources", + "columnsFrom": [ + "game_hard_resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_structures_fk": { + "name": "payload_locked_documents_rels_game_structures_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_structures", + "columnsFrom": [ + "game_structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_vehicles_fk": { + "name": "payload_locked_documents_rels_game_vehicles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_vehicles", + "columnsFrom": [ + "game_vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_npcs_fk": { + "name": "payload_locked_documents_rels_game_npcs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_npcs", + "columnsFrom": [ + "game_npcs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_npc_staffing_fk": { + "name": "payload_locked_documents_rels_npc_staffing_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "npc_staffing", + "columnsFrom": [ + "npc_staffing_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_labor_classifications_fk": { + "name": "payload_locked_documents_rels_labor_classifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "labor_classifications", + "columnsFrom": [ + "labor_classifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_event_logs_fk": { + "name": "payload_locked_documents_rels_game_event_logs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_event_logs", + "columnsFrom": [ + "game_event_logs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_users_fk": { + "name": "payload_locked_documents_rels_users_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_roles_fk": { + "name": "payload_locked_documents_rels_roles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "roles", + "columnsFrom": [ + "roles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ranks_fk": { + "name": "payload_locked_documents_rels_ranks_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ranks", + "columnsFrom": [ + "ranks_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_profiles_fk": { + "name": "payload_locked_documents_rels_profiles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "profiles", + "columnsFrom": [ + "profiles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_awards_fk": { + "name": "payload_locked_documents_rels_awards_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "awards", + "columnsFrom": [ + "awards_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_qualifications_fk": { + "name": "payload_locked_documents_rels_qualifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "qualifications", + "columnsFrom": [ + "qualifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assignments_fk": { + "name": "payload_locked_documents_rels_assignments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assignment_transfers_fk": { + "name": "payload_locked_documents_rels_assignment_transfers_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assignment_transfers", + "columnsFrom": [ + "assignment_transfers_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_experience_fk": { + "name": "payload_locked_documents_rels_experience_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "experience", + "columnsFrom": [ + "experience_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_user_notifications_fk": { + "name": "payload_locked_documents_rels_user_notifications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "user_notifications", + "columnsFrom": [ + "user_notifications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_evaluations_fk": { + "name": "payload_locked_documents_rels_evaluations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "evaluations", + "columnsFrom": [ + "evaluations_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ribbon_submissions_fk": { + "name": "payload_locked_documents_rels_ribbon_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ribbon_submissions", + "columnsFrom": [ + "ribbon_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_missions_fk": { + "name": "payload_locked_documents_rels_missions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "missions", + "columnsFrom": [ + "missions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mission_attendances_fk": { + "name": "payload_locked_documents_rels_mission_attendances_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mission_attendances", + "columnsFrom": [ + "mission_attendances_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_campaigns_fk": { + "name": "payload_locked_documents_rels_campaigns_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "campaigns", + "columnsFrom": [ + "campaigns_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_factions_fk": { + "name": "payload_locked_documents_rels_factions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "factions", + "columnsFrom": [ + "factions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_technologies_fk": { + "name": "payload_locked_documents_rels_technologies_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "technologies", + "columnsFrom": [ + "technologies_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_assets_fk": { + "name": "payload_locked_documents_rels_assets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "assets", + "columnsFrom": [ + "assets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_resources_fk": { + "name": "payload_locked_documents_rels_resources_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "resources", + "columnsFrom": [ + "resources_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_vehicles_fk": { + "name": "payload_locked_documents_rels_vehicles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "vehicles", + "columnsFrom": [ + "vehicles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_structures_fk": { + "name": "payload_locked_documents_rels_structures_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "structures", + "columnsFrom": [ + "structures_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_shipments_fk": { + "name": "payload_locked_documents_rels_shipments_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "shipments", + "columnsFrom": [ + "shipments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_bank_accounts_fk": { + "name": "payload_locked_documents_rels_bank_accounts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "bank_accounts", + "columnsFrom": [ + "bank_accounts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_bank_transactions_fk": { + "name": "payload_locked_documents_rels_bank_transactions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "bank_transactions", + "columnsFrom": [ + "bank_transactions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ledger_entries_fk": { + "name": "payload_locked_documents_rels_ledger_entries_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ledger_entries", + "columnsFrom": [ + "ledger_entries_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_locker_storages_fk": { + "name": "payload_locked_documents_rels_locker_storages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "locker_storages", + "columnsFrom": [ + "locker_storages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_loadouts_fk": { + "name": "payload_locked_documents_rels_loadouts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "loadouts", + "columnsFrom": [ + "loadouts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_listings_fk": { + "name": "payload_locked_documents_rels_market_listings_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_listings", + "columnsFrom": [ + "market_listings_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_negotiations_fk": { + "name": "payload_locked_documents_rels_market_negotiations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_negotiations", + "columnsFrom": [ + "market_negotiations_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_market_state_fk": { + "name": "payload_locked_documents_rels_market_state_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "market_state", + "columnsFrom": [ + "market_state_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_voice_scripts_fk": { + "name": "payload_locked_documents_rels_voice_scripts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "voice_scripts", + "columnsFrom": [ + "voice_scripts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_voice_submissions_fk": { + "name": "payload_locked_documents_rels_voice_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "voice_submissions", + "columnsFrom": [ + "voice_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_tickets_fk": { + "name": "payload_locked_documents_rels_tickets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "tickets", + "columnsFrom": [ + "tickets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_ticket_votes_fk": { + "name": "payload_locked_documents_rels_ticket_votes_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "ticket_votes", + "columnsFrom": [ + "ticket_votes_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_pages_fk": { + "name": "payload_locked_documents_rels_wiki_pages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_pages", + "columnsFrom": [ + "wiki_pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_revisions_fk": { + "name": "payload_locked_documents_rels_wiki_revisions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_revisions", + "columnsFrom": [ + "wiki_revisions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_wiki_templates_fk": { + "name": "payload_locked_documents_rels_wiki_templates_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "wiki_templates", + "columnsFrom": [ + "wiki_templates_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_projects_fk": { + "name": "payload_locked_documents_rels_projects_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "projects", + "columnsFrom": [ + "projects_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_sprints_fk": { + "name": "payload_locked_documents_rels_sprints_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "sprints", + "columnsFrom": [ + "sprints_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_releases_fk": { + "name": "payload_locked_documents_rels_releases_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "releases", + "columnsFrom": [ + "releases_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_labels_fk": { + "name": "payload_locked_documents_rels_labels_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "labels", + "columnsFrom": [ + "labels_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_maps_fk": { + "name": "payload_locked_documents_rels_maps_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "maps", + "columnsFrom": [ + "maps_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_map_roads_fk": { + "name": "payload_locked_documents_rels_map_roads_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "map_roads", + "columnsFrom": [ + "map_roads_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_map_zones_fk": { + "name": "payload_locked_documents_rels_map_zones_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "map_zones", + "columnsFrom": [ + "map_zones_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_resource_nodes_fk": { + "name": "payload_locked_documents_rels_resource_nodes_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "resource_nodes", + "columnsFrom": [ + "resource_nodes_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_narrative_events_fk": { + "name": "payload_locked_documents_rels_narrative_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "narrative_events", + "columnsFrom": [ + "narrative_events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_story_beats_fk": { + "name": "payload_locked_documents_rels_story_beats_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "story_beats", + "columnsFrom": [ + "story_beats_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_story_beat_states_fk": { + "name": "payload_locked_documents_rels_story_beat_states_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "story_beat_states", + "columnsFrom": [ + "story_beat_states_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mission_files_fk": { + "name": "payload_locked_documents_rels_mission_files_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mission_files", + "columnsFrom": [ + "mission_files_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_mod_lists_fk": { + "name": "payload_locked_documents_rels_mod_lists_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "mod_lists", + "columnsFrom": [ + "mod_lists_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_game_servers_fk": { + "name": "payload_locked_documents_rels_game_servers_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "game_servers", + "columnsFrom": [ + "game_servers_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_arma_sync_events_fk": { + "name": "payload_locked_documents_rels_arma_sync_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "arma_sync_events", + "columnsFrom": [ + "arma_sync_events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_arma_commands_fk": { + "name": "payload_locked_documents_rels_arma_commands_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "arma_commands", + "columnsFrom": [ + "arma_commands_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_respawn_tickets_fk": { + "name": "payload_locked_documents_rels_respawn_tickets_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "respawn_tickets", + "columnsFrom": [ + "respawn_tickets_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_minefields_fk": { + "name": "payload_locked_documents_rels_custom_minefields_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_minefields", + "columnsFrom": [ + "custom_minefields_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_minefield_scores_fk": { + "name": "payload_locked_documents_rels_custom_minefield_scores_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_minefield_scores", + "columnsFrom": [ + "custom_minefield_scores_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_radio_tests_fk": { + "name": "payload_locked_documents_rels_custom_radio_tests_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_radio_tests", + "columnsFrom": [ + "custom_radio_tests_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_custom_radio_test_scores_fk": { + "name": "payload_locked_documents_rels_custom_radio_test_scores_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "custom_radio_test_scores", + "columnsFrom": [ + "custom_radio_test_scores_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_plugin_ai_instructions_fk": { + "name": "payload_locked_documents_rels_plugin_ai_instructions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "plugin_ai_instructions", + "columnsFrom": [ + "plugin_ai_instructions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_payload_mcp_api_keys_fk": { + "name": "payload_locked_documents_rels_payload_mcp_api_keys_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_mcp_api_keys", + "columnsFrom": [ + "payload_mcp_api_keys_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences": { + "name": "payload_preferences", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "value": { + "name": "value", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_preferences_key_idx": { + "name": "payload_preferences_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_updated_at_idx": { + "name": "payload_preferences_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_created_at_idx": { + "name": "payload_preferences_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences_rels": { + "name": "payload_preferences_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "payload_mcp_api_keys_id": { + "name": "payload_mcp_api_keys_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_preferences_rels_order_idx": { + "name": "payload_preferences_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_parent_idx": { + "name": "payload_preferences_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_path_idx": { + "name": "payload_preferences_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_users_id_idx": { + "name": "payload_preferences_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_payload_mcp_api_keys_id_idx": { + "name": "payload_preferences_rels_payload_mcp_api_keys_id_idx", + "columns": [ + { + "expression": "payload_mcp_api_keys_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_preferences_rels_parent_fk": { + "name": "payload_preferences_rels_parent_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_preferences", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_users_fk": { + "name": "payload_preferences_rels_users_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_payload_mcp_api_keys_fk": { + "name": "payload_preferences_rels_payload_mcp_api_keys_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_mcp_api_keys", + "columnsFrom": [ + "payload_mcp_api_keys_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_migrations": { + "name": "payload_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "batch": { + "name": "batch", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_migrations_updated_at_idx": { + "name": "payload_migrations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_migrations_created_at_idx": { + "name": "payload_migrations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_rules": { + "name": "game_rules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "main_currency_id": { + "name": "main_currency_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "currency_name": { + "name": "currency_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_symbol": { + "name": "currency_symbol", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_singular": { + "name": "currency_singular", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_plural": { + "name": "currency_plural", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "currency_denomination": { + "name": "currency_denomination", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "proximity_threshold": { + "name": "proximity_threshold", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 1000 + }, + "game_tick_interval_minutes": { + "name": "game_tick_interval_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "locker_grid_width": { + "name": "locker_grid_width", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "locker_grid_height": { + "name": "locker_grid_height", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 6 + }, + "staff_hiring_enabled": { + "name": "staff_hiring_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "staff_hiring_disabled_message": { + "name": "staff_hiring_disabled_message", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "economy_enabled": { + "name": "economy_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "economy_default_price_band": { + "name": "economy_default_price_band", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.5 + }, + "economy_real_demand_window_ticks": { + "name": "economy_real_demand_window_ticks", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 24 + }, + "economy_real_demand_decay": { + "name": "economy_real_demand_decay", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.5 + }, + "economy_artificial_demand_drift": { + "name": "economy_artificial_demand_drift", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0.05 + }, + "economy_cold_start_observations": { + "name": "economy_cold_start_observations", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 5 + }, + "economy_tick_interval_hint_minutes": { + "name": "economy_tick_interval_hint_minutes", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 60 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_rules_main_currency_idx": { + "name": "game_rules_main_currency_idx", + "columns": [ + { + "expression": "main_currency_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_rules_main_currency_id_resources_id_fk": { + "name": "game_rules_main_currency_id_resources_id_fk", + "tableFrom": "game_rules", + "tableTo": "resources", + "columnsFrom": [ + "main_currency_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.game_rules_rels": { + "name": "game_rules_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "assignments_id": { + "name": "assignments_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "game_rules_rels_order_idx": { + "name": "game_rules_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_parent_idx": { + "name": "game_rules_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_path_idx": { + "name": "game_rules_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "game_rules_rels_assignments_id_idx": { + "name": "game_rules_rels_assignments_id_idx", + "columns": [ + { + "expression": "assignments_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "game_rules_rels_parent_fk": { + "name": "game_rules_rels_parent_fk", + "tableFrom": "game_rules_rels", + "tableTo": "game_rules", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "game_rules_rels_assignments_fk": { + "name": "game_rules_rels_assignments_fk", + "tableFrom": "game_rules_rels", + "tableTo": "assignments", + "columnsFrom": [ + "assignments_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_shims_targeting_roles": { + "name": "shims_shims_targeting_roles", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_shims_shims_targeting_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "shims_shims_targeting_roles_order_idx": { + "name": "shims_shims_targeting_roles_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_targeting_roles_parent_idx": { + "name": "shims_shims_targeting_roles_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_shims_targeting_roles_parent_fk": { + "name": "shims_shims_targeting_roles_parent_fk", + "tableFrom": "shims_shims_targeting_roles", + "tableTo": "shims_shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_shims": { + "name": "shims_shims", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "type": { + "name": "type", + "type": "enum_shims_shims_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'css'" + }, + "content": { + "name": "content", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "targeting_audience": { + "name": "targeting_audience", + "type": "enum_shims_shims_targeting_audience", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'all'" + }, + "targeting_percentage": { + "name": "targeting_percentage", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 50 + }, + "paths_match_type": { + "name": "paths_match_type", + "type": "enum_shims_shims_paths_match_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'all'" + } + }, + "indexes": { + "shims_shims_order_idx": { + "name": "shims_shims_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_parent_id_idx": { + "name": "shims_shims_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_shims_name_idx": { + "name": "shims_shims_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_shims_parent_id_fk": { + "name": "shims_shims_parent_id_fk", + "tableFrom": "shims_shims", + "tableTo": "shims", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims": { + "name": "shims", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_texts": { + "name": "shims_texts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shims_texts_order_parent": { + "name": "shims_texts_order_parent", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_texts_parent_fk": { + "name": "shims_texts_parent_fk", + "tableFrom": "shims_texts", + "tableTo": "shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shims_rels": { + "name": "shims_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "shims_rels_order_idx": { + "name": "shims_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_parent_idx": { + "name": "shims_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_path_idx": { + "name": "shims_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "shims_rels_users_id_idx": { + "name": "shims_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shims_rels_parent_fk": { + "name": "shims_rels_parent_fk", + "tableFrom": "shims_rels", + "tableTo": "shims", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shims_rels_users_fk": { + "name": "shims_rels_users_fk", + "tableFrom": "shims_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.enum_game_structures_staff_positions_position_type": { + "name": "enum_game_structures_staff_positions_position_type", + "schema": "public", + "values": [ + "administrative", + "technical", + "other" + ] + }, + "public.enum_game_structures_construction_status": { + "name": "enum_game_structures_construction_status", + "schema": "public", + "values": [ + "awaiting_materials", + "building", + "complete" + ] + }, + "public.enum_game_vehicles_status": { + "name": "enum_game_vehicles_status", + "schema": "public", + "values": [ + "idle", + "assigned", + "in_transit", + "damaged", + "destroyed" + ] + }, + "public.enum_npc_staffing_position_type": { + "name": "enum_npc_staffing_position_type", + "schema": "public", + "values": [ + "labor", + "administrative", + "technical", + "other" + ] + }, + "public.enum_npc_staffing_status": { + "name": "enum_npc_staffing_status", + "schema": "public", + "values": [ + "active", + "terminated" + ] + }, + "public.enum_game_event_logs_target_collection": { + "name": "enum_game_event_logs_target_collection", + "schema": "public", + "values": [ + "game-structures", + "game-vehicles", + "game-npcs", + "npc-staffing", + "structures", + "resources", + "assets", + "vehicles", + "factions", + "missions", + "campaigns", + "users", + "technologies", + "maps", + "shipments", + "bank-accounts", + "bank-transactions", + "ledger-entries", + "locker-storages", + "loadouts", + "market-listings", + "market-negotiations", + "market-state", + "evaluations", + "tickets", + "wiki-pages", + "wiki-revisions", + "wiki-templates", + "game-servers", + "assignment-transfers", + "voice-scripts", + "voice-submissions", + "story-beats", + "story-beat-states", + "custom-minefields", + "custom-minefield-scores", + "custom-radio-tests", + "custom-radio-test-scores", + "ribbon-submissions" + ] + }, + "public.enum_users_roles": { + "name": "enum_users_roles", + "schema": "public", + "values": [ + "guest", + "user", + "trusted", + "admin", + "developer" + ] + }, + "public.enum_users_preferences_notifications_muted_types": { + "name": "enum_users_preferences_notifications_muted_types", + "schema": "public", + "values": [ + "market:offer", + "market:counter", + "market:accept", + "market:reject", + "market:withdrawn", + "market:closed", + "market:sold", + "market:expired", + "award:granted", + "account:discord-request", + "finance:deposit", + "finance:withdraw", + "finance:transfer", + "shipment:completed", + "ticket:created", + "ticket:assigned", + "ticket:reply", + "ticket:status", + "poker:force-ended", + "poker:everyone-left", + "blackjack:force-ended", + "blackjack:everyone-left" + ] + }, + "public.enum_users_preferences_discord_muted_types": { + "name": "enum_users_preferences_discord_muted_types", + "schema": "public", + "values": [ + "market:offer", + "market:counter", + "market:accept", + "market:reject", + "market:withdrawn", + "market:closed", + "market:sold", + "market:expired", + "award:granted", + "account:discord-request", + "finance:deposit", + "finance:withdraw", + "finance:transfer", + "shipment:completed", + "ticket:created", + "ticket:assigned", + "ticket:reply", + "ticket:status", + "poker:force-ended", + "poker:everyone-left", + "blackjack:force-ended", + "blackjack:everyone-left" + ] + }, + "public.enum_users_preferences_display_lead_or_actual": { + "name": "enum_users_preferences_display_lead_or_actual", + "schema": "public", + "values": [ + "lead", + "actual" + ] + }, + "public.enum_roles_permissions": { + "name": "enum_roles_permissions", + "schema": "public", + "values": [ + "system:admin-access", + "media:create", + "media:read", + "media:update", + "media:delete", + "admin:media:manage", + "users:create", + "users:read", + "users:update", + "users:delete", + "users:unlock", + "users:assign-roles", + "admin:users:manage", + "roles:create", + "roles:read", + "roles:update", + "roles:delete", + "admin:roles:manage", + "ranks:create", + "ranks:read", + "ranks:update", + "ranks:delete", + "admin:ranks:manage", + "profiles:create", + "profiles:read", + "profiles:update", + "profiles:delete", + "admin:profiles:manage", + "awards:create", + "awards:read", + "awards:update", + "awards:delete", + "admin:awards:manage", + "qualifications:create", + "qualifications:read", + "qualifications:update", + "qualifications:delete", + "admin:qualifications:manage", + "assignments:create", + "assignments:read", + "assignments:update", + "assignments:delete", + "admin:assignments:manage", + "assignment-transfers:create", + "assignment-transfers:read", + "assignment-transfers:update", + "assignment-transfers:delete", + "admin:assignment-transfers:manage", + "experience:create", + "experience:read", + "experience:update", + "experience:delete", + "admin:experience:manage", + "user-notifications:create", + "user-notifications:read", + "user-notifications:update", + "user-notifications:delete", + "admin:user-notifications:manage", + "evaluations:create", + "evaluations:read", + "evaluations:update", + "evaluations:delete", + "admin:evaluations:manage", + "missions:create", + "missions:read", + "missions:update", + "missions:delete", + "missions:read-sensitive", + "admin:missions:manage", + "mission-attendances:create", + "mission-attendances:read", + "mission-attendances:update", + "mission-attendances:delete", + "admin:mission-attendances:manage", + "campaigns:create", + "campaigns:read", + "campaigns:update", + "campaigns:delete", + "admin:campaigns:manage", + "campaigns:manage", + "factions:create", + "factions:read", + "factions:update", + "factions:delete", + "admin:factions:manage", + "technologies:create", + "technologies:read", + "technologies:update", + "technologies:delete", + "admin:technologies:manage", + "assets:create", + "assets:read", + "assets:update", + "assets:delete", + "admin:assets:manage", + "resources:create", + "resources:read", + "resources:update", + "resources:delete", + "admin:resources:manage", + "vehicles:create", + "vehicles:read", + "vehicles:update", + "vehicles:delete", + "admin:vehicles:manage", + "structures:create", + "structures:read", + "structures:update", + "structures:delete", + "admin:structures:manage", + "shipments:create", + "shipments:read", + "shipments:update", + "shipments:delete", + "admin:shipments:manage", + "bank-accounts:create", + "bank-accounts:read", + "bank-accounts:update", + "bank-accounts:delete", + "admin:bank-accounts:manage", + "bank-transactions:create", + "bank-transactions:read", + "bank-transactions:update", + "bank-transactions:delete", + "admin:bank-transactions:manage", + "ledger-entries:create", + "ledger-entries:read", + "ledger-entries:update", + "ledger-entries:delete", + "admin:ledger-entries:manage", + "locker-storages:create", + "locker-storages:read", + "locker-storages:update", + "locker-storages:delete", + "admin:locker-storages:manage", + "loadouts:create", + "loadouts:read", + "loadouts:update", + "loadouts:delete", + "admin:loadouts:manage", + "market-listings:create", + "market-listings:read", + "market-listings:update", + "market-listings:delete", + "admin:market-listings:manage", + "market-negotiations:create", + "market-negotiations:read", + "market-negotiations:update", + "market-negotiations:delete", + "admin:market-negotiations:manage", + "market-state:create", + "market-state:read", + "market-state:update", + "market-state:delete", + "admin:market-state:manage", + "projects:create", + "projects:read", + "projects:update", + "projects:delete", + "admin:projects:manage", + "labels:create", + "labels:read", + "labels:update", + "labels:delete", + "admin:labels:manage", + "sprints:create", + "sprints:read", + "sprints:update", + "sprints:delete", + "admin:sprints:manage", + "releases:create", + "releases:read", + "releases:update", + "releases:delete", + "admin:releases:manage", + "tickets:create", + "tickets:read", + "tickets:update", + "tickets:delete", + "admin:tickets:manage", + "ticket-votes:create", + "ticket-votes:read", + "ticket-votes:update", + "ticket-votes:delete", + "admin:ticket-votes:manage", + "game-structures:create", + "game-structures:read", + "game-structures:update", + "game-structures:delete", + "admin:game-structures:manage", + "game-vehicles:create", + "game-vehicles:read", + "game-vehicles:update", + "game-vehicles:delete", + "admin:game-vehicles:manage", + "game-npcs:create", + "game-npcs:read", + "game-npcs:update", + "game-npcs:delete", + "admin:game-npcs:manage", + "game-hard-resources:create", + "game-hard-resources:read", + "game-hard-resources:update", + "game-hard-resources:delete", + "admin:game-hard-resources:manage", + "game-event-logs:create", + "game-event-logs:read", + "game-event-logs:update", + "game-event-logs:delete", + "admin:game-event-logs:manage", + "maps:create", + "maps:read", + "maps:update", + "maps:delete", + "admin:maps:manage", + "map-roads:read", + "admin:map-roads:manage", + "map-zones:read", + "admin:map-zones:manage", + "resource-nodes:read", + "admin:resource-nodes:manage", + "narrative-events:create", + "narrative-events:read", + "narrative-events:update", + "narrative-events:delete", + "admin:narrative-events:manage", + "mission-files:create", + "mission-files:read", + "mission-files:update", + "mission-files:delete", + "admin:mission-files:manage", + "mod-lists:create", + "mod-lists:read", + "mod-lists:update", + "mod-lists:delete", + "admin:mod-lists:manage", + "game-servers:create", + "game-servers:read", + "game-servers:update", + "game-servers:delete", + "admin:game-servers:manage", + "arma-sync-events:create", + "arma-sync-events:read", + "arma-sync-events:update", + "arma-sync-events:delete", + "admin:arma-sync-events:manage", + "arma-commands:create", + "arma-commands:read", + "arma-commands:update", + "arma-commands:delete", + "admin:arma-commands:manage", + "game-rules:read", + "game-rules:update", + "shims:read", + "shims:update", + "logistics:manage", + "intelligence:manage", + "profiles:intel_excerpt:update", + "banking:manage", + "tickets:staff", + "discord:staff", + "discord:announce", + "custom-minefields:update", + "custom-minefields:delete", + "custom-minefield-scores:delete", + "custom-radio-tests:update", + "custom-radio-tests:delete", + "custom-radio-test-scores:delete" + ] + }, + "public.enum_awards_grant_config_allowed_grantor_assignment_types": { + "name": "enum_awards_grant_config_allowed_grantor_assignment_types", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_awards_type": { + "name": "enum_awards_type", + "schema": "public", + "values": [ + "commendation", + "ribbon", + "medal" + ] + }, + "public.enum_awards_grant_config_recipient_scope": { + "name": "enum_awards_grant_config_recipient_scope", + "schema": "public", + "values": [ + "same_command", + "whitelist", + "anyone" + ] + }, + "public.enum_assignments_type": { + "name": "enum_assignments_type", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_assignment_transfers_status": { + "name": "enum_assignment_transfers_status", + "schema": "public", + "values": [ + "pending", + "rejected", + "awaiting_superuser", + "completed", + "cancelled", + "denied" + ] + }, + "public.enum_assignment_transfers_escalation_reason": { + "name": "enum_assignment_transfers_escalation_reason", + "schema": "public", + "values": [ + "no_leaders", + "appeal", + "leader_changed" + ] + }, + "public.enum_assignment_transfers_from_leader_decision": { + "name": "enum_assignment_transfers_from_leader_decision", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected", + "not_required" + ] + }, + "public.enum_assignment_transfers_to_leader_decision": { + "name": "enum_assignment_transfers_to_leader_decision", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected", + "not_required" + ] + }, + "public.enum_evaluations_kind": { + "name": "enum_evaluations_kind", + "schema": "public", + "values": [ + "leader-direct", + "leader-indirect", + "subordinate" + ] + }, + "public.enum_evaluations_level": { + "name": "enum_evaluations_level", + "schema": "public", + "values": [ + "exceptional", + "excellent", + "proficient", + "adequate", + "moderate", + "under-review" + ] + }, + "public.enum_ribbon_submissions_grantor_types": { + "name": "enum_ribbon_submissions_grantor_types", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "public.enum_ribbon_submissions_status": { + "name": "enum_ribbon_submissions_status", + "schema": "public", + "values": [ + "pending", + "approved", + "rejected" + ] + }, + "public.enum_ribbon_submissions_recipient_scope": { + "name": "enum_ribbon_submissions_recipient_scope", + "schema": "public", + "values": [ + "same_command", + "whitelist", + "anyone" + ] + }, + "public.enum_missions_factions_involved_threat_level": { + "name": "enum_missions_factions_involved_threat_level", + "schema": "public", + "values": [ + "ally", + "friendly", + "neutral", + "hostile" + ] + }, + "public.enum_missions_logistics_and_support_insertion": { + "name": "enum_missions_logistics_and_support_insertion", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_logistics_and_support_extraction": { + "name": "enum_missions_logistics_and_support_extraction", + "schema": "public", + "values": [ + "helicopter", + "aircraft", + "paradrop", + "boat", + "car", + "onFoot" + ] + }, + "public.enum_missions_operation_type": { + "name": "enum_missions_operation_type", + "schema": "public", + "values": [ + "main", + "side", + "external" + ] + }, + "public.enum_missions_classification_mission_type": { + "name": "enum_missions_classification_mission_type", + "schema": "public", + "values": [ + "Zeus", + "PvE", + "PvP", + "PvPvE", + "Training", + "Special" + ] + }, + "public.enum_missions_ownership_and_status_status": { + "name": "enum_missions_ownership_and_status_status", + "schema": "public", + "values": [ + "Concept", + "Planning", + "Ready", + "Scheduled", + "Active", + "Completed", + "Cancelled" + ] + }, + "public.enum_missions_ownership_and_status_visibility": { + "name": "enum_missions_ownership_and_status_visibility", + "schema": "public", + "values": [ + "unit", + "leadership", + "intel", + "private" + ] + }, + "public.enum_missions_civilian_presence": { + "name": "enum_missions_civilian_presence", + "schema": "public", + "values": [ + "None", + "Low", + "Medium", + "High" + ] + }, + "public.enum_mission_attendances_response": { + "name": "enum_mission_attendances_response", + "schema": "public", + "values": [ + "yes", + "no", + "tentative" + ] + }, + "public.enum_campaigns_status": { + "name": "enum_campaigns_status", + "schema": "public", + "values": [ + "concept", + "inProgress", + "completed" + ] + }, + "public.enum_campaigns_campaign_mode": { + "name": "enum_campaigns_campaign_mode", + "schema": "public", + "values": [ + "official", + "custom" + ] + }, + "public.enum_factions_type": { + "name": "enum_factions_type", + "schema": "public", + "values": [ + "playerFaction", + "majorFaction", + "minorFaction", + "corporation", + "special" + ] + }, + "public.enum_technologies_approval_status": { + "name": "enum_technologies_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_technologies_type": { + "name": "enum_technologies_type", + "schema": "public", + "values": [ + "asset", + "upgrade" + ] + }, + "public.enum_assets_skin_configuration_applies_to_asset_types": { + "name": "enum_assets_skin_configuration_applies_to_asset_types", + "schema": "public", + "values": [ + "weapon", + "uniform", + "vest", + "backpack", + "helmet" + ] + }, + "public.enum_assets_approval_status": { + "name": "enum_assets_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_assets_asset_type": { + "name": "enum_assets_asset_type", + "schema": "public", + "values": [ + "weapon", + "magazine", + "optic", + "muzzle", + "bipod", + "uniform", + "vest", + "backpack", + "helmet", + "facewear", + "nvg", + "radio", + "medical", + "tool", + "explosive", + "skin", + "miscellaneous" + ] + }, + "public.enum_assets_weapon_configuration_slot_type": { + "name": "enum_assets_weapon_configuration_slot_type", + "schema": "public", + "values": [ + "primary", + "secondary", + "launcher" + ] + }, + "public.enum_assets_nightvision_configuration_nvg_generation": { + "name": "enum_assets_nightvision_configuration_nvg_generation", + "schema": "public", + "values": [ + "gen1", + "gen2", + "gen3" + ] + }, + "public.enum_assets_market_trading_rarity": { + "name": "enum_assets_market_trading_rarity", + "schema": "public", + "values": [ + "basic", + "common", + "uncommon", + "rare", + "veryRare", + "epic", + "legendary", + "unique" + ] + }, + "public.enum_resources_approval_status": { + "name": "enum_resources_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_resources_type": { + "name": "enum_resources_type", + "schema": "public", + "values": [ + "physical", + "fluid", + "energy", + "abstract" + ] + }, + "public.enum_resources_rarity": { + "name": "enum_resources_rarity", + "schema": "public", + "values": [ + "common", + "uncommon", + "rare", + "epic", + "legendary", + "exotic", + "unique" + ] + }, + "public.enum_vehicles_category": { + "name": "enum_vehicles_category", + "schema": "public", + "values": [ + "civilian", + "utility", + "transport", + "weaponized", + "military" + ] + }, + "public.enum_vehicles_pylons_pylon_type": { + "name": "enum_vehicles_pylons_pylon_type", + "schema": "public", + "values": [ + "mountedWeapon", + "pylon" + ] + }, + "public.enum_vehicles_approval_status": { + "name": "enum_vehicles_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_vehicles_transport_mode": { + "name": "enum_vehicles_transport_mode", + "schema": "public", + "values": [ + "ground", + "air", + "sea" + ] + }, + "public.enum_vehicles_armor_rating": { + "name": "enum_vehicles_armor_rating", + "schema": "public", + "values": [ + "none", + "light", + "medium", + "heavy", + "composite" + ] + }, + "public.enum_structures_staff_positions_position_type": { + "name": "enum_structures_staff_positions_position_type", + "schema": "public", + "values": [ + "administrative", + "technical", + "other" + ] + }, + "public.enum_structures_module_options_effects_type": { + "name": "enum_structures_module_options_effects_type", + "schema": "public", + "values": [ + "capacity_mass", + "production_multiplier", + "storage_slots" + ] + }, + "public.enum_structures_module_options_category": { + "name": "enum_structures_module_options_category", + "schema": "public", + "values": [ + "production", + "logistics", + "defense", + "utility" + ] + }, + "public.enum_structures_approval_status": { + "name": "enum_structures_approval_status", + "schema": "public", + "values": [ + "in_progress", + "ready_for_review", + "approved", + "rejected", + "revision_requested" + ] + }, + "public.enum_structures_category": { + "name": "enum_structures_category", + "schema": "public", + "values": [ + "logistics", + "military", + "civilian" + ] + }, + "public.enum_structures_terrain_type": { + "name": "enum_structures_terrain_type", + "schema": "public", + "values": [ + "land", + "water" + ] + }, + "public.enum_structures_aura_effect_type": { + "name": "enum_structures_aura_effect_type", + "schema": "public", + "values": [ + "production_multiplier", + "capacity_mass" + ] + }, + "public.enum_structures_function_type": { + "name": "enum_structures_function_type", + "schema": "public", + "values": [ + "producer", + "storage", + "sensor", + "converter", + "defense", + "miscellaneous" + ] + }, + "public.enum_shipments_status": { + "name": "enum_shipments_status", + "schema": "public", + "values": [ + "pending", + "dispatched", + "in_transit", + "arrived", + "completed", + "cancelled", + "failed", + "stranded" + ] + }, + "public.enum_bank_accounts_account_type": { + "name": "enum_bank_accounts_account_type", + "schema": "public", + "values": [ + "treasury", + "faction", + "personal" + ] + }, + "public.enum_bank_accounts_status": { + "name": "enum_bank_accounts_status", + "schema": "public", + "values": [ + "open", + "frozen", + "closed" + ] + }, + "public.enum_bank_transactions_type": { + "name": "enum_bank_transactions_type", + "schema": "public", + "values": [ + "deposit", + "withdrawal", + "transfer", + "payment", + "fee", + "salary", + "adjustment" + ] + }, + "public.enum_bank_transactions_status": { + "name": "enum_bank_transactions_status", + "schema": "public", + "values": [ + "completed", + "reversed" + ] + }, + "public.enum_ledger_entries_type": { + "name": "enum_ledger_entries_type", + "schema": "public", + "values": [ + "deposit", + "withdrawal", + "transfer", + "payment", + "fee", + "salary", + "adjustment" + ] + }, + "public.enum_market_listings_status": { + "name": "enum_market_listings_status", + "schema": "public", + "values": [ + "active", + "sold", + "cancelled", + "expired" + ] + }, + "public.enum_market_negotiations_history_from": { + "name": "enum_market_negotiations_history_from", + "schema": "public", + "values": [ + "buyer", + "seller" + ] + }, + "public.enum_market_negotiations_status": { + "name": "enum_market_negotiations_status", + "schema": "public", + "values": [ + "open", + "accepted", + "rejected", + "closed", + "cancelled", + "expired" + ] + }, + "public.enum_market_negotiations_proposed_by": { + "name": "enum_market_negotiations_proposed_by", + "schema": "public", + "values": [ + "buyer", + "seller" + ] + }, + "public.enum_market_state_item_type": { + "name": "enum_market_state_item_type", + "schema": "public", + "values": [ + "resource", + "asset" + ] + }, + "public.enum_voice_scripts_status": { + "name": "enum_voice_scripts_status", + "schema": "public", + "values": [ + "draft", + "open", + "closed" + ] + }, + "public.enum_voice_submissions_status": { + "name": "enum_voice_submissions_status", + "schema": "public", + "values": [ + "pending", + "accepted", + "rejected" + ] + }, + "public.enum_tickets_activity_type": { + "name": "enum_tickets_activity_type", + "schema": "public", + "values": [ + "system", + "agent_message", + "client_message" + ] + }, + "public.enum_tickets_category": { + "name": "enum_tickets_category", + "schema": "public", + "values": [ + "bug_report", + "feature_request", + "support_request", + "other" + ] + }, + "public.enum_tickets_priority": { + "name": "enum_tickets_priority", + "schema": "public", + "values": [ + "low", + "medium", + "high", + "critical" + ] + }, + "public.enum_tickets_status": { + "name": "enum_tickets_status", + "schema": "public", + "values": [ + "open", + "in_review", + "planning", + "in_progress", + "waiting_on_reporter", + "in_testing", + "resolved", + "canceled", + "closed" + ] + }, + "public.enum_tickets_type": { + "name": "enum_tickets_type", + "schema": "public", + "values": [ + "task", + "bug", + "story", + "epic", + "improvement" + ] + }, + "public.enum_tickets_resolution": { + "name": "enum_tickets_resolution", + "schema": "public", + "values": [ + "fixed", + "wontfix", + "duplicate", + "invalid" + ] + }, + "public.enum_wiki_pages_category": { + "name": "enum_wiki_pages_category", + "schema": "public", + "values": [ + "Campaign", + "World", + "Lore", + "Characters", + "Plot", + "Media", + "Guides", + "Meta" + ] + }, + "public.enum_wiki_revisions_type": { + "name": "enum_wiki_revisions_type", + "schema": "public", + "values": [ + "create", + "edit", + "restore" + ] + }, + "public.enum_projects_status": { + "name": "enum_projects_status", + "schema": "public", + "values": [ + "active", + "archived" + ] + }, + "public.enum_sprints_status": { + "name": "enum_sprints_status", + "schema": "public", + "values": [ + "planning", + "active", + "completed" + ] + }, + "public.enum_releases_status": { + "name": "enum_releases_status", + "schema": "public", + "values": [ + "draft", + "in_progress", + "released" + ] + }, + "public.enum_maps_basemap_mode": { + "name": "enum_maps_basemap_mode", + "schema": "public", + "values": [ + "image", + "tiles" + ] + }, + "public.enum_map_roads_surface": { + "name": "enum_map_roads_surface", + "schema": "public", + "values": [ + "paved", + "dirt", + "trail" + ] + }, + "public.enum_map_roads_stroke_style": { + "name": "enum_map_roads_stroke_style", + "schema": "public", + "values": [ + "solid", + "dashed", + "dotted" + ] + }, + "public.enum_map_zones_type": { + "name": "enum_map_zones_type", + "schema": "public", + "values": [ + "water", + "land", + "territory", + "border", + "other" + ] + }, + "public.enum_narrative_events_triggers_type": { + "name": "enum_narrative_events_triggers_type", + "schema": "public", + "values": [ + "manual", + "mission_complete", + "timer", + "condition" + ] + }, + "public.enum_story_beats_status": { + "name": "enum_story_beats_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum_story_beat_states_reaction": { + "name": "enum_story_beat_states_reaction", + "schema": "public", + "values": [ + "like", + "heart", + "salute" + ] + }, + "public.enum_game_servers_status": { + "name": "enum_game_servers_status", + "schema": "public", + "values": [ + "online", + "offline" + ] + }, + "public.enum_arma_commands_status": { + "name": "enum_arma_commands_status", + "schema": "public", + "values": [ + "queued", + "delivered", + "succeeded", + "failed" + ] + }, + "public.enum_custom_radio_tests_order": { + "name": "enum_custom_radio_tests_order", + "schema": "public", + "values": [ + "fixed", + "shuffled" + ] + }, + "public.enum_custom_radio_test_scores_mode": { + "name": "enum_custom_radio_test_scores_mode", + "schema": "public", + "values": [ + "sprint", + "watch" + ] + }, + "public.enum_plugin_ai_instructions_field_type": { + "name": "enum_plugin_ai_instructions_field_type", + "schema": "public", + "values": [ + "text", + "textarea", + "upload", + "richText" + ] + }, + "public.enum_plugin_ai_instructions_model_id": { + "name": "enum_plugin_ai_instructions_model_id", + "schema": "public", + "values": [ + "unsloth-text" + ] + }, + "public.enum_shims_shims_targeting_roles": { + "name": "enum_shims_shims_targeting_roles", + "schema": "public", + "values": [ + "guest", + "user", + "trusted", + "admin", + "developer" + ] + }, + "public.enum_shims_shims_type": { + "name": "enum_shims_shims_type", + "schema": "public", + "values": [ + "css", + "js" + ] + }, + "public.enum_shims_shims_targeting_audience": { + "name": "enum_shims_shims_targeting_audience", + "schema": "public", + "values": [ + "all", + "percentage", + "users", + "roles" + ] + }, + "public.enum_shims_shims_paths_match_type": { + "name": "enum_shims_shims_paths_match_type", + "schema": "public", + "values": [ + "all", + "include", + "exclude" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "id": "71690f86-2fc4-4355-9e15-89f48311a447", + "prevId": "00000000-0000-0000-0000-000000000000" +} \ No newline at end of file diff --git a/src/migrations/20260918_070328_add_blueprint_aura.ts b/src/migrations/20260918_070328_add_blueprint_aura.ts new file mode 100644 index 0000000..51d37c5 --- /dev/null +++ b/src/migrations/20260918_070328_add_blueprint_aura.ts @@ -0,0 +1,17 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres' + +export async function up({ db, payload, req }: MigrateUpArgs): Promise { + await db.execute(sql` + CREATE TYPE "public"."enum_structures_aura_effect_type" AS ENUM('production_multiplier', 'capacity_mass'); + ALTER TABLE "structures" ADD COLUMN "aura_effect_type" "enum_structures_aura_effect_type"; + ALTER TABLE "structures" ADD COLUMN "aura_value" numeric; + ALTER TABLE "structures" ADD COLUMN "aura_range_meters" numeric DEFAULT 0;`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.execute(sql` + ALTER TABLE "structures" DROP COLUMN "aura_effect_type"; + ALTER TABLE "structures" DROP COLUMN "aura_value"; + ALTER TABLE "structures" DROP COLUMN "aura_range_meters"; + DROP TYPE "public"."enum_structures_aura_effect_type";`) +} diff --git a/tests/int/adjacency.int.spec.ts b/tests/int/adjacency.int.spec.ts new file mode 100644 index 0000000..55dcbfe --- /dev/null +++ b/tests/int/adjacency.int.spec.ts @@ -0,0 +1,303 @@ +import { afterAll, beforeAll, describe, expect, it } from "vitest"; +import { getPayload, type CollectionSlug, type Payload, type Where } from "payload"; +import type { Map as MapDoc, Resource, Structure } from "@/payload-types"; + +import config from "@payload-config"; +import dotenv from "dotenv"; +import { auraBonusAt, type AuraSourceLike } from "@/lib/base/adjacency"; +import { processProductionTick } from "@/lib/base/production"; + +dotenv.config({ path: ".env" }); + +const RUN = `aura-${Date.now()}`; +const LEXICAL_EMPTY = { + root: { + children: [{ text: "" }], + direction: null, + format: "" as const, + indent: 0, + type: "text", + version: 1, + }, +}; + +let payload: Payload; + +const createdIds = { + maps: [] as number[], + resources: [] as number[], + structureBlueprints: [] as number[], + gameStructures: [] as number[], + classifications: [] as number[], +}; + +async function makeResource(name: string, massPerUnit = 1): Promise { + return (await payload.create({ + collection: "resources", + data: { + name, + codeName: `${RUN}-${name.toLowerCase().replace(/\s+/g, "-")}`, + approvalStatus: "in_progress", + type: "physical", + baseValue: 1, + rarity: "common", + unitOfMeasure: "kg", + massPerUnit, + gridWidth: 1, + gridHeight: 1, + }, + overrideAccess: true, + depth: 0, + })) as unknown as Resource; +} + +async function makeBlueprint(data: { + name: string; + materialResource: number; + outputs?: { resource: number; amountPerHour: number }[]; + maxCapacityMass?: number; + aura?: { + effectType: "production_multiplier" | "capacity_mass"; + value: number; + rangeMeters: number; + }; +}): Promise { + return (await payload.create({ + collection: "structures", + data: { + name: data.name, + codeName: data.name.toLowerCase().replace(/\s+/g, "_"), + approvalStatus: "in_progress", + description: LEXICAL_EMPTY as unknown as Structure["description"], + category: "logistics", + materials: [{ resource: data.materialResource, amount: 1 }], + constructionDurationMinutes: 1, + terrainType: "land", + maxHealth: 100, + maxCapacityMass: data.maxCapacityMass, + productionOutputs: data.outputs, + ...(data.aura ? { aura: data.aura } : {}), + }, + overrideAccess: true, + depth: 0, + })) as unknown as Structure; +} + +async function makeSite(data: { + name: string; + blueprintId: number; + materialResource: number; + point?: [number, number]; + constructionStatus?: "awaiting_materials" | "building" | "complete"; +}): Promise<{ id: number }> { + return (await payload.create({ + collection: "game-structures", + data: { + name: data.name, + type: data.blueprintId, + map: createdIds.maps[0], + coordinates: data.point ?? [3000, 3000], + constructionStatus: data.constructionStatus ?? "complete", + storedResources: [{ resource: data.materialResource, amount: 10, gridX: 0, gridY: 0 }], + }, + overrideAccess: true, + depth: 0, + })) as unknown as { id: number }; +} + +async function assignLabor(siteId: number): Promise { + const classification = (await payload.create({ + collection: "labor-classifications", + data: { + name: `${RUN} Crew ${siteId}`, + key: `${RUN}-crew-${siteId}`, + defaultUnitSalary: 1, + availableHeadcount: 50, + }, + overrideAccess: true, + depth: 0, + })) as unknown as { id: number }; + createdIds.classifications.push(classification.id); + await payload.create({ + collection: "npc-staffing", + data: { + structure: siteId, + positionType: "other", + headcount: 5, + laborClassification: classification.id, + positionTitle: "Labor crew", + status: "active", + }, + overrideAccess: true, + }); +} + +async function voidAmount(siteId: number, resourceId: number): Promise { + const doc = (await payload.findByID({ + collection: "game-structures", + id: siteId, + depth: 1, + overrideAccess: true, + })) as unknown as { voidStorage: { resource: number | Resource; amount: number }[] }; + return doc.voidStorage.reduce( + (total, entry) => + total + + ((typeof entry.resource === "object" ? entry.resource.id : entry.resource) === resourceId + ? entry.amount + : 0), + 0, + ); +} + +describe("Adjacency auras", () => { + describe("pure aura math", () => { + const source = (over: Partial & { id: number }): AuraSourceLike => ({ + coordinates: [5000, 5000], + constructionStatus: "complete", + blueprint: { aura: { effectType: "production_multiplier", value: 0.5, rangeMeters: 2000 } }, + ...over, + }); + const target = { id: 99, coordinates: [6000, 5000] as [number, number] }; + + it("sums in-range auras and ignores out-of-range, inactive, and self sources", () => { + expect( + auraBonusAt(target, [ + source({ id: 1 }), + source({ id: 2 }), + source({ id: 3, coordinates: [50000, 50000] }), + source({ id: 4, constructionStatus: "building" }), + source({ + id: 5, + blueprint: { aura: { effectType: "capacity_mass", value: 300, rangeMeters: 2000 } }, + }), + ]), + ).toEqual({ productionMultiplier: 1, capacityMass: 300 }); + expect(auraBonusAt(target, [source({ id: 1 }), source({ id: 99 })])).toEqual({ + productionMultiplier: 0.5, + capacityMass: 0, + }); + expect(auraBonusAt({ id: 7, coordinates: null }, [source({ id: 1 })])).toEqual({ + productionMultiplier: 0, + capacityMass: 0, + }); + }); + }); + + describe("production tick", () => { + beforeAll(async () => { + payload = await getPayload({ config }); + createdIds.maps.push( + ( + (await payload.create({ + collection: "maps", + data: { + name: `${RUN} map`, + worldSizeWidth: 8192, + worldSizeHeight: 8192, + basemapMode: "image", + }, + overrideAccess: true, + depth: 0, + })) as unknown as MapDoc + ).id, + ); + }); + + afterAll(async () => { + const sweep = async (collection: CollectionSlug, where: Where) => { + const found = await payload + .find({ collection, where, limit: 500, depth: 0, overrideAccess: true }) + .catch(() => null); + for (const doc of found?.docs ?? []) { + await payload.delete({ collection, id: doc.id, overrideAccess: true }).catch(() => {}); + } + }; + await sweep("npc-staffing", { structure: { in: createdIds.gameStructures } }); + await sweep("game-event-logs", { structure: { in: createdIds.gameStructures } }); + await sweep("game-structures", { name: { like: `${RUN}%` } }); + await sweep("structures", { name: { like: `${RUN}%` } }); + await sweep("labor-classifications", { name: { like: `${RUN}%` } }); + await sweep("resources", { name: { like: `${RUN}%` } }); + await sweep("maps", { name: { like: `${RUN}%` } }); + }); + + it("boosts a neighbor's output with a production aura", async () => { + const timber = await makeResource("Logs"); + const fuel = await makeResource("Ethanol"); + createdIds.resources.push(timber.id, fuel.id); + const producer = await makeBlueprint({ + name: `${RUN} Boiler`, + materialResource: timber.id, + outputs: [{ resource: fuel.id, amountPerHour: 1000 }], + }); + const auraTower = await makeBlueprint({ + name: `${RUN} Pylon`, + materialResource: timber.id, + aura: { effectType: "production_multiplier", value: 0.5, rangeMeters: 2000 }, + }); + createdIds.structureBlueprints.push(producer.id, auraTower.id); + const site = await makeSite({ + name: `${RUN} Boiler site`, + blueprintId: producer.id, + materialResource: timber.id, + point: [4000, 3000], + }); + createdIds.gameStructures.push(site.id); + const tower = await makeSite({ + name: `${RUN} Pylon site`, + blueprintId: auraTower.id, + materialResource: timber.id, + point: [3000, 3000], + }); + createdIds.gameStructures.push(tower.id); + await assignLabor(site.id); + + const start = new Date(); + await processProductionTick(payload, undefined, start, [site.id]); + await processProductionTick(payload, undefined, new Date(start.getTime() + 3_600_000), [ + site.id, + ]); + await expect(voidAmount(site.id, fuel.id)).resolves.toBe(1500); + }); + + it("raises a neighbor's production capacity with a capacity aura", async () => { + const timber = await makeResource("Sticks"); + const fuel = await makeResource("Biodiesel"); + createdIds.resources.push(timber.id, fuel.id); + const producer = await makeBlueprint({ + name: `${RUN} Still`, + materialResource: timber.id, + outputs: [{ resource: fuel.id, amountPerHour: 1000 }], + maxCapacityMass: 100, + }); + const auraTower = await makeBlueprint({ + name: `${RUN} Silo Pylon`, + materialResource: timber.id, + aura: { effectType: "capacity_mass", value: 500, rangeMeters: 2000 }, + }); + createdIds.structureBlueprints.push(producer.id, auraTower.id); + const site = await makeSite({ + name: `${RUN} Still site`, + blueprintId: producer.id, + materialResource: timber.id, + point: [4000, 3000], + }); + createdIds.gameStructures.push(site.id); + const tower = await makeSite({ + name: `${RUN} Silo Pylon site`, + blueprintId: auraTower.id, + materialResource: timber.id, + point: [3000, 3000], + }); + createdIds.gameStructures.push(tower.id); + await assignLabor(site.id); + + const start = new Date(); + await processProductionTick(payload, undefined, start, [site.id]); + await processProductionTick(payload, undefined, new Date(start.getTime() + 3_600_000), [ + site.id, + ]); + await expect(voidAmount(site.id, fuel.id)).resolves.toBe(600); + }); + }); +}); diff --git a/tests/int/construction-speed.int.spec.ts b/tests/int/construction-speed.int.spec.ts new file mode 100644 index 0000000..72ad781 --- /dev/null +++ b/tests/int/construction-speed.int.spec.ts @@ -0,0 +1,364 @@ +import { afterAll, beforeAll, describe, expect, it } from "vitest"; +import { getPayload, type CollectionSlug, type Payload, type Where } from "payload"; +import type { Map as MapDoc, Resource, Structure } from "@/payload-types"; + +import config from "@payload-config"; +import dotenv from "dotenv"; +import { setLaborHeadcount as setLaborHeadcountService } from "@/lib/base"; +import { + MIN_BUILD_SPEED_FACTOR, + buildSpeedFactor, + durationMinutesFor, + effectiveCrew, + recomputeCompletesAt, +} from "@/lib/base/constructionSpeed"; +import { maybeStartConstruction } from "@/lib/map/construction"; + +dotenv.config({ path: ".env" }); + +const RUN = `cspeed-${Date.now()}`; +const LEXICAL_EMPTY = { + root: { + children: [{ text: "" }], + direction: null, + format: "" as const, + indent: 0, + type: "text", + version: 1, + }, +}; + +let payload: Payload; +let classificationCounter = 0; +let hiringWasEnabled = false; + +const createdIds = { + maps: [] as number[], + resources: [] as number[], + structureBlueprints: [] as number[], + gameStructures: [] as number[], + classifications: [] as number[], +}; + +async function makeResource(name: string): Promise { + return (await payload.create({ + collection: "resources", + data: { + name, + codeName: `${RUN}-${name.toLowerCase().replace(/\s+/g, "-")}`, + approvalStatus: "in_progress", + type: "physical", + baseValue: 1, + rarity: "common", + unitOfMeasure: "kg", + massPerUnit: 1, + gridWidth: 1, + gridHeight: 1, + }, + overrideAccess: true, + depth: 0, + })) as unknown as Resource; +} + +async function makeBlueprint(data: { + name: string; + materialResource: number; + durationMinutes: number; + crewRequired: number; + laborRequirements?: { + classification: number; + requiredHeadcount: number; + maxHeadcount: number; + }[]; +}): Promise { + return (await payload.create({ + collection: "structures", + data: { + name: data.name, + codeName: data.name.toLowerCase().replace(/\s+/g, "_"), + approvalStatus: "in_progress", + description: LEXICAL_EMPTY as unknown as Structure["description"], + category: "logistics", + materials: [{ resource: data.materialResource, amount: 1 }], + constructionDurationMinutes: data.durationMinutes, + constructionCrewRequired: data.crewRequired, + terrainType: "land", + maxHealth: 100, + laborRequirements: data.laborRequirements, + }, + overrideAccess: true, + depth: 0, + })) as unknown as Structure; +} + +async function makeSite(data: { + name: string; + blueprintId: number; + materialResource: number; +}): Promise<{ id: number }> { + return (await payload.create({ + collection: "game-structures", + data: { + name: data.name, + type: data.blueprintId, + map: createdIds.maps[0], + coordinates: [500, 500], + constructionStatus: "awaiting_materials", + storedResources: [{ resource: data.materialResource, amount: 10, gridX: 0, gridY: 0 }], + }, + overrideAccess: true, + depth: 0, + })) as unknown as { id: number }; +} + +async function makeClassification(buildEfficiency = 1): Promise<{ id: number }> { + classificationCounter += 1; + return (await payload.create({ + collection: "labor-classifications", + data: { + name: `${RUN} Crew ${classificationCounter}`, + key: `${RUN}-crew-${classificationCounter}`, + defaultUnitSalary: 1, + buildEfficiency, + availableHeadcount: 50, + }, + overrideAccess: true, + depth: 0, + })) as unknown as { id: number }; +} + +async function siteConstruction(siteId: number): Promise<{ + constructionStatus: string | null; + startedAt: string | null; + completesAt: string | null; +}> { + const doc = (await payload.findByID({ + collection: "game-structures", + id: siteId, + depth: 0, + overrideAccess: true, + })) as unknown as { + constructionStatus: string | null; + constructionStartedAt: string | null; + constructionCompletesAt: string | null; + }; + return { + constructionStatus: doc.constructionStatus, + startedAt: doc.constructionStartedAt, + completesAt: doc.constructionCompletesAt, + }; +} + +describe("Construction crew speed", () => { + describe("pure math", () => { + const rows = [ + { classificationId: 1, headcount: 3, efficiency: 1 }, + { classificationId: 2, headcount: 2, efficiency: 0.5 }, + ]; + + it("scores crews and clamps the speed factor", () => { + expect(effectiveCrew(rows)).toBe(4); + expect(buildSpeedFactor(rows, 0)).toBe(1); + expect(buildSpeedFactor(rows, 8)).toBe(0.5); + expect(buildSpeedFactor(rows, 4)).toBe(1); + expect(buildSpeedFactor([], 6)).toBe(0); + }); + + it("floors the derived duration so a stripped site never freezes", () => { + expect(durationMinutesFor(60, 1)).toBe(60); + expect(durationMinutesFor(60, 0.5)).toBe(120); + expect(durationMinutesFor(60, 0)).toBe(60 / MIN_BUILD_SPEED_FACTOR); + }); + + it("recomputes completesAt from the finished fraction", () => { + const start = new Date("2026-01-01T00:00:00Z"); + const end = new Date(start.getTime() + 60 * 60_000); + const now = new Date(start.getTime() + 30 * 60_000); + // Half done at factor 1, re-priced at 0.5: 30 base minutes left -> 60 wall minutes. + expect( + recomputeCompletesAt({ + startedAt: start, + completesAt: end, + baseMinutes: 60, + oldFactor: 1, + newFactor: 0.5, + now, + }), + ).toBe(new Date(now.getTime() + 60 * 60_000).toISOString()); + // Half done at factor 0.5, re-priced at 1: 15 base minutes left -> 15 wall minutes. + expect( + recomputeCompletesAt({ + startedAt: start, + completesAt: end, + baseMinutes: 60, + oldFactor: 0.5, + newFactor: 1, + now, + }), + ).toBe(new Date(now.getTime() + 15 * 60_000).toISOString()); + // Already past the deadline: sweeper territory, no recompute. + expect( + recomputeCompletesAt({ + startedAt: start, + completesAt: end, + baseMinutes: 60, + oldFactor: 1, + newFactor: 1, + now: end, + }), + ).toBeNull(); + }); + }); + + describe("start gating and rate recompute", () => { + beforeAll(async () => { + payload = await getPayload({ config }); + const rules = (await payload.findGlobal({ + slug: "game-rules", + depth: 0, + overrideAccess: true, + })) as unknown as { staffHiringEnabled?: boolean }; + hiringWasEnabled = rules.staffHiringEnabled === true; + if (!hiringWasEnabled) { + await payload.updateGlobal({ + slug: "game-rules", + data: { staffHiringEnabled: true }, + overrideAccess: true, + }); + } + createdIds.maps.push( + ( + (await payload.create({ + collection: "maps", + data: { + name: `${RUN} map`, + worldSizeWidth: 8192, + worldSizeHeight: 8192, + basemapMode: "image", + }, + overrideAccess: true, + depth: 0, + })) as unknown as MapDoc + ).id, + ); + }); + + afterAll(async () => { + const sweep = async (collection: CollectionSlug, where: Where) => { + const found = await payload + .find({ collection, where, limit: 500, depth: 0, overrideAccess: true }) + .catch(() => null); + for (const doc of found?.docs ?? []) { + await payload.delete({ collection, id: doc.id, overrideAccess: true }).catch(() => {}); + } + }; + await sweep("npc-staffing", { structure: { in: createdIds.gameStructures } }); + await sweep("game-event-logs", { structure: { in: createdIds.gameStructures } }); + await sweep("game-structures", { name: { like: `${RUN}%` } }); + await sweep("structures", { name: { like: `${RUN}%` } }); + await sweep("labor-classifications", { name: { like: `${RUN}%` } }); + await sweep("resources", { name: { like: `${RUN}%` } }); + await sweep("maps", { name: { like: `${RUN}%` } }); + if (!hiringWasEnabled) { + await payload.updateGlobal({ + slug: "game-rules", + data: { staffHiringEnabled: false }, + overrideAccess: true, + }); + } + }); + + it("refuses to start a crewed build with no labor assigned", async () => { + const timber = await makeResource("Timber"); + createdIds.resources.push(timber.id); + const blueprint = await makeBlueprint({ + name: `${RUN} Watchtower`, + materialResource: timber.id, + durationMinutes: 60, + crewRequired: 6, + }); + createdIds.structureBlueprints.push(blueprint.id); + const site = await makeSite({ + name: `${RUN} Watchtower site`, + blueprintId: blueprint.id, + materialResource: timber.id, + }); + createdIds.gameStructures.push(site.id); + + const result = await maybeStartConstruction(payload, site.id); + expect(result.started).toBe(false); + expect(result.reason).toBe("no_crew"); + expect((await siteConstruction(site.id)).constructionStatus).toBe("awaiting_materials"); + }); + + it("scales the build duration by the staffed crew and re-prices on headcount change", async () => { + const timber = await makeResource("Lumber"); + createdIds.resources.push(timber.id); + const crew = await makeClassification(1); + createdIds.classifications.push(crew.id); + const blueprint = await makeBlueprint({ + name: `${RUN} Depot`, + materialResource: timber.id, + durationMinutes: 60, + crewRequired: 6, + laborRequirements: [{ classification: crew.id, requiredHeadcount: 2, maxHeadcount: 6 }], + }); + createdIds.structureBlueprints.push(blueprint.id); + const site = await makeSite({ + name: `${RUN} Depot site`, + blueprintId: blueprint.id, + materialResource: timber.id, + }); + createdIds.gameStructures.push(site.id); + + await setLaborHeadcountService(payload, { + structureId: site.id, + classificationId: crew.id, + headcount: 3, + unitSalary: 1, + }); + + const start = new Date(); + const started = await maybeStartConstruction(payload, site.id, start); + expect(started.started).toBe(true); + const during = await siteConstruction(site.id); + expect(during.constructionStatus).toBe("building"); + // 3 of 6 required crew: 60 base minutes take 120. + const spanMinutes = + (new Date(during.completesAt as string).getTime() - + new Date(during.startedAt as string).getTime()) / + 60_000; + expect(spanMinutes).toBe(120); + + // Full crew hired mid-build: the remaining work is re-priced at factor 1 + // and the deadline pulls in well before the original 120-minute mark. + await setLaborHeadcountService(payload, { + structureId: site.id, + classificationId: crew.id, + headcount: 6, + unitSalary: 1, + }); + const afterHire = await siteConstruction(site.id); + const hiredSpan = + (new Date(afterHire.completesAt as string).getTime() - + new Date(afterHire.startedAt as string).getTime()) / + 60_000; + expect(hiredSpan).toBeLessThan(120); + expect(new Date(afterHire.completesAt as string).getTime()).toBeLessThan( + new Date(during.completesAt as string).getTime(), + ); + + // Releasing every worker floors the speed instead of freezing the build. + await setLaborHeadcountService(payload, { + structureId: site.id, + classificationId: crew.id, + headcount: 0, + unitSalary: 1, + }); + const afterRelease = await siteConstruction(site.id); + expect(new Date(afterRelease.completesAt as string).getTime()).toBeGreaterThan( + new Date(afterHire.completesAt as string).getTime(), + ); + }); + }); +}); diff --git a/tests/int/modules.int.spec.ts b/tests/int/modules.int.spec.ts new file mode 100644 index 0000000..265b393 --- /dev/null +++ b/tests/int/modules.int.spec.ts @@ -0,0 +1,350 @@ +import { afterAll, beforeAll, describe, expect, it } from "vitest"; +import { getPayload, type CollectionSlug, type Payload, type Where } from "payload"; +import type { Map as MapDoc, Resource, Structure } from "@/payload-types"; + +import config from "@payload-config"; +import dotenv from "dotenv"; +import { processProductionTick } from "@/lib/base/production"; +import { installModule, installedModuleEffects, uninstallModule } from "@/lib/base/modules"; + +dotenv.config({ path: ".env" }); + +const RUN = `mods-${Date.now()}`; +const LEXICAL_EMPTY = { + root: { + children: [{ text: "" }], + direction: null, + format: "" as const, + indent: 0, + type: "text", + version: 1, + }, +}; + +let payload: Payload; + +const createdIds = { + maps: [] as number[], + resources: [] as number[], + structureBlueprints: [] as number[], + gameStructures: [] as number[], + classifications: [] as number[], +}; + +async function makeResource(name: string, massPerUnit = 1): Promise { + return (await payload.create({ + collection: "resources", + data: { + name, + codeName: `${RUN}-${name.toLowerCase().replace(/\s+/g, "-")}`, + approvalStatus: "in_progress", + type: "physical", + baseValue: 1, + rarity: "common", + unitOfMeasure: "kg", + massPerUnit, + gridWidth: 1, + gridHeight: 1, + }, + overrideAccess: true, + depth: 0, + })) as unknown as Resource; +} + +async function makeBlueprint(data: { + name: string; + materialResource: number; + moduleSlots: number; + outputs?: { resource: number; amountPerHour: number }[]; + maxCapacityMass?: number; +}): Promise { + return (await payload.create({ + collection: "structures", + data: { + name: data.name, + codeName: data.name.toLowerCase().replace(/\s+/g, "_"), + approvalStatus: "in_progress", + description: LEXICAL_EMPTY as unknown as Structure["description"], + category: "logistics", + materials: [{ resource: data.materialResource, amount: 1 }], + constructionDurationMinutes: 1, + terrainType: "land", + maxHealth: 100, + maxCapacityMass: data.maxCapacityMass, + productionOutputs: data.outputs, + moduleSlots: data.moduleSlots, + moduleOptions: [ + { + name: `${RUN} Reinforced Flooring`, + category: "logistics", + effects: [{ type: "capacity_mass", value: 500 }], + materials: [{ resource: data.materialResource, amount: 5 }], + }, + { + name: `${RUN} Overclocked Line`, + category: "production", + effects: [{ type: "production_multiplier", value: 0.5 }], + materials: [{ resource: data.materialResource, amount: 2 }], + }, + { + name: `${RUN} Extra Racking`, + category: "logistics", + effects: [{ type: "storage_slots", value: 4 }], + materials: [{ resource: data.materialResource, amount: 1 }], + }, + ], + }, + overrideAccess: true, + depth: 0, + })) as unknown as Structure; +} + +async function makeSite(data: { + name: string; + blueprintId: number; + materialResource: number; + complete?: boolean; +}): Promise<{ id: number }> { + return (await payload.create({ + collection: "game-structures", + data: { + name: data.name, + type: data.blueprintId, + map: createdIds.maps[0], + coordinates: [500, 500], + constructionStatus: data.complete === false ? "building" : "complete", + storedResources: [{ resource: data.materialResource, amount: 100, gridX: 0, gridY: 0 }], + }, + overrideAccess: true, + depth: 0, + })) as unknown as { id: number }; +} + +async function assignLabor(siteId: number): Promise { + const classification = (await payload.create({ + collection: "labor-classifications", + data: { + name: `${RUN} Crew ${siteId}`, + key: `${RUN}-crew-${siteId}`, + defaultUnitSalary: 1, + availableHeadcount: 50, + }, + overrideAccess: true, + depth: 0, + })) as unknown as { id: number }; + createdIds.classifications.push(classification.id); + await payload.create({ + collection: "npc-staffing", + data: { + structure: siteId, + positionType: "other", + headcount: 5, + laborClassification: classification.id, + positionTitle: "Labor crew", + status: "active", + }, + overrideAccess: true, + }); +} + +async function storedAmountOf( + siteId: number, + resourceId: number, +): Promise<{ stored: number; void: number; fuel: number }> { + const doc = (await payload.findByID({ + collection: "game-structures", + id: siteId, + depth: 1, + overrideAccess: true, + })) as unknown as { + storedResources: { resource: number | Resource; amount: number }[]; + voidStorage: { resource: number | Resource; amount: number }[]; + }; + const sum = (entries: { resource: number | Resource; amount: number }[]): number => + entries.reduce( + (total, entry) => + total + + ((typeof entry.resource === "object" ? entry.resource.id : entry.resource) === resourceId + ? entry.amount + : 0), + 0, + ); + const fuelEntry = doc.voidStorage.find( + (entry) => + (typeof entry.resource === "object" ? entry.resource.id : entry.resource) === resourceId, + ); + return { + stored: sum(doc.storedResources), + void: sum(doc.voidStorage), + fuel: fuelEntry?.amount ?? 0, + }; +} + +describe("Module system", () => { + describe("pure effects", () => { + it("aggregates installed module effects against the blueprint catalog", () => { + const blueprint = { + moduleSlots: 2, + moduleOptions: [ + { name: "A", effects: [{ type: "capacity_mass", value: 500 }] }, + { name: "B", effects: [{ type: "production_multiplier", value: 0.25 }] }, + { name: "C", effects: [{ type: "storage_slots", value: 2.7 }] }, + ], + }; + expect(installedModuleEffects(blueprint, ["A", "B", "C"])).toEqual({ + capacityMass: 500, + productionMultiplier: 0.25, + storageSlots: 2, + }); + // Unknown and empty installs contribute nothing. + expect(installedModuleEffects(blueprint, ["Z"])).toEqual({ + capacityMass: 0, + productionMultiplier: 0, + storageSlots: 0, + }); + expect(installedModuleEffects({}, [])).toEqual({ + capacityMass: 0, + productionMultiplier: 0, + storageSlots: 0, + }); + }); + }); + + describe("install / uninstall", () => { + beforeAll(async () => { + payload = await getPayload({ config }); + createdIds.maps.push( + ( + (await payload.create({ + collection: "maps", + data: { + name: `${RUN} map`, + worldSizeWidth: 8192, + worldSizeHeight: 8192, + basemapMode: "image", + }, + overrideAccess: true, + depth: 0, + })) as unknown as MapDoc + ).id, + ); + }); + + afterAll(async () => { + const sweep = async (collection: CollectionSlug, where: Where) => { + const found = await payload + .find({ collection, where, limit: 500, depth: 0, overrideAccess: true }) + .catch(() => null); + for (const doc of found?.docs ?? []) { + await payload.delete({ collection, id: doc.id, overrideAccess: true }).catch(() => {}); + } + }; + await sweep("npc-staffing", { structure: { in: createdIds.gameStructures } }); + await sweep("game-event-logs", { structure: { in: createdIds.gameStructures } }); + await sweep("game-structures", { name: { like: `${RUN}%` } }); + await sweep("structures", { name: { like: `${RUN}%` } }); + await sweep("labor-classifications", { name: { like: `${RUN}%` } }); + await sweep("resources", { name: { like: `${RUN}%` } }); + await sweep("maps", { name: { like: `${RUN}%` } }); + }); + + it("consumes materials, records the module, and enforces slots", async () => { + const timber = await makeResource("Timber"); + createdIds.resources.push(timber.id); + const blueprint = await makeBlueprint({ + name: `${RUN} Warehouse`, + materialResource: timber.id, + moduleSlots: 2, + }); + createdIds.structureBlueprints.push(blueprint.id); + const site = await makeSite({ + name: `${RUN} Warehouse site`, + blueprintId: blueprint.id, + materialResource: timber.id, + }); + createdIds.gameStructures.push(site.id); + + await installModule(payload, site.id, `${RUN} Reinforced Flooring`); + const afterFirst = await storedAmountOf(site.id, timber.id); + expect(afterFirst.stored).toBe(95); + + await expect(installModule(payload, site.id, `${RUN} Reinforced Flooring`)).rejects.toThrow( + "already installed", + ); + await expect(installModule(payload, site.id, "No Such Module")).rejects.toThrow( + "Unknown module", + ); + + await installModule(payload, site.id, `${RUN} Overclocked Line`); + await expect(installModule(payload, site.id, `${RUN} Extra Racking`)).rejects.toThrow( + "All 2 module slot(s)", + ); + + const uninstalled = await uninstallModule(payload, site.id, `${RUN} Overclocked Line`); + expect(uninstalled.map((entry) => entry.name)).toEqual([`${RUN} Reinforced Flooring`]); + await expect(uninstallModule(payload, site.id, `${RUN} Overclocked Line`)).rejects.toThrow( + "not installed", + ); + await installModule(payload, site.id, `${RUN} Extra Racking`); + }); + + it("refuses installation outside operational structures", async () => { + const timber = await makeResource("Planks"); + createdIds.resources.push(timber.id); + const blueprint = await makeBlueprint({ + name: `${RUN} Yard`, + materialResource: timber.id, + moduleSlots: 1, + }); + createdIds.structureBlueprints.push(blueprint.id); + const site = await makeSite({ + name: `${RUN} Yard site`, + blueprintId: blueprint.id, + materialResource: timber.id, + complete: false, + }); + createdIds.gameStructures.push(site.id); + + await expect(installModule(payload, site.id, `${RUN} Reinforced Flooring`)).rejects.toThrow( + "operational", + ); + }); + + it("applies production multiplier and capacity bonus in the tick", async () => { + const timber = await makeResource("Beams"); + const fuel = await makeResource("Fuel"); + createdIds.resources.push(timber.id, fuel.id); + const blueprint = await makeBlueprint({ + name: `${RUN} Refinery`, + materialResource: timber.id, + moduleSlots: 2, + outputs: [{ resource: fuel.id, amountPerHour: 1000 }], + maxCapacityMass: 100, + }); + createdIds.structureBlueprints.push(blueprint.id); + const site = await makeSite({ + name: `${RUN} Refinery site`, + blueprintId: blueprint.id, + materialResource: timber.id, + }); + createdIds.gameStructures.push(site.id); + await assignLabor(site.id); + + // Baseline without modules: 1000 kg clamped to the 100 kg cap. + const start = new Date(); + await processProductionTick(payload, undefined, start, [site.id]); + await processProductionTick(payload, undefined, new Date(start.getTime() + 3_600_000), [ + site.id, + ]); + expect((await storedAmountOf(site.id, fuel.id)).fuel).toBe(100); + + // Install capacity (+500) and multiplier (+50%): output clamps at 600. + await installModule(payload, site.id, `${RUN} Reinforced Flooring`); + await installModule(payload, site.id, `${RUN} Overclocked Line`); + await processProductionTick(payload, undefined, new Date(start.getTime() + 7_200_000), [ + site.id, + ]); + expect((await storedAmountOf(site.id, fuel.id)).fuel).toBe(600); + }); + }); +}); diff --git a/tests/int/production.int.spec.ts b/tests/int/production.int.spec.ts new file mode 100644 index 0000000..ba469f6 --- /dev/null +++ b/tests/int/production.int.spec.ts @@ -0,0 +1,327 @@ +import { afterAll, beforeAll, describe, expect, it } from "vitest"; +import { getPayload, type CollectionSlug, type Payload, type Where } from "payload"; +import type { LaborClassification, Map as MapDoc, Resource, Structure } from "@/payload-types"; + +import config from "@payload-config"; +import dotenv from "dotenv"; +import { processProductionTick } from "@/lib/base/production"; + +dotenv.config({ path: ".env" }); + +const RUN = `prod-${Date.now()}`; +const LEXICAL_EMPTY = { + root: { + children: [{ text: "" }], + direction: null, + format: "" as const, + indent: 0, + type: "text", + version: 1, + }, +}; + +let payload: Payload; +let laborCounter = 0; + +const createdIds = { + maps: [] as number[], + resources: [] as number[], + structureBlueprints: [] as number[], + gameStructures: [] as number[], + classifications: [] as number[], +}; + +async function makeResource(name: string, massPerUnit = 1): Promise { + return (await payload.create({ + collection: "resources", + data: { + name, + codeName: `${RUN}-${name.toLowerCase().replace(/\s+/g, "-")}`, + approvalStatus: "in_progress", + type: "physical", + baseValue: 1, + rarity: "common", + unitOfMeasure: "kg", + massPerUnit, + gridWidth: 1, + gridHeight: 1, + }, + overrideAccess: true, + depth: 0, + })) as unknown as Resource; +} + +async function makeBlueprint(data: { + name: string; + inputs: { resource: number; amountPerHour: number }[]; + outputs: { resource: number; amountPerHour: number }[]; + maxCapacityMass?: number; +}): Promise { + return (await payload.create({ + collection: "structures", + data: { + name: data.name, + codeName: data.name.toLowerCase().replace(/\s+/g, "_"), + approvalStatus: "in_progress", + description: LEXICAL_EMPTY as unknown as Structure["description"], + category: "logistics", + materials: [{ resource: (data.outputs[0] ?? data.inputs[0]).resource, amount: 1 }], + constructionDurationMinutes: 1, + terrainType: "land", + maxHealth: 100, + maxCapacityMass: data.maxCapacityMass, + productionInputs: data.inputs, + productionOutputs: data.outputs, + }, + overrideAccess: true, + depth: 0, + })) as unknown as Structure; +} + +async function makeSite(data: { + name: string; + blueprintId: number; + paused?: boolean; +}): Promise<{ id: number; name: string }> { + return (await payload.create({ + collection: "game-structures", + data: { + name: data.name, + type: data.blueprintId, + map: createdIds.maps[0], + coordinates: [500, 500], + constructionStatus: "complete", + productionPaused: data.paused ?? false, + }, + overrideAccess: true, + depth: 0, + })) as unknown as { id: number; name: string }; +} + +async function assignLabor(siteId: number, headcount = 5): Promise { + laborCounter += 1; + const classification = (await payload.create({ + collection: "labor-classifications", + data: { + name: `${RUN} Workers ${laborCounter}`, + key: `${RUN}-workers-${laborCounter}`, + defaultUnitSalary: 1, + availableHeadcount: 50, + }, + overrideAccess: true, + depth: 0, + })) as unknown as LaborClassification; + createdIds.classifications.push(classification.id); + await payload.create({ + collection: "npc-staffing", + data: { + structure: siteId, + positionType: "other", + headcount, + laborClassification: classification.id, + positionTitle: "Labor crew", + status: "active", + }, + overrideAccess: true, + }); +} + +async function stallReason(siteId: number): Promise { + const doc = (await payload.findByID({ + collection: "game-structures", + id: siteId, + depth: 0, + overrideAccess: true, + })) as unknown as { productionStallReason: string | null }; + return doc.productionStallReason; +} + +describe("Production system", () => { + beforeAll(async () => { + payload = await getPayload({ config }); + createdIds.maps.push( + ( + (await payload.create({ + collection: "maps", + data: { + name: `${RUN} map`, + worldSizeWidth: 8192, + worldSizeHeight: 8192, + basemapMode: "image", + }, + overrideAccess: true, + depth: 0, + })) as unknown as MapDoc + ).id, + ); + }); + + afterAll(async () => { + const sweep = async (collection: CollectionSlug, where: Where) => { + const found = await payload + .find({ collection, where, limit: 500, depth: 0, overrideAccess: true }) + .catch(() => null); + for (const doc of found?.docs ?? []) { + await payload.delete({ collection, id: doc.id, overrideAccess: true }).catch(() => {}); + } + }; + await sweep("npc-staffing", { structure: { in: createdIds.gameStructures } }); + await sweep("game-event-logs", { structure: { in: createdIds.gameStructures } }); + await sweep("game-structures", { name: { like: `${RUN}%` } }); + await sweep("structures", { name: { like: `${RUN}%` } }); + await sweep("labor-classifications", { name: { like: `${RUN}%` } }); + await sweep("resources", { name: { like: `${RUN}%` } }); + await sweep("maps", { name: { like: `${RUN}%` } }); + }); + + it("consumes inputs, produces outputs, and advances the clock", async () => { + const ore = await makeResource("Ore"); + const fuel = await makeResource("Fuel"); + createdIds.resources.push(ore.id, fuel.id); + const blueprint = await makeBlueprint({ + name: `${RUN} Refinery`, + inputs: [{ resource: ore.id, amountPerHour: 100 }], + outputs: [{ resource: fuel.id, amountPerHour: 50 }], + }); + createdIds.structureBlueprints.push(blueprint.id); + const site = await makeSite({ name: `${RUN} Refinery site`, blueprintId: blueprint.id }); + createdIds.gameStructures.push(site.id); + + // Prime the clock, staff the site, then run an hour later with ore in storage. + const start = new Date(); + await processProductionTick(payload, undefined, start, [site.id]); + await assignLabor(site.id); + await payload.update({ + collection: "game-structures", + id: site.id, + data: { storedResources: [{ resource: ore.id, amount: 500, gridX: 0, gridY: 0 }] }, + overrideAccess: true, + }); + const result = await processProductionTick( + payload, + undefined, + new Date(start.getTime() + 3_600_000), + [site.id], + ); + expect(result.produced).toBe(1); + + const after = (await payload.findByID({ + collection: "game-structures", + id: site.id, + depth: 1, + overrideAccess: true, + })) as unknown as { + voidStorage: { resource: number | Resource; amount: number }[]; + storedResources: { resource: number | Resource; amount: number }[]; + }; + + const fuelStored = after.voidStorage.find( + (entry) => (entry.resource as Resource).id === fuel.id, + ); + expect(fuelStored?.amount).toBe(50); + const oreLeft = after.storedResources.find( + (entry) => (entry.resource as Resource).id === ore.id, + ); + expect(oreLeft?.amount).toBe(400); + }); + + it("stalls on missing labor and missing inputs with surfaced reasons", async () => { + const scrap = await makeResource("Scrap"); + createdIds.resources.push(scrap.id); + const blueprint = await makeBlueprint({ + name: `${RUN} Mill`, + inputs: [{ resource: scrap.id, amountPerHour: 10 }], + outputs: [{ resource: scrap.id, amountPerHour: 5 }], + }); + createdIds.structureBlueprints.push(blueprint.id); + const site = await makeSite({ name: `${RUN} Mill site`, blueprintId: blueprint.id }); + createdIds.gameStructures.push(site.id); + + const start = new Date(); + await processProductionTick(payload, undefined, start, [site.id]); + + // No labor crew assigned: no_labor. + await processProductionTick(payload, undefined, new Date(start.getTime() + 3_600_000), [ + site.id, + ]); + expect(await stallReason(site.id)).toBe("no_labor"); + + // With labor but no ore: missing_inputs. + const classification = (await payload.create({ + collection: "labor-classifications", + data: { + name: `${RUN} Workers`, + key: `${RUN}-workers`, + defaultUnitSalary: 1, + availableHeadcount: 50, + }, + overrideAccess: true, + depth: 0, + })) as unknown as LaborClassification; + createdIds.classifications.push(classification.id); + await payload.create({ + collection: "npc-staffing", + data: { + structure: site.id, + positionType: "other", + headcount: 5, + laborClassification: classification.id, + positionTitle: "Labor crew", + status: "active", + }, + overrideAccess: true, + }); + await assignLabor(site.id); + await processProductionTick(payload, undefined, new Date(start.getTime() + 7_200_000), [ + site.id, + ]); + expect(await stallReason(site.id)).toBe("missing_inputs"); + }); + + it("respects the pause flag and clamps output to storage capacity", async () => { + const grain = await makeResource("Grain"); + createdIds.resources.push(grain.id); + const blueprint = await makeBlueprint({ + name: `${RUN} Silo`, + inputs: [], + outputs: [{ resource: grain.id, amountPerHour: 1000 }], + maxCapacityMass: 300, + }); + createdIds.structureBlueprints.push(blueprint.id); + + const pausedSite = await makeSite({ + name: `${RUN} Silo paused`, + blueprintId: blueprint.id, + paused: true, + }); + createdIds.gameStructures.push(pausedSite.id); + const start = new Date(); + await processProductionTick(payload, undefined, start); + await processProductionTick(payload, undefined, new Date(start.getTime() + 3_600_000), [ + pausedSite.id, + ]); + const after = (await payload.findByID({ + collection: "game-structures", + id: pausedSite.id, + depth: 0, + overrideAccess: true, + })) as unknown as { lastProductionAt: string | null; voidStorage: unknown[] }; + expect(after.lastProductionAt).toBeNull(); + expect(after.voidStorage).toHaveLength(0); + + const capped = await makeSite({ name: `${RUN} Silo capped`, blueprintId: blueprint.id }); + createdIds.gameStructures.push(capped.id); + await assignLabor(capped.id); + await processProductionTick(payload, undefined, start, [capped.id]); + await processProductionTick(payload, undefined, new Date(start.getTime() + 3_600_000), [ + capped.id, + ]); + const cappedAfter = (await payload.findByID({ + collection: "game-structures", + id: capped.id, + depth: 0, + overrideAccess: true, + })) as unknown as { voidStorage: { amount: number }[] }; + expect(cappedAfter.voidStorage[0]?.amount).toBe(300); + }); +});