From 9b10361749ed356164fbae4c44b00b50297f9b3b Mon Sep 17 00:00:00 2001 From: ingalls Date: Fri, 21 Jun 2024 16:27:44 -0600 Subject: [PATCH] DB Migration --- api/migrations/0049_parched_mandarin.sql | 18 + api/migrations/meta/0049_snapshot.json | 1752 ++++++++++++++++++++++ api/migrations/meta/_journal.json | 7 + 3 files changed, 1777 insertions(+) create mode 100644 api/migrations/0049_parched_mandarin.sql create mode 100644 api/migrations/meta/0049_snapshot.json diff --git a/api/migrations/0049_parched_mandarin.sql b/api/migrations/0049_parched_mandarin.sql new file mode 100644 index 000000000..2350ad9fc --- /dev/null +++ b/api/migrations/0049_parched_mandarin.sql @@ -0,0 +1,18 @@ +/* + Unfortunately in current drizzle-kit version we can't automatically get name for primary key. + We are working on making it available! + + Meanwhile you can: + 1. Check pk name in your database, by running + SELECT constraint_name FROM information_schema.table_constraints + WHERE table_schema = 'public' + AND table_name = 'tasks' + AND constraint_type = 'PRIMARY KEY'; + 2. Uncomment code below and paste pk name manually + + Hope to release this update as soon as possible +*/ + +-- ALTER TABLE "tasks" DROP CONSTRAINT "";--> statement-breakpoint +ALTER TABLE "tasks" ADD COLUMN "id" text NOT NULL;--> statement-breakpoint +ALTER TABLE "tasks" ADD CONSTRAINT "tasks_prefix_unique" UNIQUE("prefix"); \ No newline at end of file diff --git a/api/migrations/meta/0049_snapshot.json b/api/migrations/meta/0049_snapshot.json new file mode 100644 index 000000000..8fe708d1d --- /dev/null +++ b/api/migrations/meta/0049_snapshot.json @@ -0,0 +1,1752 @@ +{ + "id": "d9701401-b5f6-4720-b34c-89a0b5cb3478", + "prevId": "b0a32847-d0e4-4537-acc9-92cfee19fd50", + "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 + }, + "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'" + }, + "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" + }, + "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.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": false, + "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": false, + "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": "integer", + "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": "text", + "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": {} + } + }, + "enums": {}, + "schemas": {}, + "_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 88c606b15..1c51e3f61 100644 --- a/api/migrations/meta/_journal.json +++ b/api/migrations/meta/_journal.json @@ -344,6 +344,13 @@ "when": 1719001308828, "tag": "0048_abandoned_fat_cobra", "breakpoints": true + }, + { + "idx": 49, + "version": "7", + "when": 1719008864195, + "tag": "0049_parched_mandarin", + "breakpoints": true } ] } \ No newline at end of file