diff --git a/.gitignore b/.gitignore index 26fd19e..6be10ee 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ # Dependency directories (remove the comment below to include it) # vendor/ .idea +logs # Go workspace file go.work diff --git a/logs/runtime-hyxc.log b/logs/runtime-hyxc.log deleted file mode 100644 index f909607..0000000 --- a/logs/runtime-hyxc.log +++ /dev/null @@ -1,4369 +0,0 @@ -[2024-03-07 11:39:22.193] INFO sqlite@v1.5.5/migrator.go:32 [63.3µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 11:39:22.206] 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-07 11:39:22.206] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 11:39:22.206] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 11:39:22.206] 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-07 11:39:22.207] INFO sqlite@v1.5.5/migrator.go:413 [508.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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 11:39:22.207] 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-07 11:39:22.208] INFO sqlite@v1.5.5/migrator.go:423 [1.0879ms] [rows:1] DROP TABLE `t_user` -[2024-03-07 11:39:22.209] INFO sqlite@v1.5.5/migrator.go:423 [1.1032ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 11:39:22.211] INFO sqlite@v1.5.5/migrator.go:79 [71.1µs] [rows:1] PRAGMA foreign_keys -[2024-03-07 11:39:22.211] 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-07 11:39:22.211] 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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 11:39:22.212] 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-07 11:39:22.212] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-07 11:39:22.213] INFO sqlite@v1.5.5/migrator.go:423 [1.1628ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 11:39:22.214] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 11:39:22.215] 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-07 11:39:22.215] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 11:39:22.215] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 11:39:22.217] 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-07 11:39:22.218] INFO sqlite@v1.5.5/migrator.go:413 [1.0859ms] [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-07 11:39:22.218] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 11:39:22.219] INFO sqlite@v1.5.5/migrator.go:423 [1.0538ms] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 11:39:22.220] INFO sqlite@v1.5.5/migrator.go:423 [1.0028ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 11:39:22.221] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 11:39:22.221] 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-07 11:39:22.222] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 11:39:22.222] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 11:39:22.222] 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-07 11:39:22.224] INFO sqlite@v1.5.5/migrator.go:413 [1.0128ms] [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-07 11:39:22.225] 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-07 11:39:22.225] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 11:39:22.226] INFO sqlite@v1.5.5/migrator.go:423 [1.1012ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 11:39:22.228] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 11:39:22.228] 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-07 11:39:22.229] 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-07 11:39:22.230] INFO sqlite@v1.5.5/migrator.go:423 [1.0388ms] [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-07 11:39:22.230] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 11:39:22.230] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 11:39:22.232] 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-07 11:39:22.232] INFO script/db_migrate.go:49 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 11:39:41.779] INFO repository/user.go:32 [0s] [rows:1] SELECT * FROM `t_user` WHERE account = "Admin" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 11:39:55.538] INFO repository/user.go:21 [112.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 11:46:11.901] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 11:46:11.915] INFO migrator/migrator.go:73 [1.0033ms] [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-07 11:46:11.915] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 11:46:11.915] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 11:46:11.915] 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-07 11:46:11.917] INFO sqlite@v1.5.5/migrator.go:413 [999.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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 11:46:11.917] 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-07 11:46:11.917] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-07 11:46:11.919] INFO sqlite@v1.5.5/migrator.go:423 [503.3µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 11:46:11.921] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 11:46:11.921] 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-07 11:46:11.922] 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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 11:46:11.922] 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-07 11:46:11.923] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-07 11:46:11.924] INFO sqlite@v1.5.5/migrator.go:423 [1.0165ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 11:46:11.926] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 11:46:11.926] 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-07 11:46:11.926] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 11:46:11.927] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 11:46:11.927] 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-07 11:46:11.928] INFO sqlite@v1.5.5/migrator.go:413 [1.0461ms] [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-07 11:46:11.928] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 11:46:11.929] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 11:46:11.930] INFO sqlite@v1.5.5/migrator.go:423 [999.9µs] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 11:46:11.932] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 11:46:11.932] 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-07 11:46:11.933] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 11:46:11.933] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 11:46:11.933] 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-07 11:46:11.935] INFO sqlite@v1.5.5/migrator.go:413 [504µ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-07 11:46:11.935] 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-07 11:46:11.936] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 11:46:11.937] INFO sqlite@v1.5.5/migrator.go:423 [1.0018ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 11:46:11.939] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 11:46:11.939] 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-07 11:46:11.940] INFO sqlite@v1.5.5/migrator.go:413 [959.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-07 11:46:11.940] 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-07 11:46:11.941] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 11:46:11.942] 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-07 11:46:11.944] 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-07 11:46:11.945] INFO script/db_migrate.go:50 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 12:01:13.182] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 12:01:13.194] 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-07 12:01:13.195] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 12:01:13.195] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 12:01:13.195] 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-07 12:01:13.197] INFO sqlite@v1.5.5/migrator.go:413 [1.159ms] [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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 12:01:13.197] 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-07 12:01:13.197] INFO sqlite@v1.5.5/migrator.go:423 [579.4µs] [rows:1] DROP TABLE `t_user` -[2024-03-07 12:01:13.198] INFO sqlite@v1.5.5/migrator.go:423 [1.1276ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 12:01:13.201] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 12:01:13.201] 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-07 12:01:13.202] INFO sqlite@v1.5.5/migrator.go:413 [1.0055ms] [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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 12:01:13.203] INFO sqlite@v1.5.5/migrator.go:423 [504.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-07 12:01:13.203] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-07 12:01:13.204] INFO sqlite@v1.5.5/migrator.go:423 [1.0677ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 12:01:13.205] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 12:01:13.205] 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-07 12:01:13.206] INFO sqlite@v1.5.5/migrator.go:125 [59.7µs] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 12:01:13.206] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 12:01:13.206] 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-07 12:01:13.207] INFO sqlite@v1.5.5/migrator.go:413 [573.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-07 12:01:13.207] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 12:01:13.208] INFO sqlite@v1.5.5/migrator.go:423 [504µs] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 12:01:13.208] INFO sqlite@v1.5.5/migrator.go:423 [521µs] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 12:01:13.210] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 12:01:13.210] 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-07 12:01:13.210] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 12:01:13.211] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 12:01:13.211] 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-07 12:01:13.212] INFO sqlite@v1.5.5/migrator.go:413 [540.9µ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-07 12:01:13.212] 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-07 12:01:13.213] INFO sqlite@v1.5.5/migrator.go:423 [616.1µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 12:01:13.214] INFO sqlite@v1.5.5/migrator.go:423 [1.1245ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 12:01:13.217] INFO sqlite@v1.5.5/migrator.go:79 [525.6µs] [rows:1] PRAGMA foreign_keys -[2024-03-07 12:01:13.217] 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-07 12:01:13.218] INFO sqlite@v1.5.5/migrator.go:413 [520.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-07 12:01:13.218] 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-07 12:01:13.218] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 12:01:13.219] INFO sqlite@v1.5.5/migrator.go:423 [553.6µs] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 12:01:13.222] 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-07 12:01:13.222] INFO script/db_migrate.go:50 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 12:01:29.181] INFO repository/user.go:47 [504.7µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 12:02:23.977] INFO repository/user.go:47 [211.3µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 12:02:23.977] ERROR repository/user.go:58 record not found -> SELECT * FROM `t_user` WHERE account = "123123123" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:06:09.134] INFO repository/user.go:47 [438µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:06:09.134] ERROR repository/user.go:58 record not found -> SELECT * FROM `t_user` WHERE account = "123123123" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:06:32.385] INFO repository/user.go:47 [911.4µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:06:32.386] ERROR repository/user.go:58 record not found -> SELECT * FROM `t_user` WHERE account = "123123123" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:08:38.344] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 14:08:38.356] 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-07 14:08:38.357] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 14:08:38.357] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:08:38.357] 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-07 14:08:38.358] INFO sqlite@v1.5.5/migrator.go:413 [566.5µ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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:08:38.358] 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-07 14:08:38.359] INFO sqlite@v1.5.5/migrator.go:423 [554µs] [rows:1] DROP TABLE `t_user` -[2024-03-07 14:08:38.360] INFO sqlite@v1.5.5/migrator.go:423 [1.1329ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:08:38.361] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:08:38.361] 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-07 14:08:38.363] INFO sqlite@v1.5.5/migrator.go:413 [586.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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:08:38.363] INFO sqlite@v1.5.5/migrator.go:423 [559.9µ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-07 14:08:38.363] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-07 14:08:38.365] INFO sqlite@v1.5.5/migrator.go:423 [1.1457ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:08:38.367] INFO sqlite@v1.5.5/migrator.go:32 [56.5µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 14:08:38.367] 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-07 14:08:38.367] INFO sqlite@v1.5.5/migrator.go:125 [75.3µs] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 14:08:38.367] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:08:38.367] 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-07 14:08:38.369] INFO sqlite@v1.5.5/migrator.go:413 [1.1745ms] [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-07 14:08:38.369] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 14:08:38.370] INFO sqlite@v1.5.5/migrator.go:423 [582.9µs] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 14:08:38.371] INFO sqlite@v1.5.5/migrator.go:423 [1.092ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 14:08:38.372] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 14:08:38.372] 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-07 14:08:38.373] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 14:08:38.373] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:08:38.373] 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-07 14:08:38.375] INFO sqlite@v1.5.5/migrator.go:413 [950µ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-07 14:08:38.375] 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-07 14:08:38.375] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:08:38.376] INFO sqlite@v1.5.5/migrator.go:423 [1.6338ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:08:38.378] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:08:38.378] 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-07 14:08:38.379] 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-07 14:08:38.380] 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-07 14:08:38.380] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:08:38.381] INFO sqlite@v1.5.5/migrator.go:423 [1.0888ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:08:38.383] 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-07 14:08:38.383] INFO script/db_migrate.go:50 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 14:08:40.261] INFO repository/user.go:47 [778.7µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:08:40.261] INFO api/user.go:126 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE account = "123123123" -[2024-03-07 14:08:41.171] INFO repository/user.go:37 [3.4901ms] [rows:1] INSERT INTO `t_user` (`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) VALUES ("2ac392865c644d1daaeb6ddd6b516e97","2024-03-07 14:08:41","2024-03-07 14:08:41","http://wireguard-dashboard.oss-cn-chengdu.aliyuncs.com/wg/25fd738f-007d-4415-aac6-cfa008f84160.png","张三","123123123","","hahahaha",1,1) -[2024-03-07 14:08:51.686] INFO repository/user.go:47 [950.7µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:08:51.687] INFO api/user.go:126 [506.3µs] [rows:1] SELECT count(*) FROM `t_user` WHERE account = "123123123" -[2024-03-07 14:09:56.542] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 14:09:56.555] 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-07 14:09:56.555] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 14:09:56.556] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:09:56.556] 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-07 14:09:56.557] INFO sqlite@v1.5.5/migrator.go:413 [612µ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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:09:56.558] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:09:56.558] INFO sqlite@v1.5.5/migrator.go:423 [530.4µs] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:09:56.559] INFO sqlite@v1.5.5/migrator.go:423 [1.2126ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:09:56.561] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:09:56.561] 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-07 14:09:56.562] INFO sqlite@v1.5.5/migrator.go:413 [576.8µs] [rows:2] 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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:09:56.562] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:09:56.563] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:09:56.564] INFO sqlite@v1.5.5/migrator.go:423 [1.0557ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:09:56.567] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 14:09:56.567] 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-07 14:09:56.567] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 14:09:56.567] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:09:56.567] 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-07 14:09:56.568] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:2] 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-07 14:09:56.568] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 14:09:56.569] INFO sqlite@v1.5.5/migrator.go:423 [56µs] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 14:09:56.571] INFO sqlite@v1.5.5/migrator.go:423 [2.2125ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 14:09:56.573] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 14:09:56.573] 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-07 14:09:56.574] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 14:09:56.574] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:09:56.574] 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-07 14:09:56.575] INFO sqlite@v1.5.5/migrator.go:413 [1.177ms] [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-07 14:09:56.575] 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-07 14:09:56.576] INFO sqlite@v1.5.5/migrator.go:423 [1.0873ms] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:09:56.577] INFO sqlite@v1.5.5/migrator.go:423 [1.091ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:09:56.579] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:09:56.579] 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-07 14:09:56.580] INFO sqlite@v1.5.5/migrator.go:413 [1.1019ms] [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-07 14:09:56.580] 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-07 14:09:56.581] INFO sqlite@v1.5.5/migrator.go:423 [1.0567ms] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:09:56.582] INFO sqlite@v1.5.5/migrator.go:423 [1.0689ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:09:56.584] 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-07 14:09:56.585] INFO script/db_migrate.go:50 [174.4µs] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 14:11:37.702] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 14:11:37.714] 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-07 14:11:37.715] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 14:11:37.715] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:11:37.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-07 14:11:37.717] INFO sqlite@v1.5.5/migrator.go:413 [1.1811ms] [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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:11:37.717] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:11:37.717] INFO sqlite@v1.5.5/migrator.go:423 [564.7µs] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:11:37.719] INFO sqlite@v1.5.5/migrator.go:423 [1.1244ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:11:37.720] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:11:37.720] 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-07 14:11:37.721] INFO sqlite@v1.5.5/migrator.go:413 [1.0261ms] [rows:2] 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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:11:37.721] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:11:37.721] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:11:37.723] INFO sqlite@v1.5.5/migrator.go:423 [1.5032ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:11:37.726] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 14:11:37.726] 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-07 14:11:37.726] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 14:11:37.726] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:11:37.727] 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-07 14:11:37.728] INFO sqlite@v1.5.5/migrator.go:413 [1.0401ms] [rows:2] 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-07 14:11:37.728] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 14:11:37.728] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 14:11:37.729] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 14:11:37.731] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 14:11:37.731] 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-07 14:11:37.732] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 14:11:37.732] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:11:37.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-07 14:11:37.733] 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-07 14:11:37.733] 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-07 14:11:37.734] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:11:37.735] INFO sqlite@v1.5.5/migrator.go:423 [1.5008ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:11:37.737] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:11:37.737] 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-07 14:11:37.739] INFO sqlite@v1.5.5/migrator.go:413 [1.0917ms] [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-07 14:11:37.739] 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-07 14:11:37.740] INFO sqlite@v1.5.5/migrator.go:423 [1.0014ms] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:11:37.740] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:11:37.742] 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-07 14:11:37.742] INFO script/db_migrate.go:50 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 14:11:44.300] INFO repository/user.go:55 [818.9µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:11:53.083] INFO repository/user.go:55 [502.1µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:11:59.339] INFO repository/user.go:55 [800µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:12:03.207] INFO repository/user.go:55 [146.1µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:12:15.084] INFO repository/user.go:55 [868.9µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:12:39.296] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 14:12:39.307] 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-07 14:12:39.308] INFO sqlite@v1.5.5/migrator.go:125 [70.6µs] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 14:12:39.308] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:12:39.308] 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-07 14:12:39.310] INFO sqlite@v1.5.5/migrator.go:413 [1.1822ms] [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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:12:39.310] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:12:39.310] INFO sqlite@v1.5.5/migrator.go:423 [68.5µs] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:12:39.311] INFO sqlite@v1.5.5/migrator.go:423 [1.1698ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:12:39.313] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:12:39.313] 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-07 14:12:39.314] INFO sqlite@v1.5.5/migrator.go:413 [565.1µs] [rows:2] 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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:12:39.314] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:12:39.315] INFO sqlite@v1.5.5/migrator.go:423 [962µs] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:12:39.316] INFO sqlite@v1.5.5/migrator.go:423 [583.4µs] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:12:39.318] INFO sqlite@v1.5.5/migrator.go:32 [69.9µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 14:12:39.318] 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-07 14:12:39.318] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 14:12:39.318] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:12:39.318] 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-07 14:12:39.320] INFO sqlite@v1.5.5/migrator.go:413 [651.3µs] [rows:2] 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-07 14:12:39.320] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 14:12:39.320] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 14:12:39.322] INFO sqlite@v1.5.5/migrator.go:423 [1.1351ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 14:12:39.323] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 14:12:39.324] INFO migrator/migrator.go:73 [1.0967ms] [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-07 14:12:39.324] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 14:12:39.324] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:12:39.324] 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-07 14:12:39.326] INFO sqlite@v1.5.5/migrator.go:413 [1.0529ms] [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-07 14:12:39.326] 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-07 14:12:39.326] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:12:39.327] INFO sqlite@v1.5.5/migrator.go:423 [1.0869ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:12:39.329] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:12:39.329] 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-07 14:12:39.330] INFO sqlite@v1.5.5/migrator.go:413 [1.1357ms] [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-07 14:12:39.330] 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-07 14:12:39.330] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:12:39.332] INFO sqlite@v1.5.5/migrator.go:423 [65µs] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:12:39.334] 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-07 14:12:39.334] INFO script/db_migrate.go:50 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 14:12:40.382] INFO repository/user.go:55 [1.0007ms] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:12:41.405] INFO api/user.go:126 [209.4µs] [rows:1] SELECT count(*) FROM `t_user` WHERE account = "123123123" -[2024-03-07 14:14:42.943] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 14:14:42.956] INFO migrator/migrator.go:73 [599µ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-07 14:14:42.956] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 14:14:42.957] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:14:42.957] 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-07 14:14:42.958] INFO sqlite@v1.5.5/migrator.go:413 [1.0837ms] [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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:14:42.958] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:14:42.959] INFO sqlite@v1.5.5/migrator.go:423 [531.9µs] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:14:42.960] INFO sqlite@v1.5.5/migrator.go:423 [1.1284ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:14:42.961] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:14:42.961] 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-07 14:14:42.962] INFO sqlite@v1.5.5/migrator.go:413 [520.2µs] [rows:2] 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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:14:42.962] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:14:42.963] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:14:42.964] INFO sqlite@v1.5.5/migrator.go:423 [1.0572ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:14:42.966] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 14:14:42.966] 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-07 14:14:42.966] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 14:14:42.966] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:14:42.966] 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-07 14:14:42.967] INFO sqlite@v1.5.5/migrator.go:413 [529.4µs] [rows:2] 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-07 14:14:42.967] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 14:14:42.968] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 14:14:42.969] INFO sqlite@v1.5.5/migrator.go:423 [1.1041ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 14:14:42.971] INFO sqlite@v1.5.5/migrator.go:32 [520.9µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 14:14:42.971] 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-07 14:14:42.971] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 14:14:42.971] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:14:42.971] 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-07 14:14:42.973] INFO sqlite@v1.5.5/migrator.go:413 [1.0581ms] [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-07 14:14:42.973] 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-07 14:14:42.974] INFO sqlite@v1.5.5/migrator.go:423 [550µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:14:42.974] INFO sqlite@v1.5.5/migrator.go:423 [511.8µs] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:14:42.976] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:14:42.976] 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-07 14:14:42.977] INFO sqlite@v1.5.5/migrator.go:413 [538.9µ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-07 14:14:42.977] 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-07 14:14:42.978] INFO sqlite@v1.5.5/migrator.go:423 [518.8µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:14:42.978] INFO sqlite@v1.5.5/migrator.go:423 [521.7µs] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:14:42.980] 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-07 14:14:42.981] INFO script/db_migrate.go:50 [504.6µs] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 14:14:44.106] INFO repository/user.go:55 [91.3µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:15:48.092] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 14:15:48.104] 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-07 14:15:48.104] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 14:15:48.104] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:15:48.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-07 14:15:48.106] INFO sqlite@v1.5.5/migrator.go:413 [636.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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:15:48.106] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:15:48.107] INFO sqlite@v1.5.5/migrator.go:423 [56.7µs] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:15:48.108] INFO sqlite@v1.5.5/migrator.go:423 [666.7µs] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:15:48.110] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:15:48.110] 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-07 14:15:48.111] INFO sqlite@v1.5.5/migrator.go:413 [660µs] [rows:2] 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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:15:48.111] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:15:48.112] INFO sqlite@v1.5.5/migrator.go:423 [563.1µs] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:15:48.113] INFO sqlite@v1.5.5/migrator.go:423 [1.0908ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:15:48.114] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 14:15:48.115] 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-07 14:15:48.115] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 14:15:48.115] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:15:48.115] 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-07 14:15:48.116] INFO sqlite@v1.5.5/migrator.go:413 [631.1µs] [rows:2] 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-07 14:15:48.117] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 14:15:48.117] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 14:15:48.118] INFO sqlite@v1.5.5/migrator.go:423 [1.2075ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 14:15:48.119] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 14:15:48.120] 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-07 14:15:48.120] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 14:15:48.121] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:15:48.121] 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-07 14:15:48.122] INFO sqlite@v1.5.5/migrator.go:413 [613.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-07 14:15:48.122] 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-07 14:15:48.122] INFO sqlite@v1.5.5/migrator.go:423 [564µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:15:48.123] INFO sqlite@v1.5.5/migrator.go:423 [1.112ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:15:48.125] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:15:48.125] 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-07 14:15:48.126] INFO sqlite@v1.5.5/migrator.go:413 [569.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-07 14:15:48.126] 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-07 14:15:48.126] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:15:48.127] INFO sqlite@v1.5.5/migrator.go:423 [634.5µs] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:15:48.128] 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-07 14:15:48.128] INFO script/db_migrate.go:50 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 14:15:49.260] INFO repository/user.go:55 [765.6µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:15:50.647] ERROR repository/user.go:31 no such column: isAdmin -> UPDATE `t_user` SET `avatar`="",`email`="",`isAdmin`=1,`name`="张三1",`status`=1,`updated_at`="2024-03-07 14:15:50.646" WHERE id = "2ac392865c644d1daaeb6ddd6b516e97" -[2024-03-07 14:16:02.228] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 14:16:02.242] 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-07 14:16:02.242] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 14:16:02.242] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:16:02.243] 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-07 14:16:02.245] INFO sqlite@v1.5.5/migrator.go:413 [1.0051ms] [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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:16:02.245] INFO sqlite@v1.5.5/migrator.go:423 [503.6µs] [rows:2] 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-07 14:16:02.245] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:16:02.246] INFO sqlite@v1.5.5/migrator.go:423 [1.004ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:16:02.248] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:16:02.248] 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-07 14:16:02.249] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:2] 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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:16:02.249] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:16:02.250] INFO sqlite@v1.5.5/migrator.go:423 [1.4226ms] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:16:02.252] INFO sqlite@v1.5.5/migrator.go:423 [1.5116ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:16:02.253] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 14:16:02.253] 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-07 14:16:02.254] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 14:16:02.254] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:16:02.254] 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-07 14:16:02.256] INFO sqlite@v1.5.5/migrator.go:413 [1.0073ms] [rows:2] 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-07 14:16:02.256] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 14:16:02.257] INFO sqlite@v1.5.5/migrator.go:423 [999.4µs] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 14:16:02.258] INFO sqlite@v1.5.5/migrator.go:423 [998.4µs] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 14:16:02.260] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 14:16:02.260] 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-07 14:16:02.260] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 14:16:02.260] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:16:02.261] 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-07 14:16:02.262] INFO sqlite@v1.5.5/migrator.go:413 [1.0017ms] [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-07 14:16:02.262] 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-07 14:16:02.263] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:16:02.264] INFO sqlite@v1.5.5/migrator.go:423 [1.0031ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:16:02.266] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:16:02.266] 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-07 14:16:02.268] INFO sqlite@v1.5.5/migrator.go:413 [1.0001ms] [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-07 14:16:02.268] 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-07 14:16:02.268] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:16:02.269] INFO sqlite@v1.5.5/migrator.go:423 [1.0005ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:16:02.271] 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-07 14:16:02.272] INFO script/db_migrate.go:50 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 14:16:03.225] INFO repository/user.go:55 [1.5847ms] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:16:04.658] INFO repository/user.go:31 [2.6176ms] [rows:1] UPDATE `t_user` SET `avatar`="",`email`="",`is_admin`=1,`name`="张三1",`status`=1,`updated_at`="2024-03-07 14:16:04.656" WHERE id = "2ac392865c644d1daaeb6ddd6b516e97" -[2024-03-07 14:45:21.473] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 14:45:21.489] 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-07 14:45:21.489] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 14:45:21.489] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:45:21.490] 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-07 14:45:21.491] INFO sqlite@v1.5.5/migrator.go:413 [1.5644ms] [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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:45:21.492] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:45:21.493] INFO sqlite@v1.5.5/migrator.go:423 [595.3µs] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:45:21.494] INFO sqlite@v1.5.5/migrator.go:423 [1.042ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:45:21.498] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:45:21.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-07 14:45:21.500] INFO sqlite@v1.5.5/migrator.go:413 [1.0362ms] [rows:2] 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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:45:21.500] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:45:21.501] INFO sqlite@v1.5.5/migrator.go:423 [525.4µs] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:45:21.503] INFO sqlite@v1.5.5/migrator.go:423 [1.6078ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:45:21.507] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 14:45:21.507] 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-07 14:45:21.507] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 14:45:21.507] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:45:21.509] 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-07 14:45:21.509] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:2] 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-07 14:45:21.510] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 14:45:21.510] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 14:45:21.511] INFO sqlite@v1.5.5/migrator.go:423 [961µs] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 14:45:21.513] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 14:45:21.513] 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-07 14:45:21.514] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 14:45:21.514] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:45:21.514] 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-07 14:45:21.515] 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-07 14:45:21.516] 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-07 14:45:21.517] INFO sqlite@v1.5.5/migrator.go:423 [1.0111ms] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:45:21.518] INFO sqlite@v1.5.5/migrator.go:423 [1.0017ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:45:21.520] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:45:21.520] 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-07 14:45:21.521] INFO sqlite@v1.5.5/migrator.go:413 [560.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-07 14:45:21.522] 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-07 14:45:21.523] INFO sqlite@v1.5.5/migrator.go:423 [579.2µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:45:21.524] INFO sqlite@v1.5.5/migrator.go:423 [1.1393ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:45:21.525] 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-07 14:45:21.525] INFO script/db_migrate.go:50 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 14:45:30.353] INFO repository/user.go:68 [688.9µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:45:58.264] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 14:45:58.278] 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-07 14:45:58.278] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 14:45:58.278] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:45:58.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-07 14:45:58.280] INFO sqlite@v1.5.5/migrator.go:413 [1.0005ms] [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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:45:58.280] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:45:58.280] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:45:58.282] INFO sqlite@v1.5.5/migrator.go:423 [1.0005ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:45:58.284] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:45:58.284] 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-07 14:45:58.284] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:2] 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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 14:45:58.286] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 14:45:58.286] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_user` -[2024-03-07 14:45:58.287] INFO sqlite@v1.5.5/migrator.go:423 [1.0048ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 14:45:58.289] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 14:45:58.289] 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-07 14:45:58.289] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 14:45:58.289] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:45:58.290] 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-07 14:45:58.291] INFO sqlite@v1.5.5/migrator.go:413 [1.0009ms] [rows:2] 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-07 14:45:58.291] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 14:45:58.291] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 14:45:58.292] INFO sqlite@v1.5.5/migrator.go:423 [1ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 14:45:58.294] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 14:45:58.294] 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-07 14:45:58.294] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 14:45:58.295] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:45:58.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-07 14:45:58.295] 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-07 14:45:58.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-07 14:45:58.296] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:45:58.297] INFO sqlite@v1.5.5/migrator.go:423 [1.005ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:45:58.299] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 14:45:58.299] 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-07 14:45:58.300] INFO sqlite@v1.5.5/migrator.go:413 [1.0089ms] [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-07 14:45:58.300] 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-07 14:45:58.301] INFO sqlite@v1.5.5/migrator.go:423 [988.6µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 14:45:58.302] INFO sqlite@v1.5.5/migrator.go:423 [1.0107ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 14:45:58.303] 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-07 14:45:58.304] INFO script/db_migrate.go:50 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 14:45:59.588] INFO repository/user.go:68 [224.6µs] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:46:13.620] INFO repository/user.go:68 [0s] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 14:46:13.621] INFO repository/user.go:93 [1.504ms] [rows:2] SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`is_admin`,`status` FROM `t_user` ORDER BY created_at DESC LIMIT 10 -[2024-03-07 14:46:13.622] INFO repository/user.go:93 [519.9µs] [rows:1] SELECT count(*) FROM `t_user` -[2024-03-07 15:16:08.290] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 15:16:08.303] INFO migrator/migrator.go:73 [585.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-07 15:16:08.303] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 15:16:08.303] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 15:16:08.303] 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-07 15:16:08.305] INFO sqlite@v1.5.5/migrator.go:413 [1.1667ms] [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` int(1) NOT NULL,PRIMARY KEY (`id`)) -[2024-03-07 15:16:08.305] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 15:16:08.305] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_user` -[2024-03-07 15:16:08.306] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 15:16:08.309] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 15:16:08.309] 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-07 15:16:08.311] INFO sqlite@v1.5.5/migrator.go:413 [609.4µs] [rows:2] 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-07 15:16:08.311] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 15:16:08.311] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_user` -[2024-03-07 15:16:08.312] INFO sqlite@v1.5.5/migrator.go:423 [981.7µs] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 15:16:08.314] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 15:16:08.314] 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-07 15:16:08.314] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 15:16:08.314] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 15:16:08.314] 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-07 15:16:08.315] INFO sqlite@v1.5.5/migrator.go:413 [1.1598ms] [rows:2] 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-07 15:16:08.315] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 15:16:08.315] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 15:16:08.316] INFO sqlite@v1.5.5/migrator.go:423 [1.4555ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 15:16:08.318] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 15:16:08.319] INFO migrator/migrator.go:73 [59.5µ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-07 15:16:08.319] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 15:16:08.319] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 15:16:08.319] 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-07 15:16:08.320] INFO sqlite@v1.5.5/migrator.go:413 [1.0816ms] [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-07 15:16:08.320] 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-07 15:16:08.320] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 15:16:08.321] INFO sqlite@v1.5.5/migrator.go:423 [1.0777ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 15:16:08.324] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 15:16:08.324] 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-07 15:16:08.325] INFO sqlite@v1.5.5/migrator.go:413 [1.1425ms] [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-07 15:16:08.325] 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-07 15:16:08.325] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 15:16:08.327] INFO sqlite@v1.5.5/migrator.go:423 [2.1432ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 15:16:08.329] INFO sqlite@v1.5.5/migrator.go:219 [559.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-07 15:16:08.329] INFO script/db_migrate.go:50 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 15:16:14.683] INFO repository/user.go:44 [0s] [rows:1] SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 15:16:14.684] INFO repository/user.go:32 [0s] [rows:2] SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`is_admin`,`status` FROM `t_user` ORDER BY created_at DESC LIMIT 10 -[2024-03-07 15:16:14.684] INFO repository/user.go:32 [0s] [rows:1] SELECT count(*) FROM `t_user` -[2024-03-07 15:25:12.973] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 15:25:12.985] 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-07 15:25:12.986] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 15:25:12.987] INFO sqlite@v1.5.5/migrator.go:79 [53.1µs] [rows:1] PRAGMA foreign_keys -[2024-03-07 15:25:12.987] 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-07 15:25:12.988] INFO sqlite@v1.5.5/migrator.go:413 [595.4µ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-07 15:25:12.988] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 15:25:12.988] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_user` -[2024-03-07 15:25:12.990] INFO sqlite@v1.5.5/migrator.go:423 [961.5µs] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 15:25:12.990] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 15:25:12.991] INFO sqlite@v1.5.5/migrator.go:368 [57.9µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" -[2024-03-07 15:25:12.991] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:2] 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-07 15:25:12.992] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 15:25:12.992] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_user` -[2024-03-07 15:25:12.993] INFO sqlite@v1.5.5/migrator.go:423 [1.0106ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 15:25:12.994] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 15:25:12.996] INFO migrator/migrator.go:73 [1.3965ms] [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-07 15:25:12.996] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 15:25:12.996] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 15:25:12.996] 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-07 15:25:12.997] INFO sqlite@v1.5.5/migrator.go:413 [1.0128ms] [rows:2] 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-07 15:25:12.997] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 15:25:12.998] INFO sqlite@v1.5.5/migrator.go:423 [987.4µs] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 15:25:12.998] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 15:25:13.000] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 15:25:13.000] 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-07 15:25:13.000] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 15:25:13.001] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 15:25:13.001] 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-07 15:25:13.002] 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-07 15:25:13.002] 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-07 15:25:13.003] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 15:25:13.004] INFO sqlite@v1.5.5/migrator.go:423 [1.0087ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 15:25:13.006] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 15:25:13.006] 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-07 15:25:13.007] INFO sqlite@v1.5.5/migrator.go:413 [999.4µ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-07 15:25:13.007] 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-07 15:25:13.007] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 15:25:13.008] INFO sqlite@v1.5.5/migrator.go:423 [1.0009ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 15:25:13.010] INFO sqlite@v1.5.5/migrator.go:219 [513.4µ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-07 15:25:13.010] INFO script/db_migrate.go:50 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 16:08:27.564] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 16:08:27.578] INFO migrator/migrator.go:73 [529.5µ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-07 16:08:27.578] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 16:08:27.579] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:08:27.579] 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-07 16:08:27.580] INFO sqlite@v1.5.5/migrator.go:413 [1.0482ms] [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-07 16:08:27.580] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 16:08:27.581] INFO sqlite@v1.5.5/migrator.go:423 [516.7µs] [rows:2] DROP TABLE `t_user` -[2024-03-07 16:08:27.582] INFO sqlite@v1.5.5/migrator.go:423 [1.1006ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 16:08:27.584] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:08:27.585] INFO sqlite@v1.5.5/migrator.go:368 [549.9µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" -[2024-03-07 16:08:27.585] INFO sqlite@v1.5.5/migrator.go:413 [518µs] [rows:2] 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-07 16:08:27.586] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 16:08:27.586] INFO sqlite@v1.5.5/migrator.go:423 [524.7µs] [rows:2] DROP TABLE `t_user` -[2024-03-07 16:08:27.587] INFO sqlite@v1.5.5/migrator.go:423 [1.1637ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 16:08:27.589] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 16:08:27.589] 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-07 16:08:27.589] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 16:08:27.589] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:08:27.589] 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-07 16:08:27.590] INFO sqlite@v1.5.5/migrator.go:413 [520.9µs] [rows:2] 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-07 16:08:27.591] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 16:08:27.591] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 16:08:27.592] INFO sqlite@v1.5.5/migrator.go:423 [1.1759ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 16:08:27.594] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 16:08:27.594] 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-07 16:08:27.595] INFO sqlite@v1.5.5/migrator.go:125 [541.8µs] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 16:08:27.595] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:08:27.595] 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-07 16:08:27.596] INFO sqlite@v1.5.5/migrator.go:413 [526.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-07 16:08:27.596] 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-07 16:08:27.596] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 16:08:27.598] INFO sqlite@v1.5.5/migrator.go:423 [1.1396ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 16:08:27.600] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:08:27.600] 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-07 16:08:27.601] INFO sqlite@v1.5.5/migrator.go:413 [532.6µ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-07 16:08:27.601] 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-07 16:08:27.602] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 16:08:27.603] INFO sqlite@v1.5.5/migrator.go:423 [1.5874ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 16:08:27.605] 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-07 16:08:27.605] INFO script/db_migrate.go:55 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 16:08:27.605] INFO script/db_migrate.go:92 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-07 16:08:27.609] INFO repository/server.go:40 [3.9316ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("03a7d57deabd42d6a634ceb2499d63f0","2024-03-07 16:08:27","2024-03-07 16:08:27","10.10.10.1/24",51820,"qMyd0aHQ0tgbVHsYqYZcvloHEsM/vtumc8tNBurIDUE=","Iuk9z5NaiwMA8NiOuqioDPZWL2zfG9hXzY/xL3nXIQA=","","","") -[2024-03-07 16:47:48.440] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 16:47:48.454] 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-07 16:47:48.454] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 16:47:48.454] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:47:48.454] 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-07 16:47:48.456] INFO sqlite@v1.5.5/migrator.go:413 [1.0624ms] [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-07 16:47:48.456] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 16:47:48.457] INFO sqlite@v1.5.5/migrator.go:423 [607.6µs] [rows:2] DROP TABLE `t_user` -[2024-03-07 16:47:48.458] INFO sqlite@v1.5.5/migrator.go:423 [1.0321ms] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 16:47:48.460] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:47:48.460] 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-07 16:47:48.461] INFO sqlite@v1.5.5/migrator.go:413 [537.7µs] [rows:2] 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-07 16:47:48.462] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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-07 16:47:48.462] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_user` -[2024-03-07 16:47:48.463] INFO sqlite@v1.5.5/migrator.go:423 [524.6µs] [rows:2] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 16:47:48.465] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 16:47:48.465] 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-07 16:47:48.466] INFO sqlite@v1.5.5/migrator.go:125 [503.5µs] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 16:47:48.466] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:47:48.466] 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-07 16:47:48.467] INFO sqlite@v1.5.5/migrator.go:413 [520.9µs] [rows:2] 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-07 16:47:48.467] 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-07 16:47:48.468] INFO sqlite@v1.5.5/migrator.go:423 [517.6µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-07 16:47:48.469] INFO sqlite@v1.5.5/migrator.go:423 [1.1113ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 16:47:48.471] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 16:47:48.471] 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-07 16:47:48.472] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 16:47:48.472] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:47:48.472] 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-07 16:47:48.473] INFO sqlite@v1.5.5/migrator.go:413 [1.0476ms] [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-07 16:47:48.473] 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-07 16:47:48.474] INFO sqlite@v1.5.5/migrator.go:423 [517.4µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 16:47:48.475] INFO sqlite@v1.5.5/migrator.go:423 [1.1308ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 16:47:48.477] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:47:48.477] 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-07 16:47:48.478] INFO sqlite@v1.5.5/migrator.go:413 [1.0524ms] [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-07 16:47:48.478] 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-07 16:47:48.479] INFO sqlite@v1.5.5/migrator.go:423 [525.7µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 16:47:48.480] INFO sqlite@v1.5.5/migrator.go:423 [1.6294ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 16:47:48.481] 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-07 16:47:48.481] INFO script/db_migrate.go:56 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 16:47:48.482] INFO script/db_migrate.go:93 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-07 16:48:01.634] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 16:48:01.647] 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-07 16:48:01.648] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 16:48:01.648] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:48:01.648] 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-07 16:48:01.649] INFO sqlite@v1.5.5/migrator.go:413 [1.0103ms] [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-07 16:48:01.650] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 16:48:01.650] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_user` -[2024-03-07 16:48:01.651] INFO sqlite@v1.5.5/migrator.go:423 [1.0022ms] [rows:0] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 16:48:01.653] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:48:01.653] 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-07 16:48:01.654] INFO sqlite@v1.5.5/migrator.go:413 [503.8µ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-07 16:48:01.654] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 16:48:01.655] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_user` -[2024-03-07 16:48:01.656] INFO sqlite@v1.5.5/migrator.go:423 [998.5µs] [rows:0] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 16:48:01.658] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 16:48:01.658] 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-07 16:48:01.659] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 16:48:01.659] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:48:01.659] 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-07 16:48:01.660] INFO sqlite@v1.5.5/migrator.go:413 [507.9µs] [rows:0] 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-07 16:48:01.660] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 16:48:01.662] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 16:48:01.663] INFO sqlite@v1.5.5/migrator.go:423 [1.0022ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 16:48:01.665] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 16:48:01.665] 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-07 16:48:01.665] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 16:48:01.665] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:48:01.665] 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-07 16:48:01.667] INFO sqlite@v1.5.5/migrator.go:413 [1.0008ms] [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-07 16:48:01.667] 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-07 16:48:01.667] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 16:48:01.669] INFO sqlite@v1.5.5/migrator.go:423 [2.0049ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 16:48:01.671] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:48:01.671] 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-07 16:48:01.672] 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-07 16:48:01.673] 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-07 16:48:01.673] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 16:48:01.675] INFO sqlite@v1.5.5/migrator.go:423 [1.998ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 16:48:01.676] 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-07 16:48:01.677] INFO script/db_migrate.go:56 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 16:48:02.614] INFO repository/user.go:89 [2.5668ms] [rows:1] INSERT INTO `t_user` (`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) VALUES ("0dbdde3660934396b79a6bad002d82a8","2024-03-07 16:48:02","2024-03-07 16:48:02","http://wireguard-dashboard.oss-cn-chengdu.aliyuncs.com/wg/1a0fb80c-fa8f-43c7-8357-2502f62dc48f.png","超牛管理员","Admin","","$2a$10$UsOdMPNyy3xp4o.hKs6ZjuEu57XSuN7xGcjd5k5I2iinK1/OzpGMS",1,1) -[2024-03-07 16:48:02.614] INFO script/db_migrate.go:93 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-07 16:48:03.623] ERROR repository/system.go:28 no such table: t_setting -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-07 16:48:03.624] ERROR repository/system.go:59 no such table: t_setting -> INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("34ef92b3423a4ac1a20535bafe2f759f","2024-03-07 16:48:03","2024-03-07 16:48:03","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.239.10"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-07 16:48:03.624] ERROR script/db_migrate.go:30 no such table: t_setting -[2024-03-07 16:48:38.627] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 16:48:38.640] 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-07 16:48:38.641] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 16:48:38.641] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:48:38.641] 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-07 16:48:38.642] INFO sqlite@v1.5.5/migrator.go:413 [1.0448ms] [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-07 16:48:38.643] 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-07 16:48:38.643] INFO sqlite@v1.5.5/migrator.go:423 [522.6µs] [rows:1] DROP TABLE `t_user` -[2024-03-07 16:48:38.644] INFO sqlite@v1.5.5/migrator.go:423 [1.0629ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 16:48:38.646] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:48:38.646] 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-07 16:48:38.647] INFO sqlite@v1.5.5/migrator.go:413 [523.7µ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-07 16:48:38.647] 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-07 16:48:38.647] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-07 16:48:38.648] INFO sqlite@v1.5.5/migrator.go:423 [528µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 16:48:38.650] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 16:48:38.651] 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-07 16:48:38.651] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 16:48:38.651] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:48:38.651] 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-07 16:48:38.652] INFO sqlite@v1.5.5/migrator.go:413 [597.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-07 16:48:38.652] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 16:48:38.652] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 16:48:38.654] INFO sqlite@v1.5.5/migrator.go:423 [1.1141ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 16:48:38.655] INFO sqlite@v1.5.5/migrator.go:32 [521.3µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 16:48:38.655] 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-07 16:48:38.656] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 16:48:38.656] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:48:38.656] 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-07 16:48:38.657] INFO sqlite@v1.5.5/migrator.go:413 [1.0444ms] [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-07 16:48:38.657] 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-07 16:48:38.658] INFO sqlite@v1.5.5/migrator.go:423 [554.7µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 16:48:38.659] INFO sqlite@v1.5.5/migrator.go:423 [1.062ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 16:48:38.661] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 16:48:38.661] 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-07 16:48:38.662] INFO sqlite@v1.5.5/migrator.go:413 [504.9µ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-07 16:48:38.662] 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-07 16:48:38.663] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 16:48:38.665] INFO sqlite@v1.5.5/migrator.go:423 [1.1174ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 16:48:38.667] 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-07 16:48:38.667] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-07 16:48:38.669] INFO migrator/migrator.go:298 [2.7103ms] [rows:0] CREATE TABLE `t_setting` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`code` char(20) NOT NULL,`data` text NOT NULL,`describe` text,PRIMARY KEY (`id`)) -[2024-03-07 16:48:38.670] INFO script/db_migrate.go:57 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 16:48:38.670] INFO script/db_migrate.go:94 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-07 16:48:39.590] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-07 16:48:39.593] INFO repository/system.go:59 [2.3012ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("82d85b9e4b0845bd9f710ce08f121db2","2024-03-07 16:48:39","2024-03-07 16:48:39","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.239.10"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-07 16:48:39.596] INFO repository/server.go:40 [2.3348ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("578d7372a8904761b68631f49d896afa","2024-03-07 16:48:39","2024-03-07 16:48:39","10.10.10.1/24",51820,"gHdFnW5z2VaNBptvIg+4XoeWdanN7KFXnmoL5URnFnA=","yUsxEjnfPsYyAA0xQkfBUe+C1HZifw5u8wdJgJgSlzw=","","","") -[2024-03-07 17:03:26.828] ERROR repository/user.go:44 record not found -> SELECT * FROM `t_user` WHERE id = "21b09f1bbff54512bed815f991fae7f8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 17:03:38.999] INFO repository/user.go:55 [507.7µs] [rows:1] SELECT * FROM `t_user` WHERE account = "Admin" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 17:03:49.604] INFO repository/user.go:44 [792.8µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-07 17:03:49.605] INFO repository/server.go:26 [0s] [rows:1] SELECT `t_wg_server`.`id`,`t_wg_server`.`ip_scope`,`t_wg_server`.`listen_port`,`t_wg_server`.`private_key`,`t_wg_server`.`public_key`,`t_wg_server`.`post_up_script`,`t_wg_server`.`pre_down_script`,`t_wg_server`.`post_down_script` FROM `t_wg_server` ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-07 17:30:39.214] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 17:30:39.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-07 17:30:39.227] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 17:30:39.229] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 17:30:39.229] 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-07 17:30:39.231] INFO sqlite@v1.5.5/migrator.go:413 [1.0734ms] [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-07 17:30:39.231] 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-07 17:30:39.231] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-07 17:30:39.232] INFO sqlite@v1.5.5/migrator.go:423 [1.4392ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 17:30:39.234] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 17:30:39.234] 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-07 17:30:39.235] INFO sqlite@v1.5.5/migrator.go:413 [1.0459ms] [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-07 17:30:39.235] 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-07 17:30:39.236] INFO sqlite@v1.5.5/migrator.go:423 [1.0513ms] [rows:1] DROP TABLE `t_user` -[2024-03-07 17:30:39.237] INFO sqlite@v1.5.5/migrator.go:423 [945.7µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 17:30:39.240] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 17:30:39.240] 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-07 17:30:39.240] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 17:30:39.240] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 17:30:39.240] 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-07 17:30:39.241] 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-07 17:30:39.242] 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-07 17:30:39.242] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-07 17:30:39.243] INFO sqlite@v1.5.5/migrator.go:423 [1.1021ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 17:30:39.245] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 17:30:39.245] 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-07 17:30:39.245] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 17:30:39.246] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 17:30:39.246] 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-07 17:30:39.247] INFO sqlite@v1.5.5/migrator.go:413 [1.0534ms] [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-07 17:30:39.248] 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-07 17:30:39.248] INFO sqlite@v1.5.5/migrator.go:423 [522µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 17:30:39.250] INFO sqlite@v1.5.5/migrator.go:423 [1.3497ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 17:30:39.252] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 17:30:39.252] 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-07 17:30:39.253] INFO sqlite@v1.5.5/migrator.go:413 [576.8µ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-07 17:30:39.253] 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-07 17:30:39.253] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 17:30:39.255] INFO sqlite@v1.5.5/migrator.go:423 [1.1166ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 17:30:39.257] INFO sqlite@v1.5.5/migrator.go:219 [51.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-07 17:30:39.257] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-07 17:30:39.257] 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-07 17:30:39.258] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-07 17:30:39.258] INFO script/db_migrate.go:58 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 17:30:39.258] INFO script/db_migrate.go:95 [524.9µs] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-07 17:30:58.790] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-07 17:30:58.805] 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-07 17:30:58.805] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-07 17:30:58.805] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 17:30:58.805] 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-07 17:30:58.807] INFO sqlite@v1.5.5/migrator.go:413 [999.8µ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-07 17:30:58.807] 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-07 17:30:58.808] INFO sqlite@v1.5.5/migrator.go:423 [999.3µs] [rows:1] DROP TABLE `t_user` -[2024-03-07 17:30:58.809] INFO sqlite@v1.5.5/migrator.go:423 [504µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 17:30:58.812] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 17:30:58.812] 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-07 17:30:58.813] 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-07 17:30:58.813] 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-07 17:30:58.814] INFO sqlite@v1.5.5/migrator.go:423 [1.5063ms] [rows:1] DROP TABLE `t_user` -[2024-03-07 17:30:58.815] INFO sqlite@v1.5.5/migrator.go:423 [1.0059ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-07 17:30:58.817] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-07 17:30:58.818] INFO migrator/migrator.go:73 [1.0008ms] [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-07 17:30:58.818] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-07 17:30:58.818] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 17:30:58.818] 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-07 17:30:58.819] INFO sqlite@v1.5.5/migrator.go:413 [999.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-07 17:30:58.819] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-07 17:30:58.820] INFO sqlite@v1.5.5/migrator.go:423 [1.0002ms] [rows:0] DROP TABLE `t_wg_server` -[2024-03-07 17:30:58.821] INFO sqlite@v1.5.5/migrator.go:423 [999.8µs] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-07 17:30:58.823] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-07 17:30:58.823] 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-07 17:30:58.823] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-07 17:30:58.823] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 17:30:58.823] 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-07 17:30:58.825] INFO sqlite@v1.5.5/migrator.go:413 [506.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-07 17:30:58.826] 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-07 17:30:58.827] INFO sqlite@v1.5.5/migrator.go:423 [999.7µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 17:30:58.828] INFO sqlite@v1.5.5/migrator.go:423 [1.0009ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 17:30:58.830] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-07 17:30:58.831] 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-07 17:30:58.832] INFO sqlite@v1.5.5/migrator.go:413 [1.0003ms] [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-07 17:30:58.833] 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-07 17:30:58.833] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-07 17:30:58.835] INFO sqlite@v1.5.5/migrator.go:423 [1.5172ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-07 17:30:58.837] 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-07 17:30:58.837] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-07 17:30:58.837] 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-07 17:30:58.837] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-07 17:30:58.838] INFO script/db_migrate.go:58 [1ms] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-07 17:30:58.838] INFO script/db_migrate.go:95 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-07 17:30:59.921] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-07 17:30:59.924] INFO repository/system.go:59 [2.1686ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("b456253c6cdf4575acf6f22c0443b37e","2024-03-07 17:30:59","2024-03-07 17:30:59","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.239.10"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-07 17:30:59.927] INFO repository/server.go:40 [2.224ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("613572f5d1be4b5ea866915894e80479","2024-03-07 17:30:59","2024-03-07 17:30:59","10.10.10.1/24",51820,"uIcQM4koYm5AFVy5DdJS+IXm/HdPDclz5iI2bcOFKF4=","77ZVC/0KnC6wfPTXiYqvuPfW3PcsgUpoa5fRCvIhpE8=","","","") -[2024-03-08 09:20:01.006] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:20:01.018] 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-08 09:20:01.019] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:20:01.019] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:01.019] 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-08 09:20:01.021] INFO sqlite@v1.5.5/migrator.go:413 [1.5261ms] [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-08 09:20:01.021] 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-08 09:20:01.022] INFO sqlite@v1.5.5/migrator.go:423 [567.2µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:20:01.023] INFO sqlite@v1.5.5/migrator.go:423 [1.0278ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:20:01.025] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:01.025] 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-08 09:20:01.026] INFO sqlite@v1.5.5/migrator.go:413 [585µ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-08 09:20:01.027] 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-08 09:20:01.027] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:20:01.028] INFO sqlite@v1.5.5/migrator.go:423 [545.2µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:20:01.030] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:20:01.031] 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-08 09:20:01.031] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:20:01.031] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:01.031] 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-08 09:20:01.032] INFO sqlite@v1.5.5/migrator.go:413 [1.14ms] [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-08 09:20:01.032] 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-08 09:20:01.032] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-08 09:20:01.033] INFO sqlite@v1.5.5/migrator.go:423 [592.4µs] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:20:01.035] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:20:01.036] INFO migrator/migrator.go:73 [506.7µ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-08 09:20:01.036] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:20:01.036] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:01.036] 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-08 09:20:01.038] INFO sqlite@v1.5.5/migrator.go:413 [1.0783ms] [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-08 09:20:01.038] 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-08 09:20:01.038] INFO sqlite@v1.5.5/migrator.go:423 [532.9µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:20:01.039] INFO sqlite@v1.5.5/migrator.go:423 [1.1028ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:20:01.041] INFO sqlite@v1.5.5/migrator.go:79 [512.3µs] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:01.041] 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-08 09:20:01.042] INFO sqlite@v1.5.5/migrator.go:413 [531.8µ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-08 09:20:01.043] 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-08 09:20:01.043] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:20:01.045] INFO sqlite@v1.5.5/migrator.go:423 [1.2023ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:20:01.047] 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-08 09:20:01.047] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:20:01.047] INFO migrator/migrator.go:73 [81.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-08 09:20:01.047] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:20:01.048] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:20:01.048] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:20:13.812] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:20:13.825] 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-08 09:20:13.825] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:20:13.826] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:13.826] 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-08 09:20:13.827] INFO sqlite@v1.5.5/migrator.go:413 [914.4µ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-08 09:20:13.828] 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-08 09:20:13.828] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:20:13.829] INFO sqlite@v1.5.5/migrator.go:423 [1.0009ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:20:13.831] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:13.831] 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-08 09:20:13.832] INFO sqlite@v1.5.5/migrator.go:413 [1.0064ms] [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-08 09:20:13.832] 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-08 09:20:13.833] INFO sqlite@v1.5.5/migrator.go:423 [1.0003ms] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:20:13.834] INFO sqlite@v1.5.5/migrator.go:423 [999.8µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:20:13.835] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:20:13.835] 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-08 09:20:13.835] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:20:13.835] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:13.835] 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-08 09:20:13.837] 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-08 09:20:13.837] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-08 09:20:13.838] INFO sqlite@v1.5.5/migrator.go:423 [1.0046ms] [rows:0] DROP TABLE `t_wg_server` -[2024-03-08 09:20:13.839] INFO sqlite@v1.5.5/migrator.go:423 [1.0087ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:20:13.840] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:20:13.840] 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-08 09:20:13.840] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:20:13.840] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:13.841] 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-08 09:20:13.842] INFO sqlite@v1.5.5/migrator.go:413 [1.0622ms] [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-08 09:20:13.842] 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-08 09:20:13.843] INFO sqlite@v1.5.5/migrator.go:423 [503.7µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:20:13.844] INFO sqlite@v1.5.5/migrator.go:423 [1.0144ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:20:13.845] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:13.845] 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-08 09:20:13.847] INFO sqlite@v1.5.5/migrator.go:413 [1.0092ms] [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-08 09:20:13.847] 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-08 09:20:13.847] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:20:13.848] INFO sqlite@v1.5.5/migrator.go:423 [1.2552ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:20:13.850] 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-08 09:20:13.850] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:20:13.850] 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-08 09:20:13.850] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:20:13.851] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:20:13.851] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:20:14.812] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 09:20:14.814] INFO repository/system.go:59 [1.5941ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("e14e8349a6a446f9be0218600662b12f","2024-03-08 09:20:14","2024-03-08 09:20:14","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.237.53"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-08 09:20:14.817] INFO repository/server.go:40 [1.6594ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("0dba6bf0c23b48f2aea06087b7143351","2024-03-08 09:20:14","2024-03-08 09:20:14","10.10.10.1/24",51820,"gIukrBANNbMnuLpmZGU/vOPkOuToWHQMOinQnILb93U=","fTPugEY7JI9b2P+S9kuPJdRuHglgwwx+UT9Sz1ZRVRo=","","","") -[2024-03-08 09:20:14.817] ERROR component/wireguard.go:22 解析模板信息失败 -[2024-03-08 09:20:14.817] ERROR script/db_migrate.go:170 应用配置文件失败: open E:\Workspace\Go\wireguard-dashboard\template_data\wg.conf: The system cannot find the path specified. -[2024-03-08 09:20:14.817] ERROR script/db_migrate.go:33 open E:\Workspace\Go\wireguard-dashboard\template_data\wg.conf: The system cannot find the path specified. -[2024-03-08 09:20:54.719] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:20:54.731] 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-08 09:20:54.732] INFO sqlite@v1.5.5/migrator.go:125 [83.4µs] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:20:54.732] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:54.732] 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-08 09:20:54.733] INFO sqlite@v1.5.5/migrator.go:413 [1.1861ms] [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-08 09:20:54.734] INFO sqlite@v1.5.5/migrator.go:423 [502.9µ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-08 09:20:54.734] INFO sqlite@v1.5.5/migrator.go:423 [533.3µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:20:54.735] INFO sqlite@v1.5.5/migrator.go:423 [590.9µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:20:54.737] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:54.737] 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-08 09:20:54.738] INFO sqlite@v1.5.5/migrator.go:413 [563.6µ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-08 09:20:54.738] 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-08 09:20:54.739] INFO sqlite@v1.5.5/migrator.go:423 [614.9µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:20:54.740] INFO sqlite@v1.5.5/migrator.go:423 [1.0825ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:20:54.745] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:20:54.745] INFO migrator/migrator.go:73 [101µ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-08 09:20:54.745] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:20:54.746] INFO sqlite@v1.5.5/migrator.go:79 [506.5µs] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:54.746] 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-08 09:20:54.747] INFO sqlite@v1.5.5/migrator.go:413 [560.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-08 09:20:54.747] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-08 09:20:54.747] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-08 09:20:54.749] INFO sqlite@v1.5.5/migrator.go:423 [1.6629ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:20:54.752] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:20:54.752] 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-08 09:20:54.753] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:20:54.753] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:54.753] 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-08 09:20:54.754] INFO sqlite@v1.5.5/migrator.go:413 [607.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-08 09:20:54.754] 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-08 09:20:54.754] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:20:54.756] INFO sqlite@v1.5.5/migrator.go:423 [1.112ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:20:54.758] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:20:54.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-08 09:20:54.759] INFO sqlite@v1.5.5/migrator.go:413 [567.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-08 09:20:54.759] 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-08 09:20:54.759] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:20:54.760] INFO sqlite@v1.5.5/migrator.go:423 [1.5239ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:20:54.762] 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-08 09:20:54.762] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:20:54.762] 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-08 09:20:54.762] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:20:54.762] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:20:54.763] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:20:55.687] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 09:20:55.690] INFO repository/system.go:59 [1.7845ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("3fef88f544b64bbf8852ea9ca55e9930","2024-03-08 09:20:55","2024-03-08 09:20:55","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.237.53"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-08 09:20:55.692] INFO repository/server.go:40 [2.4339ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("8748d33f5aa34720a213ca4b30519bf6","2024-03-08 09:20:55","2024-03-08 09:20:55","10.10.10.1/24",51820,"SFBHgQj2/zYloRAkqQcV8TqXL6ebTItyk8ml+UQ0TEg=","CmFgadC0yECvJydQXjs8GHahufpVeXdJpc3tv02CnBI=","","","") -[2024-03-08 09:20:58.583] ERROR component/wireguard.go:22 解析模板信息失败 -[2024-03-08 09:21:09.546] ERROR script/db_migrate.go:170 应用配置文件失败: open E:\Workspace\Go\wireguard-dashboard\template_data\wg.conf: The system cannot find the path specified. -[2024-03-08 09:21:09.546] ERROR script/db_migrate.go:33 open E:\Workspace\Go\wireguard-dashboard\template_data\wg.conf: The system cannot find the path specified. -[2024-03-08 09:21:17.356] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:21:17.368] 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-08 09:21:17.369] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:21:17.369] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:21:17.369] 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-08 09:21:17.370] INFO sqlite@v1.5.5/migrator.go:413 [668.2µ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-08 09:21:17.371] 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-08 09:21:17.372] INFO sqlite@v1.5.5/migrator.go:423 [533µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:21:17.373] INFO sqlite@v1.5.5/migrator.go:423 [1.113ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:21:17.374] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:21:17.375] INFO sqlite@v1.5.5/migrator.go:368 [955.1µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" -[2024-03-08 09:21:17.375] 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-08 09:21:17.375] 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-08 09:21:17.377] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:21:17.378] INFO sqlite@v1.5.5/migrator.go:423 [1.1367ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:21:17.379] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:21:17.379] 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-08 09:21:17.380] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:21:17.380] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:21:17.380] 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-08 09:21:17.382] INFO sqlite@v1.5.5/migrator.go:413 [1.0713ms] [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-08 09:21:17.382] 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-08 09:21:17.383] INFO sqlite@v1.5.5/migrator.go:423 [1.0545ms] [rows:1] DROP TABLE `t_wg_server` -[2024-03-08 09:21:17.384] INFO sqlite@v1.5.5/migrator.go:423 [1.0104ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:21:17.385] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:21:17.385] 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-08 09:21:17.386] INFO sqlite@v1.5.5/migrator.go:125 [53.6µs] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:21:17.386] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:21:17.386] 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-08 09:21:17.387] INFO sqlite@v1.5.5/migrator.go:413 [62.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-08 09:21:17.387] 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-08 09:21:17.388] INFO sqlite@v1.5.5/migrator.go:423 [1.0805ms] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:21:17.390] INFO sqlite@v1.5.5/migrator.go:423 [1.0976ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:21:17.391] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:21:17.392] 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-08 09:21:17.393] INFO sqlite@v1.5.5/migrator.go:413 [1.1013ms] [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-08 09:21:17.393] 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-08 09:21:17.393] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:21:17.394] INFO sqlite@v1.5.5/migrator.go:423 [1.0939ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:21:17.396] 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-08 09:21:17.396] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:21:17.397] INFO migrator/migrator.go:73 [60.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-08 09:21:17.397] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:21:17.397] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:21:17.397] INFO script/db_migrate.go:97 [528.6µs] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:21:28.579] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:21:28.591] 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-08 09:21:28.591] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:21:28.591] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:21:28.591] 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-08 09:21:28.593] INFO sqlite@v1.5.5/migrator.go:413 [1.0769ms] [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-08 09:21:28.593] 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-08 09:21:28.593] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:21:28.594] INFO sqlite@v1.5.5/migrator.go:423 [1.0884ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:21:28.597] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:21:28.597] 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-08 09:21:28.598] INFO sqlite@v1.5.5/migrator.go:413 [655µ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-08 09:21:28.598] 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-08 09:21:28.599] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:21:28.600] INFO sqlite@v1.5.5/migrator.go:423 [1.1685ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:21:28.602] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:21:28.603] 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-08 09:21:28.603] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:21:28.603] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:21:28.603] 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-08 09:21:28.605] INFO sqlite@v1.5.5/migrator.go:413 [614.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-08 09:21:28.605] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-08 09:21:28.605] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-08 09:21:28.606] INFO sqlite@v1.5.5/migrator.go:423 [1.1621ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:21:28.609] INFO sqlite@v1.5.5/migrator.go:32 [51.8µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:21:28.609] 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-08 09:21:28.609] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:21:28.609] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:21:28.609] 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-08 09:21:28.610] INFO sqlite@v1.5.5/migrator.go:413 [623.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-08 09:21:28.611] 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-08 09:21:28.611] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:21:28.612] INFO sqlite@v1.5.5/migrator.go:423 [1.1123ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:21:28.614] INFO sqlite@v1.5.5/migrator.go:79 [508.2µs] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:21:28.614] 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-08 09:21:28.616] INFO sqlite@v1.5.5/migrator.go:413 [617.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-08 09:21:28.616] 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-08 09:21:28.616] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:21:28.617] INFO sqlite@v1.5.5/migrator.go:423 [1.1735ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:21:28.619] 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-08 09:21:28.619] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:21:28.620] 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-08 09:21:28.620] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:21:28.620] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:21:28.620] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:21:29.887] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 09:21:29.891] INFO repository/system.go:59 [2.9817ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("b452319baeb148cdaacce8b9a328ae37","2024-03-08 09:21:29","2024-03-08 09:21:29","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.237.53"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-08 09:21:29.894] INFO repository/server.go:40 [2.3509ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("f724e63d07ea43478ca8303ddea1eaed","2024-03-08 09:21:29","2024-03-08 09:21:29","10.10.10.1/24",51820,"2KP+1XnchdCOff5gQDMMCQY9PZehZfy/z8/x61F6B30=","fN4iadK7qCEU7QEHVeRWTEJGQAJaSqKI585UEXXocH4=","","","") -[2024-03-08 09:21:45.125] ERROR component/wireguard.go:22 解析模板信息失败 -[2024-03-08 09:21:45.126] ERROR script/db_migrate.go:170 应用配置文件失败: open E:\Workspace\Go\wireguard-dashboard\template_data\wg.conf: The system cannot find the path specified. -[2024-03-08 09:21:45.126] ERROR script/db_migrate.go:33 open E:\Workspace\Go\wireguard-dashboard\template_data\wg.conf: The system cannot find the path specified. -[2024-03-08 09:22:05.676] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:22:05.689] 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-08 09:22:05.690] INFO sqlite@v1.5.5/migrator.go:125 [547.9µs] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:22:05.690] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:22:05.690] 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-08 09:22:05.692] INFO sqlite@v1.5.5/migrator.go:413 [1.0786ms] [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-08 09:22:05.692] 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-08 09:22:05.693] INFO sqlite@v1.5.5/migrator.go:423 [584µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:22:05.694] INFO sqlite@v1.5.5/migrator.go:423 [1.0356ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:22:05.696] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:22:05.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-08 09:22:05.697] INFO sqlite@v1.5.5/migrator.go:413 [515µ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-08 09:22:05.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-08 09:22:05.698] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:22:05.699] INFO sqlite@v1.5.5/migrator.go:423 [1.0299ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:22:05.702] INFO sqlite@v1.5.5/migrator.go:32 [1.0031ms] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:22:05.702] 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-08 09:22:05.702] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:22:05.702] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:22:05.702] 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-08 09:22:05.703] INFO sqlite@v1.5.5/migrator.go:413 [1.0038ms] [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-08 09:22:05.703] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-08 09:22:05.703] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-08 09:22:05.705] INFO sqlite@v1.5.5/migrator.go:423 [999.7µs] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:22:05.707] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:22:05.707] 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-08 09:22:05.707] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:22:05.707] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:22:05.708] 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-08 09:22:05.709] INFO sqlite@v1.5.5/migrator.go:413 [999.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-08 09:22:05.709] 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-08 09:22:05.709] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:22:05.710] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:22:05.713] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:22:05.713] 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-08 09:22:05.714] INFO sqlite@v1.5.5/migrator.go:413 [519.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-08 09:22:05.714] 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-08 09:22:05.714] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:22:05.715] INFO sqlite@v1.5.5/migrator.go:423 [1.0653ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:22:05.717] 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-08 09:22:05.717] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:22:05.717] 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-08 09:22:05.717] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:22:05.718] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:22:05.718] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:22:06.664] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 09:22:06.667] INFO repository/system.go:59 [2.5373ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("30f27e4fe34d492ca83e8668a50cf5aa","2024-03-08 09:22:06","2024-03-08 09:22:06","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.237.53"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-08 09:22:06.669] INFO repository/server.go:40 [2.1792ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("c367ce3a2aab4e538fd5036ae41b311f","2024-03-08 09:22:06","2024-03-08 09:22:06","10.10.10.1/24",51820,"AF1pWGsvlk8qQDFim2CdijKV7k7UaPH7NSXH+XLthFE=","yno3cnEOIS4VqL0rlYwuwyutJ8gnoupawNdp2P8WtCE=","","","") -[2024-03-08 09:24:47.302] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:24:47.314] INFO migrator/migrator.go:73 [115.2µ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-08 09:24:47.314] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:24:47.315] INFO sqlite@v1.5.5/migrator.go:79 [50.8µs] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:24:47.315] 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-08 09:24:47.316] INFO sqlite@v1.5.5/migrator.go:413 [1.0791ms] [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-08 09:24:47.316] 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-08 09:24:47.317] INFO sqlite@v1.5.5/migrator.go:423 [587µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:24:47.318] INFO sqlite@v1.5.5/migrator.go:423 [1.1182ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:24:47.320] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:24:47.320] 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-08 09:24:47.321] INFO sqlite@v1.5.5/migrator.go:413 [1.1506ms] [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-08 09:24:47.321] 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-08 09:24:47.322] INFO sqlite@v1.5.5/migrator.go:423 [57.1µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:24:47.324] INFO sqlite@v1.5.5/migrator.go:423 [1.7001ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:24:47.325] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:24:47.325] 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-08 09:24:47.326] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:24:47.326] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:24:47.326] 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-08 09:24:47.327] INFO sqlite@v1.5.5/migrator.go:413 [561.1µ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-08 09:24:47.328] INFO sqlite@v1.5.5/migrator.go:423 [503.5µs] [rows:0] 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-08 09:24:47.328] INFO sqlite@v1.5.5/migrator.go:423 [551.8µs] [rows:0] DROP TABLE `t_wg_server` -[2024-03-08 09:24:47.330] INFO sqlite@v1.5.5/migrator.go:423 [1.6683ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:24:47.331] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:24:47.332] 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-08 09:24:47.332] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:24:47.333] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:24:47.333] 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-08 09:24:47.334] INFO sqlite@v1.5.5/migrator.go:413 [536.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-08 09:24:47.334] 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-08 09:24:47.335] INFO sqlite@v1.5.5/migrator.go:423 [542.9µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:24:47.336] INFO sqlite@v1.5.5/migrator.go:423 [1.0828ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:24:47.337] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:24:47.337] 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-08 09:24:47.338] INFO sqlite@v1.5.5/migrator.go:413 [543µ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-08 09:24:47.339] 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-08 09:24:47.340] INFO sqlite@v1.5.5/migrator.go:423 [523.3µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:24:47.341] INFO sqlite@v1.5.5/migrator.go:423 [1.1427ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:24:47.343] 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-08 09:24:47.343] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:24:47.343] 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-08 09:24:47.343] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:24:47.343] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:24:47.343] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:24:48.315] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 09:24:48.318] INFO repository/system.go:59 [2.3237ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("539e8e370e814d1b8ca99543062da551","2024-03-08 09:24:48","2024-03-08 09:24:48","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.237.53"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-08 09:24:48.320] INFO repository/server.go:40 [1.8171ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("3fe8d368c71a4618a56f76e72d979217","2024-03-08 09:24:48","2024-03-08 09:24:48","10.10.10.1/24",51820,"KBvpECYi88Gprzqg7zIV09pJIdgnVxR9iskRQWVhKV8=","e9BF20z+oRm5cguyYyflKcijLQ6Wwo0ep3+oCmJxCyA=","","","") -[2024-03-08 09:35:18.572] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:35:18.587] INFO migrator/migrator.go:73 [586.5µ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-08 09:35:18.587] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:35:18.587] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:18.587] 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-08 09:35:18.589] INFO sqlite@v1.5.5/migrator.go:413 [1.0831ms] [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-08 09:35:18.589] 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-08 09:35:18.589] INFO sqlite@v1.5.5/migrator.go:423 [503.6µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:35:18.591] INFO sqlite@v1.5.5/migrator.go:423 [1.146ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:35:18.592] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:18.593] 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-08 09:35:18.593] INFO sqlite@v1.5.5/migrator.go:413 [524.8µ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-08 09:35:18.594] 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-08 09:35:18.594] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:35:18.595] INFO sqlite@v1.5.5/migrator.go:423 [631.8µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:35:18.597] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:35:18.598] 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-08 09:35:18.598] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:35:18.598] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:18.598] 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-08 09:35:18.599] INFO sqlite@v1.5.5/migrator.go:413 [1.0199ms] [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-08 09:35:18.599] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-08 09:35:18.599] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-08 09:35:18.601] INFO sqlite@v1.5.5/migrator.go:423 [1.8108ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:35:18.602] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:35:18.602] 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-08 09:35:18.602] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:35:18.602] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:18.603] 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-08 09:35:18.603] 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-08 09:35:18.603] 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-08 09:35:18.605] INFO sqlite@v1.5.5/migrator.go:423 [1.5083ms] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:35:18.606] INFO sqlite@v1.5.5/migrator.go:423 [1.0081ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:35:18.607] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:18.607] 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-08 09:35:18.608] 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-08 09:35:18.609] INFO sqlite@v1.5.5/migrator.go:423 [999.9µ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-08 09:35:18.609] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:35:18.610] INFO sqlite@v1.5.5/migrator.go:423 [1.0998ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:35:18.612] 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-08 09:35:18.613] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:35:18.613] 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-08 09:35:18.613] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:35:18.613] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:35:18.613] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:35:19.561] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 09:35:19.566] INFO repository/system.go:59 [3.7972ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("b674361b45ac452ea8de47737fcda2c5","2024-03-08 09:35:19","2024-03-08 09:35:19","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.237.53"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-08 09:35:19.569] INFO repository/server.go:40 [2.332ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("e1453df18e0a4a8f9ece360e2eea3b8a","2024-03-08 09:35:19","2024-03-08 09:35:19","10.10.10.1/24",51820,"EDEq59rDY/FBEglLKjkDAIZR22TSMc4hqJ6evfknHW8=","4kYZRuixdu8KhdgVcpc7J5Gmoxt/Il94dmySGNj2mBo=","","","") -[2024-03-08 09:35:43.418] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:35:43.431] 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-08 09:35:43.431] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:35:43.431] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:43.432] 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-08 09:35:43.433] INFO sqlite@v1.5.5/migrator.go:413 [999.7µ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-08 09:35:43.434] INFO sqlite@v1.5.5/migrator.go:423 [502.5µ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-08 09:35:43.434] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:35:43.435] INFO sqlite@v1.5.5/migrator.go:423 [1.0027ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:35:43.437] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:43.437] 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-08 09:35:43.438] 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-08 09:35:43.438] 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-08 09:35:43.439] INFO sqlite@v1.5.5/migrator.go:423 [503.8µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:35:43.441] INFO sqlite@v1.5.5/migrator.go:423 [2.0957ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:35:43.443] INFO sqlite@v1.5.5/migrator.go:32 [518.9µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:35:43.443] 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-08 09:35:43.443] INFO sqlite@v1.5.5/migrator.go:125 [519.7µs] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:35:43.443] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:43.443] 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-08 09:35:43.444] INFO sqlite@v1.5.5/migrator.go:413 [517.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-08 09:35:43.444] 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-08 09:35:43.445] INFO sqlite@v1.5.5/migrator.go:423 [520.1µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-08 09:35:43.447] INFO sqlite@v1.5.5/migrator.go:423 [1.5518ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:35:43.448] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:35:43.449] 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-08 09:35:43.449] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:35:43.449] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:43.449] 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-08 09:35:43.450] INFO sqlite@v1.5.5/migrator.go:413 [550.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-08 09:35:43.451] INFO sqlite@v1.5.5/migrator.go:423 [518.7µ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-08 09:35:43.451] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:35:43.452] INFO sqlite@v1.5.5/migrator.go:423 [1.0361ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:35:43.453] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:43.453] 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-08 09:35:43.455] INFO sqlite@v1.5.5/migrator.go:413 [558µ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-08 09:35:43.455] 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-08 09:35:43.455] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:35:43.457] INFO sqlite@v1.5.5/migrator.go:423 [1.5581ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:35:43.459] 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-08 09:35:43.459] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:35:43.459] 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-08 09:35:43.460] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:35:43.460] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:35:43.460] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:35:54.435] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:35:54.448] INFO migrator/migrator.go:73 [64.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-08 09:35:54.448] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:35:54.448] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:54.448] 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-08 09:35:54.450] INFO sqlite@v1.5.5/migrator.go:413 [744.5µ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-08 09:35:54.450] INFO sqlite@v1.5.5/migrator.go:423 [74.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-08 09:35:54.450] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:35:54.452] INFO sqlite@v1.5.5/migrator.go:423 [1.1808ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:35:54.455] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:54.455] 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-08 09:35:54.457] INFO sqlite@v1.5.5/migrator.go:413 [1.111ms] [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-08 09:35:54.457] 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-08 09:35:54.457] INFO sqlite@v1.5.5/migrator.go:423 [590.6µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:35:54.458] INFO sqlite@v1.5.5/migrator.go:423 [1.0854ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:35:54.460] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:35:54.460] 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-08 09:35:54.460] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:35:54.460] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:54.460] 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-08 09:35:54.461] INFO sqlite@v1.5.5/migrator.go:413 [545.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-08 09:35:54.461] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-08 09:35:54.462] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-08 09:35:54.463] INFO sqlite@v1.5.5/migrator.go:423 [1.1936ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:35:54.464] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:35:54.465] INFO migrator/migrator.go:73 [531.7µ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-08 09:35:54.465] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:35:54.465] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:54.465] 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-08 09:35:54.467] INFO sqlite@v1.5.5/migrator.go:413 [639.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-08 09:35:54.467] 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-08 09:35:54.467] INFO sqlite@v1.5.5/migrator.go:423 [538µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:35:54.468] INFO sqlite@v1.5.5/migrator.go:423 [678.4µs] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:35:54.470] INFO sqlite@v1.5.5/migrator.go:79 [1.0038ms] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:35:54.470] 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-08 09:35:54.470] 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-08 09:35:54.472] INFO sqlite@v1.5.5/migrator.go:423 [53.9µ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-08 09:35:54.472] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:35:54.473] INFO sqlite@v1.5.5/migrator.go:423 [1.0981ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:35:54.474] 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-08 09:35:54.474] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:35:54.475] INFO migrator/migrator.go:73 [1.0037ms] [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-08 09:35:54.475] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:35:54.475] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:35:54.475] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:35:55.409] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 09:35:55.412] INFO repository/system.go:59 [2.7994ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("c2efea9af3a648f4b9260d50a91054ff","2024-03-08 09:35:55","2024-03-08 09:35:55","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.237.53"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-08 09:35:55.415] INFO repository/server.go:40 [1.6153ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("66c03038ef9a4a18966eb03d928e1e5b","2024-03-08 09:35:55","2024-03-08 09:35:55","10.10.10.1/24",51820,"qGcIYQctyqQC9ErdE3057morVMgrv6pFkjZiJu0A7lk=","90N+Ybtuum7D+0ec8qGg7k357ZWcp/4UZW/LLGmLVQI=","","","") -[2024-03-08 09:36:13.647] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:36:13.661] 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-08 09:36:13.661] INFO sqlite@v1.5.5/migrator.go:125 [541.6µs] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:36:13.661] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:13.661] 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-08 09:36:13.663] INFO sqlite@v1.5.5/migrator.go:413 [1.1599ms] [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-08 09:36:13.663] 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-08 09:36:13.664] INFO sqlite@v1.5.5/migrator.go:423 [593.9µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:36:13.665] INFO sqlite@v1.5.5/migrator.go:423 [1.0804ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:36:13.666] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:13.667] 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-08 09:36:13.668] INFO sqlite@v1.5.5/migrator.go:413 [1.0488ms] [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-08 09:36:13.668] 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-08 09:36:13.668] INFO sqlite@v1.5.5/migrator.go:423 [520.4µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:36:13.671] INFO sqlite@v1.5.5/migrator.go:423 [2.1161ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:36:13.673] INFO sqlite@v1.5.5/migrator.go:32 [528.2µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:36:13.673] 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-08 09:36:13.673] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:36:13.673] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:13.673] 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-08 09:36:13.674] INFO sqlite@v1.5.5/migrator.go:413 [522.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-08 09:36:13.674] 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-08 09:36:13.675] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-08 09:36:13.677] INFO sqlite@v1.5.5/migrator.go:423 [2.1047ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:36:13.679] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:36:13.679] 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-08 09:36:13.679] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:36:13.679] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:13.679] 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-08 09:36:13.681] INFO sqlite@v1.5.5/migrator.go:413 [519.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-08 09:36:13.681] 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-08 09:36:13.681] INFO sqlite@v1.5.5/migrator.go:423 [519.9µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:36:13.682] INFO sqlite@v1.5.5/migrator.go:423 [1.0556ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:36:13.685] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:13.685] 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-08 09:36:13.686] INFO sqlite@v1.5.5/migrator.go:413 [552.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-08 09:36:13.687] 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-08 09:36:13.687] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:36:13.689] INFO sqlite@v1.5.5/migrator.go:423 [1.6173ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:36:13.690] 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-08 09:36:13.690] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:36:13.690] 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-08 09:36:13.692] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:36:13.692] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:36:13.692] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:36:24.642] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:36:24.655] 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-08 09:36:24.655] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:36:24.656] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:24.656] 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-08 09:36:24.658] INFO sqlite@v1.5.5/migrator.go:413 [2.0004ms] [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-08 09:36:24.658] 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-08 09:36:24.658] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:36:24.660] INFO sqlite@v1.5.5/migrator.go:423 [1.0004ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:36:24.661] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:24.662] 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-08 09:36:24.663] INFO sqlite@v1.5.5/migrator.go:413 [999.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-08 09:36:24.663] 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-08 09:36:24.664] INFO sqlite@v1.5.5/migrator.go:423 [999µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:36:24.665] INFO sqlite@v1.5.5/migrator.go:423 [1.5062ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:36:24.666] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:36:24.666] 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-08 09:36:24.666] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:36:24.668] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:24.668] 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-08 09:36:24.669] INFO sqlite@v1.5.5/migrator.go:413 [1.0027ms] [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-08 09:36:24.669] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-08 09:36:24.669] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-08 09:36:24.671] INFO sqlite@v1.5.5/migrator.go:423 [1.9994ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:36:24.672] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:36:24.672] 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-08 09:36:24.673] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:36:24.673] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:24.673] 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-08 09:36:24.674] 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-08 09:36:24.674] 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-08 09:36:24.674] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:36:24.677] INFO sqlite@v1.5.5/migrator.go:423 [2.9588ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:36:24.679] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:24.679] INFO sqlite@v1.5.5/migrator.go:368 [538.5µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" -[2024-03-08 09:36:24.680] INFO sqlite@v1.5.5/migrator.go:413 [550.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-08 09:36:24.680] 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-08 09:36:24.681] INFO sqlite@v1.5.5/migrator.go:423 [526.6µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:36:24.682] INFO sqlite@v1.5.5/migrator.go:423 [1.0937ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:36:24.683] 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-08 09:36:24.683] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:36:24.684] 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-08 09:36:24.684] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:36:24.684] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:36:24.684] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:36:25.645] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 09:36:25.648] INFO repository/system.go:59 [2.739ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("5f839b5ecfb04703a75436dfcad1f86b","2024-03-08 09:36:25","2024-03-08 09:36:25","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.237.53"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-08 09:36:25.651] INFO repository/server.go:40 [2.153ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("a4883067a4c84c9d9fb03c487affb92f","2024-03-08 09:36:25","2024-03-08 09:36:25","10.10.10.1/24",51820,"aA7CQSyD5uYLKW1ehfxMvmlIcYY4Tum8sFZBcsWTfWc=","1QjJw+r67RQDsV9mizOUZe9O/tS0dEpcNcuvQapX0iw=","","","") -[2024-03-08 09:36:46.102] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:36:46.115] 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-08 09:36:46.115] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:36:46.115] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:46.115] 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-08 09:36:46.117] INFO sqlite@v1.5.5/migrator.go:413 [1.5734ms] [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-08 09:36:46.118] 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-08 09:36:46.118] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:36:46.119] INFO sqlite@v1.5.5/migrator.go:423 [999.5µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:36:46.123] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:46.123] 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-08 09:36:46.124] INFO sqlite@v1.5.5/migrator.go:413 [1.0089ms] [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-08 09:36:46.124] 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-08 09:36:46.124] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:36:46.125] INFO sqlite@v1.5.5/migrator.go:423 [1.5077ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:36:46.127] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:36:46.127] 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-08 09:36:46.128] INFO sqlite@v1.5.5/migrator.go:125 [1ms] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:36:46.128] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:46.128] 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-08 09:36:46.129] INFO sqlite@v1.5.5/migrator.go:413 [1.0004ms] [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-08 09:36:46.129] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-08 09:36:46.129] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-08 09:36:46.130] INFO sqlite@v1.5.5/migrator.go:423 [999.1µs] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:36:46.132] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:36:46.132] 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-08 09:36:46.133] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:36:46.133] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:46.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-08 09:36:46.134] INFO sqlite@v1.5.5/migrator.go:413 [1.0097ms] [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-08 09:36:46.134] 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-08 09:36:46.135] INFO sqlite@v1.5.5/migrator.go:423 [991µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:36:46.136] INFO sqlite@v1.5.5/migrator.go:423 [1.0533ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:36:46.138] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:36:46.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-08 09:36:46.139] INFO sqlite@v1.5.5/migrator.go:413 [545.4µ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-08 09:36:46.140] 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-08 09:36:46.140] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:36:46.141] INFO sqlite@v1.5.5/migrator.go:423 [1.1745ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:36:46.143] 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-08 09:36:46.143] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:36:46.144] 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-08 09:36:46.144] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:36:46.144] INFO script/db_migrate.go:60 [546.6µs] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:36:46.144] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:36:47.060] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 09:36:47.063] INFO repository/system.go:59 [2.617ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("60ede467a2b64392b2349d13846776c3","2024-03-08 09:36:47","2024-03-08 09:36:47","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.237.53"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-08 09:36:47.066] INFO repository/server.go:40 [2.5997ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("ed9b6cd8e5ec435897dd19b312c2c803","2024-03-08 09:36:47","2024-03-08 09:36:47","10.10.10.1/24",51820,"WD8Tj6xmOw4cfB2qLjKgcPfzAwQaeO8v+u6IVQ9r8Ww=","/+vSGX3ks7NSItSsoEDRCQT7SalKDOcDoA3SHuRRkWc=","","","") -[2024-03-08 09:42:07.913] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 09:42:07.930] 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-08 09:42:07.930] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 09:42:07.931] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:42:07.931] 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-08 09:42:07.932] INFO sqlite@v1.5.5/migrator.go:413 [1.0506ms] [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-08 09:42:07.932] 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-08 09:42:07.932] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:42:07.934] INFO sqlite@v1.5.5/migrator.go:423 [505µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:42:07.937] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:42:07.938] 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-08 09:42:07.939] INFO sqlite@v1.5.5/migrator.go:413 [1.344ms] [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-08 09:42:07.939] 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-08 09:42:07.940] INFO sqlite@v1.5.5/migrator.go:423 [997.8µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 09:42:07.941] INFO sqlite@v1.5.5/migrator.go:423 [999.3µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 09:42:07.943] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 09:42:07.943] 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-08 09:42:07.944] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 09:42:07.944] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:42:07.944] 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-08 09:42:07.946] INFO sqlite@v1.5.5/migrator.go:413 [999.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-08 09:42:07.946] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-08 09:42:07.946] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_server` -[2024-03-08 09:42:07.948] INFO sqlite@v1.5.5/migrator.go:423 [1.0024ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 09:42:07.951] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 09:42:07.952] 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-08 09:42:07.952] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 09:42:07.952] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:42:07.952] 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-08 09:42:07.954] 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-08 09:42:07.954] 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-08 09:42:07.955] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:42:07.956] INFO sqlite@v1.5.5/migrator.go:423 [999.1µs] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:42:07.957] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 09:42:07.957] 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-08 09:42:07.959] INFO sqlite@v1.5.5/migrator.go:413 [1.0033ms] [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-08 09:42:07.959] 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-08 09:42:07.960] INFO sqlite@v1.5.5/migrator.go:423 [1.0012ms] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 09:42:07.961] INFO sqlite@v1.5.5/migrator.go:423 [997.4µs] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 09:42:07.964] INFO sqlite@v1.5.5/migrator.go:219 [998µ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-08 09:42:07.964] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 09:42:07.964] 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-08 09:42:07.964] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 09:42:07.964] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 09:42:07.965] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 09:42:09.002] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 09:42:09.005] INFO repository/system.go:59 [2.1716ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("bf270b8d670543b78b086c5af0e5fba3","2024-03-08 09:42:09","2024-03-08 09:42:09","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.237.53"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-08 09:42:09.007] INFO repository/server.go:40 [2.2008ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("a2e2473f82f04974bf01a92c13a87dc9","2024-03-08 09:42:09","2024-03-08 09:42:09","10.10.10.1/24",51820,"cGdK/42YvQF4Nry6IdLmi28XSgqA2+i8rVF/SDj6glM=","FP5VPamqJsDGFDqua5SOgvVMUjrJgKOVGhuR7a9CHgg=","","","") -[2024-03-08 10:42:12.116] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 10:42:12.130] 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-08 10:42:12.131] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 10:42:12.131] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:42:12.131] 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-08 10:42:12.132] INFO sqlite@v1.5.5/migrator.go:413 [1.0456ms] [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-08 10:42:12.133] INFO sqlite@v1.5.5/migrator.go:423 [530.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-08 10:42:12.133] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 10:42:12.134] INFO sqlite@v1.5.5/migrator.go:423 [1.0653ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 10:42:12.136] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:42:12.137] 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-08 10:42:12.138] INFO sqlite@v1.5.5/migrator.go:413 [549.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-08 10:42:12.138] 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-08 10:42:12.138] INFO sqlite@v1.5.5/migrator.go:423 [519.8µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 10:42:12.140] INFO sqlite@v1.5.5/migrator.go:423 [2.1099ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 10:42:12.142] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 10:42:12.142] 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-08 10:42:12.143] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 10:42:12.143] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:42:12.143] 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-08 10:42:12.144] INFO sqlite@v1.5.5/migrator.go:413 [525.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-08 10:42:12.145] 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-08 10:42:12.145] INFO sqlite@v1.5.5/migrator.go:423 [528µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-08 10:42:12.147] INFO sqlite@v1.5.5/migrator.go:423 [1.6428ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 10:42:12.149] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 10:42:12.149] 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-08 10:42:12.149] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 10:42:12.149] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:42:12.149] 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-08 10:42:12.150] INFO sqlite@v1.5.5/migrator.go:413 [538.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-08 10:42:12.151] 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-08 10:42:12.151] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 10:42:12.153] INFO sqlite@v1.5.5/migrator.go:423 [1.0712ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 10:42:12.155] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:42:12.155] 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-08 10:42:12.156] INFO sqlite@v1.5.5/migrator.go:413 [552.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-08 10:42:12.156] 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-08 10:42:12.156] INFO sqlite@v1.5.5/migrator.go:423 [524.1µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 10:42:12.158] INFO sqlite@v1.5.5/migrator.go:423 [1.6216ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 10:42:12.160] 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-08 10:42:12.160] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 10:42:12.160] 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-08 10:42:12.160] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 10:42:12.160] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 10:42:12.160] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 10:42:30.920] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 10:42:30.933] 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-08 10:42:30.934] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 10:42:30.934] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:42:30.934] 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-08 10:42:30.935] INFO sqlite@v1.5.5/migrator.go:413 [1.0693ms] [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-08 10:42:30.935] 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-08 10:42:30.936] INFO sqlite@v1.5.5/migrator.go:423 [1.0001ms] [rows:1] DROP TABLE `t_user` -[2024-03-08 10:42:30.937] INFO sqlite@v1.5.5/migrator.go:423 [1.0004ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 10:42:30.938] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:42:30.939] INFO sqlite@v1.5.5/migrator.go:368 [1.0004ms] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" -[2024-03-08 10:42:30.940] INFO sqlite@v1.5.5/migrator.go:413 [530µ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-08 10:42:30.940] 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-08 10:42:30.941] INFO sqlite@v1.5.5/migrator.go:423 [1.0048ms] [rows:1] DROP TABLE `t_user` -[2024-03-08 10:42:30.942] INFO sqlite@v1.5.5/migrator.go:423 [999.9µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 10:42:30.944] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 10:42:30.944] 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-08 10:42:30.944] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 10:42:30.944] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:42:30.944] 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-08 10:42:30.945] 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-08 10:42:30.945] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] 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-08 10:42:30.946] INFO sqlite@v1.5.5/migrator.go:423 [1.0002ms] [rows:0] DROP TABLE `t_wg_server` -[2024-03-08 10:42:30.947] INFO sqlite@v1.5.5/migrator.go:423 [1.0003ms] [rows:0] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 10:42:30.949] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 10:42:30.949] 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-08 10:42:30.950] INFO sqlite@v1.5.5/migrator.go:125 [1.0002ms] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 10:42:30.950] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:42:30.950] 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-08 10:42:30.951] INFO sqlite@v1.5.5/migrator.go:413 [999.9µ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-08 10:42:30.951] 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-08 10:42:30.951] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 10:42:30.953] INFO sqlite@v1.5.5/migrator.go:423 [1.001ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 10:42:30.955] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:42:30.955] 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-08 10:42:30.956] INFO sqlite@v1.5.5/migrator.go:413 [579.9µ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-08 10:42:30.957] INFO sqlite@v1.5.5/migrator.go:423 [503.5µ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-08 10:42:30.957] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 10:42:30.958] INFO sqlite@v1.5.5/migrator.go:423 [1.5626ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 10:42:30.960] 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-08 10:42:30.960] INFO sqlite@v1.5.5/migrator.go:32 [520.4µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 10:42:30.960] 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-08 10:42:30.960] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 10:42:30.961] INFO script/db_migrate.go:60 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 10:42:30.961] INFO script/db_migrate.go:97 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 10:42:31.934] ERROR repository/system.go:28 record not found -> SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 10:42:31.937] INFO repository/system.go:59 [2.2855ms] [rows:1] INSERT INTO `t_setting` (`id`,`created_at`,`updated_at`,`code`,`data`,`describe`) VALUES ("5a18e3d7545d452fbc8ba5568a786a8d","2024-03-08 10:42:31","2024-03-08 10:42:31","SERVER_SETTING","{""MTU"":1450,""configFilePath"":""/etc/wireguard/wg0.conf"",""dnsServer"":""10.10.10.1/24"",""endpointAddress"":""222.183.237.53"",""firewallMark"":"""",""persistentKeepalive"":15,""table"":""""}","服务端全局配置") -[2024-03-08 10:42:31.939] INFO repository/server.go:40 [1.6029ms] [rows:1] INSERT INTO `t_wg_server` (`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) VALUES ("2cc89e0b665c47b683a4042b8654062a","2024-03-08 10:42:31","2024-03-08 10:42:31","10.10.10.1/24",51820,"sO8kK0Jzw/TGRKJ9hl7bWq19NnkcOF/Zq0gzkbnh8Xw=","lYUdv0QUgrHsLzFl05l56UA9XaKEtB+eraxIOMLXjis=","","","") -[2024-03-08 10:45:01.868] INFO repository/user.go:55 [503.7µs] [rows:1] SELECT * FROM `t_user` WHERE account = "Admin" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-08 10:45:24.815] INFO repository/user.go:44 [862.1µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-08 10:45:24.815] INFO repository/server.go:26 [504.3µs] [rows:1] SELECT `t_wg_server`.`id`,`t_wg_server`.`ip_scope`,`t_wg_server`.`listen_port`,`t_wg_server`.`private_key`,`t_wg_server`.`public_key`,`t_wg_server`.`post_up_script`,`t_wg_server`.`pre_down_script`,`t_wg_server`.`post_down_script` FROM `t_wg_server` ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-08 10:59:48.534] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 10:59:48.547] 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-08 10:59:48.547] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 10:59:48.547] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:59:48.547] 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-08 10:59:48.549] 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-08 10:59:48.549] 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-08 10:59:48.549] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 10:59:48.550] INFO sqlite@v1.5.5/migrator.go:423 [1.0002ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 10:59:48.552] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:59:48.552] 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-08 10:59:48.553] INFO sqlite@v1.5.5/migrator.go:413 [998.6µ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-08 10:59:48.553] 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-08 10:59:48.554] INFO sqlite@v1.5.5/migrator.go:423 [1.0002ms] [rows:1] DROP TABLE `t_user` -[2024-03-08 10:59:48.555] INFO sqlite@v1.5.5/migrator.go:423 [1.0082ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 10:59:48.557] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 10:59:48.557] 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-08 10:59:48.557] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 10:59:48.557] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:59:48.557] 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-08 10:59:48.559] INFO sqlite@v1.5.5/migrator.go:413 [1.0431ms] [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-08 10:59:48.559] 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-08 10:59:48.559] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-08 10:59:48.560] INFO sqlite@v1.5.5/migrator.go:423 [1.013ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 10:59:48.562] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 10:59:48.562] 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-08 10:59:48.562] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 10:59:48.562] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:59:48.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-08 10:59:48.564] INFO sqlite@v1.5.5/migrator.go:413 [990.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-08 10:59:48.564] 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-08 10:59:48.564] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 10:59:48.565] INFO sqlite@v1.5.5/migrator.go:423 [999.4µs] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 10:59:48.567] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 10:59:48.567] 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-08 10:59:48.568] 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-08 10:59:48.568] 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-08 10:59:48.568] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 10:59:48.570] INFO sqlite@v1.5.5/migrator.go:423 [1.0004ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 10:59:48.571] 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-08 10:59:48.571] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 10:59:48.572] 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-08 10:59:48.572] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 10:59:48.572] INFO script/db_migrate.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 10:59:48.572] INFO script/db_migrate.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 11:00:08.344] INFO repository/user.go:44 [368.3µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-08 11:00:08.344] INFO repository/system.go:28 [503.5µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 11:01:14.450] INFO sqlite@v1.5.5/migrator.go:32 [542.5µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 11:01:14.464] 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-08 11:01:14.464] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 11:01:14.465] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 11:01:14.465] 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-08 11:01:14.466] INFO sqlite@v1.5.5/migrator.go:413 [1.0136ms] [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-08 11:01:14.467] 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-08 11:01:14.467] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 11:01:14.469] INFO sqlite@v1.5.5/migrator.go:423 [1.5163ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 11:01:14.471] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 11:01:14.471] 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-08 11:01:14.472] 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-08 11:01:14.473] 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-08 11:01:14.473] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 11:01:14.474] INFO sqlite@v1.5.5/migrator.go:423 [1.0006ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 11:01:14.477] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 11:01:14.477] 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-08 11:01:14.478] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 11:01:14.478] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 11:01:14.478] 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-08 11:01:14.479] INFO sqlite@v1.5.5/migrator.go:413 [990.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-08 11:01:14.479] 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-08 11:01:14.480] INFO sqlite@v1.5.5/migrator.go:423 [1.0006ms] [rows:1] DROP TABLE `t_wg_server` -[2024-03-08 11:01:14.481] INFO sqlite@v1.5.5/migrator.go:423 [1.0088ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 11:01:14.483] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 11:01:14.483] 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-08 11:01:14.483] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 11:01:14.484] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 11:01:14.484] 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-08 11:01:14.485] INFO sqlite@v1.5.5/migrator.go:413 [1.1802ms] [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-08 11:01:14.485] 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-08 11:01:14.485] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 11:01:14.487] INFO sqlite@v1.5.5/migrator.go:423 [1.0094ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 11:01:14.489] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 11:01:14.489] 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-08 11:01:14.490] 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-08 11:01:14.491] 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-08 11:01:14.491] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 11:01:14.492] INFO sqlite@v1.5.5/migrator.go:423 [1.008ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 11:01:14.494] 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-08 11:01:14.496] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 11:01:14.496] 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-08 11:01:14.496] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 11:01:14.496] INFO script/db_migrate.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 11:01:14.496] INFO script/db_migrate.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 11:01:35.507] INFO sqlite@v1.5.5/migrator.go:32 [59.2µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 11:01:35.518] 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-08 11:01:35.519] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 11:01:35.519] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 11:01:35.520] 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-08 11:01:35.521] INFO sqlite@v1.5.5/migrator.go:413 [1.1159ms] [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-08 11:01:35.521] 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-08 11:01:35.521] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 11:01:35.522] INFO sqlite@v1.5.5/migrator.go:423 [1.1247ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 11:01:35.524] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 11:01:35.524] 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-08 11:01:35.525] INFO sqlite@v1.5.5/migrator.go:413 [599.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-08 11:01:35.526] INFO sqlite@v1.5.5/migrator.go:423 [503.5µ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-08 11:01:35.526] INFO sqlite@v1.5.5/migrator.go:423 [602µs] [rows:1] DROP TABLE `t_user` -[2024-03-08 11:01:35.528] INFO sqlite@v1.5.5/migrator.go:423 [1.452ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 11:01:35.530] INFO sqlite@v1.5.5/migrator.go:32 [937.8µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 11:01:35.530] 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-08 11:01:35.530] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 11:01:35.530] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 11:01:35.530] 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-08 11:01:35.531] 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-08 11:01:35.531] 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-08 11:01:35.532] INFO sqlite@v1.5.5/migrator.go:423 [1.0002ms] [rows:1] DROP TABLE `t_wg_server` -[2024-03-08 11:01:35.533] INFO sqlite@v1.5.5/migrator.go:423 [1.508ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 11:01:35.534] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 11:01:35.535] INFO migrator/migrator.go:73 [1.0659ms] [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-08 11:01:35.535] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 11:01:35.535] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 11:01:35.535] 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-08 11:01:35.536] 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-08 11:01:35.536] 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-08 11:01:35.537] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 11:01:35.539] INFO sqlite@v1.5.5/migrator.go:423 [1.133ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 11:01:35.539] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 11:01:35.540] 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-08 11:01:35.542] INFO sqlite@v1.5.5/migrator.go:413 [1.0247ms] [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-08 11:01:35.542] 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-08 11:01:35.542] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 11:01:35.543] INFO sqlite@v1.5.5/migrator.go:423 [1.9721ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 11:01:35.544] 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-08 11:01:35.544] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 11:01:35.545] 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-08 11:01:35.545] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-08 11:01:35.545] INFO script/db_migrate.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-08 11:01:35.545] INFO script/db_migrate.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-08 11:01:44.066] INFO repository/user.go:44 [511.7µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-08 11:01:44.067] INFO repository/system.go:28 [503.3µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-08 11:01:47.455] INFO repository/user.go:44 [348.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-08 11:01:47.456] INFO repository/server.go:26 [504.2µs] [rows:1] SELECT `t_wg_server`.`id`,`t_wg_server`.`ip_scope`,`t_wg_server`.`listen_port`,`t_wg_server`.`private_key`,`t_wg_server`.`public_key`,`t_wg_server`.`post_up_script`,`t_wg_server`.`pre_down_script`,`t_wg_server`.`post_down_script` FROM `t_wg_server` ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-08 14:59:07.136] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-08 14:59:07.148] 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-08 14:59:07.148] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-08 14:59:07.149] INFO sqlite@v1.5.5/migrator.go:79 [999.3µs] [rows:1] PRAGMA foreign_keys -[2024-03-08 14:59:07.149] 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-08 14:59:07.150] INFO sqlite@v1.5.5/migrator.go:413 [1.0706ms] [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-08 14:59:07.151] 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-08 14:59:07.151] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 14:59:07.152] INFO sqlite@v1.5.5/migrator.go:423 [1.0101ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 14:59:07.155] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 14:59:07.155] 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-08 14:59:07.156] 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-08 14:59:07.157] 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-08 14:59:07.157] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-08 14:59:07.160] INFO sqlite@v1.5.5/migrator.go:423 [3.1008ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-08 14:59:07.162] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-08 14:59:07.162] 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-08 14:59:07.162] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-08 14:59:07.162] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 14:59:07.163] 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-08 14:59:07.164] INFO sqlite@v1.5.5/migrator.go:413 [1.0062ms] [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-08 14:59:07.164] 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-08 14:59:07.164] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-08 14:59:07.166] INFO sqlite@v1.5.5/migrator.go:423 [2.0002ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-08 14:59:07.167] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client" -[2024-03-08 14:59:07.167] 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-08 14:59:07.169] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-08 14:59:07.169] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 14:59:07.169] 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-08 14:59:07.170] INFO sqlite@v1.5.5/migrator.go:413 [1.0749ms] [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-08 14:59:07.170] 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-08 14:59:07.170] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 14:59:07.172] INFO sqlite@v1.5.5/migrator.go:423 [2.1557ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 14:59:07.174] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-08 14:59:07.174] 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-08 14:59:07.176] INFO sqlite@v1.5.5/migrator.go:413 [531.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-08 14:59:07.176] 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-08 14:59:07.176] INFO sqlite@v1.5.5/migrator.go:423 [516.1µs] [rows:0] DROP TABLE `t_wg_client` -[2024-03-08 14:59:07.177] INFO sqlite@v1.5.5/migrator.go:423 [1.0676ms] [rows:0] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-08 14:59:07.179] 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-08 14:59:07.179] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-08 14:59:07.179] INFO migrator/migrator.go:73 [534.1µ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-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 -[2024-03-11 11:29:30.567] 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:29:30.575] INFO migrator/migrator.go:73 [1.0022ms] [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:29:30.575] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 11:29:30.575] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 11:29:30.575] 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:29:30.577] INFO sqlite@v1.5.5/migrator.go:413 [1.0886ms] [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:29:30.577] 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:29:30.577] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 11:29:30.577] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 11:29:30.579] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 11:29:30.579] 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:29:30.580] INFO sqlite@v1.5.5/migrator.go:413 [1.1553ms] [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:29:30.580] 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:29:30.580] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 11:29:30.580] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 11:29:30.582] 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:29:30.582] 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:29:30.582] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 11:29:30.582] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 11:29:30.582] 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:29:30.584] 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:29:30.584] 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:29:30.584] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 11:29:30.585] INFO sqlite@v1.5.5/migrator.go:423 [1.0811ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 11:29:30.586] 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:29:30.586] 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:29:30.587] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 11:29:30.587] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 11:29:30.587] 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:29:30.588] INFO sqlite@v1.5.5/migrator.go:413 [1.1107ms] [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:29:30.588] 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:29:30.588] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 11:29:30.588] 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:29:30.590] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 11:29:30.590] 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:29:30.592] INFO sqlite@v1.5.5/migrator.go:413 [1.5512ms] [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:29:30.592] 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:29:30.592] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 11:29:30.592] 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:29:30.594] 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:29:30.594] 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:29:30.594] 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:29:30.595] INFO migrator/migrator.go:73 [69.7µ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:29:30.595] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 11:29:30.595] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 11:29:30.595] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 11:29:34.384] INFO repository/user.go:44 [198.2µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 11:29:34.386] INFO repository/server.go:63 [2.5807ms] [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:29:34.384" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 11:29:34.405] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 11:29:34.406] INFO callbacks/preload.go:261 [505.6µs] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 11:29:34.406] INFO repository/server.go:37 [1.1638ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 11:29:34.407] INFO repository/system.go:28 [533.4µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-11 11:36:13.036] 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:36:13.049] 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:36:13.050] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 11:36:13.050] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 11:36:13.050] 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:36:13.051] INFO sqlite@v1.5.5/migrator.go:413 [1.3296ms] [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:36:13.052] INFO sqlite@v1.5.5/migrator.go:423 [1.0013ms] [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:36:13.052] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 11:36:13.053] INFO sqlite@v1.5.5/migrator.go:423 [1.4125ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 11:36:13.055] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 11:36:13.055] 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:36:13.056] INFO sqlite@v1.5.5/migrator.go:413 [1.0763ms] [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:36:13.056] 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:36:13.057] INFO sqlite@v1.5.5/migrator.go:423 [520.5µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 11:36:13.059] INFO sqlite@v1.5.5/migrator.go:423 [2.2706ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 11:36:13.061] 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:36:13.062] INFO migrator/migrator.go:73 [69.4µ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:36:13.062] INFO sqlite@v1.5.5/migrator.go:125 [510.6µs] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 11:36:13.062] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 11:36:13.062] 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:36:13.064] INFO sqlite@v1.5.5/migrator.go:413 [1.1774ms] [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:36:13.064] 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:36:13.065] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 11:36:13.066] INFO sqlite@v1.5.5/migrator.go:423 [1.1783ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 11:36:13.068] 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:36:13.068] 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:36:13.069] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 11:36:13.069] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 11:36:13.069] 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:36:13.070] INFO sqlite@v1.5.5/migrator.go:413 [540.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` 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:36:13.070] 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:36:13.071] INFO sqlite@v1.5.5/migrator.go:423 [521µs] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 11:36:13.073] INFO sqlite@v1.5.5/migrator.go:423 [1.6442ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 11:36:13.074] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 11:36:13.074] 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:36:13.075] INFO sqlite@v1.5.5/migrator.go:413 [523.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` 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:36:13.076] INFO sqlite@v1.5.5/migrator.go:423 [545.9µ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:36:13.076] INFO sqlite@v1.5.5/migrator.go:423 [601µs] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 11:36:13.078] INFO sqlite@v1.5.5/migrator.go:423 [1.1676ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 11:36:13.079] 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:36:13.079] 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:36:13.080] 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:36:13.080] 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:36:13.081] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 11:36:13.081] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 11:36:13.081] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 11:36:14.261] INFO repository/user.go:44 [253.2µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 11:36:14.265] INFO repository/server.go:63 [3.2704ms] [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:36:14.261" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 11:36:14.284] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 11:36:14.285] INFO callbacks/preload.go:261 [633.7µs] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 11:36:14.285] INFO repository/server.go:37 [1.3974ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 11:36:14.285] INFO repository/system.go:28 [518.5µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-11 14:22:09.027] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:22:09.040] 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 14:22:09.040] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:22:09.040] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:22:09.041] 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 14:22:09.042] INFO sqlite@v1.5.5/migrator.go:413 [1.0362ms] [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 14:22:09.042] 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 14:22:09.042] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:22:09.043] INFO sqlite@v1.5.5/migrator.go:423 [1.657ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:22:09.045] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:22:09.045] 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 14:22:09.047] INFO sqlite@v1.5.5/migrator.go:413 [515.7µ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 14:22:09.047] 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 14:22:09.047] INFO sqlite@v1.5.5/migrator.go:423 [71.5µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:22:09.049] INFO sqlite@v1.5.5/migrator.go:423 [1.1693ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:22:09.050] 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 14:22:09.051] 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 14:22:09.051] INFO sqlite@v1.5.5/migrator.go:125 [505.8µs] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:22:09.051] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:22:09.051] 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 14:22:09.052] INFO sqlite@v1.5.5/migrator.go:413 [526.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 14:22:09.052] 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 14:22:09.053] INFO sqlite@v1.5.5/migrator.go:423 [518.2µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:22:09.055] INFO sqlite@v1.5.5/migrator.go:423 [2.1733ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:22:09.056] 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 14:22:09.057] 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 14:22:09.057] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:22:09.057] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:22:09.057] 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 14:22:09.058] INFO sqlite@v1.5.5/migrator.go:413 [581.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` 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 14:22:09.058] 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 14:22:09.059] INFO sqlite@v1.5.5/migrator.go:423 [576.2µs] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:22:09.059] INFO sqlite@v1.5.5/migrator.go:423 [576.9µs] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:22:09.061] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:22:09.062] INFO sqlite@v1.5.5/migrator.go:368 [528.9µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" -[2024-03-11 14:22:09.062] INFO sqlite@v1.5.5/migrator.go:413 [600.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` 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 14:22:09.063] 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 14:22:09.063] INFO sqlite@v1.5.5/migrator.go:423 [503.5µs] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:22:09.065] INFO sqlite@v1.5.5/migrator.go:423 [1.2187ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:22:09.066] 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 14:22:09.066] 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 14:22:09.067] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:22:09.067] INFO migrator/migrator.go:73 [544.7µ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 14:22:09.067] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:22:09.067] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:22:09.068] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:22:39.992] 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 14:23:25.053] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:23:25.067] 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 14:23:25.067] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:23:25.067] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:23:25.068] 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 14:23:25.069] INFO sqlite@v1.5.5/migrator.go:413 [1.0009ms] [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 14:23:25.069] 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 14:23:25.070] INFO sqlite@v1.5.5/migrator.go:423 [999.5µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:23:25.071] INFO sqlite@v1.5.5/migrator.go:423 [1ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:23:25.072] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:23:25.072] 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 14:23:25.073] 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 14:23:25.074] 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 14:23:25.074] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:23:25.076] INFO sqlite@v1.5.5/migrator.go:423 [1.9983ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:23:25.079] 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 14:23:25.079] 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 14:23:25.079] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:23:25.079] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:23:25.079] 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 14:23:25.080] 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 14:23:25.080] 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 14:23:25.081] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:23:25.082] INFO sqlite@v1.5.5/migrator.go:423 [1.0011ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:23:25.084] 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 14:23:25.084] 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 14:23:25.085] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:23:25.085] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:23:25.085] 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 14:23:25.086] 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 14:23:25.086] 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 14:23:25.088] INFO sqlite@v1.5.5/migrator.go:423 [1.504ms] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:23:25.089] INFO sqlite@v1.5.5/migrator.go:423 [1.0719ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:23:25.091] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:23:25.091] 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 14:23:25.092] INFO sqlite@v1.5.5/migrator.go:413 [520.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` 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 14:23:25.093] INFO sqlite@v1.5.5/migrator.go:423 [520.6µ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 14:23:25.093] INFO sqlite@v1.5.5/migrator.go:423 [525µs] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:23:25.095] INFO sqlite@v1.5.5/migrator.go:423 [1.5757ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:23:25.096] 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 14:23:25.097] 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 14:23:25.097] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:23:25.097] 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 14:23:25.097] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:23:25.098] INFO script/script.go:61 [520.9µs] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:23:25.098] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:23:27.797] INFO repository/user.go:44 [522.1µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:23:49.904] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:23:49.917] 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 14:23:49.918] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:23:49.918] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:23:49.918] 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 14:23:49.920] INFO sqlite@v1.5.5/migrator.go:413 [1.1864ms] [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 14:23:49.920] 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 14:23:49.920] INFO sqlite@v1.5.5/migrator.go:423 [572.4µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:23:49.922] INFO sqlite@v1.5.5/migrator.go:423 [1.1071ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:23:49.924] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:23:49.924] 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 14:23:49.925] INFO sqlite@v1.5.5/migrator.go:413 [518.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 14:23:49.925] 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 14:23:49.925] INFO sqlite@v1.5.5/migrator.go:423 [550.7µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:23:49.926] INFO sqlite@v1.5.5/migrator.go:423 [1.1037ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:23:49.928] 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 14:23:49.929] INFO migrator/migrator.go:73 [503.2µ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 14:23:49.929] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:23:49.929] INFO sqlite@v1.5.5/migrator.go:79 [536.9µs] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:23:49.929] 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 14:23:49.930] INFO sqlite@v1.5.5/migrator.go:413 [1.0644ms] [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 14:23:49.930] 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 14:23:49.931] INFO sqlite@v1.5.5/migrator.go:423 [543.7µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:23:49.932] INFO sqlite@v1.5.5/migrator.go:423 [1.0557ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:23:49.934] 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 14:23:49.934] INFO migrator/migrator.go:73 [530.4µ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 14:23:49.934] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:23:49.935] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:23:49.935] 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 14:23:49.936] INFO sqlite@v1.5.5/migrator.go:413 [517.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` 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 14:23:49.936] 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 14:23:49.936] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:23:49.937] 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 14:23:49.939] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:23:49.939] 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 14:23:49.940] INFO sqlite@v1.5.5/migrator.go:413 [535.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`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`)) -[2024-03-11 14:23:49.941] INFO sqlite@v1.5.5/migrator.go:423 [524.6µ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 14:23:49.941] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:23:49.942] INFO sqlite@v1.5.5/migrator.go:423 [544.3µs] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:23:49.943] 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 14:23:49.944] 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 14:23:49.944] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:23:49.944] 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 14:23:49.944] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:23:49.945] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:23:49.945] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:23:50.714] INFO repository/user.go:44 [865.3µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:23:50.714] ERROR repository/client.go:32 near "t_user": syntax error -> SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc t_user as tu ON twc.user_id = tu.id LIMIT 10 -[2024-03-11 14:24:28.176] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:24:28.189] 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 14:24:28.189] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:24:28.189] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:24:28.190] 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 14:24:28.190] 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 14:24:28.191] INFO sqlite@v1.5.5/migrator.go:423 [1.0044ms] [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 14:24:28.191] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:24:28.192] INFO sqlite@v1.5.5/migrator.go:423 [1.0258ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:24:28.194] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:24:28.194] 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 14:24:28.196] INFO sqlite@v1.5.5/migrator.go:413 [1.043ms] [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 14:24:28.196] 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 14:24:28.197] INFO sqlite@v1.5.5/migrator.go:423 [1.0014ms] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:24:28.199] INFO sqlite@v1.5.5/migrator.go:423 [1.9969ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:24:28.200] 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 14:24:28.200] 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 14:24:28.201] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:24:28.201] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:24:28.201] 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 14:24:28.202] INFO sqlite@v1.5.5/migrator.go:413 [998.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 14:24:28.202] 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 14:24:28.202] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:24:28.204] INFO sqlite@v1.5.5/migrator.go:423 [999.8µs] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:24:28.205] 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 14:24:28.205] 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 14:24:28.206] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:24:28.207] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:24:28.207] 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 14:24:28.208] INFO sqlite@v1.5.5/migrator.go:413 [1.0044ms] [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 14:24:28.208] 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 14:24:28.209] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:24:28.210] INFO sqlite@v1.5.5/migrator.go:423 [1.5027ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:24:28.212] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:24:28.212] 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 14:24:28.213] INFO sqlite@v1.5.5/migrator.go:413 [518.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` 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 14:24:28.214] INFO sqlite@v1.5.5/migrator.go:423 [518µ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 14:24:28.214] INFO sqlite@v1.5.5/migrator.go:423 [518.9µs] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:24:28.215] INFO sqlite@v1.5.5/migrator.go:423 [1.0742ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:24:28.217] 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 14:24:28.217] 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 14:24:28.217] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:24:28.218] 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 14:24:28.218] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:24:28.218] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:24:28.218] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:24:40.141] INFO repository/user.go:44 [530.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:24:40.142] INFO repository/client.go:32 [0s] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10 -[2024-03-11 14:24:40.142] INFO repository/client.go:32 [521.3µs] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id -[2024-03-11 14:26:09.503] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:26:09.515] 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 14:26:09.515] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:26:09.516] INFO sqlite@v1.5.5/migrator.go:79 [1.004ms] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:26:09.516] 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 14:26:09.518] INFO sqlite@v1.5.5/migrator.go:413 [1.0042ms] [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 14:26:09.518] 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 14:26:09.518] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:26:09.519] INFO sqlite@v1.5.5/migrator.go:423 [1.0433ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:26:09.521] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:26:09.521] 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 14:26:09.522] INFO sqlite@v1.5.5/migrator.go:413 [584.6µ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 14:26:09.523] 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 14:26:09.523] INFO sqlite@v1.5.5/migrator.go:423 [519.4µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:26:09.524] INFO sqlite@v1.5.5/migrator.go:423 [1.0728ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:26:09.526] 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 14:26:09.526] 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 14:26:09.527] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:26:09.527] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:26:09.527] 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 14:26:09.528] INFO sqlite@v1.5.5/migrator.go:413 [590.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 14:26:09.528] 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 14:26:09.528] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:26:09.530] INFO sqlite@v1.5.5/migrator.go:423 [1.6267ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:26:09.531] 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 14:26:09.531] 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 14:26:09.532] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:26:09.532] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:26:09.533] INFO sqlite@v1.5.5/migrator.go:368 [522.1µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" -[2024-03-11 14:26:09.534] INFO sqlite@v1.5.5/migrator.go:413 [550µ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`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`)) -[2024-03-11 14:26:09.534] INFO sqlite@v1.5.5/migrator.go:423 [172.2µ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 14:26:09.534] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:26:09.536] INFO sqlite@v1.5.5/migrator.go:423 [1.586ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:26:09.539] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:26:09.539] INFO sqlite@v1.5.5/migrator.go:368 [538.2µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" -[2024-03-11 14:26:09.540] INFO sqlite@v1.5.5/migrator.go:413 [539.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`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`)) -[2024-03-11 14:26:09.540] 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 14:26:09.541] INFO sqlite@v1.5.5/migrator.go:423 [570.6µs] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:26:09.542] INFO sqlite@v1.5.5/migrator.go:423 [1.5839ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:26:09.544] 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 14:26:09.544] 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 14:26:09.544] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:26:09.545] 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 14:26:09.545] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:26:09.545] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:26:09.545] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:26:10.973] INFO repository/user.go:44 [1.4428ms] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:26:10.975] INFO repository/client.go:33 [1.0575ms] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10 -[2024-03-11 14:26:10.975] INFO repository/client.go:33 [520.3µs] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id -[2024-03-11 14:26:38.701] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:26:38.714] 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 14:26:38.714] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:26:38.715] INFO sqlite@v1.5.5/migrator.go:79 [51.4µs] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:26:38.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 14:26:38.716] INFO sqlite@v1.5.5/migrator.go:413 [1.0795ms] [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 14:26:38.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 14:26:38.717] INFO sqlite@v1.5.5/migrator.go:423 [510.7µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:26:38.718] INFO sqlite@v1.5.5/migrator.go:423 [597.6µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:26:38.719] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:26:38.719] 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 14:26:38.720] 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 14:26:38.721] 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 14:26:38.721] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:26:38.724] INFO sqlite@v1.5.5/migrator.go:423 [2.5321ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:26:38.726] 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 14:26:38.726] 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 14:26:38.727] INFO sqlite@v1.5.5/migrator.go:125 [988.7µs] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:26:38.727] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:26:38.727] 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 14:26:38.728] INFO sqlite@v1.5.5/migrator.go:413 [1ms] [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 14:26:38.728] 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 14:26:38.728] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:26:38.729] INFO sqlite@v1.5.5/migrator.go:423 [1.5221ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:26:38.731] 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 14:26:38.732] 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 14:26:38.732] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:26:38.732] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:26:38.733] 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 14:26:38.734] INFO sqlite@v1.5.5/migrator.go:413 [1.0007ms] [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 14:26:38.734] 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 14:26:38.735] INFO sqlite@v1.5.5/migrator.go:423 [999.3µs] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:26:38.736] INFO sqlite@v1.5.5/migrator.go:423 [1.007ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:26:38.737] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:26:38.737] 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 14:26:38.740] INFO sqlite@v1.5.5/migrator.go:413 [941.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` 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 14:26:38.740] 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 14:26:38.741] INFO sqlite@v1.5.5/migrator.go:423 [999.1µs] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:26:38.742] INFO sqlite@v1.5.5/migrator.go:423 [1.0102ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:26:38.744] 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 14:26:38.744] 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 14:26:38.744] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:26:38.744] 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 14:26:38.744] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:26:38.745] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:26:38.745] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:26:41.007] INFO repository/user.go:44 [1.0526ms] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:26:41.008] INFO repository/client.go:33 [0s] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10 -[2024-03-11 14:26:41.008] INFO repository/client.go:33 [0s] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id -[2024-03-11 14:27:15.726] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:27:15.738] 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 14:27:15.739] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:27:15.739] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:27:15.739] INFO sqlite@v1.5.5/migrator.go:368 [502.7µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" -[2024-03-11 14:27:15.740] INFO sqlite@v1.5.5/migrator.go:413 [1.1542ms] [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 14:27:15.740] 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 14:27:15.741] INFO sqlite@v1.5.5/migrator.go:423 [564.3µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:27:15.742] INFO sqlite@v1.5.5/migrator.go:423 [1.1637ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:27:15.743] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:27:15.744] INFO sqlite@v1.5.5/migrator.go:368 [82.1µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" -[2024-03-11 14:27:15.744] INFO sqlite@v1.5.5/migrator.go:413 [591.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 14:27:15.744] 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 14:27:15.745] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:27:15.747] INFO sqlite@v1.5.5/migrator.go:423 [1.6939ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:27:15.748] 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 14:27:15.748] 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 14:27:15.748] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:27:15.749] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:27:15.749] 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 14:27:15.750] INFO sqlite@v1.5.5/migrator.go:413 [583.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 14:27:15.750] 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 14:27:15.750] INFO sqlite@v1.5.5/migrator.go:423 [525.8µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:27:15.751] INFO sqlite@v1.5.5/migrator.go:423 [1.0474ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:27:15.753] 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 14:27:15.754] 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 14:27:15.754] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:27:15.754] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:27:15.755] INFO sqlite@v1.5.5/migrator.go:368 [520µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client" -[2024-03-11 14:27:15.756] INFO sqlite@v1.5.5/migrator.go:413 [504.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` 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 14:27:15.756] INFO sqlite@v1.5.5/migrator.go:423 [60.6µ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 14:27:15.756] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:27:15.758] INFO sqlite@v1.5.5/migrator.go:423 [1.5819ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:27:15.760] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:27:15.760] 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 14:27:15.762] INFO sqlite@v1.5.5/migrator.go:413 [1.0399ms] [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 14:27:15.762] 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 14:27:15.762] INFO sqlite@v1.5.5/migrator.go:423 [510.4µs] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:27:15.764] INFO sqlite@v1.5.5/migrator.go:423 [1.5267ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:27:15.765] 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 14:27:15.765] 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 14:27:15.765] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:27:15.765] 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 14:27:15.766] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:27:15.766] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:27:15.766] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:27:20.636] INFO repository/user.go:44 [138.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:27:20.637] INFO repository/client.go:33 [527.8µs] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10 -[2024-03-11 14:27:20.638] INFO repository/client.go:33 [0s] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id -[2024-03-11 14:27:27.603] INFO repository/user.go:44 [952.3µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:27:27.603] INFO repository/client.go:33 [0s] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10 -[2024-03-11 14:27:27.604] INFO repository/client.go:33 [0s] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id -[2024-03-11 14:28:05.959] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:28:05.970] 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 14:28:05.970] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:28:05.971] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:28:05.971] 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 14:28:05.973] INFO sqlite@v1.5.5/migrator.go:413 [1.0732ms] [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 14:28:05.973] 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 14:28:05.973] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:28:05.974] INFO sqlite@v1.5.5/migrator.go:423 [1.0025ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:28:05.976] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:28:05.977] 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 14:28:05.978] 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 14:28:05.978] 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 14:28:05.978] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:28:05.979] INFO sqlite@v1.5.5/migrator.go:423 [1.096ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:28:05.981] 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 14:28:05.982] 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 14:28:05.982] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:28:05.982] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:28:05.982] 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 14:28:05.983] INFO sqlite@v1.5.5/migrator.go:413 [1.004ms] [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 14:28:05.983] 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 14:28:05.983] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:28:05.985] INFO sqlite@v1.5.5/migrator.go:423 [1.0462ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:28:05.986] 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 14:28:05.986] 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 14:28:05.987] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:28:05.987] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:28:05.987] 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 14:28:05.988] INFO sqlite@v1.5.5/migrator.go:413 [1.1062ms] [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 14:28:05.988] 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 14:28:05.989] INFO sqlite@v1.5.5/migrator.go:423 [1.0625ms] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:28:05.990] INFO sqlite@v1.5.5/migrator.go:423 [1.0938ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:28:05.991] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:28:05.991] 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 14:28:05.992] 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 14:28:05.992] 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 14:28:05.994] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:28:05.995] INFO sqlite@v1.5.5/migrator.go:423 [1.0787ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:28:05.996] 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 14:28:05.996] 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 14:28:05.997] INFO sqlite@v1.5.5/migrator.go:32 [1.0384ms] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:28:05.997] 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 14:28:05.997] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:28:05.997] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:28:05.997] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:28:13.050] INFO repository/user.go:44 [482.3µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:28:13.051] INFO repository/client.go:33 [0s] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10 -[2024-03-11 14:28:13.051] INFO repository/client.go:33 [0s] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id -[2024-03-11 14:28:41.330] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:28:41.341] 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 14:28:41.341] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:28:41.341] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:28:41.341] 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 14:28:41.343] INFO sqlite@v1.5.5/migrator.go:413 [1.0873ms] [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 14:28:41.343] 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 14:28:41.343] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:28:41.344] INFO sqlite@v1.5.5/migrator.go:423 [1.0928ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:28:41.345] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:28:41.345] 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 14:28:41.348] INFO sqlite@v1.5.5/migrator.go:413 [535.6µ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 14:28:41.348] 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 14:28:41.349] INFO sqlite@v1.5.5/migrator.go:423 [536.7µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:28:41.351] INFO sqlite@v1.5.5/migrator.go:423 [1.791ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:28:41.353] 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 14:28:41.353] 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 14:28:41.354] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:28:41.354] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:28:41.354] INFO sqlite@v1.5.5/migrator.go:368 [506.2µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server" -[2024-03-11 14:28:41.355] INFO sqlite@v1.5.5/migrator.go:413 [595.1µ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 14:28:41.355] 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 14:28:41.355] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:28:41.357] INFO sqlite@v1.5.5/migrator.go:423 [1.1604ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:28:41.359] 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 14:28:41.359] 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 14:28:41.359] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:28:41.360] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:28:41.360] 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 14:28:41.361] INFO sqlite@v1.5.5/migrator.go:413 [543.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` 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 14:28:41.361] 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 14:28:41.361] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:28:41.362] INFO sqlite@v1.5.5/migrator.go:423 [1.1422ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:28:41.364] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:28:41.365] 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 14:28:41.366] INFO sqlite@v1.5.5/migrator.go:413 [599.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` 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 14:28:41.366] 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 14:28:41.366] INFO sqlite@v1.5.5/migrator.go:423 [571.6µs] [rows:1] DROP TABLE `t_wg_client` -[2024-03-11 14:28:41.368] INFO sqlite@v1.5.5/migrator.go:423 [1.0849ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:28:41.369] 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 14:28:41.370] INFO sqlite@v1.5.5/migrator.go:219 [518µ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 14:28:41.370] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:28:41.370] 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 14:28:41.370] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:28:41.370] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:28:41.370] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:28:52.138] INFO repository/user.go:44 [635.7µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:28:52.139] INFO repository/client.go:33 [0s] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10 -[2024-03-11 14:28:52.139] INFO repository/client.go:33 [531.5µs] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id -[2024-03-11 14:31:14.893] INFO repository/user.go:44 [783.7µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:31:14.896] INFO repository/server.go:63 [2.2315ms] [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 14:31:14.894" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:31:14.916] INFO callbacks/preload.go:261 [506.4µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 14:31:14.916] INFO callbacks/preload.go:261 [506.4µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:31:14.916] INFO repository/server.go:37 [1.3476ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 14:31:14.916] INFO repository/system.go:28 [584µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-11 14:39:15.280] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:39:15.291] 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 14:39:15.291] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:39:15.291] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:39:15.291] 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 14:39:15.293] INFO sqlite@v1.5.5/migrator.go:413 [1.1159ms] [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 14:39:15.293] 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 14:39:15.294] INFO sqlite@v1.5.5/migrator.go:423 [587.9µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:39:15.295] INFO sqlite@v1.5.5/migrator.go:423 [1.0886ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:39:15.296] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:39:15.297] 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 14:39:15.297] INFO sqlite@v1.5.5/migrator.go:413 [529.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 14:39:15.298] 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 14:39:15.298] INFO sqlite@v1.5.5/migrator.go:423 [561.1µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:39:15.300] INFO sqlite@v1.5.5/migrator.go:423 [1.4838ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:39:15.301] 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 14:39:15.301] 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 14:39:15.302] INFO sqlite@v1.5.5/migrator.go:125 [1.03ms] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:39:15.302] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:39:15.302] 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 14:39:15.303] INFO sqlite@v1.5.5/migrator.go:413 [988.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 14:39:15.303] 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 14:39:15.303] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:39:15.305] INFO sqlite@v1.5.5/migrator.go:423 [2.1652ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:39:15.307] 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 14:39:15.307] 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 14:39:15.308] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:39:15.308] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:39:15.308] 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 14:39:15.309] INFO sqlite@v1.5.5/migrator.go:413 [1.505ms] [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 14:39:15.309] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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 14:39:15.309] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:39:15.311] INFO sqlite@v1.5.5/migrator.go:423 [2.0124ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:39:15.312] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:39:15.312] 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 14:39:15.314] INFO sqlite@v1.5.5/migrator.go:413 [1.5049ms] [rows:2] 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 14:39:15.314] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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 14:39:15.315] INFO sqlite@v1.5.5/migrator.go:423 [1.0116ms] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:39:15.317] INFO sqlite@v1.5.5/migrator.go:423 [2.0005ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:39:15.318] ERROR migrator/migrator.go:371 Cannot add a NOT NULL column with default value NULL -> ALTER TABLE `t_wg_client` ADD `enabled` tinyint(1) NOT NULL -[2024-03-11 14:39:15.318] ERROR wireguard-dashboard/main.go:17 执行脚本失败: Cannot add a NOT NULL column with default value NULL -[2024-03-11 14:40:33.602] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:40:33.615] INFO migrator/migrator.go:73 [519.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 14:40:33.615] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:40:33.616] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:40:33.616] 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 14:40:33.617] INFO sqlite@v1.5.5/migrator.go:413 [1.0464ms] [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 14:40:33.617] 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 14:40:33.618] INFO sqlite@v1.5.5/migrator.go:423 [1.0053ms] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:40:33.618] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:40:33.621] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:40:33.621] 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 14:40:33.622] INFO sqlite@v1.5.5/migrator.go:413 [1.0005ms] [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 14:40:33.622] 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 14:40:33.623] INFO sqlite@v1.5.5/migrator.go:423 [1.0141ms] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:40:33.624] INFO sqlite@v1.5.5/migrator.go:423 [1.0451ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:40:33.626] 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 14:40:33.626] 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 14:40:33.626] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:40:33.626] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:40:33.626] 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 14:40:33.627] INFO sqlite@v1.5.5/migrator.go:413 [504.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 14:40:33.627] 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 14:40:33.628] INFO sqlite@v1.5.5/migrator.go:423 [1.0052ms] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:40:33.630] INFO sqlite@v1.5.5/migrator.go:423 [1.4471ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:40:33.632] 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 14:40:33.633] 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 14:40:33.633] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:40:33.633] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:40:33.633] 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 14:40:33.635] INFO sqlite@v1.5.5/migrator.go:413 [999.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` 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 14:40:33.635] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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 14:40:33.635] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:40:33.636] INFO sqlite@v1.5.5/migrator.go:423 [999.5µs] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:40:33.639] INFO sqlite@v1.5.5/migrator.go:79 [1.0001ms] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:40:33.639] 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 14:40:33.640] INFO sqlite@v1.5.5/migrator.go:413 [1.0831ms] [rows:2] 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 14:40:33.640] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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 14:40:33.641] INFO sqlite@v1.5.5/migrator.go:423 [991.5µs] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:40:33.642] INFO sqlite@v1.5.5/migrator.go:423 [999.5µs] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:40:33.646] INFO migrator/migrator.go:371 [2.0002ms] [rows:2] ALTER TABLE `t_wg_client` ADD `enabled` tinyint(1) -[2024-03-11 14:40:33.646] 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 14:40:33.647] 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 14:40:33.647] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:40:33.647] 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 14:40:33.647] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:40:33.648] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:40:33.648] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:40:58.481] INFO repository/user.go:44 [710.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:40:58.485] INFO repository/server.go:63 [2.7396ms] [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 14:40:58.482" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:40:58.504] INFO callbacks/preload.go:261 [505.6µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 14:40:58.504] INFO callbacks/preload.go:261 [505.6µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:40:58.504] INFO repository/server.go:37 [598.4µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 14:40:58.505] INFO repository/system.go:28 [525.9µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-11 14:40:58.505] ERROR component/wireguard.go:22 解析模板信息失败 -[2024-03-11 14:40:58.506] ERROR queues/async_wg_config.go:100 同步配置文件失败: template: wg0.conf:12: unexpected "!" in if -[2024-03-11 14:41:36.548] INFO repository/user.go:44 [0s] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:41:36.551] INFO repository/server.go:63 [2.8592ms] [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 14:41:36.548" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:41:36.571] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 14:41:36.571] INFO callbacks/preload.go:261 [508.9µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:41:36.571] INFO repository/server.go:37 [900.7µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 14:41:36.572] INFO repository/system.go:28 [534.2µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-11 14:41:37.521] ERROR component/wireguard.go:22 解析模板信息失败 -[2024-03-11 14:41:41.305] ERROR queues/async_wg_config.go:100 同步配置文件失败: template: wg0.conf:12: unexpected "!" in if -[2024-03-11 14:43:12.370] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:43:12.384] 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 14:43:12.384] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:43:12.384] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:43:12.384] 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 14:43:12.386] INFO sqlite@v1.5.5/migrator.go:413 [1.1391ms] [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 14:43:12.386] 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 14:43:12.387] INFO sqlite@v1.5.5/migrator.go:423 [598.9µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:43:12.388] INFO sqlite@v1.5.5/migrator.go:423 [579.8µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:43:12.390] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:43:12.390] 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 14:43:12.391] INFO sqlite@v1.5.5/migrator.go:413 [523.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 14:43:12.392] INFO sqlite@v1.5.5/migrator.go:423 [556.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 14:43:12.392] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:43:12.393] INFO sqlite@v1.5.5/migrator.go:423 [1.1288ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:43:12.395] INFO sqlite@v1.5.5/migrator.go:32 [521.9µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-11 14:43:12.395] 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 14:43:12.395] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:43:12.395] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:43:12.395] 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 14:43:12.396] INFO sqlite@v1.5.5/migrator.go:413 [627.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 14:43:12.397] INFO sqlite@v1.5.5/migrator.go:423 [523.3µ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 14:43:12.397] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:43:12.399] INFO sqlite@v1.5.5/migrator.go:423 [1.151ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:43:12.400] 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 14:43:12.401] INFO migrator/migrator.go:73 [54.4µ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 14:43:12.401] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:43:12.402] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:43:12.402] 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 14:43:12.403] INFO sqlite@v1.5.5/migrator.go:413 [524.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` varchar(36) NOT NULL,`enabled` tinyint(1),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 14:43:12.403] INFO sqlite@v1.5.5/migrator.go:423 [65.9µs] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 14:43:12.403] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:43:12.404] INFO sqlite@v1.5.5/migrator.go:423 [1.144ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:43:12.406] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:43:12.406] 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 14:43:12.407] INFO sqlite@v1.5.5/migrator.go:413 [580.2µs] [rows:2] 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,`enabled` tinyint(1),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 14:43:12.408] INFO sqlite@v1.5.5/migrator.go:423 [555.1µs] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 14:43:12.408] INFO sqlite@v1.5.5/migrator.go:423 [575.7µs] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:43:12.410] INFO sqlite@v1.5.5/migrator.go:423 [1.7044ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:43:12.412] INFO sqlite@v1.5.5/migrator.go:219 [522.5µ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 14:43:12.412] 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 14:43:12.412] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:43:12.412] 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 14:43:12.412] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:43:12.413] INFO script/script.go:61 [946.5µs] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:43:12.413] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:43:15.641] INFO repository/user.go:44 [208.4µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:43:15.644] INFO repository/server.go:63 [2.2543ms] [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 14:43:15.642" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:43:15.663] INFO callbacks/preload.go:261 [504.2µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 14:43:15.663] INFO callbacks/preload.go:261 [504.2µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:43:15.663] INFO repository/server.go:37 [951.9µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 14:43:15.664] 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 14:43:17.833] ERROR component/wireguard.go:22 解析模板信息失败 -[2024-03-11 14:43:22.087] ERROR queues/async_wg_config.go:100 同步配置文件失败: template: wg0.conf:12: function "Enabled" not defined -[2024-03-11 14:43:37.481] INFO sqlite@v1.5.5/migrator.go:32 [552.5µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:43:37.492] 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 14:43:37.493] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:43:37.493] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:43:37.493] 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 14:43:37.494] INFO sqlite@v1.5.5/migrator.go:413 [119.8µ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 14:43:37.494] 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 14:43:37.494] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:43:37.496] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:43:37.498] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:43:37.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 14:43:37.499] INFO sqlite@v1.5.5/migrator.go:413 [1.0964ms] [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 14:43:37.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 14:43:37.499] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:43:37.501] INFO sqlite@v1.5.5/migrator.go:423 [999.2µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:43:37.503] 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 14:43:37.503] 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 14:43:37.503] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:43:37.503] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:43:37.503] 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 14:43:37.505] INFO sqlite@v1.5.5/migrator.go:413 [561.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 14:43:37.505] 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 14:43:37.505] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:43:37.506] INFO sqlite@v1.5.5/migrator.go:423 [1.7006ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:43:37.509] 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 14:43:37.509] 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 14:43:37.509] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:43:37.509] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:43:37.510] 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 14:43:37.511] INFO sqlite@v1.5.5/migrator.go:413 [569.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` varchar(36) NOT NULL,`enabled` tinyint(1),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 14:43:37.511] INFO sqlite@v1.5.5/migrator.go:423 [80.1µs] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 14:43:37.511] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:43:37.513] INFO sqlite@v1.5.5/migrator.go:423 [1.1048ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:43:37.514] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:43:37.515] 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 14:43:37.516] INFO sqlite@v1.5.5/migrator.go:413 [523.7µs] [rows:2] 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,`enabled` tinyint(1),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 14:43:37.516] INFO sqlite@v1.5.5/migrator.go:423 [546.4µs] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 14:43:37.517] INFO sqlite@v1.5.5/migrator.go:423 [588.8µs] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:43:37.518] INFO sqlite@v1.5.5/migrator.go:423 [1.6322ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:43:37.520] 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 14:43:37.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 14:43:37.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 14:43:37.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 14:43:37.521] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:43:37.521] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:43:37.521] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:43:40.149] INFO repository/user.go:44 [321.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:43:40.152] INFO repository/server.go:63 [2.5965ms] [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 14:43:40.15" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:43:40.171] INFO callbacks/preload.go:261 [505.5µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 14:43:40.171] INFO callbacks/preload.go:261 [505.5µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:43:40.171] INFO repository/server.go:37 [887.1µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 14:43:40.171] 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 14:44:40.869] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:44:40.881] INFO migrator/migrator.go:73 [1.0012ms] [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 14:44:40.881] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:44:40.881] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:44:40.882] INFO sqlite@v1.5.5/migrator.go:368 [1ms] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" -[2024-03-11 14:44:40.884] INFO sqlite@v1.5.5/migrator.go:413 [1.0939ms] [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 14:44:40.884] 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 14:44:40.884] INFO sqlite@v1.5.5/migrator.go:423 [525.6µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:44:40.885] INFO sqlite@v1.5.5/migrator.go:423 [1.1489ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:44:40.887] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:44:40.888] 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 14:44:40.889] INFO sqlite@v1.5.5/migrator.go:413 [584.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 14:44:40.889] 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 14:44:40.889] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:44:40.890] INFO sqlite@v1.5.5/migrator.go:423 [1.1759ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:44:40.892] 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 14:44:40.893] 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 14:44:40.893] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:44:40.893] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:44:40.893] 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 14:44:40.894] INFO sqlite@v1.5.5/migrator.go:413 [515µ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 14:44:40.894] 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 14:44:40.895] INFO sqlite@v1.5.5/migrator.go:423 [545.4µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:44:40.896] INFO sqlite@v1.5.5/migrator.go:423 [1.0638ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:44:40.898] 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 14:44:40.898] 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 14:44:40.898] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:44:40.898] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:44:40.898] 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 14:44:40.900] INFO sqlite@v1.5.5/migrator.go:413 [600.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` varchar(36) NOT NULL,`enabled` tinyint(1),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 14:44:40.900] INFO sqlite@v1.5.5/migrator.go:423 [511.1µs] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 14:44:40.900] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:44:40.902] INFO sqlite@v1.5.5/migrator.go:423 [1.7306ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:44:40.903] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:44:40.904] 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 14:44:40.904] INFO sqlite@v1.5.5/migrator.go:413 [65.9µs] [rows:2] 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,`enabled` tinyint(1),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 14:44:40.905] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 14:44:40.905] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:44:40.906] INFO sqlite@v1.5.5/migrator.go:423 [639.1µs] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:44:40.908] INFO sqlite@v1.5.5/migrator.go:219 [521.1µ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 14:44:40.908] 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 14:44:40.908] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:44:40.909] 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 14:44:40.909] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:44:40.909] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:44:40.909] INFO script/script.go:98 [87.9µs] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:44:45.700] INFO repository/user.go:44 [386.4µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:44:45.702] INFO repository/server.go:63 [2.1875ms] [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 14:44:45.7" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:44:45.723] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 14:44:45.723] INFO callbacks/preload.go:261 [551.3µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:44:45.723] INFO repository/server.go:37 [2.0581ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 14:44:45.723] 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 14:45:02.193] INFO repository/user.go:44 [578.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:45:02.196] INFO repository/server.go:63 [2.6634ms] [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 14:45:02.193" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:45:02.215] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 14:45:02.216] INFO callbacks/preload.go:261 [508.2µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:45:02.216] INFO repository/server.go:37 [967µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 14:45:02.216] 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 14:45:31.889] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:45:31.902] 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 14:45:31.902] INFO sqlite@v1.5.5/migrator.go:125 [61.6µs] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:45:31.902] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:45:31.902] 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 14:45:31.904] INFO sqlite@v1.5.5/migrator.go:413 [1.1162ms] [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 14:45:31.905] INFO sqlite@v1.5.5/migrator.go:423 [558.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 14:45:31.905] INFO sqlite@v1.5.5/migrator.go:423 [505.2µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:45:31.906] INFO sqlite@v1.5.5/migrator.go:423 [1.1879ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:45:31.908] INFO sqlite@v1.5.5/migrator.go:79 [554.5µs] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:45:31.908] 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 14:45:31.909] INFO sqlite@v1.5.5/migrator.go:413 [567.7µ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 14:45:31.909] 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 14:45:31.910] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:45:31.911] INFO sqlite@v1.5.5/migrator.go:423 [619.9µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:45:31.913] 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 14:45:31.913] 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 14:45:31.913] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:45:31.914] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:45:31.914] 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 14:45:31.915] INFO sqlite@v1.5.5/migrator.go:413 [519.1µ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 14:45:31.915] 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 14:45:31.915] INFO sqlite@v1.5.5/migrator.go:423 [539µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:45:31.917] INFO sqlite@v1.5.5/migrator.go:423 [1.6824ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:45:31.918] 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 14:45:31.918] 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 14:45:31.919] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:45:31.919] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:45:31.920] 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 14:45:31.921] INFO sqlite@v1.5.5/migrator.go:413 [519.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` varchar(36) NOT NULL,`enabled` tinyint(1),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 14:45:31.921] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 14:45:31.921] INFO sqlite@v1.5.5/migrator.go:423 [514.6µs] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:45:31.923] INFO sqlite@v1.5.5/migrator.go:423 [1.6233ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:45:31.925] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:45:31.925] 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 14:45:31.926] INFO sqlite@v1.5.5/migrator.go:413 [515.4µs] [rows:2] 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,`enabled` tinyint(1),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 14:45:31.926] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 14:45:31.927] INFO sqlite@v1.5.5/migrator.go:423 [558.8µs] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:45:31.928] INFO sqlite@v1.5.5/migrator.go:423 [1.729ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:45:31.930] 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 14:45:31.930] 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 14:45:31.930] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:45:31.931] INFO migrator/migrator.go:73 [83.1µ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 14:45:31.931] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:45:31.931] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:45:31.931] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:45:33.138] INFO repository/user.go:44 [586.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:45:33.141] INFO repository/server.go:63 [2.6069ms] [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 14:45:33.139" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:45:33.161] INFO callbacks/preload.go:261 [507.6µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 14:45:33.161] INFO callbacks/preload.go:261 [507.6µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:45:33.161] INFO repository/server.go:37 [1.3902ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 14:45:33.161] INFO repository/system.go:28 [532.6µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-11 14:48:25.310] INFO sqlite@v1.5.5/migrator.go:32 [532.9µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 14:48:25.322] 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 14:48:25.323] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 14:48:25.323] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:48:25.323] INFO sqlite@v1.5.5/migrator.go:368 [502.4µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" -[2024-03-11 14:48:25.325] INFO sqlite@v1.5.5/migrator.go:413 [1.1725ms] [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 14:48:25.325] INFO sqlite@v1.5.5/migrator.go:423 [527.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 14:48:25.325] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:48:25.326] INFO sqlite@v1.5.5/migrator.go:423 [651.2µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:48:25.328] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:48:25.328] 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 14:48:25.329] INFO sqlite@v1.5.5/migrator.go:413 [590µ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 14:48:25.330] INFO sqlite@v1.5.5/migrator.go:423 [602µ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 14:48:25.330] INFO sqlite@v1.5.5/migrator.go:423 [581.1µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 14:48:25.331] INFO sqlite@v1.5.5/migrator.go:423 [945.2µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 14:48:25.333] 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 14:48:25.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 14:48:25.333] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 14:48:25.333] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:48:25.333] 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 14:48:25.334] 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 14:48:25.335] INFO sqlite@v1.5.5/migrator.go:423 [1.1028ms] [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 14:48:25.336] INFO sqlite@v1.5.5/migrator.go:423 [564.7µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 14:48:25.337] INFO sqlite@v1.5.5/migrator.go:423 [1.0686ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 14:48:25.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 14:48:25.339] 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 14:48:25.339] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 14:48:25.339] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:48:25.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 14:48:25.341] INFO sqlite@v1.5.5/migrator.go:413 [1.0587ms] [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,`enabled` tinyint(1),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 14:48:25.341] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 14:48:25.341] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:48:25.343] INFO sqlite@v1.5.5/migrator.go:423 [1.124ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:48:25.344] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 14:48:25.344] 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 14:48:25.345] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:2] 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,`enabled` tinyint(1),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 14:48:25.346] INFO sqlite@v1.5.5/migrator.go:423 [81.3µs] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 14:48:25.346] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 14:48:25.349] INFO sqlite@v1.5.5/migrator.go:423 [2.2094ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 14:48:25.350] 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 14:48:25.350] 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 14:48:25.350] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 14:48:25.350] 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 14:48:25.351] INFO sqlite@v1.5.5/migrator.go:125 [1.5459ms] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 14:48:25.351] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 14:48:25.351] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 14:48:30.155] INFO repository/user.go:44 [433.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:48:30.158] INFO repository/server.go:63 [2.618ms] [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 14:48:30.155" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:48:30.177] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 14:48:30.177] INFO callbacks/preload.go:261 [504.2µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 14:48:30.178] INFO repository/server.go:37 [1.6475ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 14:48:30.179] INFO repository/system.go:28 [521.4µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-11 14:48:45.903] INFO repository/user.go:44 [603.2µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 14:48:45.903] INFO repository/client.go:33 [504.5µs] [rows:2] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.enabled,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10 -[2024-03-11 14:48:45.904] INFO repository/client.go:33 [521.5µs] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id -[2024-03-11 15:20:19.427] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 15:20:19.440] 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 15:20:19.440] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 15:20:19.442] INFO sqlite@v1.5.5/migrator.go:79 [1.5461ms] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:20:19.442] 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 15:20:19.444] INFO sqlite@v1.5.5/migrator.go:413 [1.1123ms] [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 15:20:19.444] 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 15:20:19.444] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 15:20:19.445] INFO sqlite@v1.5.5/migrator.go:423 [1.1598ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 15:20:19.447] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:20:19.448] 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 15:20:19.448] INFO sqlite@v1.5.5/migrator.go:413 [607.6µ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 15:20:19.449] 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 15:20:19.449] INFO sqlite@v1.5.5/migrator.go:423 [602.5µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 15:20:19.451] INFO sqlite@v1.5.5/migrator.go:423 [1.2027ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 15:20:19.453] INFO sqlite@v1.5.5/migrator.go:32 [54.2µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server" -[2024-03-11 15:20:19.453] 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 15:20:19.454] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 15:20:19.454] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:20:19.454] 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 15:20:19.455] INFO sqlite@v1.5.5/migrator.go:413 [534µ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 15:20:19.456] INFO sqlite@v1.5.5/migrator.go:423 [67.2µ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 15:20:19.456] INFO sqlite@v1.5.5/migrator.go:423 [555.1µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 15:20:19.458] INFO sqlite@v1.5.5/migrator.go:423 [1.7243ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 15:20:19.460] 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 15:20:19.460] 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 15:20:19.460] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 15:20:19.461] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:20:19.461] 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 15:20:19.463] INFO sqlite@v1.5.5/migrator.go:413 [1.0465ms] [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,`enabled` tinyint(1),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 15:20:19.463] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 15:20:19.463] INFO sqlite@v1.5.5/migrator.go:423 [532.2µs] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 15:20:19.465] INFO sqlite@v1.5.5/migrator.go:423 [1.6818ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 15:20:19.467] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:20:19.468] 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 15:20:19.469] INFO sqlite@v1.5.5/migrator.go:413 [504.3µs] [rows:2] 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,`enabled` tinyint(1),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 15:20:19.469] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 15:20:19.470] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 15:20:19.471] INFO sqlite@v1.5.5/migrator.go:423 [1.5696ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 15:20:19.474] 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 15:20:19.474] 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 15:20:19.474] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 15:20:19.475] INFO migrator/migrator.go:73 [1.0049ms] [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 15:20:19.475] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 15:20:19.475] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 15:20:19.475] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 15:20:25.702] INFO repository/user.go:44 [110.9µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 15:20:25.705] INFO repository/server.go:63 [2.1023ms] [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 15:20:25.703" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:20:25.725] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 15:20:25.725] INFO callbacks/preload.go:261 [1.0321ms] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:20:25.725] INFO repository/server.go:37 [1.8835ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 15:20:25.726] INFO repository/system.go:28 [523.6µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-11 15:20:36.143] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 15:20:36.156] 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 15:20:36.156] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 15:20:36.156] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:20:36.156] 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 15:20:36.158] INFO sqlite@v1.5.5/migrator.go:413 [998.1µ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 15:20:36.158] 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 15:20:36.158] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 15:20:36.159] INFO sqlite@v1.5.5/migrator.go:423 [1.0002ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 15:20:36.162] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:20:36.162] 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 15:20:36.163] INFO sqlite@v1.5.5/migrator.go:413 [535.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 15:20:36.163] 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 15:20:36.163] INFO sqlite@v1.5.5/migrator.go:423 [514.5µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 15:20:36.165] INFO sqlite@v1.5.5/migrator.go:423 [1.0701ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 15:20:36.166] 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 15:20:36.166] 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 15:20:36.167] INFO sqlite@v1.5.5/migrator.go:125 [64.9µs] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 15:20:36.167] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:20:36.167] 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 15:20:36.168] INFO sqlite@v1.5.5/migrator.go:413 [606.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 15:20:36.168] 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 15:20:36.168] INFO sqlite@v1.5.5/migrator.go:423 [503.5µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 15:20:36.170] INFO sqlite@v1.5.5/migrator.go:423 [1.7259ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 15:20:36.172] 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 15:20:36.172] 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 15:20:36.172] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 15:20:36.172] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:20:36.173] 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 15:20:36.174] INFO sqlite@v1.5.5/migrator.go:413 [534.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` varchar(36) NOT NULL,`enabled` tinyint(1),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 15:20:36.175] INFO sqlite@v1.5.5/migrator.go:423 [575.5µs] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 15:20:36.175] INFO sqlite@v1.5.5/migrator.go:423 [518.3µs] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 15:20:36.177] INFO sqlite@v1.5.5/migrator.go:423 [1.661ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 15:20:36.178] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:20:36.178] 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 15:20:36.180] INFO sqlite@v1.5.5/migrator.go:413 [521.9µs] [rows:2] 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,`enabled` tinyint(1),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 15:20:36.180] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 15:20:36.180] INFO sqlite@v1.5.5/migrator.go:423 [558.2µs] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 15:20:36.182] INFO sqlite@v1.5.5/migrator.go:423 [1.7029ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 15:20:36.184] INFO sqlite@v1.5.5/migrator.go:219 [66.1µ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 15:20:36.184] 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 15:20:36.184] INFO sqlite@v1.5.5/migrator.go:32 [522µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 15:20:36.184] 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 15:20:36.184] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 15:20:36.185] INFO script/script.go:61 [503µs] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 15:20:36.185] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 15:20:37.209] INFO repository/user.go:44 [407.2µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 15:20:37.213] INFO repository/server.go:63 [3.927ms] [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 15:20:37.209" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:20:37.234] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 15:20:37.234] INFO callbacks/preload.go:261 [506.6µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:20:37.234] INFO repository/server.go:37 [1.2413ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 15:20:37.234] 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 15:46:46.381] INFO sqlite@v1.5.5/migrator.go:32 [999.9µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 15:46:46.393] 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 15:46:46.394] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 15:46:46.394] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:46:46.394] INFO sqlite@v1.5.5/migrator.go:368 [519µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" -[2024-03-11 15:46:46.396] INFO sqlite@v1.5.5/migrator.go:413 [1.6379ms] [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 15:46:46.396] 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 15:46:46.396] INFO sqlite@v1.5.5/migrator.go:423 [514.4µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 15:46:46.398] INFO sqlite@v1.5.5/migrator.go:423 [1.0595ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 15:46:46.400] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:46:46.400] 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 15:46:46.401] INFO sqlite@v1.5.5/migrator.go:413 [540.6µ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 15:46:46.401] INFO sqlite@v1.5.5/migrator.go:423 [542.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 15:46:46.402] INFO sqlite@v1.5.5/migrator.go:423 [506µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 15:46:46.403] INFO sqlite@v1.5.5/migrator.go:423 [1.0853ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 15:46:46.405] 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 15:46:46.405] 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 15:46:46.406] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 15:46:46.406] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:46:46.406] 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 15:46:46.407] INFO sqlite@v1.5.5/migrator.go:413 [546.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 15:46:46.407] INFO sqlite@v1.5.5/migrator.go:423 [519.9µ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 15:46:46.408] INFO sqlite@v1.5.5/migrator.go:423 [552.1µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 15:46:46.409] INFO sqlite@v1.5.5/migrator.go:423 [1.6173ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 15:46:46.411] 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 15:46:46.412] INFO migrator/migrator.go:73 [531.8µ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 15:46:46.412] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 15:46:46.412] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:46:46.412] 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 15:46:46.413] INFO sqlite@v1.5.5/migrator.go:413 [525.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` varchar(36) NOT NULL,`enabled` tinyint(1),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 15:46:46.414] INFO sqlite@v1.5.5/migrator.go:423 [553.8µs] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 15:46:46.414] INFO sqlite@v1.5.5/migrator.go:423 [543.7µs] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 15:46:46.416] INFO sqlite@v1.5.5/migrator.go:423 [1.62ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 15:46:46.418] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:46:46.418] 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 15:46:46.419] INFO sqlite@v1.5.5/migrator.go:413 [545.8µs] [rows:2] 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,`enabled` tinyint(1),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 15:46:46.419] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 15:46:46.420] INFO sqlite@v1.5.5/migrator.go:423 [549.6µs] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 15:46:46.421] INFO sqlite@v1.5.5/migrator.go:423 [1.073ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 15:46:46.422] 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 15:46:46.423] 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 15:46:46.423] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 15:46:46.423] 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 15:46:46.423] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 15:46:46.423] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 15:46:46.425] INFO script/script.go:98 [63.1µs] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 15:47:09.168] INFO repository/user.go:44 [637µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 15:47:09.171] INFO repository/server.go:63 [3.1582ms] [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 15:47:09.168" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:47:09.191] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 15:47:09.191] INFO callbacks/preload.go:261 [504µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:47:09.191] INFO repository/server.go:37 [1.2724ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 15:47:09.192] INFO repository/system.go:28 [521.4µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-11 15:47:54.814] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 15:47:54.827] INFO migrator/migrator.go:73 [52.9µ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 15:47:54.827] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 15:47:54.827] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:47:54.827] 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 15:47:54.828] INFO sqlite@v1.5.5/migrator.go:413 [578.5µ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 15:47:54.829] INFO sqlite@v1.5.5/migrator.go:423 [521.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 15:47:54.829] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 15:47:54.830] INFO sqlite@v1.5.5/migrator.go:423 [644.3µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 15:47:54.832] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:47:54.832] 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 15:47:54.833] INFO sqlite@v1.5.5/migrator.go:413 [565.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 15:47:54.833] INFO sqlite@v1.5.5/migrator.go:423 [537.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 15:47:54.833] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 15:47:54.835] INFO sqlite@v1.5.5/migrator.go:423 [1.133ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 15:47:54.836] 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 15:47:54.837] INFO migrator/migrator.go:73 [73µ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 15:47:54.837] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 15:47:54.838] INFO sqlite@v1.5.5/migrator.go:79 [57.1µs] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:47:54.838] 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 15:47:54.839] INFO sqlite@v1.5.5/migrator.go:413 [553µ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 15:47:54.839] 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 15:47:54.839] INFO sqlite@v1.5.5/migrator.go:423 [570.1µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 15:47:54.841] INFO sqlite@v1.5.5/migrator.go:423 [1.7912ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 15:47:54.842] 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 15:47:54.843] INFO migrator/migrator.go:73 [551.5µ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 15:47:54.843] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 15:47:54.843] INFO sqlite@v1.5.5/migrator.go:79 [61µs] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:47:54.843] 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 15:47:54.844] INFO sqlite@v1.5.5/migrator.go:413 [598µ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,`enabled` tinyint(1),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 15:47:54.844] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 15:47:54.845] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 15:47:54.847] INFO sqlite@v1.5.5/migrator.go:423 [1.7086ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 15:47:54.848] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:47:54.848] 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 15:47:54.850] INFO sqlite@v1.5.5/migrator.go:413 [591µs] [rows:2] 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,`enabled` tinyint(1),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 15:47:54.851] INFO sqlite@v1.5.5/migrator.go:423 [521.8µs] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 15:47:54.851] INFO sqlite@v1.5.5/migrator.go:423 [551.7µs] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 15:47:54.852] INFO sqlite@v1.5.5/migrator.go:423 [1.1661ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 15:47:54.853] 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 15:47:54.853] 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 15:47:54.855] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 15:47:54.855] 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 15:47:54.855] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 15:47:54.855] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 15:47:54.855] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 15:47:57.696] INFO repository/user.go:44 [987.3µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 15:47:57.698] INFO repository/server.go:63 [2.1737ms] [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 15:47:57.696" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:47:57.718] INFO callbacks/preload.go:261 [505.4µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 15:47:57.718] INFO callbacks/preload.go:261 [505.4µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:47:57.718] INFO repository/server.go:37 [1.3592ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 15:47:57.718] INFO repository/system.go:28 [530.1µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-11 15:48:11.267] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 15:48:11.280] 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 15:48:11.281] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 15:48:11.281] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:48:11.281] 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 15:48:11.282] INFO sqlite@v1.5.5/migrator.go:413 [645.4µ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 15:48:11.283] 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 15:48:11.284] INFO sqlite@v1.5.5/migrator.go:423 [540.4µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 15:48:11.284] INFO sqlite@v1.5.5/migrator.go:423 [723.3µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 15:48:11.286] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:48:11.287] INFO sqlite@v1.5.5/migrator.go:368 [502.6µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user" -[2024-03-11 15:48:11.287] INFO sqlite@v1.5.5/migrator.go:413 [611.7µ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 15:48:11.288] INFO sqlite@v1.5.5/migrator.go:423 [54.9µ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 15:48:11.288] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 15:48:11.290] INFO sqlite@v1.5.5/migrator.go:423 [1.144ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 15:48:11.292] 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 15:48:11.292] INFO migrator/migrator.go:73 [54.4µ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 15:48:11.292] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 15:48:11.293] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:48:11.293] 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 15:48:11.294] INFO sqlite@v1.5.5/migrator.go:413 [564.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 15:48:11.294] 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 15:48:11.294] INFO sqlite@v1.5.5/migrator.go:423 [621.1µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 15:48:11.296] INFO sqlite@v1.5.5/migrator.go:423 [1.1748ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 15:48:11.297] 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 15:48:11.297] 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 15:48:11.298] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 15:48:11.298] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:48:11.298] 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 15:48:11.299] INFO sqlite@v1.5.5/migrator.go:413 [587.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` varchar(36) NOT NULL,`enabled` tinyint(1),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 15:48:11.300] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 15:48:11.300] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 15:48:11.301] INFO sqlite@v1.5.5/migrator.go:423 [618.5µs] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 15:48:11.302] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:48:11.302] 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 15:48:11.303] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:2] 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,`enabled` tinyint(1),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 15:48:11.303] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 15:48:11.305] INFO sqlite@v1.5.5/migrator.go:423 [1.6006ms] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 15:48:11.306] INFO sqlite@v1.5.5/migrator.go:423 [1.0708ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 15:48:11.308] 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 15:48:11.309] 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 15:48:11.309] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 15:48:11.309] 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 15:48:11.309] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 15:48:11.309] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 15:48:11.309] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 15:48:13.325] INFO repository/user.go:44 [902.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 15:48:13.327] INFO repository/server.go:63 [2.1308ms] [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 15:48:13.325" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:48:13.347] INFO callbacks/preload.go:261 [503.6µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 15:48:13.347] INFO callbacks/preload.go:261 [503.6µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:48:13.347] INFO repository/server.go:37 [813.6µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 15:48:13.348] INFO repository/system.go:28 [522.8µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-11 15:49:12.581] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user" -[2024-03-11 15:49:12.594] 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 15:49:12.595] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1 -[2024-03-11 15:49:12.595] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:49:12.595] 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 15:49:12.596] INFO sqlite@v1.5.5/migrator.go:413 [1.0446ms] [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 15:49:12.597] 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 15:49:12.597] INFO sqlite@v1.5.5/migrator.go:423 [572.6µs] [rows:1] DROP TABLE `t_user` -[2024-03-11 15:49:12.598] INFO sqlite@v1.5.5/migrator.go:423 [1.1013ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 15:49:12.600] INFO sqlite@v1.5.5/migrator.go:79 [76.8µs] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:49:12.600] 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 15:49:12.601] INFO sqlite@v1.5.5/migrator.go:413 [523.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 15:49:12.601] 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 15:49:12.602] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user` -[2024-03-11 15:49:12.603] INFO sqlite@v1.5.5/migrator.go:423 [1.0366ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user` -[2024-03-11 15:49:12.604] 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 15:49:12.605] 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 15:49:12.605] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1 -[2024-03-11 15:49:12.605] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:49:12.605] 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 15:49:12.606] INFO sqlite@v1.5.5/migrator.go:413 [545.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 15:49:12.606] 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 15:49:12.607] INFO sqlite@v1.5.5/migrator.go:423 [538.2µs] [rows:1] DROP TABLE `t_wg_server` -[2024-03-11 15:49:12.608] INFO sqlite@v1.5.5/migrator.go:423 [1.0377ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server` -[2024-03-11 15:49:12.610] 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 15:49:12.610] 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 15:49:12.610] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1 -[2024-03-11 15:49:12.610] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:49:12.611] 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 15:49:12.612] INFO sqlite@v1.5.5/migrator.go:413 [518.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,`enabled` tinyint(1),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 15:49:12.612] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 15:49:12.612] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 15:49:12.614] INFO sqlite@v1.5.5/migrator.go:423 [1.5882ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 15:49:12.615] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys -[2024-03-11 15:49:12.615] 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 15:49:12.616] INFO sqlite@v1.5.5/migrator.go:413 [530.6µs] [rows:2] 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,`enabled` tinyint(1),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 15:49:12.617] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] 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`,`enabled`) 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`,`enabled` FROM `t_wg_client` -[2024-03-11 15:49:12.617] INFO sqlite@v1.5.5/migrator.go:423 [528.2µs] [rows:2] DROP TABLE `t_wg_client` -[2024-03-11 15:49:12.619] INFO sqlite@v1.5.5/migrator.go:423 [1.0588ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client` -[2024-03-11 15:49:12.620] 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 15:49:12.620] 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 15:49:12.621] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting" -[2024-03-11 15:49:12.621] 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 15:49:12.621] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1 -[2024-03-11 15:49:12.621] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1 -[2024-03-11 15:49:12.621] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server` -[2024-03-11 15:49:19.295] INFO repository/user.go:44 [122.1µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 15:49:19.297] INFO repository/server.go:63 [2.1076ms] [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 15:49:19.295" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:49:19.317] INFO callbacks/preload.go:261 [506.7µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 15:49:19.317] INFO callbacks/preload.go:261 [506.7µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:49:19.317] INFO repository/server.go:37 [1.5703ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 15:49:19.318] INFO repository/system.go:28 [575µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1 -[2024-03-11 15:49:23.748] INFO repository/user.go:44 [216.2µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1 -[2024-03-11 15:49:23.751] INFO repository/server.go:63 [2.3822ms] [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 15:49:23.749" WHERE id = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:49:23.769] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8" -[2024-03-11 15:49:23.770] INFO callbacks/preload.go:261 [558.8µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a" -[2024-03-11 15:49:23.770] INFO repository/server.go:37 [1.5213ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1 -[2024-03-11 15:49:23.770] INFO repository/system.go:28 [503.7µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1