From 04191541403a432467824643bd1ba3c4e4580a70 Mon Sep 17 00:00:00 2001 From: ingalls Date: Tue, 3 Sep 2024 16:27:21 -0600 Subject: [PATCH] DB Migration --- api/migrations/0058_left_secret_warriors.sql | 1 + api/migrations/meta/0058_snapshot.json | 2041 ++++++++++++++++++ api/migrations/meta/_journal.json | 7 + 3 files changed, 2049 insertions(+) create mode 100644 api/migrations/0058_left_secret_warriors.sql create mode 100644 api/migrations/meta/0058_snapshot.json diff --git a/api/migrations/0058_left_secret_warriors.sql b/api/migrations/0058_left_secret_warriors.sql new file mode 100644 index 000000000..db6c2e5a8 --- /dev/null +++ b/api/migrations/0058_left_secret_warriors.sql @@ -0,0 +1 @@ +ALTER TABLE "layers" ADD COLUMN "ephemeral" json DEFAULT '{}'::json NOT NULL; \ No newline at end of file diff --git a/api/migrations/meta/0058_snapshot.json b/api/migrations/meta/0058_snapshot.json new file mode 100644 index 000000000..6864437cf --- /dev/null +++ b/api/migrations/meta/0058_snapshot.json @@ -0,0 +1,2041 @@ +{ + "id": "0e674e99-73be-4017-9c68-9110046679b4", + "prevId": "a7b683e7-9a08-40b5-a47b-9995c36a27f6", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.basemaps": { + "name": "basemaps", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "bounds": { + "name": "bounds", + "type": "GEOMETRY(POLYGON, 4326)", + "primaryKey": false, + "notNull": false + }, + "center": { + "name": "center", + "type": "GEOMETRY(POINT, 4326)", + "primaryKey": false, + "notNull": false + }, + "minzoom": { + "name": "minzoom", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "maxzoom": { + "name": "maxzoom", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 16 + }, + "format": { + "name": "format", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'png'" + }, + "style": { + "name": "style", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'zxy'" + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'raster'" + } + }, + "indexes": { + "basemaps_username_idx": { + "name": "basemaps_username_idx", + "columns": [ + { + "expression": "username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "basemaps_username_profile_username_fk": { + "name": "basemaps_username_profile_username_fk", + "tableFrom": "basemaps", + "tableTo": "profile", + "columnsFrom": [ + "username" + ], + "columnsTo": [ + "username" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.connections": { + "name": "connections", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "agency": { + "name": "agency", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "auth": { + "name": "auth", + "type": "json", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.connection_sinks": { + "name": "connection_sinks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "connection": { + "name": "connection", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body": { + "name": "body", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "logging": { + "name": "logging", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": { + "connection_sinks_connection_connections_id_fk": { + "name": "connection_sinks_connection_connections_id_fk", + "tableFrom": "connection_sinks", + "tableTo": "connections", + "columnsFrom": [ + "connection" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.connection_tokens": { + "name": "connection_tokens", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": false, + "notNull": true + }, + "connection": { + "name": "connection", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + } + }, + "indexes": {}, + "foreignKeys": { + "connection_tokens_connection_connections_id_fk": { + "name": "connection_tokens_connection_connections_id_fk", + "tableFrom": "connection_tokens", + "tableTo": "connections", + "columnsFrom": [ + "connection" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.data": { + "name": "data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "auto_transform": { + "name": "auto_transform", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "mission_sync": { + "name": "mission_sync", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "mission_diff": { + "name": "mission_diff", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "mission_role": { + "name": "mission_role", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'MISSION_SUBSCRIBER'" + }, + "mission_token": { + "name": "mission_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mission_groups": { + "name": "mission_groups", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "assets": { + "name": "assets", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'[\"*\"]'::json" + }, + "connection": { + "name": "connection", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "data_connection_connections_id_fk": { + "name": "data_connection_connections_id_fk", + "tableFrom": "data", + "tableTo": "connections", + "columnsFrom": [ + "connection" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.icons": { + "name": "icons", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "iconset": { + "name": "iconset", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type2525b": { + "name": "type2525b", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "icons_iconset_iconsets_uid_fk": { + "name": "icons_iconset_iconsets_uid_fk", + "tableFrom": "icons", + "tableTo": "iconsets", + "columnsFrom": [ + "iconset" + ], + "columnsTo": [ + "uid" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.iconsets": { + "name": "iconsets", + "schema": "", + "columns": { + "uid": { + "name": "uid", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "default_group": { + "name": "default_group", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "default_friendly": { + "name": "default_friendly", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "default_hostile": { + "name": "default_hostile", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "default_neutral": { + "name": "default_neutral", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "default_unknown": { + "name": "default_unknown", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "skip_resize": { + "name": "skip_resize", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "iconsets_username_idx": { + "name": "iconsets_username_idx", + "columns": [ + { + "expression": "username", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "iconsets_username_profile_username_fk": { + "name": "iconsets_username_profile_username_fk", + "tableFrom": "iconsets", + "tableTo": "profile", + "columnsFrom": [ + "username" + ], + "columnsTo": [ + "username" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.imports": { + "name": "imports", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'Pending'" + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "batch": { + "name": "batch", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "result": { + "name": "result", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "mode": { + "name": "mode", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'Unknown'" + }, + "mode_id": { + "name": "mode_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "config": { + "name": "config", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + } + }, + "indexes": {}, + "foreignKeys": { + "imports_username_profile_username_fk": { + "name": "imports_username_profile_username_fk", + "tableFrom": "imports", + "tableTo": "profile", + "columnsFrom": [ + "username" + ], + "columnsTo": [ + "username" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.layers": { + "name": "layers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "priority": { + "name": "priority", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'off'" + }, + "alarm_period": { + "name": "alarm_period", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 30 + }, + "alarm_evals": { + "name": "alarm_evals", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 5 + }, + "alarm_points": { + "name": "alarm_points", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 4 + }, + "alarm_threshold": { + "name": "alarm_threshold", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "enabled_styles": { + "name": "enabled_styles", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "styles": { + "name": "styles", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "logging": { + "name": "logging", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "stale": { + "name": "stale", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 20 + }, + "task": { + "name": "task", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "connection": { + "name": "connection", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "cron": { + "name": "cron", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "environment": { + "name": "environment", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "ephemeral": { + "name": "ephemeral", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "config": { + "name": "config", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "memory": { + "name": "memory", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 128 + }, + "timeout": { + "name": "timeout", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 128 + }, + "data": { + "name": "data", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "schema": { + "name": "schema", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{\"type\":\"object\",\"required\":[],\"properties\":{}}'::json" + } + }, + "indexes": {}, + "foreignKeys": { + "layers_connection_connections_id_fk": { + "name": "layers_connection_connections_id_fk", + "tableFrom": "layers", + "tableTo": "connections", + "columnsFrom": [ + "connection" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "layers_data_data_id_fk": { + "name": "layers_data_data_id_fk", + "tableFrom": "layers", + "tableTo": "data", + "columnsFrom": [ + "data" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "layers_connection_name_unique": { + "name": "layers_connection_name_unique", + "nullsNotDistinct": false, + "columns": [ + "connection", + "name" + ] + } + } + }, + "public.layer_alerts": { + "name": "layer_alerts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "layer": { + "name": "layer", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'alert-circle'" + }, + "priority": { + "name": "priority", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'yellow'" + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'Details Unknown'" + }, + "hidden": { + "name": "hidden", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": { + "layer_alerts_layer_layers_id_fk": { + "name": "layer_alerts_layer_layers_id_fk", + "tableFrom": "layer_alerts", + "tableTo": "layers", + "columnsFrom": [ + "layer" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.layers_template": { + "name": "layers_template", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "datasync": { + "name": "datasync", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "priority": { + "name": "priority", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'off'" + }, + "enabled_styles": { + "name": "enabled_styles", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "styles": { + "name": "styles", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "logging": { + "name": "logging", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "stale": { + "name": "stale", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 20 + }, + "task": { + "name": "task", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cron": { + "name": "cron", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "config": { + "name": "config", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "memory": { + "name": "memory", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 128 + }, + "timeout": { + "name": "timeout", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 128 + }, + "alarm_period": { + "name": "alarm_period", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 30 + }, + "alarm_evals": { + "name": "alarm_evals", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 5 + }, + "alarm_points": { + "name": "alarm_points", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 4 + }, + "alarm_threshold": { + "name": "alarm_threshold", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": { + "layers_template_username_profile_username_fk": { + "name": "layers_template_username_profile_username_fk", + "tableFrom": "layers_template", + "tableTo": "profile", + "columnsFrom": [ + "username" + ], + "columnsTo": [ + "username" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.overlays": { + "name": "overlays", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'vector'" + }, + "styles": { + "name": "styles", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.profile": { + "name": "profile", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'Unknown'" + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "last_login": { + "name": "last_login", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "auth": { + "name": "auth", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "phone": { + "name": "phone", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "tak_callsign": { + "name": "tak_callsign", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'CloudTAK User'" + }, + "tak_group": { + "name": "tak_group", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'Orange'" + }, + "tak_role": { + "name": "tak_role", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'Team Member'" + }, + "tak_loc": { + "name": "tak_loc", + "type": "GEOMETRY(POINT, 4326)", + "primaryKey": false, + "notNull": false + }, + "display_stale": { + "name": "display_stale", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'10 Minutes'" + }, + "display_distance": { + "name": "display_distance", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'mile'" + }, + "display_elevation": { + "name": "display_elevation", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'feet'" + }, + "display_speed": { + "name": "display_speed", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'mi/h'" + }, + "system_admin": { + "name": "system_admin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "agency_admin": { + "name": "agency_admin", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'[]'::json" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.profile_chats": { + "name": "profile_chats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chatroom": { + "name": "chatroom", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sender_callsign": { + "name": "sender_callsign", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sender_uid": { + "name": "sender_uid", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "message_id": { + "name": "message_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "profile_chats_username_profile_username_fk": { + "name": "profile_chats_username_profile_username_fk", + "tableFrom": "profile_chats", + "tableTo": "profile", + "columnsFrom": [ + "username" + ], + "columnsTo": [ + "username" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.profile_features": { + "name": "profile_features", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'/'" + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "properties": { + "name": "properties", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "geometry": { + "name": "geometry", + "type": "GEOMETRY(GEOMETRYZ, 4326)", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "profile_features_username_profile_username_fk": { + "name": "profile_features_username_profile_username_fk", + "tableFrom": "profile_features", + "tableTo": "profile", + "columnsFrom": [ + "username" + ], + "columnsTo": [ + "username" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.profile_missions": { + "name": "profile_missions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "guid": { + "name": "guid", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.profile_overlays": { + "name": "profile_overlays", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "pos": { + "name": "pos", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 5 + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'vector'" + }, + "opacity": { + "name": "opacity", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'1'" + }, + "visible": { + "name": "visible", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "styles": { + "name": "styles", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "mode": { + "name": "mode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "mode_id": { + "name": "mode_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "profile_overlays_username_profile_username_fk": { + "name": "profile_overlays_username_profile_username_fk", + "tableFrom": "profile_overlays", + "tableTo": "profile", + "columnsFrom": [ + "username" + ], + "columnsTo": [ + "username" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "profile_overlays_username_url_unique": { + "name": "profile_overlays_username_url_unique", + "nullsNotDistinct": false, + "columns": [ + "username", + "url" + ] + } + } + }, + "public.server": { + "name": "server", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'Default'" + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "auth": { + "name": "auth", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "api": { + "name": "api", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "provider_url": { + "name": "provider_url", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "provider_secret": { + "name": "provider_secret", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "provider_client": { + "name": "provider_client", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.settings": { + "name": "settings", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.spatial_ref_sys": { + "name": "spatial_ref_sys", + "schema": "", + "columns": { + "srid": { + "name": "srid", + "type": "integer", + "primaryKey": true, + "notNull": true + }, + "auth_name": { + "name": "auth_name", + "type": "varchar(256)", + "primaryKey": false, + "notNull": false + }, + "auth_srid": { + "name": "auth_srid", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "srtext": { + "name": "srtext", + "type": "varchar(2048)", + "primaryKey": false, + "notNull": false + }, + "proj4text": { + "name": "proj4text", + "type": "varchar(2048)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.tasks": { + "name": "tasks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "prefix": { + "name": "prefix", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "repo": { + "name": "repo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "readme": { + "name": "readme", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "tasks_prefix_unique": { + "name": "tasks_prefix_unique", + "nullsNotDistinct": false, + "columns": [ + "prefix" + ] + } + } + }, + "public.tokens": { + "name": "tokens", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.video_lease": { + "name": "video_lease", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created": { + "name": "created", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "updated": { + "name": "updated", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now()" + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expiration": { + "name": "expiration", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "Now() + INTERVAL 1 HOUR;" + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stream_user": { + "name": "stream_user", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stream_pass": { + "name": "stream_pass", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "video_lease_username_profile_username_fk": { + "name": "video_lease_username_profile_username_fk", + "tableFrom": "video_lease", + "tableTo": "profile", + "columnsFrom": [ + "username" + ], + "columnsTo": [ + "username" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/api/migrations/meta/_journal.json b/api/migrations/meta/_journal.json index e633c4841..908889b70 100644 --- a/api/migrations/meta/_journal.json +++ b/api/migrations/meta/_journal.json @@ -407,6 +407,13 @@ "when": 1725402051432, "tag": "0057_stale_rogue", "breakpoints": true + }, + { + "idx": 58, + "version": "7", + "when": 1725402441849, + "tag": "0058_left_secret_warriors", + "breakpoints": true } ] } \ No newline at end of file