summaryrefslogtreecommitdiff
path: root/drizzle/20260115153715_little_legion
diff options
context:
space:
mode:
authorJustZvan <justzvan@justzvan.xyz>2026-02-06 12:16:40 +0100
committerJustZvan <justzvan@justzvan.xyz>2026-02-06 12:16:40 +0100
commite904e9634548e47d611bdcbb88d7b180b927fd5f (patch)
tree21aa5be08fc5b22585508c0263ee5ea4effcc593 /drizzle/20260115153715_little_legion
feat: initial commit!
Diffstat (limited to 'drizzle/20260115153715_little_legion')
-rw-r--r--drizzle/20260115153715_little_legion/migration.sql16
-rw-r--r--drizzle/20260115153715_little_legion/snapshot.json510
2 files changed, 526 insertions, 0 deletions
diff --git a/drizzle/20260115153715_little_legion/migration.sql b/drizzle/20260115153715_little_legion/migration.sql
new file mode 100644
index 0000000..adffaea
--- /dev/null
+++ b/drizzle/20260115153715_little_legion/migration.sql
@@ -0,0 +1,16 @@
+CREATE TABLE "alerts" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "alerts_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "device_id" integer NOT NULL,
+ "parent_id" integer NOT NULL,
+ "category" varchar(50),
+ "title" varchar(255) NOT NULL,
+ "message" text NOT NULL,
+ "summary" text NOT NULL,
+ "confidence" integer NOT NULL,
+ "packageName" varchar(255),
+ "timestamp" integer NOT NULL,
+ "read" boolean DEFAULT false NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "users" ADD COLUMN "push_tokens" text[] DEFAULT '{}'::text[];--> statement-breakpoint
+ALTER TABLE "users" DROP COLUMN "push_token"; \ No newline at end of file
diff --git a/drizzle/20260115153715_little_legion/snapshot.json b/drizzle/20260115153715_little_legion/snapshot.json
new file mode 100644
index 0000000..7f889e9
--- /dev/null
+++ b/drizzle/20260115153715_little_legion/snapshot.json
@@ -0,0 +1,510 @@
+{
+ "version": "8",
+ "dialect": "postgres",
+ "id": "20210d2e-5ece-45cc-92d5-960b1045a90b",
+ "prevIds": [
+ "3673abad-8c2e-40e2-842b-5b94f1f0979f"
+ ],
+ "ddl": [
+ {
+ "isRlsEnabled": false,
+ "name": "alerts",
+ "entityType": "tables",
+ "schema": "public"
+ },
+ {
+ "isRlsEnabled": false,
+ "name": "deviceConfig",
+ "entityType": "tables",
+ "schema": "public"
+ },
+ {
+ "isRlsEnabled": false,
+ "name": "linkedDevices",
+ "entityType": "tables",
+ "schema": "public"
+ },
+ {
+ "isRlsEnabled": false,
+ "name": "users",
+ "entityType": "tables",
+ "schema": "public"
+ },
+ {
+ "type": "integer",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": {
+ "type": "always",
+ "name": "alerts_id_seq",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": 1,
+ "cycle": false
+ },
+ "name": "id",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "alerts"
+ },
+ {
+ "type": "integer",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "device_id",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "alerts"
+ },
+ {
+ "type": "integer",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "parent_id",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "alerts"
+ },
+ {
+ "type": "varchar(50)",
+ "typeSchema": null,
+ "notNull": false,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "category",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "alerts"
+ },
+ {
+ "type": "varchar(255)",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "title",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "alerts"
+ },
+ {
+ "type": "text",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "message",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "alerts"
+ },
+ {
+ "type": "text",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "summary",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "alerts"
+ },
+ {
+ "type": "integer",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "confidence",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "alerts"
+ },
+ {
+ "type": "varchar(255)",
+ "typeSchema": null,
+ "notNull": false,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "packageName",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "alerts"
+ },
+ {
+ "type": "integer",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "timestamp",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "alerts"
+ },
+ {
+ "type": "boolean",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": "false",
+ "generated": null,
+ "identity": null,
+ "name": "read",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "alerts"
+ },
+ {
+ "type": "integer",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": {
+ "type": "always",
+ "name": "deviceConfig_id_seq",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": 1,
+ "cycle": false
+ },
+ "name": "id",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "deviceConfig"
+ },
+ {
+ "type": "integer",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "device_id",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "deviceConfig"
+ },
+ {
+ "type": "boolean",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": "false",
+ "generated": null,
+ "identity": null,
+ "name": "disable_buddy",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "deviceConfig"
+ },
+ {
+ "type": "boolean",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": "true",
+ "generated": null,
+ "identity": null,
+ "name": "block_adult_sites",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "deviceConfig"
+ },
+ {
+ "type": "boolean",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": "true",
+ "generated": null,
+ "identity": null,
+ "name": "new_contact_alerts",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "deviceConfig"
+ },
+ {
+ "type": "boolean",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": "false",
+ "generated": null,
+ "identity": null,
+ "name": "block_strangers",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "deviceConfig"
+ },
+ {
+ "type": "boolean",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": "true",
+ "generated": null,
+ "identity": null,
+ "name": "notify_dangerous_messages",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "deviceConfig"
+ },
+ {
+ "type": "boolean",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": "true",
+ "generated": null,
+ "identity": null,
+ "name": "notify_new_contact_added",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "deviceConfig"
+ },
+ {
+ "type": "integer",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": {
+ "type": "always",
+ "name": "linkedDevices_id_seq",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": 1,
+ "cycle": false
+ },
+ "name": "id",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "linkedDevices"
+ },
+ {
+ "type": "varchar(255)",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": "'New Device'",
+ "generated": null,
+ "identity": null,
+ "name": "nickname",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "linkedDevices"
+ },
+ {
+ "type": "integer",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "parent_id",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "linkedDevices"
+ },
+ {
+ "type": "integer",
+ "typeSchema": null,
+ "notNull": false,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "last_online",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "linkedDevices"
+ },
+ {
+ "type": "integer",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": 1,
+ "cycle": false
+ },
+ "name": "id",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "users"
+ },
+ {
+ "type": "varchar(255)",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "email",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "users"
+ },
+ {
+ "type": "varchar(255)",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "password",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "users"
+ },
+ {
+ "type": "boolean",
+ "typeSchema": null,
+ "notNull": false,
+ "dimensions": 0,
+ "default": "false",
+ "generated": null,
+ "identity": null,
+ "name": "emailVerified",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "users"
+ },
+ {
+ "type": "varchar(6)",
+ "typeSchema": null,
+ "notNull": true,
+ "dimensions": 0,
+ "default": null,
+ "generated": null,
+ "identity": null,
+ "name": "emailCode",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "users"
+ },
+ {
+ "type": "text",
+ "typeSchema": null,
+ "notNull": false,
+ "dimensions": 1,
+ "default": "'{}'",
+ "generated": null,
+ "identity": null,
+ "name": "push_tokens",
+ "entityType": "columns",
+ "schema": "public",
+ "table": "users"
+ },
+ {
+ "columns": [
+ "id"
+ ],
+ "nameExplicit": false,
+ "name": "alerts_pkey",
+ "schema": "public",
+ "table": "alerts",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ "id"
+ ],
+ "nameExplicit": false,
+ "name": "deviceConfig_pkey",
+ "schema": "public",
+ "table": "deviceConfig",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ "id"
+ ],
+ "nameExplicit": false,
+ "name": "linkedDevices_pkey",
+ "schema": "public",
+ "table": "linkedDevices",
+ "entityType": "pks"
+ },
+ {
+ "columns": [
+ "id"
+ ],
+ "nameExplicit": false,
+ "name": "users_pkey",
+ "schema": "public",
+ "table": "users",
+ "entityType": "pks"
+ },
+ {
+ "nameExplicit": false,
+ "columns": [
+ "device_id"
+ ],
+ "nullsNotDistinct": false,
+ "name": "deviceConfig_device_id_key",
+ "schema": "public",
+ "table": "deviceConfig",
+ "entityType": "uniques"
+ },
+ {
+ "nameExplicit": false,
+ "columns": [
+ "email"
+ ],
+ "nullsNotDistinct": false,
+ "name": "users_email_key",
+ "schema": "public",
+ "table": "users",
+ "entityType": "uniques"
+ }
+ ],
+ "renames": []
+} \ No newline at end of file