diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..d78d3c1 --- /dev/null +++ b/.env.development @@ -0,0 +1,23 @@ +#DATABASE_URI=postgres://ptfapp:polaristaskforcedb@jmf-usrv-2404:2552/ptf_app_prd +PAYLOAD_SECRET=b5ac11acc77ea8427d10fcd0 +# Added by Payload + +EMAIL_FROM_ADDRESS="arma@onyxsimple.com" +EMAIL_FROM_NAME="Arma" +EMAIL_HOST="smtp-relay.brevo.com" +EMAIL_PORT=587 +EMAIL_USERNAME="b34870001@smtp-brevo.com" +EMAIL_PASSWORD="xsmtpsib-97789fdb52a37baeff8a586a06e849cdaea39bd7dfd850f1a612030328d64899-fVMh5bQkZx0wNQej" + +LAST_UPDATED=1766438881 + +APP_URL=http://localhost:3000 +GAME_TICK_NOTIFY_SECRET=4707fba13f1c66db44df38721fba204f2d6bdc6796ced7a5 + +DISCORD_TOKEN=MTUzNzI2MzQ0Njk2NDMwNjEwMQ.GnTFBc.2LHX1FO7aAm9LbrKzj2IlVFNDmTBXsnBebzk3o +DISCORD_GUILD_ID=851910807020765275 +DISCORD_OPS_CHANNEL_ID=1136692636481237173 +DISCORD_ANNOUNCE_CHANNEL_ID=1136692636481237173 +DISCORD_STAFF_ROLE_IDS=851910807277404187,851910807277404188,851910807277404189,851910807289462814 +DISCORD_ATTENDANCE_POLL_MS=5000 +DISCORD_NOTIFICATION_POLL_MS=5000 \ No newline at end of file diff --git a/public/favicon.webp b/public/favicon.webp new file mode 100644 index 0000000..76d0c1e Binary files /dev/null and b/public/favicon.webp differ diff --git a/src/app/(frontend)/layout.tsx b/src/app/(frontend)/layout.tsx index 0f841a5..3edb259 100644 --- a/src/app/(frontend)/layout.tsx +++ b/src/app/(frontend)/layout.tsx @@ -26,6 +26,13 @@ export const dynamic = "force-dynamic"; export const metadata: Metadata = { description: "A gamified platform for Polaris Task Force, an Arma 3 unit.", title: "Polaris Task Force", + icons: [ + { + url: "/favicon.webp", + type: "image/webp", + rel: "icon" + } + ] }; export default async function RootLayout(props: { children: React.ReactNode }) { diff --git a/src/migrations/20260817_053752.json b/src/migrations/20260817_053752.json new file mode 100644 index 0000000..2871c6a --- /dev/null +++ b/src/migrations/20260817_053752.json @@ -0,0 +1,15671 @@ +{ + "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_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 + }, + "coordinates": { + "name": "coordinates", + "type": "geometry(Point)", + "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_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" + } + }, + "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.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_discord_enabled": { + "name": "preferences_discord_enabled", + "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()" + }, + "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.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 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "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_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" + } + }, + "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_personal_excerpt": { + "name": "dossier_personal_excerpt", + "type": "varchar", + "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 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "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 + }, + "awards_id": { + "name": "awards_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "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_awards_id_idx": { + "name": "profiles_rels_awards_id_idx", + "columns": [ + { + "expression": "awards_id", + "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_awards_fk": { + "name": "profiles_rels_awards_fk", + "tableFrom": "profiles_rels", + "tableTo": "awards", + "columnsFrom": [ + "awards_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": { + "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'" + }, + "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 + }, + "medal_design": { + "name": "medal_design", + "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": { + "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_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" + } + }, + "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.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.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 + } + }, + "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": true + }, + "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 + }, + "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": true + }, + "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'" + }, + "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_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_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'" + }, + "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 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "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_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" + } + }, + "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 + }, + "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'" + }, + "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 + }, + "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_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_time": { + "name": "construction_time", + "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 + }, + "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 + }, + "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_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_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.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": { + "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 + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "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_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" + } + }, + "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 + }, + "file_name": { + "name": "file_name", + "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": { + "maps_name_idx": { + "name": "maps_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "maps_file_name_idx": { + "name": "maps_file_name_idx", + "columns": [ + { + "expression": "file_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "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": {}, + "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.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.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 + }, + "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 + }, + "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 + }, + "experience_id": { + "name": "experience_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "user_notifications_id": { + "name": "user_notifications_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 + }, + "tickets_id": { + "name": "tickets_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "maps_id": { + "name": "maps_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "narrative_events_id": { + "name": "narrative_events_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 + } + }, + "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_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_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_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_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_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_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_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_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": {} + } + }, + "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_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_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_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_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_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_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_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_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" + } + }, + "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 + } + }, + "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": {} + } + }, + "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" + } + }, + "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 + }, + "proximity_threshold": { + "name": "proximity_threshold", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "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 + }, + "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": { + "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 + }, + "content": { + "name": "content", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_shims_shims_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'css'" + } + }, + "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 + } + }, + "enums": { + "public.enum_game_vehicles_status": { + "name": "enum_game_vehicles_status", + "schema": "public", + "values": [ + "idle", + "assigned", + "in_transit", + "damaged", + "destroyed" + ] + }, + "public.enum_game_event_logs_target_collection": { + "name": "enum_game_event_logs_target_collection", + "schema": "public", + "values": [ + "game-structures", + "game-vehicles", + "game-npcs", + "structures", + "resources", + "assets", + "vehicles", + "factions", + "missions", + "campaigns", + "users", + "technologies", + "maps", + "shipments", + "bank-accounts", + "bank-transactions", + "ledger-entries", + "locker-storages", + "loadouts", + "market-listings", + "market-negotiations", + "tickets" + ] + }, + "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", + "account:discord-request", + "finance:deposit", + "finance:withdraw", + "finance:transfer", + "shipment:completed", + "ticket:created", + "ticket:assigned", + "ticket:reply", + "ticket:status" + ] + }, + "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", + "account:discord-request", + "finance:deposit", + "finance:withdraw", + "finance:transfer", + "shipment:completed", + "ticket:created", + "ticket:assigned", + "ticket:reply", + "ticket:status" + ] + }, + "public.enum_awards_type": { + "name": "enum_awards_type", + "schema": "public", + "values": [ + "commendation", + "ribbon", + "medal" + ] + }, + "public.enum_assignments_type": { + "name": "enum_assignments_type", + "schema": "public", + "values": [ + "division", + "squad", + "team", + "special" + ] + }, + "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_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_armor_rating": { + "name": "enum_vehicles_armor_rating", + "schema": "public", + "values": [ + "none", + "light", + "medium", + "heavy", + "composite" + ] + }, + "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_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_narrative_events_triggers_type": { + "name": "enum_narrative_events_triggers_type", + "schema": "public", + "values": [ + "manual", + "mission_complete", + "timer", + "condition" + ] + }, + "public.enum_shims_shims_type": { + "name": "enum_shims_shims_type", + "schema": "public", + "values": [ + "css", + "js" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "id": "d0940e5d-b2ab-45be-9345-1ef43e726db1", + "prevId": "00000000-0000-0000-0000-000000000000" +} \ No newline at end of file diff --git a/src/migrations/20260817_053752.ts b/src/migrations/20260817_053752.ts new file mode 100644 index 0000000..226b304 --- /dev/null +++ b/src/migrations/20260817_053752.ts @@ -0,0 +1,33 @@ +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_shims_shims_type" AS ENUM('css', 'js'); + CREATE TABLE "shims_shims" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "summary" varchar, + "content" varchar NOT NULL, + "type" "enum_shims_shims_type" DEFAULT 'css' NOT NULL + ); + + CREATE TABLE "shims" ( + "id" serial PRIMARY KEY NOT NULL, + "updated_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone + ); + + ALTER TABLE "shims_shims" ADD CONSTRAINT "shims_shims_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."shims"("id") ON DELETE cascade ON UPDATE no action; + CREATE INDEX "shims_shims_order_idx" ON "shims_shims" USING btree ("_order"); + CREATE INDEX "shims_shims_parent_id_idx" ON "shims_shims" USING btree ("_parent_id"); + CREATE UNIQUE INDEX "shims_shims_name_idx" ON "shims_shims" USING btree ("name");`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.execute(sql` + DROP TABLE "shims_shims" CASCADE; + DROP TABLE "shims" CASCADE; + DROP TYPE "public"."enum_shims_shims_type";`) +} diff --git a/src/migrations/20251206_065831.json b/src/migrations/_archived/20251206_065831.json similarity index 100% rename from src/migrations/20251206_065831.json rename to src/migrations/_archived/20251206_065831.json diff --git a/src/migrations/20251206_065831.ts b/src/migrations/_archived/20251206_065831.ts similarity index 100% rename from src/migrations/20251206_065831.ts rename to src/migrations/_archived/20251206_065831.ts diff --git a/src/migrations/20251212_183607.json b/src/migrations/_archived/20251212_183607.json similarity index 100% rename from src/migrations/20251212_183607.json rename to src/migrations/_archived/20251212_183607.json diff --git a/src/migrations/20251212_183607.ts b/src/migrations/_archived/20251212_183607.ts similarity index 100% rename from src/migrations/20251212_183607.ts rename to src/migrations/_archived/20251212_183607.ts diff --git a/src/migrations/20251219_061127.json b/src/migrations/_archived/20251219_061127.json similarity index 100% rename from src/migrations/20251219_061127.json rename to src/migrations/_archived/20251219_061127.json diff --git a/src/migrations/20251219_061127.ts b/src/migrations/_archived/20251219_061127.ts similarity index 100% rename from src/migrations/20251219_061127.ts rename to src/migrations/_archived/20251219_061127.ts diff --git a/src/migrations/20251222_200320.json b/src/migrations/_archived/20251222_200320.json similarity index 100% rename from src/migrations/20251222_200320.json rename to src/migrations/_archived/20251222_200320.json diff --git a/src/migrations/20251222_200320.ts b/src/migrations/_archived/20251222_200320.ts similarity index 100% rename from src/migrations/20251222_200320.ts rename to src/migrations/_archived/20251222_200320.ts diff --git a/src/migrations/20251223_055859.json b/src/migrations/_archived/20251223_055859.json similarity index 100% rename from src/migrations/20251223_055859.json rename to src/migrations/_archived/20251223_055859.json diff --git a/src/migrations/20251223_055859.ts b/src/migrations/_archived/20251223_055859.ts similarity index 100% rename from src/migrations/20251223_055859.ts rename to src/migrations/_archived/20251223_055859.ts diff --git a/src/migrations/index.ts b/src/migrations/index.ts index 6fa4279..c3857da 100644 --- a/src/migrations/index.ts +++ b/src/migrations/index.ts @@ -1,51 +1,49 @@ -import * as migration_20251206_065831 from "./20251206_065831"; -import * as migration_20251212_183607 from "./20251212_183607"; -import * as migration_20251219_061127 from "./20251219_061127"; -import * as migration_20251222_200320 from "./20251222_200320"; -import * as migration_20251223_055859 from "./20251223_055859"; -import * as migration_20260109_065519 from "./20260109_065519"; -import * as migration_20260816_213455 from "./20260816_213455"; -import * as migration_20260816_220000 from "./20260816_220000"; +import * as migration_20260817_053752 from "./20260817_053752"; export const migrations = [ - { + /*{ up: migration_20251206_065831.up, down: migration_20251206_065831.down, - name: "20251206_065831", + name: '20251206_065831', }, { up: migration_20251212_183607.up, down: migration_20251212_183607.down, - name: "20251212_183607", + name: '20251212_183607', }, { up: migration_20251219_061127.up, down: migration_20251219_061127.down, - name: "20251219_061127", + name: '20251219_061127', }, { up: migration_20251222_200320.up, down: migration_20251222_200320.down, - name: "20251222_200320", + name: '20251222_200320', }, { up: migration_20251223_055859.up, down: migration_20251223_055859.down, - name: "20251223_055859", - }, + name: '20251223_055859', + },*/ + // { + // up: migration_20260109_065519.up, + // down: migration_20260109_065519.down, + // name: "20260109_065519", + // }, + // { + // up: migration_20260816_213455.up, + // down: migration_20260816_213455.down, + // name: "20260816_213455", + // }, + // { + // up: migration_20260816_220000.up, + // down: migration_20260816_220000.down, + // name: "20260816_220000", + // }, { - up: migration_20260109_065519.up, - down: migration_20260109_065519.down, - name: "20260109_065519", - }, - { - up: migration_20260816_213455.up, - down: migration_20260816_213455.down, - name: "20260816_213455", - }, - { - up: migration_20260816_220000.up, - down: migration_20260816_220000.down, - name: "20260816_220000", + up: migration_20260817_053752.up, + down: migration_20260817_053752.down, + name: "20260817_053752", }, ];