diff --git a/constant/cache_prefix.go b/constant/cache_prefix.go index b36146d..ab8e298 100644 --- a/constant/cache_prefix.go +++ b/constant/cache_prefix.go @@ -6,5 +6,5 @@ const ( ) const ( - SyncWgConfigFile = "queues:wg:" + SyncWgConfigFile = "queues:wg:sync-file" ) diff --git a/http/api/server.go b/http/api/server.go index 62c7d6f..ad20c03 100644 --- a/http/api/server.go +++ b/http/api/server.go @@ -6,6 +6,7 @@ import ( "golang.zx2c4.com/wireguard/wgctrl/wgtypes" "wireguard-dashboard/http/param" "wireguard-dashboard/model/entity" + "wireguard-dashboard/queues" "wireguard-dashboard/repository" "wireguard-dashboard/utils" ) @@ -28,7 +29,9 @@ func (server) SaveServer(c *gin.Context) { } var err error + var serverId string if p.Id != "" { + serverId = p.Id if err = repository.Server().Update(p); err != nil { log.Errorf("更改服务端信息失败: %v", err.Error()) } @@ -39,7 +42,7 @@ func (server) SaveServer(c *gin.Context) { return } publicKey := privateKey.PublicKey() - if err = repository.Server().Save(&entity.Server{ + serverInfo := &entity.Server{ IpScope: p.IpScope, ListenPort: p.ListenPort, PrivateKey: privateKey.String(), @@ -47,9 +50,12 @@ func (server) SaveServer(c *gin.Context) { PostUpScript: p.PostUpScript, PreDownScript: p.PreDownScript, PostDownScript: p.PostDownScript, - }); err != nil { + } + if err = repository.Server().Save(serverInfo); err != nil { log.Errorf("新增服务端失败: %v", err.Error()) } + + serverId = serverInfo.Id } if err != nil { @@ -57,6 +63,13 @@ func (server) SaveServer(c *gin.Context) { return } + go func() { + if err = queues.PutAsyncWireguardConfigFile(serverId); err != nil { + log.Errorf("投递同步配置文件任务失败: %s", err.Error()) + } + }() + + utils.GinResponse(c).OK() } // GetServer diff --git a/logs/runtime-hyxc.log b/logs/runtime-hyxc.log index fb33770..d07e214 100644 --- a/logs/runtime-hyxc.log +++ b/logs/runtime-hyxc.log @@ -1832,3 +1832,1296 @@ [2024-03-08 14:59:07.179] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 [2024-03-08 14:59:07.179] INFO script/db_migrate.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 [2024-03-08 14:59:07.180] INFO script/db_migrate.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:27:04.100] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 10:27:04.112] INFO migrator/migrator.go:73 [60.4µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:27:04.112] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 10:27:04.113] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:27:04.113] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:27:04.114] INFO sqlite@v1.5.5/migrator.go:413 [503.3µs] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:27:04.114] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:27:04.115] INFO sqlite@v1.5.5/migrator.go:423 [552.4µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:27:04.116] INFO sqlite@v1.5.5/migrator.go:423 [1.055ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:27:04.118] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:27:04.118] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:27:04.119] INFO sqlite@v1.5.5/migrator.go:413 [561.3µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:27:04.119] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:27:04.119] INFO sqlite@v1.5.5/migrator.go:423 [558.1µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:27:04.121] INFO sqlite@v1.5.5/migrator.go:423 [1.1334ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:27:04.122] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 10:27:04.122] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:27:04.123] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 10:27:04.123] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:27:04.123] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 10:27:04.124] INFO sqlite@v1.5.5/migrator.go:413 [566.9µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 10:27:04.125] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 10:27:04.125] INFO sqlite@v1.5.5/migrator.go:423 [504.8µs] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 10:27:04.126] INFO sqlite@v1.5.5/migrator.go:423 [1.1984ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 10:27:04.128] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 10:27:04.129] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:27:04.129] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 10:27:04.129] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:27:04.130] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:27:04.131] INFO sqlite@v1.5.5/migrator.go:413 [531.2µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:27:04.131] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:27:04.131] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:27:04.133] INFO sqlite@v1.5.5/migrator.go:423 [1.6744ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:27:04.134] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:27:04.134] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:27:04.135] INFO sqlite@v1.5.5/migrator.go:413 [581.3µs] [rows:0] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:27:04.136] INFO sqlite@v1.5.5/migrator.go:423 [54.8µs] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:27:04.136] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:27:04.138] INFO sqlite@v1.5.5/migrator.go:423 [1.6661ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:27:04.139] INFO sqlite@v1.5.5/migrator.go:219 [517.3µs] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 10:27:04.139] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 10:27:04.139] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:27:04.140] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 10:27:04.140] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 10:27:04.140] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:28:51.407] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 10:28:51.420] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:28:51.421] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 10:28:51.421] INFO sqlite@v1.5.5/migrator.go:79 [517.2µs] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:28:51.421] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:28:51.423] INFO sqlite@v1.5.5/migrator.go:413 [1.6012ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:28:51.423] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:28:51.423] INFO sqlite@v1.5.5/migrator.go:423 [603.7µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:28:51.424] INFO sqlite@v1.5.5/migrator.go:423 [1.1053ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:28:51.426] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:28:51.427] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:28:51.428] INFO sqlite@v1.5.5/migrator.go:413 [1.147ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:28:51.428] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:28:51.429] INFO sqlite@v1.5.5/migrator.go:423 [522.4µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:28:51.430] INFO sqlite@v1.5.5/migrator.go:423 [1.1323ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:28:51.432] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 10:28:51.432] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:28:51.432] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 10:28:51.432] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:28:51.433] INFO sqlite@v1.5.5/migrator.go:368 [545.5µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 10:28:51.434] INFO sqlite@v1.5.5/migrator.go:413 [573.2µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 10:28:51.434] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 10:28:51.434] INFO sqlite@v1.5.5/migrator.go:423 [520.9µs] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 10:28:51.435] INFO sqlite@v1.5.5/migrator.go:423 [1.1297ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 10:28:51.437] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 10:28:51.438] INFO migrator/migrator.go:73 [587.9µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:28:51.438] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 10:28:51.438] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:28:51.438] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:28:51.439] INFO sqlite@v1.5.5/migrator.go:413 [519.9µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:28:51.440] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:28:51.440] INFO sqlite@v1.5.5/migrator.go:423 [552.7µs] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:28:51.441] INFO sqlite@v1.5.5/migrator.go:423 [1.061ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:28:51.443] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:28:51.443] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:28:51.444] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:0] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:28:51.444] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:28:51.446] INFO sqlite@v1.5.5/migrator.go:423 [116.2µs] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:28:51.447] INFO sqlite@v1.5.5/migrator.go:423 [1.0559ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:28:51.449] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 10:28:51.449] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 10:28:51.449] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:28:51.450] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 10:28:51.450] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 10:28:51.450] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:29:36.257] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 10:29:36.270] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:29:36.271] INFO sqlite@v1.5.5/migrator.go:125 [1.0303ms] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 10:29:36.271] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:29:36.271] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:29:36.273] INFO sqlite@v1.5.5/migrator.go:413 [1.5024ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:29:36.273] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:29:36.274] INFO sqlite@v1.5.5/migrator.go:423 [514.5µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:29:36.275] INFO sqlite@v1.5.5/migrator.go:423 [1.1008ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:29:36.277] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:29:36.277] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:29:36.278] INFO sqlite@v1.5.5/migrator.go:413 [1.0672ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:29:36.279] INFO sqlite@v1.5.5/migrator.go:423 [606.7µs] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:29:36.279] INFO sqlite@v1.5.5/migrator.go:423 [568.1µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:29:36.282] INFO sqlite@v1.5.5/migrator.go:423 [2.1327ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:29:36.283] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 10:29:36.283] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:29:36.284] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 10:29:36.284] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:29:36.284] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 10:29:36.285] INFO sqlite@v1.5.5/migrator.go:413 [537.8µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 10:29:36.285] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 10:29:36.285] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 10:29:36.287] INFO sqlite@v1.5.5/migrator.go:423 [1.6092ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 10:29:36.289] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 10:29:36.289] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:29:36.289] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 10:29:36.290] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:29:36.290] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:29:36.291] INFO sqlite@v1.5.5/migrator.go:413 [626.1µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:29:36.291] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:29:36.291] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:29:36.292] INFO sqlite@v1.5.5/migrator.go:423 [1.1049ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:29:36.295] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:29:36.295] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:29:36.296] INFO sqlite@v1.5.5/migrator.go:413 [535.1µs] [rows:0] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:29:36.296] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:29:36.297] INFO sqlite@v1.5.5/migrator.go:423 [518.6µs] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:29:36.298] INFO sqlite@v1.5.5/migrator.go:423 [1.5841ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:29:36.300] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 10:29:36.300] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 10:29:36.300] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:29:36.300] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 10:29:36.301] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 10:29:36.301] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:31:33.798] ERROR component/jwt.go:69 缓存中用户[0dbdde3660934396b79a6bad002d82a8]的token查找失败: redis: nil +[2024-03-11 10:31:40.481] INFO repository/user.go:55 [504.9µs] [rows:1] SELECT * FROM `t_user` WHERE account = "Admin" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:31:56.927] INFO repository/user.go:44 [748.8µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:31:56.930] INFO repository/server.go:64 [2.6121ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:31:56.927" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:33:29.653] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 10:33:29.665] INFO migrator/migrator.go:73 [1.1079ms] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:33:29.665] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 10:33:29.665] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:33:29.665] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:33:29.667] INFO sqlite@v1.5.5/migrator.go:413 [523µs] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:33:29.667] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:33:29.668] INFO sqlite@v1.5.5/migrator.go:423 [1.0043ms] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:33:29.669] INFO sqlite@v1.5.5/migrator.go:423 [1.0529ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:33:29.671] INFO sqlite@v1.5.5/migrator.go:79 [51µs] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:33:29.671] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:33:29.672] INFO sqlite@v1.5.5/migrator.go:413 [948.9µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:33:29.672] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:33:29.672] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:33:29.674] INFO sqlite@v1.5.5/migrator.go:423 [1.3986ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:33:29.675] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 10:33:29.675] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:33:29.676] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 10:33:29.676] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:33:29.676] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 10:33:29.677] INFO sqlite@v1.5.5/migrator.go:413 [513.4µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 10:33:29.678] INFO sqlite@v1.5.5/migrator.go:423 [541.6µs] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 10:33:29.678] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 10:33:29.679] INFO sqlite@v1.5.5/migrator.go:423 [1.5726ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 10:33:29.681] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 10:33:29.681] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:33:29.681] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 10:33:29.681] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:33:29.682] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:33:29.683] INFO sqlite@v1.5.5/migrator.go:413 [541.7µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:33:29.683] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:33:29.683] INFO sqlite@v1.5.5/migrator.go:423 [525.6µs] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:33:29.685] INFO sqlite@v1.5.5/migrator.go:423 [1.6743ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:33:29.687] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:33:29.687] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:33:29.688] INFO sqlite@v1.5.5/migrator.go:413 [584.7µs] [rows:0] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:33:29.688] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:33:29.688] INFO sqlite@v1.5.5/migrator.go:423 [527.1µs] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:33:29.690] INFO sqlite@v1.5.5/migrator.go:423 [1.0582ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:33:29.692] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 10:33:29.692] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 10:33:29.692] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:33:29.693] INFO sqlite@v1.5.5/migrator.go:125 [561.4µs] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 10:33:29.693] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 10:33:29.693] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:34:58.484] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 10:34:58.497] INFO migrator/migrator.go:73 [546.8µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:34:58.497] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 10:34:58.497] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:34:58.498] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:34:58.499] INFO sqlite@v1.5.5/migrator.go:413 [1.0153ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:34:58.499] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:34:58.499] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:34:58.500] INFO sqlite@v1.5.5/migrator.go:423 [1.6023ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:34:58.501] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:34:58.502] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:34:58.503] INFO sqlite@v1.5.5/migrator.go:413 [539.5µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:34:58.503] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:34:58.504] INFO sqlite@v1.5.5/migrator.go:423 [1.0596ms] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:34:58.505] INFO sqlite@v1.5.5/migrator.go:423 [1.0732ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:34:58.506] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 10:34:58.507] INFO migrator/migrator.go:73 [1.0188ms] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:34:58.507] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 10:34:58.507] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:34:58.507] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 10:34:58.508] INFO sqlite@v1.5.5/migrator.go:413 [1.0006ms] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 10:34:58.508] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 10:34:58.508] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 10:34:58.510] INFO sqlite@v1.5.5/migrator.go:423 [1.0737ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 10:34:58.511] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 10:34:58.511] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:34:58.512] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 10:34:58.512] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:34:58.512] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:34:58.513] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:34:58.513] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:34:58.515] INFO sqlite@v1.5.5/migrator.go:423 [1.0177ms] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:34:58.516] INFO sqlite@v1.5.5/migrator.go:423 [1.0376ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:34:58.517] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:34:58.517] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:34:58.518] INFO sqlite@v1.5.5/migrator.go:413 [58.1µs] [rows:0] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:34:58.518] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:34:58.519] INFO sqlite@v1.5.5/migrator.go:423 [940.7µs] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:34:58.520] INFO sqlite@v1.5.5/migrator.go:423 [1.0633ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:34:58.521] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 10:34:58.521] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 10:34:58.521] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:34:58.522] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 10:34:58.522] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 10:34:58.522] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:35:06.655] INFO repository/user.go:44 [291.4µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:35:06.658] INFO repository/server.go:64 [2.9163ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:35:06.655" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:35:06.678] INFO repository/server.go:38 [1.456ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:35:06.679] INFO repository/system.go:28 [521.6µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:35:51.109] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 10:35:51.123] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:35:51.124] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 10:35:51.124] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:35:51.124] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:35:51.126] INFO sqlite@v1.5.5/migrator.go:413 [1.0764ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:35:51.126] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:35:51.126] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:35:51.127] INFO sqlite@v1.5.5/migrator.go:423 [1.0548ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:35:51.129] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:35:51.130] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:35:51.131] INFO sqlite@v1.5.5/migrator.go:413 [530.3µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:35:51.131] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:35:51.131] INFO sqlite@v1.5.5/migrator.go:423 [542.3µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:35:51.132] INFO sqlite@v1.5.5/migrator.go:423 [1.057ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:35:51.134] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 10:35:51.134] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:35:51.134] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 10:35:51.134] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:35:51.134] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 10:35:51.136] INFO sqlite@v1.5.5/migrator.go:413 [534.6µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 10:35:51.136] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 10:35:51.136] INFO sqlite@v1.5.5/migrator.go:423 [529.6µs] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 10:35:51.137] INFO sqlite@v1.5.5/migrator.go:423 [1.0551ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 10:35:51.139] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 10:35:51.139] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:35:51.139] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 10:35:51.140] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:35:51.140] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:35:51.141] INFO sqlite@v1.5.5/migrator.go:413 [594µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:35:51.141] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:35:51.141] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:35:51.142] INFO sqlite@v1.5.5/migrator.go:423 [1.0397ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:35:51.144] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:35:51.144] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:35:51.146] INFO sqlite@v1.5.5/migrator.go:413 [552.2µs] [rows:0] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:35:51.146] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:35:51.146] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:35:51.148] INFO sqlite@v1.5.5/migrator.go:423 [1.6182ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:35:51.149] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 10:35:51.149] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 10:35:51.149] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:35:51.149] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 10:35:51.150] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 10:35:51.150] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:35:52.411] INFO repository/user.go:44 [1.0001ms] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:35:52.415] INFO repository/server.go:63 [2.6605ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:35:52.412" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:35:52.434] INFO callbacks/preload.go:261 [0s] [rows:0] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:35:52.434] INFO repository/server.go:37 [689µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:35:52.434] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:36:32.215] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 10:36:32.227] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:36:32.228] INFO sqlite@v1.5.5/migrator.go:125 [54.8µs] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 10:36:32.228] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:36:32.228] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:36:32.230] INFO sqlite@v1.5.5/migrator.go:413 [1.0875ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:36:32.230] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:36:32.230] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:36:32.231] INFO sqlite@v1.5.5/migrator.go:423 [1.0037ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:36:32.233] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:36:32.233] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:36:32.234] INFO sqlite@v1.5.5/migrator.go:413 [1.0444ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:36:32.234] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:36:32.235] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:36:32.236] INFO sqlite@v1.5.5/migrator.go:423 [1.0679ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:36:32.238] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 10:36:32.238] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:36:32.238] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 10:36:32.238] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:36:32.239] INFO sqlite@v1.5.5/migrator.go:368 [70.7µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 10:36:32.240] INFO sqlite@v1.5.5/migrator.go:413 [928.7µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 10:36:32.240] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 10:36:32.240] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 10:36:32.241] INFO sqlite@v1.5.5/migrator.go:423 [790.6µs] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 10:36:32.243] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 10:36:32.244] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:36:32.244] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 10:36:32.244] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:36:32.244] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:36:32.245] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:36:32.246] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:36:32.246] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:36:32.247] INFO sqlite@v1.5.5/migrator.go:423 [1.0015ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:36:32.249] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:36:32.249] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:36:32.251] INFO sqlite@v1.5.5/migrator.go:413 [743µs] [rows:0] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:36:32.251] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:36:32.252] INFO sqlite@v1.5.5/migrator.go:423 [1.0062ms] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:36:32.253] INFO sqlite@v1.5.5/migrator.go:423 [999.6µs] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:36:32.255] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 10:36:32.256] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 10:36:32.256] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:36:32.256] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 10:36:32.256] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 10:36:32.256] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:36:33.685] INFO repository/user.go:44 [518.6µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:36:33.688] INFO repository/server.go:64 [2.3983ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:36:33.686" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:36:33.708] INFO repository/server.go:38 [1.056ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:36:33.709] INFO repository/system.go:28 [614.2µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:36:56.682] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 10:36:56.695] INFO migrator/migrator.go:73 [523.3µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:36:56.695] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 10:36:56.696] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:36:56.696] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:36:56.697] INFO sqlite@v1.5.5/migrator.go:413 [623.6µs] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:36:56.697] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:36:56.698] INFO sqlite@v1.5.5/migrator.go:423 [523.3µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:36:56.699] INFO sqlite@v1.5.5/migrator.go:423 [1.1349ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:36:56.700] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:36:56.700] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:36:56.701] INFO sqlite@v1.5.5/migrator.go:413 [539.2µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:36:56.701] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:36:56.702] INFO sqlite@v1.5.5/migrator.go:423 [67.2µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:36:56.703] INFO sqlite@v1.5.5/migrator.go:423 [1.1453ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:36:56.704] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 10:36:56.704] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:36:56.704] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 10:36:56.705] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:36:56.705] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 10:36:56.706] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 10:36:56.706] INFO sqlite@v1.5.5/migrator.go:423 [52.6µs] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 10:36:56.706] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 10:36:56.708] INFO sqlite@v1.5.5/migrator.go:423 [1.7614ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 10:36:56.710] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 10:36:56.710] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:36:56.710] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 10:36:56.711] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:36:56.711] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:36:56.712] INFO sqlite@v1.5.5/migrator.go:413 [588.3µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:36:56.712] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:36:56.712] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:36:56.714] INFO sqlite@v1.5.5/migrator.go:423 [1.2201ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:36:56.715] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:36:56.716] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:36:56.716] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:0] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:36:56.716] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:36:56.718] INFO sqlite@v1.5.5/migrator.go:423 [1.5357ms] [rows:0] DROP TABLE `t_wg_client` +[2024-03-11 10:36:56.719] INFO sqlite@v1.5.5/migrator.go:423 [1.0473ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:36:56.721] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 10:36:56.721] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 10:36:56.721] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:36:56.721] INFO sqlite@v1.5.5/migrator.go:125 [943µs] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 10:36:56.721] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 10:36:56.721] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:38:29.691] INFO repository/user.go:44 [741.2µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:38:29.695] INFO repository/server.go:63 [3.1715ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:38:29.691" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:38:29.717] ERROR callbacks/preload.go:261 sql: Scan error on column index 11, name "use_server_dns": converting driver.Value type string ("asd") to a int: invalid syntax -> SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:38:29.718] ERROR repository/server.go:37 sql: Scan error on column index 11, name "use_server_dns": converting driver.Value type string ("asd") to a int: invalid syntax -> SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:38:29.718] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:38:39.524] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 10:38:39.535] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:38:39.536] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 10:38:39.536] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:38:39.536] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:38:39.537] INFO sqlite@v1.5.5/migrator.go:413 [58.6µs] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:38:39.538] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:38:39.539] INFO sqlite@v1.5.5/migrator.go:423 [307µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:38:39.540] INFO sqlite@v1.5.5/migrator.go:423 [1.2005ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:38:39.542] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:38:39.543] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:38:39.545] INFO sqlite@v1.5.5/migrator.go:413 [1.1224ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:38:39.546] INFO sqlite@v1.5.5/migrator.go:423 [529.4µs] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:38:39.547] INFO sqlite@v1.5.5/migrator.go:423 [535.8µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:38:39.548] INFO sqlite@v1.5.5/migrator.go:423 [1.6117ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:38:39.550] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 10:38:39.550] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:38:39.551] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 10:38:39.552] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:38:39.552] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 10:38:39.553] INFO sqlite@v1.5.5/migrator.go:413 [534.5µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 10:38:39.553] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 10:38:39.553] INFO sqlite@v1.5.5/migrator.go:423 [603.7µs] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 10:38:39.555] INFO sqlite@v1.5.5/migrator.go:423 [1.7631ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 10:38:39.557] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 10:38:39.557] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:38:39.557] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 10:38:39.558] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:38:39.558] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:38:39.559] INFO sqlite@v1.5.5/migrator.go:413 [542.8µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:38:39.559] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:38:39.560] INFO sqlite@v1.5.5/migrator.go:423 [548.4µs] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 10:38:39.561] INFO sqlite@v1.5.5/migrator.go:423 [1.5993ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:38:39.562] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:38:39.563] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:38:39.564] INFO sqlite@v1.5.5/migrator.go:413 [580.7µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:38:39.564] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:38:39.565] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 10:38:39.566] INFO sqlite@v1.5.5/migrator.go:423 [1.1453ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:38:39.567] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 10:38:39.567] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 10:38:39.569] INFO migrator/migrator.go:73 [1.6632ms] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:38:39.569] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 10:38:39.569] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 10:38:39.569] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:38:40.927] INFO repository/user.go:44 [992µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:38:40.930] INFO repository/server.go:63 [2.6684ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:38:40.928" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:38:40.950] ERROR callbacks/preload.go:261 sql: Scan error on column index 11, name "use_server_dns": converting driver.Value type string ("asd") to a int: invalid syntax -> SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:38:40.950] ERROR repository/server.go:37 sql: Scan error on column index 11, name "use_server_dns": converting driver.Value type string ("asd") to a int: invalid syntax -> SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:38:40.950] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:39:18.852] INFO repository/user.go:44 [649.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:39:18.856] INFO repository/server.go:63 [3.9207ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:39:18.852" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:39:18.876] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:39:18.876] INFO repository/server.go:37 [462.9µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:39:18.877] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:39:26.377] INFO repository/user.go:44 [625.4µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:39:26.379] INFO repository/server.go:63 [2.0689ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:39:26.377" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:39:27.365] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:39:27.365] INFO repository/server.go:37 [2.1322ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:39:35.213] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:46:31.258] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 10:46:31.271] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:46:31.271] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 10:46:31.273] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:46:31.273] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:46:31.274] INFO sqlite@v1.5.5/migrator.go:413 [1.5875ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:46:31.274] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:46:31.274] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:46:31.275] INFO sqlite@v1.5.5/migrator.go:423 [1.0203ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:46:31.277] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:46:31.278] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:46:31.279] INFO sqlite@v1.5.5/migrator.go:413 [1.0441ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:46:31.279] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:46:31.279] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:46:31.281] INFO sqlite@v1.5.5/migrator.go:423 [1.1586ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:46:31.283] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 10:46:31.283] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:46:31.284] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 10:46:31.284] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:46:31.284] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 10:46:31.285] INFO sqlite@v1.5.5/migrator.go:413 [527.5µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 10:46:31.285] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 10:46:31.285] INFO sqlite@v1.5.5/migrator.go:423 [539.6µs] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 10:46:31.287] INFO sqlite@v1.5.5/migrator.go:423 [1.6334ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 10:46:31.289] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 10:46:31.289] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:46:31.289] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 10:46:31.290] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:46:31.290] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:46:31.291] INFO sqlite@v1.5.5/migrator.go:413 [544.5µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:46:31.291] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:46:31.291] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 10:46:31.292] INFO sqlite@v1.5.5/migrator.go:423 [1.1397ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:46:31.294] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:46:31.294] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:46:31.295] INFO sqlite@v1.5.5/migrator.go:413 [503.2µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:46:31.296] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:46:31.296] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 10:46:31.297] INFO sqlite@v1.5.5/migrator.go:423 [1.1777ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:46:31.299] INFO sqlite@v1.5.5/migrator.go:219 [537.9µs] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 10:46:31.299] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 10:46:31.299] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:46:31.300] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 10:46:31.300] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 10:46:31.300] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:46:50.845] INFO repository/user.go:44 [538.9µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:46:50.848] INFO repository/server.go:63 [2.3367ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:46:50.845" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:46:50.867] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:46:50.868] INFO repository/server.go:37 [1.3917ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:46:50.868] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:47:50.200] INFO repository/user.go:44 [998.6µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:47:50.202] INFO repository/server.go:63 [2.1216ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:47:50.201" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:47:50.223] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:47:50.223] INFO repository/server.go:37 [1.4608ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:47:50.223] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:49:48.207] INFO repository/user.go:44 [233.6µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:49:48.210] INFO repository/server.go:63 [2.1099ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:49:48.208" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:49:48.229] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:49:48.229] INFO repository/server.go:37 [1.5127ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:49:48.229] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:50:05.350] INFO repository/user.go:44 [181.9µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:50:05.353] INFO repository/server.go:63 [2.5957ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:50:05.35" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:50:05.372] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:50:05.372] INFO repository/server.go:37 [1.1708ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:50:05.372] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:51:11.930] INFO repository/user.go:44 [1.0699ms] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:51:11.933] INFO repository/server.go:63 [2.5977ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:51:11.93" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:51:11.952] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:51:11.953] INFO repository/server.go:37 [1.0015ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:51:11.953] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:52:30.687] INFO sqlite@v1.5.5/migrator.go:32 [1.5455ms] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 10:52:30.699] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:52:30.700] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 10:52:30.700] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:52:30.700] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:52:30.701] INFO sqlite@v1.5.5/migrator.go:413 [1.0665ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:52:30.701] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:52:30.702] INFO sqlite@v1.5.5/migrator.go:423 [523.3µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:52:30.703] INFO sqlite@v1.5.5/migrator.go:423 [1.1578ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:52:30.704] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:52:30.704] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:52:30.706] INFO sqlite@v1.5.5/migrator.go:413 [517.9µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:52:30.706] INFO sqlite@v1.5.5/migrator.go:423 [58.3µs] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:52:30.707] INFO sqlite@v1.5.5/migrator.go:423 [518.7µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:52:30.708] INFO sqlite@v1.5.5/migrator.go:423 [1.1943ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:52:30.709] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 10:52:30.710] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:52:30.710] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 10:52:30.710] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:52:30.710] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 10:52:30.712] INFO sqlite@v1.5.5/migrator.go:413 [614.2µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 10:52:30.712] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 10:52:30.713] INFO sqlite@v1.5.5/migrator.go:423 [592.9µs] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 10:52:30.714] INFO sqlite@v1.5.5/migrator.go:423 [1.662ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 10:52:30.717] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 10:52:30.717] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:52:30.717] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 10:52:30.717] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:52:30.718] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:52:30.719] INFO sqlite@v1.5.5/migrator.go:413 [519.8µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:52:30.719] INFO sqlite@v1.5.5/migrator.go:423 [520.1µs] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:52:30.720] INFO sqlite@v1.5.5/migrator.go:423 [551.7µs] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 10:52:30.721] INFO sqlite@v1.5.5/migrator.go:423 [1.0798ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:52:30.723] INFO sqlite@v1.5.5/migrator.go:79 [52.5µs] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:52:30.723] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:52:30.723] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:52:30.725] INFO sqlite@v1.5.5/migrator.go:423 [1.5044ms] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:52:30.725] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 10:52:30.726] INFO sqlite@v1.5.5/migrator.go:423 [1.0462ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:52:30.727] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 10:52:30.728] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 10:52:30.728] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:52:30.728] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 10:52:30.728] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 10:52:30.728] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:52:32.777] INFO repository/user.go:44 [460.2µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:52:32.780] INFO repository/server.go:63 [3.1776ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:52:32.777" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:52:32.799] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:52:32.799] INFO repository/server.go:37 [1.5724ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:52:32.800] INFO repository/system.go:28 [521.1µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 10:57:54.587] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 10:57:54.601] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:57:54.601] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 10:57:54.601] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:57:54.602] INFO sqlite@v1.5.5/migrator.go:368 [58.7µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:57:54.603] INFO sqlite@v1.5.5/migrator.go:413 [1.043ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:57:54.603] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:57:54.604] INFO sqlite@v1.5.5/migrator.go:423 [540µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:57:54.605] INFO sqlite@v1.5.5/migrator.go:423 [1.0591ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:57:54.606] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:57:54.606] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 10:57:54.607] INFO sqlite@v1.5.5/migrator.go:413 [506µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 10:57:54.608] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 10:57:54.608] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 10:57:54.609] INFO sqlite@v1.5.5/migrator.go:423 [1.0663ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 10:57:54.610] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 10:57:54.611] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:57:54.611] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 10:57:54.611] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:57:54.611] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 10:57:54.612] INFO sqlite@v1.5.5/migrator.go:413 [535µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 10:57:54.613] INFO sqlite@v1.5.5/migrator.go:423 [519.5µs] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 10:57:54.613] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 10:57:54.614] INFO sqlite@v1.5.5/migrator.go:423 [595.1µs] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 10:57:54.616] INFO sqlite@v1.5.5/migrator.go:32 [530.3µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 10:57:54.616] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:57:54.617] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 10:57:54.617] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:57:54.617] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:57:54.618] INFO sqlite@v1.5.5/migrator.go:413 [519µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:57:54.618] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:57:54.619] INFO sqlite@v1.5.5/migrator.go:423 [519.1µs] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 10:57:54.620] INFO sqlite@v1.5.5/migrator.go:423 [1.0401ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:57:54.621] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 10:57:54.621] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 10:57:54.622] INFO sqlite@v1.5.5/migrator.go:413 [527.4µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 10:57:54.622] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 10:57:54.623] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 10:57:54.625] INFO sqlite@v1.5.5/migrator.go:423 [1.1259ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 10:57:54.626] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 10:57:54.627] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 10:57:54.627] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 10:57:54.627] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 10:57:54.627] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 10:57:54.627] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 10:57:55.840] INFO repository/user.go:44 [420µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 10:57:55.843] INFO repository/server.go:63 [3.1706ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 10:57:55.84" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:57:55.863] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 10:57:55.864] INFO repository/server.go:37 [923.5µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 10:57:55.864] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:00:59.115] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:00:59.127] INFO migrator/migrator.go:73 [530.7µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:00:59.127] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:00:59.127] INFO sqlite@v1.5.5/migrator.go:79 [533.2µs] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:00:59.127] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:00:59.128] INFO sqlite@v1.5.5/migrator.go:413 [1.0406ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:00:59.128] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:00:59.129] INFO sqlite@v1.5.5/migrator.go:423 [559.4µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:00:59.130] INFO sqlite@v1.5.5/migrator.go:423 [1.0674ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:00:59.132] INFO sqlite@v1.5.5/migrator.go:79 [1.5314ms] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:00:59.132] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:00:59.133] INFO sqlite@v1.5.5/migrator.go:413 [1.0403ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:00:59.133] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:00:59.133] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:00:59.134] INFO sqlite@v1.5.5/migrator.go:423 [1.5862ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:00:59.136] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 11:00:59.136] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:00:59.137] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 11:00:59.137] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:00:59.137] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 11:00:59.138] INFO sqlite@v1.5.5/migrator.go:413 [1.094ms] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 11:00:59.138] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 11:00:59.138] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 11:00:59.139] INFO sqlite@v1.5.5/migrator.go:423 [1.078ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 11:00:59.142] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 11:00:59.142] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:00:59.142] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 11:00:59.143] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:00:59.143] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:00:59.144] INFO sqlite@v1.5.5/migrator.go:413 [1.0931ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:00:59.144] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:00:59.144] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:00:59.145] INFO sqlite@v1.5.5/migrator.go:423 [1.0851ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:00:59.146] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:00:59.146] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:00:59.147] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:00:59.148] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:00:59.148] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:00:59.148] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:00:59.151] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 11:00:59.152] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 11:00:59.152] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:00:59.152] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 11:00:59.152] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 11:00:59.152] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 11:01:00.999] INFO repository/user.go:44 [243.2µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:01:01.002] INFO repository/server.go:63 [2.6379ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/24",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:01:00.999" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:01:01.029] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:01:01.030] INFO repository/server.go:37 [1.1191ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:01:01.030] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:01:27.094] INFO repository/user.go:44 [99.7µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:01:27.098] INFO repository/server.go:63 [3.3576ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:01:27.094" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:01:27.117] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:01:27.118] INFO repository/server.go:37 [1.5193ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:01:27.118] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:03:51.394] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:03:51.407] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:03:51.408] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:03:51.408] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:03:51.408] INFO sqlite@v1.5.5/migrator.go:368 [502.5µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:03:51.410] INFO sqlite@v1.5.5/migrator.go:413 [1.165ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:03:51.410] INFO sqlite@v1.5.5/migrator.go:423 [526.3µs] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:03:51.410] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:03:51.412] INFO sqlite@v1.5.5/migrator.go:423 [1.015ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:03:51.414] INFO sqlite@v1.5.5/migrator.go:79 [50.4µs] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:03:51.414] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:03:51.415] INFO sqlite@v1.5.5/migrator.go:413 [577.4µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:03:51.415] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:03:51.416] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:03:51.417] INFO sqlite@v1.5.5/migrator.go:423 [1.1584ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:03:51.419] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 11:03:51.419] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:03:51.419] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 11:03:51.419] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:03:51.419] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 11:03:51.420] INFO sqlite@v1.5.5/migrator.go:413 [580.5µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 11:03:51.420] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 11:03:51.421] INFO sqlite@v1.5.5/migrator.go:423 [514.4µs] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 11:03:51.421] INFO sqlite@v1.5.5/migrator.go:423 [601.9µs] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 11:03:51.423] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 11:03:51.423] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:03:51.424] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 11:03:51.424] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:03:51.424] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:03:51.425] INFO sqlite@v1.5.5/migrator.go:413 [558µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:03:51.425] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:03:51.426] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:03:51.427] INFO sqlite@v1.5.5/migrator.go:423 [1.2101ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:03:51.428] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:03:51.428] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:03:51.429] INFO sqlite@v1.5.5/migrator.go:413 [547.2µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:03:51.429] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:03:51.430] INFO sqlite@v1.5.5/migrator.go:423 [593.4µs] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:03:51.431] INFO sqlite@v1.5.5/migrator.go:423 [959.7µs] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:03:51.432] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 11:03:51.432] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 11:03:51.432] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:03:51.432] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 11:03:51.433] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 11:03:51.433] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 11:03:53.008] INFO repository/user.go:44 [514.8µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:03:53.011] INFO repository/server.go:63 [2.704ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:03:53.009" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:03:53.030] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:03:53.031] INFO repository/server.go:37 [1.5124ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:03:53.031] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:07:39.723] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:07:39.740] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:07:39.740] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:07:39.740] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:07:39.741] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:07:39.742] INFO sqlite@v1.5.5/migrator.go:413 [1.0412ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:07:39.743] INFO sqlite@v1.5.5/migrator.go:423 [517.4µs] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:07:39.743] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:07:39.744] INFO sqlite@v1.5.5/migrator.go:423 [633.3µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:07:39.746] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:07:39.746] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:07:39.747] INFO sqlite@v1.5.5/migrator.go:413 [582.3µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:07:39.747] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:07:39.748] INFO sqlite@v1.5.5/migrator.go:423 [64.5µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:07:39.749] INFO sqlite@v1.5.5/migrator.go:423 [1.1511ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:07:39.751] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 11:07:39.751] INFO migrator/migrator.go:73 [504µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:07:39.751] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 11:07:39.752] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:07:39.752] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 11:07:39.753] INFO sqlite@v1.5.5/migrator.go:413 [564.2µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 11:07:39.753] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 11:07:39.753] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 11:07:39.754] INFO sqlite@v1.5.5/migrator.go:423 [659.8µs] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 11:07:39.757] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 11:07:39.757] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:07:39.757] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 11:07:39.757] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:07:39.758] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:07:39.759] INFO sqlite@v1.5.5/migrator.go:413 [519.4µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:07:39.759] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:07:39.759] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:07:39.761] INFO sqlite@v1.5.5/migrator.go:423 [541.9µs] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:07:39.762] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:07:39.762] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:07:39.763] INFO sqlite@v1.5.5/migrator.go:413 [515.5µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:07:39.764] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:07:39.764] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:07:39.765] INFO sqlite@v1.5.5/migrator.go:423 [525.7µs] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:07:39.766] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 11:07:39.767] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 11:07:39.767] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:07:39.767] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 11:07:39.767] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 11:07:39.767] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 11:07:41.132] INFO repository/user.go:44 [999.1µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:07:41.135] INFO repository/server.go:63 [2.697ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:07:41.132" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:07:41.155] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:07:41.155] INFO repository/server.go:37 [796.8µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:07:41.155] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:08:23.770] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:08:23.782] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:08:23.782] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:08:23.782] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:08:23.783] INFO sqlite@v1.5.5/migrator.go:368 [502.8µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:08:23.784] INFO sqlite@v1.5.5/migrator.go:413 [1.1756ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:08:23.785] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:08:23.785] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:08:23.786] INFO sqlite@v1.5.5/migrator.go:423 [605.1µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:08:23.788] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:08:23.788] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:08:23.789] INFO sqlite@v1.5.5/migrator.go:413 [522.9µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:08:23.789] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:08:23.790] INFO sqlite@v1.5.5/migrator.go:423 [596.9µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:08:23.791] INFO sqlite@v1.5.5/migrator.go:423 [1.155ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:08:23.793] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 11:08:23.793] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:08:23.793] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 11:08:23.793] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:08:23.794] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 11:08:23.795] INFO sqlite@v1.5.5/migrator.go:413 [82.2µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 11:08:23.795] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 11:08:23.795] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 11:08:23.797] INFO sqlite@v1.5.5/migrator.go:423 [1.0889ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 11:08:23.798] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 11:08:23.798] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:08:23.799] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 11:08:23.800] INFO sqlite@v1.5.5/migrator.go:79 [53.3µs] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:08:23.800] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:08:23.801] INFO sqlite@v1.5.5/migrator.go:413 [519µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:08:23.801] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:08:23.801] INFO sqlite@v1.5.5/migrator.go:423 [503.3µs] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:08:23.801] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:08:23.804] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:08:23.804] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:08:23.805] INFO sqlite@v1.5.5/migrator.go:413 [1.076ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:08:23.805] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:08:23.805] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:08:23.806] INFO sqlite@v1.5.5/migrator.go:423 [1.1046ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:08:23.808] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 11:08:23.808] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 11:08:23.808] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:08:23.809] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 11:08:23.809] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 11:08:23.809] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 11:08:24.657] INFO repository/user.go:44 [646.7µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:08:24.659] INFO repository/server.go:63 [2.0973ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:08:24.657" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:08:24.679] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:08:24.679] INFO repository/server.go:37 [1.0264ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:08:24.680] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:09:54.092] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:09:54.105] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:09:54.105] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:09:54.105] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:09:54.105] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:09:54.106] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:09:54.107] INFO sqlite@v1.5.5/migrator.go:423 [84.8µs] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:09:54.107] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:09:54.109] INFO sqlite@v1.5.5/migrator.go:423 [602.8µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:09:54.111] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:09:54.111] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:09:54.113] INFO sqlite@v1.5.5/migrator.go:413 [588.9µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:09:54.113] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:09:54.113] INFO sqlite@v1.5.5/migrator.go:423 [504.4µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:09:54.115] INFO sqlite@v1.5.5/migrator.go:423 [1.6221ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:09:54.116] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 11:09:54.116] INFO migrator/migrator.go:73 [503.7µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:09:54.116] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 11:09:54.116] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:09:54.117] INFO sqlite@v1.5.5/migrator.go:368 [539.9µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 11:09:54.118] INFO sqlite@v1.5.5/migrator.go:413 [583.3µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 11:09:54.118] INFO sqlite@v1.5.5/migrator.go:423 [581.5µs] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 11:09:54.119] INFO sqlite@v1.5.5/migrator.go:423 [503.8µs] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 11:09:54.120] INFO sqlite@v1.5.5/migrator.go:423 [1.6652ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 11:09:54.122] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 11:09:54.122] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:09:54.122] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 11:09:54.123] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:09:54.123] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:09:54.124] INFO sqlite@v1.5.5/migrator.go:413 [533.9µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:09:54.125] INFO sqlite@v1.5.5/migrator.go:423 [553.4µs] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:09:54.125] INFO sqlite@v1.5.5/migrator.go:423 [540.2µs] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:09:54.126] INFO sqlite@v1.5.5/migrator.go:423 [1.0724ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:09:54.128] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:09:54.128] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:09:54.129] INFO sqlite@v1.5.5/migrator.go:413 [540.6µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:09:54.130] INFO sqlite@v1.5.5/migrator.go:423 [586.3µs] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:09:54.130] INFO sqlite@v1.5.5/migrator.go:423 [523.9µs] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:09:54.131] INFO sqlite@v1.5.5/migrator.go:423 [1.0707ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:09:54.133] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 11:09:54.133] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 11:09:54.133] INFO migrator/migrator.go:73 [555.5µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:09:54.133] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 11:09:54.133] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 11:09:54.134] INFO script/script.go:98 [55.2µs] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 11:09:55.905] INFO repository/user.go:44 [236.4µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:09:55.907] INFO repository/server.go:63 [2.1974ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:09:55.905" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:09:55.927] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:09:55.927] INFO repository/server.go:37 [1.0645ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:09:55.928] INFO repository/system.go:28 [528.2µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:10:18.698] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:10:18.710] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:10:18.710] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:10:18.710] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:10:18.710] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:10:18.711] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:10:18.711] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:10:18.713] INFO sqlite@v1.5.5/migrator.go:423 [1.5958ms] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:10:18.714] INFO sqlite@v1.5.5/migrator.go:423 [1.0701ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:10:18.715] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:10:18.715] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:10:18.716] INFO sqlite@v1.5.5/migrator.go:413 [1.082ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:10:18.716] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:10:18.716] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:10:18.718] INFO sqlite@v1.5.5/migrator.go:423 [1.0521ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:10:18.720] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 11:10:18.721] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:10:18.721] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 11:10:18.721] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:10:18.721] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 11:10:18.722] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 11:10:18.722] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 11:10:18.723] INFO sqlite@v1.5.5/migrator.go:423 [63µs] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 11:10:18.724] INFO sqlite@v1.5.5/migrator.go:423 [1.0689ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 11:10:18.726] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 11:10:18.726] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:10:18.726] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 11:10:18.726] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:10:18.727] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:10:18.728] INFO sqlite@v1.5.5/migrator.go:413 [1.0394ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:10:18.728] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:10:18.728] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:10:18.729] INFO sqlite@v1.5.5/migrator.go:423 [1.0475ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:10:18.732] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:10:18.732] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:10:18.733] INFO sqlite@v1.5.5/migrator.go:413 [541.6µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:10:18.733] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:10:18.733] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:10:18.735] INFO sqlite@v1.5.5/migrator.go:423 [1.613ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:10:18.737] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 11:10:18.737] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 11:10:18.738] INFO migrator/migrator.go:73 [519.5µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:10:18.738] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 11:10:18.738] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 11:10:18.738] INFO script/script.go:98 [599.6µs] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 11:10:20.062] INFO repository/user.go:44 [665µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:10:20.064] INFO repository/server.go:63 [2.1547ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:10:20.062" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:10:20.084] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:10:20.085] INFO repository/server.go:37 [1.3357ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:10:20.085] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:10:41.088] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:10:41.100] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:10:41.100] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:10:41.101] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:10:41.101] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:10:41.102] INFO sqlite@v1.5.5/migrator.go:413 [1.2001ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:10:41.102] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:10:41.103] INFO sqlite@v1.5.5/migrator.go:423 [562.1µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:10:41.104] INFO sqlite@v1.5.5/migrator.go:423 [1.1274ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:10:41.106] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:10:41.106] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:10:41.107] INFO sqlite@v1.5.5/migrator.go:413 [661.9µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:10:41.107] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:10:41.108] INFO sqlite@v1.5.5/migrator.go:423 [86.8µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:10:41.109] INFO sqlite@v1.5.5/migrator.go:423 [1.2607ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:10:41.111] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 11:10:41.111] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:10:41.111] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 11:10:41.112] INFO sqlite@v1.5.5/migrator.go:79 [542.6µs] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:10:41.112] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 11:10:41.113] INFO sqlite@v1.5.5/migrator.go:413 [530µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 11:10:41.113] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 11:10:41.114] INFO sqlite@v1.5.5/migrator.go:423 [511.9µs] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 11:10:41.114] INFO sqlite@v1.5.5/migrator.go:423 [603.9µs] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 11:10:41.117] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 11:10:41.117] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:10:41.117] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 11:10:41.117] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:10:41.118] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:10:41.119] INFO sqlite@v1.5.5/migrator.go:413 [551.6µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:10:41.119] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:10:41.120] INFO sqlite@v1.5.5/migrator.go:423 [544.7µs] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:10:41.120] INFO sqlite@v1.5.5/migrator.go:423 [618.7µs] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:10:41.122] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:10:41.122] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:10:41.123] INFO sqlite@v1.5.5/migrator.go:413 [607.8µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:10:41.124] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:10:41.124] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:10:41.125] INFO sqlite@v1.5.5/migrator.go:423 [1.0038ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:10:41.126] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 11:10:41.127] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 11:10:41.128] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:10:41.128] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 11:10:41.128] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 11:10:41.128] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 11:10:42.336] INFO repository/user.go:44 [504µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:10:42.339] INFO repository/server.go:63 [2.1507ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:10:42.336" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:10:42.358] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:10:42.358] INFO repository/server.go:37 [1.2425ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:10:42.358] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:11:00.875] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:11:00.890] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:11:00.890] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:11:00.891] INFO sqlite@v1.5.5/migrator.go:79 [526.5µs] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:11:00.891] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:11:00.893] INFO sqlite@v1.5.5/migrator.go:413 [1.588ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:11:00.893] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:11:00.893] INFO sqlite@v1.5.5/migrator.go:423 [518.1µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:11:00.894] INFO sqlite@v1.5.5/migrator.go:423 [1.0306ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:11:00.896] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:11:00.896] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:11:00.897] INFO sqlite@v1.5.5/migrator.go:413 [552.9µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:11:00.897] INFO sqlite@v1.5.5/migrator.go:423 [518.8µs] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:11:00.897] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:11:00.899] INFO sqlite@v1.5.5/migrator.go:423 [1.1338ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:11:00.900] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 11:11:00.901] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:11:00.901] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 11:11:00.901] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:11:00.902] INFO sqlite@v1.5.5/migrator.go:368 [521.7µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 11:11:00.903] INFO sqlite@v1.5.5/migrator.go:413 [1.0951ms] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 11:11:00.903] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 11:11:00.904] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 11:11:00.905] INFO sqlite@v1.5.5/migrator.go:423 [1.1273ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 11:11:00.907] INFO sqlite@v1.5.5/migrator.go:32 [518.6µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 11:11:00.907] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:11:00.907] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 11:11:00.908] INFO sqlite@v1.5.5/migrator.go:79 [520.3µs] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:11:00.908] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:11:00.909] INFO sqlite@v1.5.5/migrator.go:413 [517.8µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:11:00.910] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:11:00.910] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:11:00.911] INFO sqlite@v1.5.5/migrator.go:423 [517.5µs] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:11:00.912] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:11:00.913] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:11:00.914] INFO sqlite@v1.5.5/migrator.go:413 [529.8µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:11:00.914] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:11:00.914] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:11:00.916] INFO sqlite@v1.5.5/migrator.go:423 [1.0625ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:11:00.918] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 11:11:00.919] INFO sqlite@v1.5.5/migrator.go:32 [1.0036ms] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 11:11:00.919] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:11:00.919] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 11:11:00.919] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 11:11:00.919] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 11:11:02.675] INFO repository/user.go:44 [218.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:11:02.678] INFO repository/server.go:63 [2.2039ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:11:02.676" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:11:02.698] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:11:02.700] INFO repository/server.go:37 [1.6091ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:11:02.700] INFO repository/system.go:28 [525.1µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:11:24.151] INFO repository/user.go:44 [936.4µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:11:24.153] INFO repository/server.go:63 [2.0949ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:11:24.151" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:11:24.173] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:11:24.174] INFO repository/server.go:37 [727.2µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:11:24.174] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:11:52.308] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:11:52.320] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:11:52.321] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:11:52.321] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:11:52.322] INFO sqlite@v1.5.5/migrator.go:368 [57.2µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:11:52.323] INFO sqlite@v1.5.5/migrator.go:413 [1.1639ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:11:52.323] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:11:52.323] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:11:52.325] INFO sqlite@v1.5.5/migrator.go:423 [675µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:11:52.326] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:11:52.327] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:11:52.328] INFO sqlite@v1.5.5/migrator.go:413 [536.1µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:11:52.328] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:11:52.329] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:11:52.331] INFO sqlite@v1.5.5/migrator.go:423 [2.4071ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:11:52.333] INFO sqlite@v1.5.5/migrator.go:32 [1.0099ms] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 11:11:52.333] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:11:52.334] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 11:11:52.334] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:11:52.334] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 11:11:52.335] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 11:11:52.335] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 11:11:52.336] INFO sqlite@v1.5.5/migrator.go:423 [59.1µs] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 11:11:52.337] INFO sqlite@v1.5.5/migrator.go:423 [1.0892ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 11:11:52.339] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 11:11:52.340] INFO migrator/migrator.go:73 [1.016ms] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:11:52.340] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 11:11:52.340] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:11:52.340] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:11:52.341] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:11:52.342] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:11:52.342] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:11:52.343] INFO sqlite@v1.5.5/migrator.go:423 [1.0896ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:11:52.345] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:11:52.345] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:11:52.346] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:11:52.346] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:11:52.348] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:11:52.349] INFO sqlite@v1.5.5/migrator.go:423 [1.6227ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:11:52.351] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 11:11:52.351] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 11:11:52.352] INFO migrator/migrator.go:73 [528.3µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:11:52.352] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 11:11:52.352] INFO script/script.go:61 [547.5µs] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 11:11:52.352] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 11:11:53.468] INFO repository/user.go:44 [552.9µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:11:53.472] INFO repository/server.go:63 [3.1877ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:11:53.469" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:11:53.492] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:11:53.492] INFO repository/server.go:37 [942µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:11:53.493] INFO repository/system.go:28 [545.5µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:12:54.667] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:12:54.679] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:12:54.680] INFO sqlite@v1.5.5/migrator.go:125 [541µs] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:12:54.680] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:12:54.680] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:12:54.681] INFO sqlite@v1.5.5/migrator.go:413 [1.101ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:12:54.681] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:12:54.682] INFO sqlite@v1.5.5/migrator.go:423 [547.7µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:12:54.683] INFO sqlite@v1.5.5/migrator.go:423 [1.1004ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:12:54.685] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:12:54.685] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:12:54.686] INFO sqlite@v1.5.5/migrator.go:413 [1.5201ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:12:54.687] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:12:54.687] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:12:54.688] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:12:54.690] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 11:12:54.690] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:12:54.691] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 11:12:54.691] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:12:54.691] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 11:12:54.692] INFO sqlite@v1.5.5/migrator.go:413 [1.0095ms] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 11:12:54.692] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 11:12:54.693] INFO sqlite@v1.5.5/migrator.go:423 [990.9µs] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 11:12:54.695] INFO sqlite@v1.5.5/migrator.go:423 [1.5046ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 11:12:54.697] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 11:12:54.698] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:12:54.698] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 11:12:54.698] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:12:54.698] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:12:54.700] INFO sqlite@v1.5.5/migrator.go:413 [1.0018ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:12:54.700] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:12:54.701] INFO sqlite@v1.5.5/migrator.go:423 [1.0075ms] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:12:54.702] INFO sqlite@v1.5.5/migrator.go:423 [991.4µs] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:12:54.704] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:12:54.704] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:12:54.705] INFO sqlite@v1.5.5/migrator.go:413 [1.5138ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:12:54.705] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:12:54.706] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:12:54.707] INFO sqlite@v1.5.5/migrator.go:423 [1.0225ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:12:54.709] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 11:12:54.709] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 11:12:54.709] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:12:54.710] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 11:12:54.710] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 11:12:54.710] INFO script/script.go:98 [525µs] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 11:12:55.751] INFO repository/user.go:44 [188.6µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:12:55.755] INFO repository/server.go:63 [3.1862ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:12:55.753" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:12:55.775] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:12:55.775] INFO repository/server.go:37 [1.0509ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:12:55.775] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:15:10.094] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:15:10.106] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:15:10.107] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:15:10.107] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:15:10.107] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:15:10.108] INFO sqlite@v1.5.5/migrator.go:413 [1.0839ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:15:10.109] INFO sqlite@v1.5.5/migrator.go:423 [57.1µs] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:15:10.109] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:15:10.111] INFO sqlite@v1.5.5/migrator.go:423 [1.5868ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:15:10.112] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:15:10.113] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:15:10.114] INFO sqlite@v1.5.5/migrator.go:413 [751.9µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:15:10.114] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:15:10.115] INFO sqlite@v1.5.5/migrator.go:423 [542.9µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:15:10.116] INFO sqlite@v1.5.5/migrator.go:423 [711µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:15:10.117] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 11:15:10.118] INFO migrator/migrator.go:73 [83.1µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:15:10.119] INFO sqlite@v1.5.5/migrator.go:125 [55.4µs] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 11:15:10.119] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:15:10.119] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 11:15:10.120] INFO sqlite@v1.5.5/migrator.go:413 [614.3µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 11:15:10.120] INFO sqlite@v1.5.5/migrator.go:423 [512.7µs] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 11:15:10.120] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 11:15:10.121] INFO sqlite@v1.5.5/migrator.go:423 [636.8µs] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 11:15:10.123] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 11:15:10.123] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:15:10.124] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 11:15:10.124] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:15:10.124] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:15:10.125] INFO sqlite@v1.5.5/migrator.go:413 [523.3µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:15:10.125] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:15:10.125] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:15:10.126] INFO sqlite@v1.5.5/migrator.go:423 [1.1132ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:15:10.128] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:15:10.128] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:15:10.129] INFO sqlite@v1.5.5/migrator.go:413 [587.8µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` char(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:15:10.130] INFO sqlite@v1.5.5/migrator.go:423 [503.7µs] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:15:10.130] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:15:10.131] INFO sqlite@v1.5.5/migrator.go:423 [1.6645ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:15:10.133] INFO sqlite@v1.5.5/migrator.go:79 [50.5µs] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:15:10.133] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:15:10.134] INFO sqlite@v1.5.5/migrator.go:413 [572.6µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`)) +[2024-03-11 11:15:10.134] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:15:10.134] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:15:10.135] INFO sqlite@v1.5.5/migrator.go:423 [950.4µs] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:15:10.136] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %") +[2024-03-11 11:15:10.138] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:15:10.139] INFO sqlite@v1.5.5/migrator.go:413 [1.121ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`)) +[2024-03-11 11:15:10.139] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:15:10.139] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:15:10.141] INFO sqlite@v1.5.5/migrator.go:423 [2.1137ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:15:10.142] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 11:15:10.142] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 11:15:10.142] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:15:10.143] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 11:15:10.143] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 11:15:10.143] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 11:15:11.687] INFO repository/user.go:44 [884.3µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:15:11.691] INFO repository/server.go:65 [2.6586ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:15:11.688" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:15:11.710] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT `t_wg_client`.`id`,`t_wg_client`.`created_at`,`t_wg_client`.`updated_at`,`t_wg_client`.`server_id`,`t_wg_client`.`name`,`t_wg_client`.`email`,`t_wg_client`.`subnet_range`,`t_wg_client`.`ip_allocation`,`t_wg_client`.`allowed_ips`,`t_wg_client`.`extra_allowed_ips`,`t_wg_client`.`endpoint`,`t_wg_client`.`use_server_dns`,`t_wg_client`.`enable_after_creation`,`t_wg_client`.`keys`,`t_wg_client`.`user_id` FROM `t_wg_client` LEFT JOIN t_user as tu ON tu.id = t_wg_client.user_id WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:15:11.711] INFO repository/server.go:39 [1.4877ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:15:11.711] INFO repository/system.go:28 [521.8µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:15:48.664] INFO repository/user.go:44 [980µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:15:48.667] INFO repository/server.go:65 [2.6439ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:15:48.664" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:15:48.687] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT `t_wg_client`.`id`,`t_wg_client`.`created_at`,`t_wg_client`.`updated_at`,`t_wg_client`.`server_id`,`t_wg_client`.`name`,`t_wg_client`.`email`,`t_wg_client`.`subnet_range`,`t_wg_client`.`ip_allocation`,`t_wg_client`.`allowed_ips`,`t_wg_client`.`extra_allowed_ips`,`t_wg_client`.`endpoint`,`t_wg_client`.`use_server_dns`,`t_wg_client`.`enable_after_creation`,`t_wg_client`.`keys`,`t_wg_client`.`user_id` FROM `t_wg_client` LEFT JOIN t_user as tu ON tu.id = t_wg_client.user_id WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:15:48.687] INFO repository/server.go:39 [1.0431ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:15:48.688] INFO repository/system.go:28 [1.0893ms] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 +[2024-03-11 11:18:14.694] INFO sqlite@v1.5.5/migrator.go:32 [510.6µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:18:14.695] INFO migrator/migrator.go:73 [562.7µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:18:14.695] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:18:14.695] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:18:14.695] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:18:14.697] INFO sqlite@v1.5.5/migrator.go:413 [1.4625ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:18:14.697] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:18:14.697] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:18:14.698] INFO sqlite@v1.5.5/migrator.go:423 [940.1µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:18:14.701] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:18:14.701] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:18:14.702] INFO sqlite@v1.5.5/migrator.go:413 [999.5µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:18:14.702] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:18:14.703] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:18:14.704] INFO sqlite@v1.5.5/migrator.go:423 [1.0068ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:18:14.708] ERROR wireguard-dashboard/main.go:17 执行脚本失败: invalid field found for struct wireguard-dashboard/model/entity.Client's field User: define a valid foreign key for relations or implement the Valuer/Scanner interface +[2024-03-11 11:18:17.941] INFO repository/user.go:44 [1.0661ms] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:18:17.942] ERROR api/server.go:36 更改服务端信息失败: invalid field found for struct wireguard-dashboard/model/entity.Client's field User: define a valid foreign key for relations or implement the Valuer/Scanner interface +[2024-03-11 11:18:55.287] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:18:55.288] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:18:55.288] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:18:55.289] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:18:55.289] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:18:55.291] INFO sqlite@v1.5.5/migrator.go:413 [1.075ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:18:55.291] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:18:55.291] INFO sqlite@v1.5.5/migrator.go:423 [574.1µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:18:55.292] INFO sqlite@v1.5.5/migrator.go:423 [578.1µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:18:55.293] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:18:55.293] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:18:55.294] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:18:55.294] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:18:55.295] INFO sqlite@v1.5.5/migrator.go:423 [928.3µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:18:55.296] INFO sqlite@v1.5.5/migrator.go:423 [1.0003ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:18:55.300] ERROR wireguard-dashboard/main.go:17 执行脚本失败: invalid field found for struct wireguard-dashboard/model/entity.Client's field User: define a valid foreign key for relations or implement the Valuer/Scanner interface +[2024-03-11 11:19:15.374] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:19:15.375] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:19:15.375] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:19:15.376] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:19:15.376] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:19:15.377] INFO sqlite@v1.5.5/migrator.go:413 [571.9µs] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:19:15.378] INFO sqlite@v1.5.5/migrator.go:423 [951.2µs] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:19:15.378] INFO sqlite@v1.5.5/migrator.go:423 [503.5µs] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:19:15.379] INFO sqlite@v1.5.5/migrator.go:423 [1.004ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:19:15.382] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:19:15.382] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:19:15.382] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:19:15.383] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:19:15.383] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:19:15.385] INFO sqlite@v1.5.5/migrator.go:423 [1.048ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:19:15.390] ERROR wireguard-dashboard/main.go:17 执行脚本失败: invalid field found for struct wireguard-dashboard/model/entity.Client's field User: define a valid foreign key for relations or implement the Valuer/Scanner interface +[2024-03-11 11:19:16.186] INFO repository/user.go:44 [345.6µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:19:16.188] ERROR api/server.go:36 更改服务端信息失败: invalid field found for struct wireguard-dashboard/model/entity.Client's field User: define a valid foreign key for relations or implement the Valuer/Scanner interface +[2024-03-11 11:27:48.667] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" +[2024-03-11 11:27:48.679] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:27:48.679] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 +[2024-03-11 11:27:48.679] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:27:48.680] INFO sqlite@v1.5.5/migrator.go:368 [503µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:27:48.681] INFO sqlite@v1.5.5/migrator.go:413 [1.1138ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:27:48.682] INFO sqlite@v1.5.5/migrator.go:423 [607.6µs] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:27:48.682] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:27:48.683] INFO sqlite@v1.5.5/migrator.go:423 [631.7µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:27:48.684] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:27:48.685] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" +[2024-03-11 11:27:48.685] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`)) +[2024-03-11 11:27:48.685] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user` +[2024-03-11 11:27:48.687] INFO sqlite@v1.5.5/migrator.go:423 [1.7494ms] [rows:1] DROP TABLE `t_user` +[2024-03-11 11:27:48.689] INFO sqlite@v1.5.5/migrator.go:423 [1.9372ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` +[2024-03-11 11:27:48.691] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" +[2024-03-11 11:27:48.691] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:27:48.691] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 +[2024-03-11 11:27:48.691] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:27:48.692] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" +[2024-03-11 11:27:48.693] INFO sqlite@v1.5.5/migrator.go:413 [999.3µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`)) +[2024-03-11 11:27:48.693] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server` +[2024-03-11 11:27:48.693] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` +[2024-03-11 11:27:48.695] INFO sqlite@v1.5.5/migrator.go:423 [2.6098ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` +[2024-03-11 11:27:48.697] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" +[2024-03-11 11:27:48.697] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:27:48.698] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 +[2024-03-11 11:27:48.698] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:27:48.698] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:27:48.699] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`)) +[2024-03-11 11:27:48.700] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:27:48.700] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:27:48.701] INFO sqlite@v1.5.5/migrator.go:423 [998.6µs] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:27:48.703] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys +[2024-03-11 11:27:48.703] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" +[2024-03-11 11:27:48.704] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`)) +[2024-03-11 11:27:48.704] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client` +[2024-03-11 11:27:48.706] INFO sqlite@v1.5.5/migrator.go:423 [104.1µs] [rows:1] DROP TABLE `t_wg_client` +[2024-03-11 11:27:48.708] INFO sqlite@v1.5.5/migrator.go:423 [1.7396ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` +[2024-03-11 11:27:48.709] INFO sqlite@v1.5.5/migrator.go:219 [108.1µs] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %") +[2024-03-11 11:27:48.710] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %") +[2024-03-11 11:27:48.710] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" +[2024-03-11 11:27:48.710] INFO migrator/migrator.go:73 [503.6µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc +[2024-03-11 11:27:48.710] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 +[2024-03-11 11:27:48.710] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 +[2024-03-11 11:27:48.711] INFO script/script.go:98 [552.1µs] [rows:1] SELECT count(*) FROM `t_wg_server` +[2024-03-11 11:27:54.144] INFO repository/user.go:44 [328µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 +[2024-03-11 11:27:54.148] INFO repository/server.go:63 [3.1809ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:27:54.144" WHERE id = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:27:54.167] INFO callbacks/preload.go:261 [0s] [rows:0] SELECT * FROM `t_user` WHERE `t_user`.`id` = "asd" +[2024-03-11 11:27:54.168] INFO callbacks/preload.go:261 [515.3µs] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" +[2024-03-11 11:27:54.168] INFO repository/server.go:37 [591.5µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 +[2024-03-11 11:27:54.168] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 diff --git a/main.go b/main.go index 7913d92..5ea2794 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ import ( "net/http" "wireguard-dashboard/config" "wireguard-dashboard/initialize" + "wireguard-dashboard/queues" "wireguard-dashboard/route" "wireguard-dashboard/script" ) @@ -15,6 +16,7 @@ func init() { if err := script.NewScript().Do(); err != nil { log.Errorf("执行脚本失败: %v", err.Error()) } + queues.StartConsumer() // 启动队列 } func main() { diff --git a/model/entity/base.go b/model/entity/base.go index 153e63d..8697f05 100644 --- a/model/entity/base.go +++ b/model/entity/base.go @@ -55,3 +55,11 @@ func (jt *JsonTime) Scan(v interface{}) error { } return fmt.Errorf("can not convert %v to timestamp", v) } + +func (jt JsonTime) String() string { + if jt.IsZero() { + return "" + } + output := fmt.Sprintf("%s", jt.Format("2006-01-02 15:04:05")) + return output +} diff --git a/model/entity/wireguard.go b/model/entity/wireguard.go index a80159b..f7ef360 100644 --- a/model/entity/wireguard.go +++ b/model/entity/wireguard.go @@ -34,6 +34,7 @@ type Client struct { EnableAfterCreation int `json:"enableAfterCreation" gorm:"type:int(1);default 1;comment:'是否创建后启用'"` Keys string `json:"keys" gorm:"type:text;default null;comment:'公钥和密钥的json串'"` UserId string `json:"userId" gorm:"type:char(36);not null;comment:'创建人id'"` + User *User `json:"user" gorm:"foreignKey:UserId"` } func (*Client) TableName() string { diff --git a/model/template_data/wireguard.go b/model/template_data/wireguard.go index d37feb4..fadf4e6 100644 --- a/model/template_data/wireguard.go +++ b/model/template_data/wireguard.go @@ -13,9 +13,19 @@ type Server struct { } type Client struct { + ID string `json:"id"` + Name string `json:"name"` PublicKey string `json:"publicKey"` PresharedKey string `json:"presharedKey"` AllowedIPS string `json:"allowedIps"` PersistentKeepalive string `json:"persistentKeepalive"` Endpoint string `json:"endpoint"` + CreateUser string `json:"createUser"` + CreatedAt string `json:"createdAt"` + UpdatedAt string `json:"updatedAt"` +} + +type Keys struct { + PrivateKey string `json:"privateKey"` + PublicKey string `json:"publicKey"` } diff --git a/queues/async_wg_config.go b/queues/async_wg_config.go new file mode 100644 index 0000000..110903c --- /dev/null +++ b/queues/async_wg_config.go @@ -0,0 +1,103 @@ +package queues + +import ( + "context" + "encoding/json" + "fmt" + "gitee.ltd/lxh/logger/log" + "os" + "strconv" + "wireguard-dashboard/client" + "wireguard-dashboard/component" + "wireguard-dashboard/constant" + "wireguard-dashboard/model/template_data" + "wireguard-dashboard/repository" +) + +// asyncWireguardConfigFile +// @description: 同步配置文件 +func asyncWireguardConfigFile() { + for { + result, err := client.Redis.BRPop(context.Background(), 0, fmt.Sprintf("%s", constant.SyncWgConfigFile)).Result() + if err != nil { + log.Errorf("获取任务失败") + continue + } + + serverId := result[1] + + // 使用serverId获取服务信息 + serverEnt, err := repository.Server().GetServerWithClient(serverId) + if err != nil { + log.Errorf("获取服务端信息失败: %s", err.Error()) + continue + } + + // 获取服务端全局配置 + globalSetting, err := repository.System().GetServerSetting() + if err != nil { + log.Errorf("获取服务端配置失败: %s", err.Error()) + continue + } + + if globalSetting.ConfigFilePath == "" { + globalSetting.ConfigFilePath = "/etc/wireguard/wg0.conf" + } + + // 获取模板文件和输出目录 + var templatePath, outFilePath string + if os.Getenv("GIN_MODE") != "release" { + templatePath = "E:\\Workspace\\Go\\wireguard-dashboard\\template\\wg.conf" + outFilePath = "E:\\Workspace\\Go\\wireguard-dashboard\\wg0.conf" + } else { + templatePath = "./template/wg.conf" + outFilePath = globalSetting.ConfigFilePath + } + + // 组装数据 + renderServer := template_data.Server{ + Address: serverEnt.IpScope, + ListenPort: serverEnt.ListenPort, + PrivateKey: serverEnt.PrivateKey, + MTU: globalSetting.MTU, + PostUp: serverEnt.PostUpScript, + PreDown: serverEnt.PreDownScript, + PostDown: serverEnt.PostDownScript, + Table: globalSetting.Table, + } + + var renderClients []template_data.Client + for _, v := range serverEnt.Clients { + var clientKey template_data.Keys + _ = json.Unmarshal([]byte(v.Keys), &clientKey) + var createUserName string + if v.User != nil { + createUserName = v.User.Name + } + renderClients = append(renderClients, template_data.Client{ + ID: v.Id, + Name: v.Name, + PublicKey: clientKey.PublicKey, + PresharedKey: clientKey.PrivateKey, + AllowedIPS: v.AllowedIps, + PersistentKeepalive: strconv.Itoa(globalSetting.PersistentKeepalive), + Endpoint: v.Endpoint, + CreatedAt: v.CreatedAt.String(), + UpdatedAt: v.UpdatedAt.String(), + CreateUser: createUserName, + }) + } + + renderData := map[string]any{ + "Server": renderServer, + "Clients": renderClients, + } + + err = component.Wireguard().Apply(templatePath, outFilePath, renderData) + if err != nil { + log.Errorf("同步配置文件失败: %s", err.Error()) + continue + } + + } +} diff --git a/queues/consumer.go b/queues/consumer.go new file mode 100644 index 0000000..28e88eb --- /dev/null +++ b/queues/consumer.go @@ -0,0 +1,7 @@ +package queues + +// StartConsumer +// @description: 启动消费者 +func StartConsumer() { + go asyncWireguardConfigFile() +} diff --git a/queues/producer.go b/queues/producer.go new file mode 100644 index 0000000..34e5a6a --- /dev/null +++ b/queues/producer.go @@ -0,0 +1,16 @@ +package queues + +import ( + "context" + "fmt" + "wireguard-dashboard/client" + "wireguard-dashboard/constant" +) + +// PutAsyncWireguardConfigFile +// @description: 启动生产者 +// @param serverId +// @return error +func PutAsyncWireguardConfigFile(serverId string) error { + return client.Redis.LPush(context.Background(), fmt.Sprintf("%s", constant.SyncWgConfigFile), serverId).Err() +} diff --git a/repository/server.go b/repository/server.go index 7add245..5fcc00d 100644 --- a/repository/server.go +++ b/repository/server.go @@ -28,6 +28,16 @@ func (r server) GetServer() (data *vo.Server, err error) { return } +// GetServerWithClient +// @description: 获取服务端信息以及所属客户端 +// @receiver r +// @param data +// @param err +func (r server) GetServerWithClient(id string) (data *entity.Server, err error) { + err = r.Model(&entity.Server{}).Preload("Clients").Preload("Clients.User").Where("id = ?", id).First(&data).Error + return +} + // Save // @description: 新增服务端信息 // @receiver r diff --git a/route/server.go b/route/server.go index 4c51d77..170cb47 100644 --- a/route/server.go +++ b/route/server.go @@ -11,5 +11,6 @@ func ServerApi(r *gin.Engine) { { apiGroup.GET("", api.Server().GetServer) // 获取服务端信息 apiGroup.GET("global-setting", api.Server().GetGlobalSetting) // 获取服务端全局配置 + apiGroup.POST("", api.Server().SaveServer) // 新增/更新服务端信息 } } diff --git a/script/db_migrate.go b/script/script.go similarity index 100% rename from script/db_migrate.go rename to script/script.go