PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE `migrations` (`id` text,PRIMARY KEY (`id`));
INSERT INTO migrations VALUES('202312101416');
INSERT INTO migrations VALUES('202312101430');
INSERT INTO migrations VALUES('202402151347');
INSERT INTO migrations VALUES('2024041121742');
INSERT INTO migrations VALUES('202406021630');
INSERT INTO migrations VALUES('202409271400');
INSERT INTO migrations VALUES('202407191627');
INSERT INTO migrations VALUES('202408181235');
CREATE TABLE IF NOT EXISTS "pre_auth_keys"  (`id` integer,`key` text,"user_id" integer,`reusable` numeric,`ephemeral` numeric DEFAULT false,`used` numeric DEFAULT false,`created_at` datetime,`expiration` datetime, `tags` text,PRIMARY KEY (`id`),CONSTRAINT `fk_pre_auth_keys_user` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE);
INSERT INTO pre_auth_keys VALUES(1,'c0e73b52c1706fcceea368ae07c19c0e91fbe1f78eff2f7b',1,0,1,0,'2022-02-26 17:02:32.568878371+00:00','2022-02-26 18:11:15.388354971+01:00',NULL);
INSERT INTO pre_auth_keys VALUES(2,'ad293159f9506a02d6de4730e5a2ddb74f9fd4033919ecc5',1,0,1,1,'2022-02-26 17:08:07.828690446+00:00','2022-02-26 18:11:18.890985216+01:00',NULL);
INSERT INTO pre_auth_keys VALUES(3,'66c7e0fbf74010ea2e153d35ffa0f3c48380ef38960d1fd1',1,0,0,1,'2022-02-26 17:11:54.149663776+00:00','2022-02-26 17:16:54.147175388+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(4,'cdbb69c88fabdc2609050c7f99e8ebdea6fcf81a50d802fc',1,0,0,1,'2022-02-26 17:15:34.160746962+00:00','2022-02-26 17:20:34.15935255+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(6,'0a99889a217a2f9cdd20082faadd5c90e72c83a47093a63a',1,0,0,1,'2022-03-04 07:27:17.535172209+00:00','2022-03-04 07:32:17.531871524+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(10,'6e88409e3883c1a47249e428030afd4a46bdaf3adb3b74c1',4,0,0,1,'2022-04-01 20:43:21.757703546+00:00','2022-04-01 20:48:21.756458144+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(13,'9d3c2bde9fcef181a3141dfe59d449bf03f6779dad3580e0',1,0,0,1,'2022-06-26 13:19:48.533865696+00:00','2022-06-26 13:24:48.532164552+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(16,'00b123d52ea8f58379b740fdc5c898b02330ab9b366cb1b4',1,0,0,1,'2023-02-12 06:21:30.15120385+00:00','2023-02-12 06:26:30.140082454+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(17,'c471ce93392c0d3040af0cf6166f4f578c3c66dd180b6e0b',1,0,0,1,'2023-02-12 06:26:55.829311638+00:00','2023-02-12 06:31:55.824701077+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(18,'fe0a438e67687540efcbbbc28c8e6c1b8ac1216f99de33d4',1,0,0,1,'2023-02-12 06:31:13.245185592+00:00','2023-02-12 06:36:13.241695106+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(19,'5a469043f1fa43ff11e54ea242dd882a81aea68f168b9a34',1,0,0,1,'2023-02-12 06:31:13.622545545+00:00','2023-02-12 06:36:13.560890824+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(20,'8b31d9a38282dfe07ffcebdfbd40db6b9e49997c93bed570',1,0,0,1,'2023-02-28 12:45:48.518939706+00:00','2023-02-28 12:50:48.445951259+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(21,'47a4216f2b4e5885d4e53a3de2ffe95521d8a708ca26d31e',1,0,0,1,'2023-02-28 12:45:48.53865321+00:00','2023-02-28 12:50:48.439132728+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(22,'1b7be83871f396e4544c8445acfc8d308dbfe29c7f0197f0',1,0,0,1,'2023-02-28 12:45:48.538806791+00:00','2023-02-28 12:50:48.445073692+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(23,'c9f364adba95c6c46c162eaa3786702805595841c0150927',1,0,0,1,'2023-05-05 08:08:16.73107293+00:00','2023-05-05 08:13:16.722921676+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(24,'a90c87e30fa22ffee39e5ce157dd22c909f2026295e3bce4',1,0,0,1,'2023-08-14 14:36:52.042138928+00:00','2023-08-14 14:41:52.038644473+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(25,'bb059cde5663619a8918bde19b9f8236085725554d9d78c2',1,0,0,1,'2023-08-14 16:15:33.722630834+00:00','2023-08-14 16:20:33.719604033+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(26,'0733b8fc67adc82644c87a95947b24c5d368c633cff92eb4',1,0,0,1,'2023-08-29 06:30:44.934900329+00:00','2023-08-29 06:35:44.931280114+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(27,'567f3a39066fd99c567d14bcc374b25cee0ad71af08b9054',1,0,0,1,'2023-11-03 17:53:45.857200883+00:00','2023-11-03 17:58:45.853742836+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(30,'8aa13c93cbef46d36c8159da51fb41a469ae04f932980890',1,0,0,1,'2024-07-29 12:24:27.140614087+00:00','2024-07-29 12:29:27.136525982+00:00',NULL);
INSERT INTO pre_auth_keys VALUES(31,'9314b171abc433d73b8db297c1c5c65dae0be53d39a71520',1,0,0,1,'2024-08-07 18:35:12.375119763+00:00','2024-08-07 18:40:12.371590392+00:00',NULL);
CREATE TABLE IF NOT EXISTS "routes"  (`id` integer,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,"node_id" integer,`prefix` text,`advertised` numeric,`enabled` numeric,`is_primary` numeric,PRIMARY KEY (`id`),CONSTRAINT `fk_nodes_routes` FOREIGN KEY (`node_id`) REFERENCES `nodes`(`id`) ON DELETE CASCADE);
INSERT INTO routes VALUES(7,'2023-01-15 14:41:49.445054371+01:00','2023-01-29 10:12:11.959527554+01:00',NULL,14,'0.0.0.0/0',1,1,0);
INSERT INTO routes VALUES(8,'2023-01-15 14:41:49.452617331+01:00','2023-01-29 10:12:13.154311101+01:00',NULL,14,'::/0',1,1,0);
INSERT INTO routes VALUES(9,'2024-05-05 07:16:02.944084847+02:00','2024-05-05 13:25:02.977065366+02:00',NULL,3,'10.138.98.32/27',1,1,1);
INSERT INTO routes VALUES(10,'2024-05-05 07:16:02.95709561+02:00','2024-05-05 13:25:04.513930181+02:00',NULL,3,'192.168.208.0/20',1,1,1);
INSERT INTO routes VALUES(11,'2024-05-05 12:46:08.770263657+02:00','2024-05-05 12:46:39.012076195+02:00',NULL,27,'172.19.128.0/20',1,1,1);
INSERT INTO routes VALUES(12,'2024-05-05 12:46:08.779527998+02:00','2024-05-05 12:46:39.843489833+02:00',NULL,27,'10.68.0.0/14',1,1,1);
INSERT INTO routes VALUES(13,'2024-05-05 12:46:08.787239639+02:00','2024-05-05 12:46:40.983839193+02:00',NULL,27,'10.243.219.68/31',1,1,1);
INSERT INTO routes VALUES(14,'2024-05-05 12:46:08.794135892+02:00','2024-08-18 08:45:35.831813635+02:00',NULL,27,'10.30.155.128/25',1,1,1);
INSERT INTO routes VALUES(15,'2024-05-05 12:46:08.799975671+02:00','2024-05-05 12:46:44.333956126+02:00',NULL,27,'10.64.0.0/13',1,1,1);
INSERT INTO routes VALUES(16,'2024-05-05 12:46:08.806879988+02:00','2024-05-05 12:46:45.422824419+02:00',NULL,27,'192.168.0.0/16',1,1,1);
INSERT INTO routes VALUES(17,'2024-08-08 20:44:22.76306591+02:00','2024-12-21 12:10:07.339044415+01:00',NULL,31,'172.27.33.0/24',1,1,1);
INSERT INTO routes VALUES(18,'2024-08-08 20:47:33.469970726+02:00','2024-12-21 12:10:07.442783446+01:00',NULL,31,'10.151.196.0/23',1,1,1);
INSERT INTO routes VALUES(21,'2024-08-08 20:54:05.146666051+02:00','2024-12-21 12:10:07.538738125+01:00',NULL,31,'192.168.33.128/26',1,1,1);
INSERT INTO routes VALUES(23,'2024-08-08 20:54:05.162212208+02:00','2024-12-21 12:10:07.644714175+01:00',NULL,31,'10.69.87.96/27',1,1,1);
INSERT INTO routes VALUES(25,'2024-08-08 20:54:05.179419681+02:00','2024-12-21 12:10:07.753927883+01:00',NULL,31,'192.168.240.184/30',1,1,1);
INSERT INTO routes VALUES(26,'2024-08-08 20:54:05.186132539+02:00','2024-12-21 12:10:07.871905187+01:00',NULL,31,'172.19.162.160/27',1,1,1);
INSERT INTO routes VALUES(28,'2024-08-08 20:54:05.202442818+02:00','2024-12-21 12:10:07.972132539+01:00',NULL,31,'172.30.190.136/30',1,1,1);
INSERT INTO routes VALUES(31,'2024-08-08 20:54:05.246698925+02:00','2024-12-21 12:10:08.150358433+01:00',NULL,31,'10.241.118.90/31',1,1,1);
INSERT INTO routes VALUES(32,'2024-08-08 20:54:05.256984635+02:00','2024-12-21 12:10:08.349521909+01:00',NULL,31,'192.168.0.0/17',1,1,1);
INSERT INTO routes VALUES(37,'2024-08-08 20:54:05.300971626+02:00','2024-12-21 12:10:08.553265285+01:00',NULL,31,'192.168.192.0/19',1,1,1);
INSERT INTO routes VALUES(43,'2024-08-08 20:54:05.383430747+02:00','2024-12-21 12:10:08.66112581+01:00',NULL,31,'172.29.254.8/29',1,1,1);
INSERT INTO routes VALUES(47,'2024-08-08 20:54:05.443181025+02:00','2024-12-21 12:10:08.826993878+01:00',NULL,31,'172.18.8.0/22',1,1,1);
INSERT INTO routes VALUES(48,'2024-08-08 20:54:05.449778605+02:00','2024-12-21 12:10:09.237117302+01:00',NULL,31,'10.169.34.250/31',1,1,1);
INSERT INTO routes VALUES(49,'2024-09-03 06:43:34.875117755+02:00','2024-12-21 12:10:09.342259317+01:00',NULL,31,'172.24.0.0/16',1,1,1);
CREATE TABLE IF NOT EXISTS "api_keys"  (`id` integer,`prefix` text UNIQUE,`hash` blob,`created_at` datetime,`expiration` datetime,`last_seen` datetime,PRIMARY KEY (`id`));
INSERT INTO api_keys VALUES(1,'S2nn85NliD',X'24326224313224437447593364536a63344d6548427a3266435a6d7a4f6f3972575178476b616e703962563435326157387753476364753947454b75','2022-12-25 21:35:28.644697962+01:00','2023-03-22 06:22:18.724817647+01:00',NULL);
INSERT INTO api_keys VALUES(2,'1KZkpEyiMH',X'24326224313224746474656e31394e30496e4f626952327a6f466f574f337749306d73684a453242455270723865557a483171747943436b4c333965','2023-03-22 06:22:18.339101298+01:00','2023-04-13 09:32:24.318715268+02:00',NULL);
INSERT INTO api_keys VALUES(3,'6yBMrqvEDX',X'2432622431322450757377786d6145352e503449364f4c36767069394f7a3948783837494879723050457752397a684b49594b56434d5250384c7a53','2023-04-13 09:32:23.864995051+02:00','2023-07-12 07:32:23.45+00:00',NULL);
CREATE TABLE IF NOT EXISTS "nodes"  (`id` integer,`machine_key` text,`node_key` text,`disco_key` text,"hostname" text,"user_id" integer,`register_method` text,`auth_key_id` integer,`last_seen` datetime,`expiry` datetime,`host_info` text,`endpoints` text,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,`given_name` varchar(63),`forced_tags` text,`ipv4` text,`ipv6` text,PRIMARY KEY (`id`),CONSTRAINT `fk_nodes_user` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE,CONSTRAINT `fk_nodes_auth_key` FOREIGN KEY (`auth_key_id`) REFERENCES `pre_auth_keys`(`id`) ON DELETE SET NULL);
INSERT INTO nodes VALUES(1,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','web-05',1,'authKey',3,'2025-01-24 17:18:58.879117852+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["198.139.228.73:16016","[a5dd:542c:6998:997c:2d87:61b0:c760:ab6f]:56919","112.221.140.130:19743","[6520:763a:5fe2:8e88:5c8e:5b03:eeb1:5588]:20840","[7670:9084:a917:1173:70ce:2798:c805:66dc]:50297","[6f5b:219b:2f0b:cc08:a034:6936:d96b:11be]:28318","60.210.210.203:14631","66.181.120.138:15464"]','2022-02-26 18:11:55.92837512+01:00','2025-01-24 17:18:58.87921789+01:00',NULL,'node001',NULL,'100.64.0.1','fd7a:115c:a1e0::1');
INSERT INTO nodes VALUES(3,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','lt-38',7,'authKey',NULL,'2025-01-24 21:00:03.638659475+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["51.107.242.7:55191","[ce6f:3f5b:da2f:8382:f3a1:e2d4:1c47:fe5e]:25604"]','2022-03-01 19:26:46.242187887+01:00','2025-01-24 21:00:03.638914306+01:00',NULL,'node003',NULL,'100.64.0.3','fd7a:115c:a1e0::3');
INSERT INTO nodes VALUES(4,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','laptop-41',1,'authKey',6,'2025-01-23 10:46:09.470903946+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["[c199:e8ca:c1bb:8364:dde8:bf3e:9467:c050]:61218","168.120.224.160:52272","184.61.212.248:29690","[32a5:51:afc3:d256:5b83:97cd:bb34:13c1]:63964"]','2022-03-04 08:27:19.383566031+01:00','2025-01-23 10:46:09.47099081+01:00',NULL,'node004',NULL,'100.64.0.2','fd7a:115c:a1e0::2');
INSERT INTO nodes VALUES(5,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','lt-42',8,'authKey',NULL,'2025-01-24 15:55:31.927025416+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["[875:166d:8d6f:e053:bbe6:1c6d:843f:25b4]:11215","196.188.180.254:52309","180.187.196.169:52502"]','2022-03-05 13:54:23.660591381+01:00','2025-01-24 15:55:31.927258245+01:00',NULL,'node005',NULL,'100.64.0.4','fd7a:115c:a1e0::4');
INSERT INTO nodes VALUES(6,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','web-14',1,'authkey',NULL,'2025-01-22 13:52:30.302827092+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["166.111.217.41:13979","[cda1:789a:9f90:f1b0:df03:71a6:2bf8:b975]:20326","[ebe:748c:c594:2bd:9c6b:3518:a118:c54d]:30356"]','2022-03-21 15:52:20.739594362+01:00','2025-01-22 13:52:30.303085169+01:00',NULL,'node006',NULL,'100.64.0.5','fd7a:115c:a1e0::5');
INSERT INTO nodes VALUES(7,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','db-70',4,'authkey',10,'2025-01-24 23:11:36.767081207+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["3.26.132.25:924","[1293:e44:fa71:9ae2:ee7c:64ff:5bb2:705a]:8071","[2263:abdc:1461:efa1:8cca:7009:f84:3747]:3731","[ca4e:2134:74e7:8888:8b8:32ea:a7cd:e6fc]:53863","[f38c:fd3b:43da:7790:faf4:7da2:8df9:7bd1]:32916","147.168.107.56:35336"]','2022-04-01 22:43:27.318756043+02:00','2025-01-24 23:11:36.767680407+01:00',NULL,'node007',NULL,'100.64.0.6','fd7a:115c:a1e0::6');
INSERT INTO nodes VALUES(8,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','laptop-34',7,'authkey',NULL,'2025-01-24 10:53:08.967670007+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["[c901:4170:7a7:1a98:5474:f0a8:1722:830b]:48874","39.36.112.35:10587","68.226.133.92:29098","11.142.49.170:22792"]','2022-04-03 09:38:46.178224968+02:00','2025-01-24 10:53:08.967898387+01:00',NULL,'node008',NULL,'100.64.0.7','fd7a:115c:a1e0::7');
INSERT INTO nodes VALUES(9,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','laptop-05',7,'cli',NULL,'2025-01-23 17:54:23.678930678+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["116.140.148.134:50513","[862d:91db:1faa:c25:4bb3:1882:ebe2:dc36]:34449","[d95c:d244:1457:ef8d:92a3:17f8:a38c:efed]:16770","215.159.49.214:32988","136.206.88.82:20612"]','2022-04-09 09:43:07.09027176+02:00','2025-01-23 17:54:23.679048069+01:00',NULL,'node009',NULL,'100.64.0.8','fd7a:115c:a1e0::8');
INSERT INTO nodes VALUES(10,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','db-93',1,'authkey',NULL,'2025-01-18 10:08:12.942196784+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["215.10.187.249:19488","[bfe7:ebf6:e338:79a6:dba:4051:a7df:10]:31519"]','2022-06-26 13:57:07.40762063+02:00','2025-01-18 10:08:12.942403965+01:00',NULL,'node010',NULL,'100.64.0.9','fd7a:115c:a1e0::9');
INSERT INTO nodes VALUES(11,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','email-44',1,'authkey',13,'2025-01-24 21:00:02.220787051+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["87.139.180.4:64685","[bae8:1f82:ff78:e8a8:235e:a50e:c131:2e8]:43129","[3486:5bc7:ada8:8da1:9df9:3cc6:d018:ee8b]:65112","43.182.159.11:27315"]','2022-06-26 15:19:50.566498735+02:00','2025-01-24 21:00:02.221354141+01:00',NULL,'node011',NULL,'100.64.0.10','fd7a:115c:a1e0::a');
INSERT INTO nodes VALUES(14,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','email-49',1,'authkey',NULL,'2025-01-23 06:42:37.593813869+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["61.59.238.85:46024","221.176.225.4:60304","[59f1:edd4:571:ac10:e700:fdbe:6084:e1eb]:43774","[88a8:d815:f927:150a:2c5b:9952:2587:818f]:33169"]','2022-09-26 16:07:54.206927686+02:00','2025-01-23 06:42:37.594039595+01:00',NULL,'node014',NULL,'100.64.0.13','fd7a:115c:a1e0::d');
INSERT INTO nodes VALUES(23,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','db-05',1,'authkey',23,'2025-01-21 14:51:26.001774373+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["[f2e:fd97:b513:b737:33f3:dd2b:df4:a90e]:41096","155.239.169.182:41163","[c908:b81c:b4c8:38d3:e311:b3f6:3067:227c]:11541","[f41f:b9e9:9205:210a:4ff9:ab34:57fd:3148]:21852"]','2023-05-05 10:08:17.301597525+02:00','2025-01-21 14:51:26.002382861+01:00',NULL,'node023','[]','100.64.0.14','fd7a:115c:a1e0::e');
INSERT INTO nodes VALUES(24,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','db-91',1,'authkey',25,'2025-01-13 15:02:48.676721758+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["[e9c0:d5fd:b25c:8cc7:4c58:b666:3fc1:2814]:11543","30.125.129.134:36303","[213c:e72:d34:c59c:d4fa:8bb5:f6d3:d691]:24926","83.92.114.14:38013","223.127.253.143:5148","[e946:63ba:5369:b6db:2d37:8922:57e5:faa8]:51269","39.143.235.96:56031"]','2023-08-14 18:15:34.292188686+02:00','2025-01-13 15:02:48.67679754+01:00',NULL,'node024','[]','100.64.0.15','fd7a:115c:a1e0::f');
INSERT INTO nodes VALUES(25,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','email-69',1,'authkey',26,'2025-01-21 07:41:05.58787908+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["110.245.60.227:50528","33.141.84.140:39332","141.199.13.112:28607","94.8.65.228:34575","58.211.127.215:33647"]','2023-08-29 08:30:45.518580154+02:00','2025-01-21 07:41:05.58844064+01:00',NULL,'node025','[]','100.64.0.16','fd7a:115c:a1e0::10');
INSERT INTO nodes VALUES(26,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','desktop-14',1,'authkey',27,'2025-01-24 23:00:24.184727782+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["[3d31:7ec5:7635:7b6c:c7d0:cf70:bb45:6922]:16454","[80d6:f9fd:44f8:58b7:2049:70d4:721:139d]:31272","173.46.200.67:17932","62.215.78.119:52651"]','2023-11-03 18:53:48.108033118+01:00','2025-01-24 23:00:24.185295273+01:00',NULL,'node026','[]','100.64.0.17','fd7a:115c:a1e0::11');
INSERT INTO nodes VALUES(27,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','srv-56',7,'authkey',NULL,'2025-01-24 20:00:03.216855282+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["13.225.162.245:60672","[5101:751a:5e00:cf46:8b50:8ba9:3c8e:4c7c]:33862","[b9fe:3630:1807:826:a4a6:e5d2:532c:bdc8]:43617","[25b5:5b72:2ecc:193c:b61e:329:81c6:5af6]:39854","214.128.115.35:43726","[436d:61b:9834:b0e0:b2ed:b452:6330:34ee]:59171","[13a0:b8ff:bebb:d48:e16e:869d:b542:531b]:17201","44.157.88.255:43418"]','2023-12-29 19:18:10.814399482+01:00','2025-01-24 20:00:03.217108129+01:00',NULL,'node027','[]','100.64.0.18','fd7a:115c:a1e0::12');
INSERT INTO nodes VALUES(29,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','db-48',1,'authkey',NULL,'2025-01-24 20:00:05.821912941+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["[60b9:155d:3b4a:1ade:51ce:e1f3:a6b8:8e5e]:42022","[ce74:4042:3405:dbfb:8e1b:2f01:5a55:6f49]:20536","[37ed:24ee:1ca9:2cdf:be79:d10a:1247:263c]:27485","199.22.246.223:36955"]','2024-06-02 09:46:39.307697473+02:00','2025-01-24 20:00:05.822130692+01:00',NULL,'node029','[]','100.64.0.19','fd7a:115c:a1e0::13');
INSERT INTO nodes VALUES(30,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','email-50',1,'authkey',30,'2025-01-17 00:08:28.17211431+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["[2f41:257d:dc1b:c709:ea6c:1ad2:ba8e:af48]:60708","[c7df:a6c9:ae51:6570:f6b6:7d2c:1803:50f0]:6218","62.26.91.22:45257","37.207.25.123:5981"]','2024-07-29 14:24:27.684620193+02:00','2025-01-17 00:08:28.17277623+01:00',NULL,'node030','[]','100.64.0.12','fd7a:115c:a1e0::c');
INSERT INTO nodes VALUES(31,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','srv-37',1,'authkey',31,'2025-01-24 17:05:22.207236228+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["49.111.96.135:35528","[abc1:b7cd:f18:6ed2:4b5a:9dce:3f08:8c17]:333","206.118.184.48:48132","7.64.160.114:11101"]','2024-08-07 20:35:12.944541318+02:00','2025-01-24 17:05:22.207871517+01:00',NULL,'node031','[]','100.64.0.20','fd7a:115c:a1e0::14');
INSERT INTO nodes VALUES(32,'mkey:[REDACTED]','nodekey:[REDACTED]','discokey:[REDACTED]','lt-44',1,'cli',NULL,'2025-01-24 23:20:53.282115214+01:00','0001-01-01 00:00:00+00:00','{"fake":"data"}','["85.212.234.244:43593","161.5.250.27:14020","[cd55:bf01:5540:c30:3981:7f71:a471:4993]:25285","24.16.62.70:35569","213.115.82.246:7596","195.216.27.246:54466","[c47f:35c9:41fe:6f5:a40d:3e8b:6679:411e]:12963","19.205.218.60:63516","116.228.193.194:44296","[ee98:8de3:1f5b:731c:751b:ba46:a4a7:8760]:23245","[6eb3:8c34:e6c9:4c6a:25c9:89ca:c165:354e]:65112","[7003:63bb:6429:d463:96a6:990:2bdc:217d]:4300","[d820:584e:2b46:6915:6420:3056:f76:9e33]:48885"]','2024-10-26 07:18:04.947942936+02:00','2025-01-24 23:20:53.282346841+01:00',NULL,'node032',NULL,'100.64.0.21','fd7a:115c:a1e0::15');
CREATE TABLE `policies` (`id` integer PRIMARY KEY AUTOINCREMENT,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,`data` text);
CREATE TABLE IF NOT EXISTS "users"  (`id` integer,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,`name` text UNIQUE,`display_name` text,`email` text,`provider_identifier` text,`provider` text,`profile_pic_url` text,PRIMARY KEY (`id`));
INSERT INTO users VALUES(1,'2022-02-26 18:00:56.104436744+01:00','2024-09-14 08:51:13.31135114+02:00',NULL,'user001','','',NULL,NULL,'');
INSERT INTO users VALUES(4,'2022-04-01 22:30:02.657653341+02:00','2024-09-14 08:55:27.877614108+02:00',NULL,'user004','','',NULL,NULL,'');
INSERT INTO users VALUES(7,'2024-05-05 07:08:47.915309504+02:00','2024-09-14 08:55:02.778476991+02:00',NULL,'user007','','',NULL,NULL,'');
INSERT INTO users VALUES(8,'2024-09-14 08:57:26.215082073+02:00','2024-09-14 08:57:26.215082073+02:00',NULL,'user008','','',NULL,NULL,'');
CREATE INDEX `idx_routes_deleted_at` ON `routes`(`deleted_at`);
CREATE UNIQUE INDEX `idx_api_keys_prefix` ON `api_keys`(`prefix`);
CREATE INDEX `idx_policies_deleted_at` ON `policies`(`deleted_at`);
CREATE INDEX `idx_users_deleted_at` ON `users`(`deleted_at`);
CREATE UNIQUE INDEX idx_provider_identifier ON users (provider_identifier) WHERE provider_identifier IS NOT NULL;
CREATE UNIQUE INDEX idx_name_provider_identifier ON users (name,provider_identifier);
CREATE UNIQUE INDEX idx_name_no_provider_identifier ON users (name) WHERE provider_identifier IS NULL;
COMMIT;
