wireguard-dashboard/logs/runtime-hyxc.log

1835 lines
387 KiB
Plaintext

[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`