PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "users" (`id` integer,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,`name` text UNIQUE,PRIMARY KEY (`id`));
INSERT INTO users VALUES(1,'2023-01-20 15:24:32.036023546+00:00','2023-01-20 15:24:32.036023546+00:00',NULL,'test_username');
INSERT INTO users VALUES(2,'2023-01-20 15:24:37.819763186+00:00','2023-01-20 15:24:37.819763186+00:00',NULL,'test_username2');
INSERT INTO users VALUES(3,'2023-03-14 18:44:35.748065603+00:00','2023-03-14 18:44:35.748065603+00:00',NULL,'test_username3');
INSERT INTO users VALUES(4,'2023-10-28 10:11:58.184072133+00:00','2023-10-28 10:11:58.184072133+00:00',NULL,'test_username4');
CREATE TABLE `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,PRIMARY KEY (`id`));
INSERT INTO pre_auth_keys VALUES(1,'abc',3,0,0,1,'2023-03-14 18:48:00.276961537+00:00','2023-03-14 19:47:00+00:00');
INSERT INTO pre_auth_keys VALUES(2,'abc',3,0,0,1,'2023-03-19 02:03:37.127380891+00:00','2023-03-19 03:03:00+00:00');
INSERT INTO pre_auth_keys VALUES(3,'abc',3,0,0,1,'2023-07-12 16:29:17.255869839+00:00','2023-07-12 17:29:17.253994971+00:00');
INSERT INTO pre_auth_keys VALUES(4,'abc',4,0,0,0,'2023-10-28 10:12:25.105521216+00:00','2023-10-28 11:12:25.103560646+00:00');
INSERT INTO pre_auth_keys VALUES(5,'abc',4,0,0,1,'2023-10-28 11:19:38.120019211+00:00','2023-10-28 12:19:38.118375437+00:00');
INSERT INTO pre_auth_keys VALUES(6,'abc',4,0,0,1,'2023-10-28 11:47:58.0406679+00:00','2023-10-28 12:47:58.036681164+00:00');
INSERT INTO pre_auth_keys VALUES(7,'abc',4,0,0,1,'2023-10-30 15:14:21.038723484+00:00','2023-10-30 16:14:21.03662712+00:00');
INSERT INTO pre_auth_keys VALUES(8,'abc',4,0,0,1,'2023-10-30 16:18:12.358594006+00:00','2023-10-30 17:18:12.357173229+00:00');
INSERT INTO pre_auth_keys VALUES(9,'abc',4,0,0,1,'2023-10-31 16:00:05.806877017+00:00','2023-10-31 17:00:05.801991493+00:00');
INSERT INTO pre_auth_keys VALUES(10,'abc',1,0,0,1,'2023-10-31 16:17:04.813054795+00:00','2023-10-31 17:17:04.809264757+00:00');
INSERT INTO pre_auth_keys VALUES(11,'abc',1,0,0,1,'2023-11-20 21:03:07.524801178+00:00','2023-11-20 22:03:07.521904023+00:00');
INSERT INTO pre_auth_keys VALUES(12,'abc',1,0,0,1,'2024-01-09 16:53:26.73433598+00:00','2024-01-09 17:53:26.730815243+00:00');
INSERT INTO pre_auth_keys VALUES(13,'abc',1,0,0,0,'2024-01-15 10:57:54.79892743+00:00','2024-01-15 11:57:54.797213855+00:00');
INSERT INTO pre_auth_keys VALUES(14,'abc',3,0,0,1,'2024-02-09 11:11:44.760824633+00:00','2024-02-09 12:11:44.757791384+00:00');
INSERT INTO pre_auth_keys VALUES(15,'abc',1,0,0,1,'2024-02-09 15:58:39.383257853+00:00','2024-02-09 16:58:39.381325589+00:00');
INSERT INTO pre_auth_keys VALUES(16,'abc',3,0,0,1,'2024-02-15 14:28:52.808875211+00:00','2024-02-15 15:28:52.806886242+00:00');
INSERT INTO pre_auth_keys VALUES(17,'abc',3,0,0,1,'2024-03-22 09:14:48.915733965+00:00','2024-03-22 10:14:48.913376104+00:00');
CREATE TABLE `machines` (`id` integer,`machine_key` varchar(64),`node_key` text,`disco_key` text,`ip_addresses` text,`hostname` text,`given_name` varchar(63),"user_id" integer,`register_method` text,`forced_tags` text,`auth_key_id` integer,`last_seen` datetime,`last_successful_update` datetime,`expiry` datetime,`host_info` text,`endpoints` text,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,PRIMARY KEY (`id`));
INSERT INTO machines VALUES(1,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.1','test_hostname','test_given_name',2,'cli','null',0,'2024-08-21 08:40:52.222825283+00:00','2024-08-21 08:18:52.242124403+00:00','0001-01-01 00:00:00+00:00','{}','[]','2023-01-20 15:25:20.356129891+00:00','2024-08-21 08:40:52.222881482+00:00',NULL);
INSERT INTO machines VALUES(3,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.3','test_hostname','test_given_name',1,'cli','null',0,'2024-08-21 08:40:56.62914289+00:00','2024-08-21 08:18:46.63998217+00:00','0001-01-01 00:00:00+00:00','{}','[]','2023-01-20 15:35:03.370060441+00:00','2024-08-21 08:40:56.629253788+00:00',NULL);
INSERT INTO machines VALUES(6,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.6','test_hostname','test_given_name',3,'authkey','[]',2,'2023-03-20 19:41:31.098518915+00:00','2023-03-20 19:40:35.242992108+00:00','0001-01-01 00:00:00+00:00','{}','[]','2023-03-19 02:04:05.008046059+00:00','2023-03-20 19:41:31.098577514+00:00',NULL);
INSERT INTO machines VALUES(9,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.9','test_hostname','test_given_name',1,'cli','null',0,'2024-07-29 13:49:30.299050593+00:00','2024-07-29 13:48:10.308424118+00:00','0001-01-01 00:00:00+00:00','{}','[]','2023-07-27 08:56:16.70263804+00:00','2024-07-29 13:49:30.299142293+00:00',NULL);
INSERT INTO machines VALUES(14,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.2','test_hostname','test_given_name',1,'cli','null',0,'2024-08-21 08:40:55.887260826+00:00','2024-08-21 08:18:45.907361083+00:00','0001-01-01 00:00:00+00:00','{}','[]','2023-10-10 18:41:13.821106556+00:00','2024-08-21 08:40:55.887344424+00:00',NULL);
INSERT INTO machines VALUES(24,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.16','test_hostname','test_given_name',1,'cli','null',0,'2024-08-21 08:40:53.141335445+00:00','2024-08-21 08:18:43.153446351+00:00','0001-01-01 00:00:00+00:00','{}','[]','2023-12-05 10:35:59.888379379+00:00','2024-08-21 08:40:53.141393344+00:00',NULL);
INSERT INTO machines VALUES(26,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.19','test_hostname','test_given_name',1,'authkey','[]',12,'2024-08-21 08:40:53.117322135+00:00','2024-08-21 08:18:43.129839273+00:00','0001-01-01 00:00:00+00:00','{}','[]','2024-01-09 16:54:15.190375117+00:00','2024-08-21 08:40:53.117392533+00:00',NULL);
INSERT INTO machines VALUES(27,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.10','test_hostname','test_given_name',3,'authkey','[]',14,'2024-08-21 08:40:17.737469943+00:00','2024-08-21 08:18:47.747596039+00:00','0001-01-01 00:00:00+00:00','{}','[]','2024-02-09 11:12:06.970690104+00:00','2024-08-21 08:40:17.737524142+00:00',NULL);
INSERT INTO machines VALUES(28,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.5','test_hostname','test_given_name',1,'cli','null',0,'2024-08-16 16:10:15.388306191+00:00','2024-08-16 15:42:50.445601237+00:00','0001-01-01 00:00:00+00:00','{}','[]','2024-02-09 12:05:40.426476827+00:00','2024-08-16 16:10:15.38838619+00:00',NULL);
INSERT INTO machines VALUES(30,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.4','test_hostname','test_given_name',1,'authkey','[]',15,'2024-08-21 08:40:58.279528619+00:00','2024-08-21 08:18:48.290788011+00:00','0001-01-01 00:00:00+00:00','{}','[]','2024-02-09 15:58:53.072455801+00:00','2024-08-21 08:40:58.279725115+00:00',NULL);
INSERT INTO machines VALUES(31,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.7','test_hostname','test_given_name',3,'authkey','[]',16,'2024-08-21 08:40:59.118548501+00:00','2024-08-21 08:18:49.131796048+00:00','0001-01-01 00:00:00+00:00','{}','[]','2024-02-15 14:29:11.751167192+00:00','2024-08-21 08:40:59.118634099+00:00',NULL);
INSERT INTO machines VALUES(32,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.11','test_hostname','test_given_name',1,'cli','null',0,'2024-08-21 08:40:11.534414289+00:00','2024-08-21 08:18:51.548310242+00:00','0001-01-01 00:00:00+00:00','{}','[]','2024-03-05 21:21:27.482961607+00:00','2024-08-21 08:40:11.534488588+00:00',NULL);
INSERT INTO machines VALUES(33,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.12','test_hostname','test_given_name',3,'authkey','[]',17,'2024-07-24 14:02:32.230464112+00:00','2024-07-24 13:58:06.34346502+00:00','0001-01-01 00:00:00+00:00','{}','[]','2024-03-22 09:15:06.999732064+00:00','2024-07-24 14:02:32.230542511+00:00',NULL);
INSERT INTO machines VALUES(34,'f3c6d0e51ae64e6020827a70fb345e8ca1225acfe2e5064b6d3611ed2ffc0a7b','c2ef0d2e0ec342d836e45690c7f6e4b986553b78997e08c55fbe28238283e30f','7808fad26f34fb919895224f80e01979074d8b8af4b81d2fa465134c20795e11','100.64.0.8','test_hostname','test_given_name',1,'cli','null',0,'2024-08-20 18:55:03.645637741+00:00','2024-08-20 18:53:33.573112275+00:00','0001-01-01 00:00:00+00:00','{}','[]','2024-05-12 18:10:18.529512769+00:00','2024-08-20 18:55:03.64569204+00:00',NULL);
CREATE TABLE `routes` (`id` integer,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,`machine_id` integer,`prefix` text,`advertised` numeric,`enabled` numeric,`is_primary` numeric,PRIMARY KEY (`id`));
INSERT INTO routes VALUES(1,'2023-06-07 19:33:30.351228569+00:00','2024-02-09 12:12:46.846169943+00:00',NULL,1,'0.0.0.0/0',1,1,0);
INSERT INTO routes VALUES(2,'2023-06-07 19:33:30.374825485+00:00','2024-02-09 12:12:46.85904672+00:00',NULL,1,'::/0',1,1,0);
INSERT INTO routes VALUES(3,'2023-06-07 19:40:59.371440019+00:00','2024-02-09 12:12:50.579469958+00:00',NULL,1,'10.9.110.0/24',1,1,1);
INSERT INTO routes VALUES(6,'2024-01-09 16:54:15.230556693+00:00','2024-01-09 16:56:18.454994668+00:00',NULL,26,'172.100.100.0/24',1,1,1);
INSERT INTO routes VALUES(7,'2024-01-09 16:54:15.244301546+00:00','2024-01-09 16:54:15.244301546+00:00',NULL,26,'172.100.100.0/24',1,0,0);
INSERT INTO routes VALUES(8,'2024-02-15 14:29:11.80450206+00:00','2024-02-15 14:31:33.693110756+00:00',NULL,31,'0.0.0.0/0',1,1,0);
INSERT INTO routes VALUES(9,'2024-02-15 14:29:11.819498226+00:00','2024-02-15 14:29:11.819498226+00:00',NULL,31,'0.0.0.0/0',1,0,0);
INSERT INTO routes VALUES(10,'2024-02-15 14:29:11.83141704+00:00','2024-02-15 14:31:33.710242987+00:00',NULL,31,'::/0',1,1,0);
INSERT INTO routes VALUES(11,'2024-02-15 14:29:11.843494351+00:00','2024-02-15 14:29:11.843494351+00:00',NULL,31,'::/0',1,0,0);
INSERT INTO routes VALUES(12,'2024-08-16 14:58:46.162834956+00:00','2024-08-16 14:59:46.380224608+00:00',NULL,32,'192.168.0.24/32',1,1,1);
CREATE TABLE `kvs` (`key` text,`value` text);
CREATE TABLE `pre_auth_key_acl_tags` (`id` integer,`pre_auth_key_id` integer,`tag` text,PRIMARY KEY (`id`));
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`));
CREATE INDEX `idx_namespaces_deleted_at` ON "users"(`deleted_at`);
CREATE INDEX `idx_routes_deleted_at` ON `routes`(`deleted_at`);
CREATE INDEX `idx_users_deleted_at` ON `users`(`deleted_at`);
CREATE UNIQUE INDEX `idx_api_keys_prefix` ON `api_keys`(`prefix`);
COMMIT;
