🎨新增客户端状态字段
This commit is contained in:
parent
16799ee5d8
commit
71d6090f94
34
http/api/client.go
Normal file
34
http/api/client.go
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"wireguard-dashboard/http/param"
|
||||||
|
"wireguard-dashboard/repository"
|
||||||
|
"wireguard-dashboard/utils"
|
||||||
|
)
|
||||||
|
|
||||||
|
type clients struct{}
|
||||||
|
|
||||||
|
func Client() clients {
|
||||||
|
return clients{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// List
|
||||||
|
// @description: 客户端列表
|
||||||
|
// @receiver clients
|
||||||
|
// @param c
|
||||||
|
func (clients) List(c *gin.Context) {
|
||||||
|
var p param.ClientList
|
||||||
|
if err := c.ShouldBind(&p); err != nil {
|
||||||
|
utils.GinResponse(c).FailedWithErr("参数错误", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
data, total, err := repository.Client().List(p)
|
||||||
|
if err != nil {
|
||||||
|
utils.GinResponse(c).FailedWithMsg("获取失败")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
utils.GinResponse(c).OkWithPage(data, total, p.Current, p.Size)
|
||||||
|
}
|
7
http/param/client.go
Normal file
7
http/param/client.go
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package param
|
||||||
|
|
||||||
|
// ClientList
|
||||||
|
// @description: 客户端列表
|
||||||
|
type ClientList struct {
|
||||||
|
page
|
||||||
|
}
|
@ -3125,3 +3125,872 @@
|
|||||||
[2024-03-11 11:27:54.168] INFO callbacks/preload.go:261 [515.3µs] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a"
|
[2024-03-11 11:27:54.168] INFO callbacks/preload.go:261 [515.3µs] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
[2024-03-11 11:27:54.168] INFO repository/server.go:37 [591.5µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1
|
[2024-03-11 11:27:54.168] INFO repository/server.go:37 [591.5µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1
|
||||||
[2024-03-11 11:27:54.168] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1
|
[2024-03-11 11:27:54.168] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1
|
||||||
|
[2024-03-11 11:29:30.567] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 11:29:30.575] INFO migrator/migrator.go:73 [1.0022ms] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 11:29:30.575] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 11:29:30.575] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 11:29:30.575] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 11:29:30.577] INFO sqlite@v1.5.5/migrator.go:413 [1.0886ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 11:29:30.577] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 11:29:30.577] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 11:29:30.577] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 11:29:30.579] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 11:29:30.579] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 11:29:30.580] INFO sqlite@v1.5.5/migrator.go:413 [1.1553ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 11:29:30.580] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 11:29:30.580] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 11:29:30.580] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 11:29:30.582] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 11:29:30.582] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 11:29:30.582] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 11:29:30.582] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 11:29:30.582] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 11:29:30.584] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 11:29:30.584] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 11:29:30.584] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 11:29:30.585] INFO sqlite@v1.5.5/migrator.go:423 [1.0811ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 11:29:30.586] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 11:29:30.586] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 11:29:30.587] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 11:29:30.587] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 11:29:30.587] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 11:29:30.588] INFO sqlite@v1.5.5/migrator.go:413 [1.1107ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 11:29:30.588] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 11:29:30.588] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 11:29:30.588] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 11:29:30.590] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 11:29:30.590] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 11:29:30.592] INFO sqlite@v1.5.5/migrator.go:413 [1.5512ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 11:29:30.592] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 11:29:30.592] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 11:29:30.592] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 11:29:30.594] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 11:29:30.594] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 11:29:30.594] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 11:29:30.595] INFO migrator/migrator.go:73 [69.7µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 11:29:30.595] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 11:29:30.595] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 11:29:30.595] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 11:29:34.384] INFO repository/user.go:44 [198.2µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 11:29:34.386] INFO repository/server.go:63 [2.5807ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:29:34.384" WHERE id = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 11:29:34.405] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8"
|
||||||
|
[2024-03-11 11:29:34.406] INFO callbacks/preload.go:261 [505.6µs] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 11:29:34.406] INFO repository/server.go:37 [1.1638ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1
|
||||||
|
[2024-03-11 11:29:34.407] INFO repository/system.go:28 [533.4µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1
|
||||||
|
[2024-03-11 11:36:13.036] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 11:36:13.049] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 11:36:13.050] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 11:36:13.050] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 11:36:13.050] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 11:36:13.051] INFO sqlite@v1.5.5/migrator.go:413 [1.3296ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 11:36:13.052] INFO sqlite@v1.5.5/migrator.go:423 [1.0013ms] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 11:36:13.052] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 11:36:13.053] INFO sqlite@v1.5.5/migrator.go:423 [1.4125ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 11:36:13.055] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 11:36:13.055] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 11:36:13.056] INFO sqlite@v1.5.5/migrator.go:413 [1.0763ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 11:36:13.056] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 11:36:13.057] INFO sqlite@v1.5.5/migrator.go:423 [520.5µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 11:36:13.059] INFO sqlite@v1.5.5/migrator.go:423 [2.2706ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 11:36:13.061] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 11:36:13.062] INFO migrator/migrator.go:73 [69.4µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 11:36:13.062] INFO sqlite@v1.5.5/migrator.go:125 [510.6µs] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 11:36:13.062] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 11:36:13.062] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 11:36:13.064] INFO sqlite@v1.5.5/migrator.go:413 [1.1774ms] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 11:36:13.064] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 11:36:13.065] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 11:36:13.066] INFO sqlite@v1.5.5/migrator.go:423 [1.1783ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 11:36:13.068] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 11:36:13.068] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 11:36:13.069] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 11:36:13.069] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 11:36:13.069] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 11:36:13.070] INFO sqlite@v1.5.5/migrator.go:413 [540.4µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 11:36:13.070] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 11:36:13.071] INFO sqlite@v1.5.5/migrator.go:423 [521µs] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 11:36:13.073] INFO sqlite@v1.5.5/migrator.go:423 [1.6442ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 11:36:13.074] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 11:36:13.074] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 11:36:13.075] INFO sqlite@v1.5.5/migrator.go:413 [523.8µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 11:36:13.076] INFO sqlite@v1.5.5/migrator.go:423 [545.9µs] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 11:36:13.076] INFO sqlite@v1.5.5/migrator.go:423 [601µs] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 11:36:13.078] INFO sqlite@v1.5.5/migrator.go:423 [1.1676ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 11:36:13.079] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 11:36:13.079] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 11:36:13.080] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 11:36:13.080] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 11:36:13.081] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 11:36:13.081] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 11:36:13.081] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 11:36:14.261] INFO repository/user.go:44 [253.2µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 11:36:14.265] INFO repository/server.go:63 [3.2704ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 11:36:14.261" WHERE id = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 11:36:14.284] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8"
|
||||||
|
[2024-03-11 11:36:14.285] INFO callbacks/preload.go:261 [633.7µs] [rows:1] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 11:36:14.285] INFO repository/server.go:37 [1.3974ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1
|
||||||
|
[2024-03-11 11:36:14.285] INFO repository/system.go:28 [518.5µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:22:09.027] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:22:09.040] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:22:09.040] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:22:09.040] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:22:09.041] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:22:09.042] INFO sqlite@v1.5.5/migrator.go:413 [1.0362ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:22:09.042] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:22:09.042] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:22:09.043] INFO sqlite@v1.5.5/migrator.go:423 [1.657ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:22:09.045] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:22:09.045] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:22:09.047] INFO sqlite@v1.5.5/migrator.go:413 [515.7µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:22:09.047] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:22:09.047] INFO sqlite@v1.5.5/migrator.go:423 [71.5µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:22:09.049] INFO sqlite@v1.5.5/migrator.go:423 [1.1693ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:22:09.050] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:22:09.051] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:22:09.051] INFO sqlite@v1.5.5/migrator.go:125 [505.8µs] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:22:09.051] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:22:09.051] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:22:09.052] INFO sqlite@v1.5.5/migrator.go:413 [526.5µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:22:09.052] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:22:09.053] INFO sqlite@v1.5.5/migrator.go:423 [518.2µs] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:22:09.055] INFO sqlite@v1.5.5/migrator.go:423 [2.1733ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:22:09.056] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:22:09.057] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:22:09.057] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:22:09.057] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:22:09.057] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:22:09.058] INFO sqlite@v1.5.5/migrator.go:413 [581.5µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:22:09.058] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:22:09.059] INFO sqlite@v1.5.5/migrator.go:423 [576.2µs] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:22:09.059] INFO sqlite@v1.5.5/migrator.go:423 [576.9µs] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:22:09.061] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:22:09.062] INFO sqlite@v1.5.5/migrator.go:368 [528.9µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:22:09.062] INFO sqlite@v1.5.5/migrator.go:413 [600.7µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:22:09.063] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:22:09.063] INFO sqlite@v1.5.5/migrator.go:423 [503.5µs] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:22:09.065] INFO sqlite@v1.5.5/migrator.go:423 [1.2187ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:22:09.066] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:22:09.066] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:22:09.067] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:22:09.067] INFO migrator/migrator.go:73 [544.7µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:22:09.067] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:22:09.067] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:22:09.068] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:22:39.992] INFO repository/user.go:44 [1.0001ms] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:23:25.053] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:23:25.067] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:23:25.067] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:23:25.067] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:23:25.068] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:23:25.069] INFO sqlite@v1.5.5/migrator.go:413 [1.0009ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:23:25.069] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:23:25.070] INFO sqlite@v1.5.5/migrator.go:423 [999.5µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:23:25.071] INFO sqlite@v1.5.5/migrator.go:423 [1ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:23:25.072] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:23:25.072] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:23:25.073] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:23:25.074] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:23:25.074] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:23:25.076] INFO sqlite@v1.5.5/migrator.go:423 [1.9983ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:23:25.079] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:23:25.079] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:23:25.079] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:23:25.079] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:23:25.079] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:23:25.080] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:23:25.080] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:23:25.081] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:23:25.082] INFO sqlite@v1.5.5/migrator.go:423 [1.0011ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:23:25.084] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:23:25.084] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:23:25.085] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:23:25.085] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:23:25.085] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:23:25.086] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:23:25.086] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:23:25.088] INFO sqlite@v1.5.5/migrator.go:423 [1.504ms] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:23:25.089] INFO sqlite@v1.5.5/migrator.go:423 [1.0719ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:23:25.091] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:23:25.091] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:23:25.092] INFO sqlite@v1.5.5/migrator.go:413 [520.5µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:23:25.093] INFO sqlite@v1.5.5/migrator.go:423 [520.6µs] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:23:25.093] INFO sqlite@v1.5.5/migrator.go:423 [525µs] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:23:25.095] INFO sqlite@v1.5.5/migrator.go:423 [1.5757ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:23:25.096] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:23:25.097] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:23:25.097] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:23:25.097] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:23:25.097] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:23:25.098] INFO script/script.go:61 [520.9µs] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:23:25.098] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:23:27.797] INFO repository/user.go:44 [522.1µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:23:49.904] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:23:49.917] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:23:49.918] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:23:49.918] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:23:49.918] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:23:49.920] INFO sqlite@v1.5.5/migrator.go:413 [1.1864ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:23:49.920] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:23:49.920] INFO sqlite@v1.5.5/migrator.go:423 [572.4µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:23:49.922] INFO sqlite@v1.5.5/migrator.go:423 [1.1071ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:23:49.924] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:23:49.924] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:23:49.925] INFO sqlite@v1.5.5/migrator.go:413 [518.4µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:23:49.925] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:23:49.925] INFO sqlite@v1.5.5/migrator.go:423 [550.7µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:23:49.926] INFO sqlite@v1.5.5/migrator.go:423 [1.1037ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:23:49.928] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:23:49.929] INFO migrator/migrator.go:73 [503.2µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:23:49.929] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:23:49.929] INFO sqlite@v1.5.5/migrator.go:79 [536.9µs] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:23:49.929] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:23:49.930] INFO sqlite@v1.5.5/migrator.go:413 [1.0644ms] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:23:49.930] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:23:49.931] INFO sqlite@v1.5.5/migrator.go:423 [543.7µs] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:23:49.932] INFO sqlite@v1.5.5/migrator.go:423 [1.0557ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:23:49.934] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:23:49.934] INFO migrator/migrator.go:73 [530.4µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:23:49.934] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:23:49.935] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:23:49.935] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:23:49.936] INFO sqlite@v1.5.5/migrator.go:413 [517.2µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:23:49.936] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:23:49.936] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:23:49.937] INFO sqlite@v1.5.5/migrator.go:423 [1.0798ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:23:49.939] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:23:49.939] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:23:49.940] INFO sqlite@v1.5.5/migrator.go:413 [535.6µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:23:49.941] INFO sqlite@v1.5.5/migrator.go:423 [524.6µs] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:23:49.941] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:23:49.942] INFO sqlite@v1.5.5/migrator.go:423 [544.3µs] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:23:49.943] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:23:49.944] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:23:49.944] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:23:49.944] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:23:49.944] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:23:49.945] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:23:49.945] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:23:50.714] INFO repository/user.go:44 [865.3µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:23:50.714] ERROR repository/client.go:32 near "t_user": syntax error -> SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc t_user as tu ON twc.user_id = tu.id LIMIT 10
|
||||||
|
[2024-03-11 14:24:28.176] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:24:28.189] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:24:28.189] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:24:28.189] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:24:28.190] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:24:28.190] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:24:28.191] INFO sqlite@v1.5.5/migrator.go:423 [1.0044ms] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:24:28.191] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:24:28.192] INFO sqlite@v1.5.5/migrator.go:423 [1.0258ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:24:28.194] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:24:28.194] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:24:28.196] INFO sqlite@v1.5.5/migrator.go:413 [1.043ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:24:28.196] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:24:28.197] INFO sqlite@v1.5.5/migrator.go:423 [1.0014ms] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:24:28.199] INFO sqlite@v1.5.5/migrator.go:423 [1.9969ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:24:28.200] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:24:28.200] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:24:28.201] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:24:28.201] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:24:28.201] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:24:28.202] INFO sqlite@v1.5.5/migrator.go:413 [998.4µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:24:28.202] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:24:28.202] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:24:28.204] INFO sqlite@v1.5.5/migrator.go:423 [999.8µs] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:24:28.205] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:24:28.205] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:24:28.206] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:24:28.207] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:24:28.207] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:24:28.208] INFO sqlite@v1.5.5/migrator.go:413 [1.0044ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:24:28.208] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:24:28.209] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:24:28.210] INFO sqlite@v1.5.5/migrator.go:423 [1.5027ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:24:28.212] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:24:28.212] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:24:28.213] INFO sqlite@v1.5.5/migrator.go:413 [518.3µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:24:28.214] INFO sqlite@v1.5.5/migrator.go:423 [518µs] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:24:28.214] INFO sqlite@v1.5.5/migrator.go:423 [518.9µs] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:24:28.215] INFO sqlite@v1.5.5/migrator.go:423 [1.0742ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:24:28.217] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:24:28.217] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:24:28.217] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:24:28.218] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:24:28.218] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:24:28.218] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:24:28.218] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:24:40.141] INFO repository/user.go:44 [530.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:24:40.142] INFO repository/client.go:32 [0s] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10
|
||||||
|
[2024-03-11 14:24:40.142] INFO repository/client.go:32 [521.3µs] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id
|
||||||
|
[2024-03-11 14:26:09.503] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:26:09.515] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:26:09.515] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:26:09.516] INFO sqlite@v1.5.5/migrator.go:79 [1.004ms] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:26:09.516] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:26:09.518] INFO sqlite@v1.5.5/migrator.go:413 [1.0042ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:26:09.518] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:26:09.518] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:26:09.519] INFO sqlite@v1.5.5/migrator.go:423 [1.0433ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:26:09.521] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:26:09.521] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:26:09.522] INFO sqlite@v1.5.5/migrator.go:413 [584.6µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:26:09.523] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:26:09.523] INFO sqlite@v1.5.5/migrator.go:423 [519.4µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:26:09.524] INFO sqlite@v1.5.5/migrator.go:423 [1.0728ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:26:09.526] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:26:09.526] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:26:09.527] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:26:09.527] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:26:09.527] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:26:09.528] INFO sqlite@v1.5.5/migrator.go:413 [590.5µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:26:09.528] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:26:09.528] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:26:09.530] INFO sqlite@v1.5.5/migrator.go:423 [1.6267ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:26:09.531] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:26:09.531] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:26:09.532] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:26:09.532] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:26:09.533] INFO sqlite@v1.5.5/migrator.go:368 [522.1µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:26:09.534] INFO sqlite@v1.5.5/migrator.go:413 [550µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:26:09.534] INFO sqlite@v1.5.5/migrator.go:423 [172.2µs] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:26:09.534] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:26:09.536] INFO sqlite@v1.5.5/migrator.go:423 [1.586ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:26:09.539] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:26:09.539] INFO sqlite@v1.5.5/migrator.go:368 [538.2µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:26:09.540] INFO sqlite@v1.5.5/migrator.go:413 [539.6µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:26:09.540] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:26:09.541] INFO sqlite@v1.5.5/migrator.go:423 [570.6µs] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:26:09.542] INFO sqlite@v1.5.5/migrator.go:423 [1.5839ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:26:09.544] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:26:09.544] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:26:09.544] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:26:09.545] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:26:09.545] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:26:09.545] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:26:09.545] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:26:10.973] INFO repository/user.go:44 [1.4428ms] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:26:10.975] INFO repository/client.go:33 [1.0575ms] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10
|
||||||
|
[2024-03-11 14:26:10.975] INFO repository/client.go:33 [520.3µs] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id
|
||||||
|
[2024-03-11 14:26:38.701] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:26:38.714] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:26:38.714] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:26:38.715] INFO sqlite@v1.5.5/migrator.go:79 [51.4µs] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:26:38.715] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:26:38.716] INFO sqlite@v1.5.5/migrator.go:413 [1.0795ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:26:38.716] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:26:38.717] INFO sqlite@v1.5.5/migrator.go:423 [510.7µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:26:38.718] INFO sqlite@v1.5.5/migrator.go:423 [597.6µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:26:38.719] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:26:38.719] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:26:38.720] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:26:38.721] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:26:38.721] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:26:38.724] INFO sqlite@v1.5.5/migrator.go:423 [2.5321ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:26:38.726] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:26:38.726] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:26:38.727] INFO sqlite@v1.5.5/migrator.go:125 [988.7µs] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:26:38.727] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:26:38.727] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:26:38.728] INFO sqlite@v1.5.5/migrator.go:413 [1ms] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:26:38.728] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:26:38.728] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:26:38.729] INFO sqlite@v1.5.5/migrator.go:423 [1.5221ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:26:38.731] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:26:38.732] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:26:38.732] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:26:38.732] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:26:38.733] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:26:38.734] INFO sqlite@v1.5.5/migrator.go:413 [1.0007ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:26:38.734] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:26:38.735] INFO sqlite@v1.5.5/migrator.go:423 [999.3µs] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:26:38.736] INFO sqlite@v1.5.5/migrator.go:423 [1.007ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:26:38.737] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:26:38.737] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:26:38.740] INFO sqlite@v1.5.5/migrator.go:413 [941.4µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:26:38.740] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:26:38.741] INFO sqlite@v1.5.5/migrator.go:423 [999.1µs] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:26:38.742] INFO sqlite@v1.5.5/migrator.go:423 [1.0102ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:26:38.744] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:26:38.744] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:26:38.744] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:26:38.744] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:26:38.744] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:26:38.745] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:26:38.745] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:26:41.007] INFO repository/user.go:44 [1.0526ms] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:26:41.008] INFO repository/client.go:33 [0s] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10
|
||||||
|
[2024-03-11 14:26:41.008] INFO repository/client.go:33 [0s] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id
|
||||||
|
[2024-03-11 14:27:15.726] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:27:15.738] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:27:15.739] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:27:15.739] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:27:15.739] INFO sqlite@v1.5.5/migrator.go:368 [502.7µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:27:15.740] INFO sqlite@v1.5.5/migrator.go:413 [1.1542ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:27:15.740] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:27:15.741] INFO sqlite@v1.5.5/migrator.go:423 [564.3µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:27:15.742] INFO sqlite@v1.5.5/migrator.go:423 [1.1637ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:27:15.743] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:27:15.744] INFO sqlite@v1.5.5/migrator.go:368 [82.1µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:27:15.744] INFO sqlite@v1.5.5/migrator.go:413 [591.9µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:27:15.744] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:27:15.745] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:27:15.747] INFO sqlite@v1.5.5/migrator.go:423 [1.6939ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:27:15.748] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:27:15.748] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:27:15.748] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:27:15.749] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:27:15.749] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:27:15.750] INFO sqlite@v1.5.5/migrator.go:413 [583.2µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:27:15.750] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:27:15.750] INFO sqlite@v1.5.5/migrator.go:423 [525.8µs] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:27:15.751] INFO sqlite@v1.5.5/migrator.go:423 [1.0474ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:27:15.753] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:27:15.754] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:27:15.754] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:27:15.754] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:27:15.755] INFO sqlite@v1.5.5/migrator.go:368 [520µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:27:15.756] INFO sqlite@v1.5.5/migrator.go:413 [504.4µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:27:15.756] INFO sqlite@v1.5.5/migrator.go:423 [60.6µs] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:27:15.756] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:27:15.758] INFO sqlite@v1.5.5/migrator.go:423 [1.5819ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:27:15.760] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:27:15.760] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:27:15.762] INFO sqlite@v1.5.5/migrator.go:413 [1.0399ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:27:15.762] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:27:15.762] INFO sqlite@v1.5.5/migrator.go:423 [510.4µs] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:27:15.764] INFO sqlite@v1.5.5/migrator.go:423 [1.5267ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:27:15.765] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:27:15.765] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:27:15.765] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:27:15.765] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:27:15.766] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:27:15.766] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:27:15.766] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:27:20.636] INFO repository/user.go:44 [138.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:27:20.637] INFO repository/client.go:33 [527.8µs] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10
|
||||||
|
[2024-03-11 14:27:20.638] INFO repository/client.go:33 [0s] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id
|
||||||
|
[2024-03-11 14:27:27.603] INFO repository/user.go:44 [952.3µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:27:27.603] INFO repository/client.go:33 [0s] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10
|
||||||
|
[2024-03-11 14:27:27.604] INFO repository/client.go:33 [0s] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id
|
||||||
|
[2024-03-11 14:28:05.959] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:28:05.970] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:28:05.970] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:28:05.971] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:28:05.971] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:28:05.973] INFO sqlite@v1.5.5/migrator.go:413 [1.0732ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:28:05.973] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:28:05.973] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:28:05.974] INFO sqlite@v1.5.5/migrator.go:423 [1.0025ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:28:05.976] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:28:05.977] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:28:05.978] INFO sqlite@v1.5.5/migrator.go:413 [1.0403ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:28:05.978] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:28:05.978] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:28:05.979] INFO sqlite@v1.5.5/migrator.go:423 [1.096ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:28:05.981] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:28:05.982] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:28:05.982] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:28:05.982] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:28:05.982] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:28:05.983] INFO sqlite@v1.5.5/migrator.go:413 [1.004ms] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:28:05.983] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:28:05.983] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:28:05.985] INFO sqlite@v1.5.5/migrator.go:423 [1.0462ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:28:05.986] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:28:05.986] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:28:05.987] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:28:05.987] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:28:05.987] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:28:05.988] INFO sqlite@v1.5.5/migrator.go:413 [1.1062ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:28:05.988] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:28:05.989] INFO sqlite@v1.5.5/migrator.go:423 [1.0625ms] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:28:05.990] INFO sqlite@v1.5.5/migrator.go:423 [1.0938ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:28:05.991] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:28:05.991] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:28:05.992] INFO sqlite@v1.5.5/migrator.go:413 [0s] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:28:05.992] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:28:05.994] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:28:05.995] INFO sqlite@v1.5.5/migrator.go:423 [1.0787ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:28:05.996] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:28:05.996] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:28:05.997] INFO sqlite@v1.5.5/migrator.go:32 [1.0384ms] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:28:05.997] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:28:05.997] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:28:05.997] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:28:05.997] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:28:13.050] INFO repository/user.go:44 [482.3µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:28:13.051] INFO repository/client.go:33 [0s] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10
|
||||||
|
[2024-03-11 14:28:13.051] INFO repository/client.go:33 [0s] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id
|
||||||
|
[2024-03-11 14:28:41.330] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:28:41.341] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:28:41.341] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:28:41.341] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:28:41.341] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:28:41.343] INFO sqlite@v1.5.5/migrator.go:413 [1.0873ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:28:41.343] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:28:41.343] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:28:41.344] INFO sqlite@v1.5.5/migrator.go:423 [1.0928ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:28:41.345] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:28:41.345] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:28:41.348] INFO sqlite@v1.5.5/migrator.go:413 [535.6µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:28:41.348] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:28:41.349] INFO sqlite@v1.5.5/migrator.go:423 [536.7µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:28:41.351] INFO sqlite@v1.5.5/migrator.go:423 [1.791ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:28:41.353] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:28:41.353] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:28:41.354] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:28:41.354] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:28:41.354] INFO sqlite@v1.5.5/migrator.go:368 [506.2µs] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:28:41.355] INFO sqlite@v1.5.5/migrator.go:413 [595.1µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:28:41.355] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:28:41.355] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:28:41.357] INFO sqlite@v1.5.5/migrator.go:423 [1.1604ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:28:41.359] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:28:41.359] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:28:41.359] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:28:41.360] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:28:41.360] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:28:41.361] INFO sqlite@v1.5.5/migrator.go:413 [543.1µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:28:41.361] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:28:41.361] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:28:41.362] INFO sqlite@v1.5.5/migrator.go:423 [1.1422ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:28:41.364] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:28:41.365] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:28:41.366] INFO sqlite@v1.5.5/migrator.go:413 [599.8µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:28:41.366] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:28:41.366] INFO sqlite@v1.5.5/migrator.go:423 [571.6µs] [rows:1] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:28:41.368] INFO sqlite@v1.5.5/migrator.go:423 [1.0849ms] [rows:1] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:28:41.369] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:28:41.370] INFO sqlite@v1.5.5/migrator.go:219 [518µs] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:28:41.370] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:28:41.370] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:28:41.370] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:28:41.370] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:28:41.370] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:28:52.138] INFO repository/user.go:44 [635.7µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:28:52.139] INFO repository/client.go:33 [0s] [rows:1] SELECT twc.id,twc.created_at,twc.updated_at,twc.name,twc.email,twc.subnet_range,twc.ip_allocation,twc.allowed_ips,twc.extra_allowed_ips,twc.endpoint,twc.use_server_dns,twc.enable_after_creation,twc.keys as keys_str,tu.name as create_user FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id LIMIT 10
|
||||||
|
[2024-03-11 14:28:52.139] INFO repository/client.go:33 [531.5µs] [rows:1] SELECT count(*) FROM t_wg_client as twc LEFT JOIN t_user as tu ON twc.user_id = tu.id
|
||||||
|
[2024-03-11 14:31:14.893] INFO repository/user.go:44 [783.7µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:31:14.896] INFO repository/server.go:63 [2.2315ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 14:31:14.894" WHERE id = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:31:14.916] INFO callbacks/preload.go:261 [506.4µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8"
|
||||||
|
[2024-03-11 14:31:14.916] INFO callbacks/preload.go:261 [506.4µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:31:14.916] INFO repository/server.go:37 [1.3476ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:31:14.916] INFO repository/system.go:28 [584µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:39:15.280] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:39:15.291] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:39:15.291] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:39:15.291] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:39:15.291] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:39:15.293] INFO sqlite@v1.5.5/migrator.go:413 [1.1159ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:39:15.293] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:39:15.294] INFO sqlite@v1.5.5/migrator.go:423 [587.9µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:39:15.295] INFO sqlite@v1.5.5/migrator.go:423 [1.0886ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:39:15.296] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:39:15.297] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:39:15.297] INFO sqlite@v1.5.5/migrator.go:413 [529.1µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:39:15.298] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:39:15.298] INFO sqlite@v1.5.5/migrator.go:423 [561.1µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:39:15.300] INFO sqlite@v1.5.5/migrator.go:423 [1.4838ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:39:15.301] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:39:15.301] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:39:15.302] INFO sqlite@v1.5.5/migrator.go:125 [1.03ms] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:39:15.302] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:39:15.302] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:39:15.303] INFO sqlite@v1.5.5/migrator.go:413 [988.5µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:39:15.303] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:39:15.303] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:39:15.305] INFO sqlite@v1.5.5/migrator.go:423 [2.1652ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:39:15.307] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:39:15.307] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:39:15.308] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:39:15.308] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:39:15.308] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:39:15.309] INFO sqlite@v1.5.5/migrator.go:413 [1.505ms] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:39:15.309] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:39:15.309] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:39:15.311] INFO sqlite@v1.5.5/migrator.go:423 [2.0124ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:39:15.312] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:39:15.312] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:39:15.314] INFO sqlite@v1.5.5/migrator.go:413 [1.5049ms] [rows:2] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:39:15.314] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:39:15.315] INFO sqlite@v1.5.5/migrator.go:423 [1.0116ms] [rows:2] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:39:15.317] INFO sqlite@v1.5.5/migrator.go:423 [2.0005ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:39:15.318] ERROR migrator/migrator.go:371 Cannot add a NOT NULL column with default value NULL -> ALTER TABLE `t_wg_client` ADD `enabled` tinyint(1) NOT NULL
|
||||||
|
[2024-03-11 14:39:15.318] ERROR wireguard-dashboard/main.go:17 执行脚本失败: Cannot add a NOT NULL column with default value NULL
|
||||||
|
[2024-03-11 14:40:33.602] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:40:33.615] INFO migrator/migrator.go:73 [519.8µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:40:33.615] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:40:33.616] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:40:33.616] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:40:33.617] INFO sqlite@v1.5.5/migrator.go:413 [1.0464ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:40:33.617] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:40:33.618] INFO sqlite@v1.5.5/migrator.go:423 [1.0053ms] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:40:33.618] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:40:33.621] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:40:33.621] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:40:33.622] INFO sqlite@v1.5.5/migrator.go:413 [1.0005ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:40:33.622] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:40:33.623] INFO sqlite@v1.5.5/migrator.go:423 [1.0141ms] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:40:33.624] INFO sqlite@v1.5.5/migrator.go:423 [1.0451ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:40:33.626] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:40:33.626] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:40:33.626] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:40:33.626] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:40:33.626] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:40:33.627] INFO sqlite@v1.5.5/migrator.go:413 [504.8µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:40:33.627] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:40:33.628] INFO sqlite@v1.5.5/migrator.go:423 [1.0052ms] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:40:33.630] INFO sqlite@v1.5.5/migrator.go:423 [1.4471ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:40:33.632] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:40:33.633] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:40:33.633] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:40:33.633] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:40:33.633] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:40:33.635] INFO sqlite@v1.5.5/migrator.go:413 [999.4µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:40:33.635] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:40:33.635] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:40:33.636] INFO sqlite@v1.5.5/migrator.go:423 [999.5µs] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:40:33.639] INFO sqlite@v1.5.5/migrator.go:79 [1.0001ms] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:40:33.639] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:40:33.640] INFO sqlite@v1.5.5/migrator.go:413 [1.0831ms] [rows:2] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:40:33.640] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:40:33.641] INFO sqlite@v1.5.5/migrator.go:423 [991.5µs] [rows:2] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:40:33.642] INFO sqlite@v1.5.5/migrator.go:423 [999.5µs] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:40:33.646] INFO migrator/migrator.go:371 [2.0002ms] [rows:2] ALTER TABLE `t_wg_client` ADD `enabled` tinyint(1)
|
||||||
|
[2024-03-11 14:40:33.646] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:40:33.647] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:40:33.647] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:40:33.647] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:40:33.647] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:40:33.648] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:40:33.648] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:40:58.481] INFO repository/user.go:44 [710.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:40:58.485] INFO repository/server.go:63 [2.7396ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 14:40:58.482" WHERE id = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:40:58.504] INFO callbacks/preload.go:261 [505.6µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8"
|
||||||
|
[2024-03-11 14:40:58.504] INFO callbacks/preload.go:261 [505.6µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:40:58.504] INFO repository/server.go:37 [598.4µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:40:58.505] INFO repository/system.go:28 [525.9µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:40:58.505] ERROR component/wireguard.go:22 解析模板信息失败
|
||||||
|
[2024-03-11 14:40:58.506] ERROR queues/async_wg_config.go:100 同步配置文件失败: template: wg0.conf:12: unexpected "!" in if
|
||||||
|
[2024-03-11 14:41:36.548] INFO repository/user.go:44 [0s] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:41:36.551] INFO repository/server.go:63 [2.8592ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 14:41:36.548" WHERE id = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:41:36.571] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8"
|
||||||
|
[2024-03-11 14:41:36.571] INFO callbacks/preload.go:261 [508.9µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:41:36.571] INFO repository/server.go:37 [900.7µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:41:36.572] INFO repository/system.go:28 [534.2µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:41:37.521] ERROR component/wireguard.go:22 解析模板信息失败
|
||||||
|
[2024-03-11 14:41:41.305] ERROR queues/async_wg_config.go:100 同步配置文件失败: template: wg0.conf:12: unexpected "!" in if
|
||||||
|
[2024-03-11 14:43:12.370] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:43:12.384] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:43:12.384] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:43:12.384] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:43:12.384] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:43:12.386] INFO sqlite@v1.5.5/migrator.go:413 [1.1391ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:43:12.386] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:43:12.387] INFO sqlite@v1.5.5/migrator.go:423 [598.9µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:43:12.388] INFO sqlite@v1.5.5/migrator.go:423 [579.8µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:43:12.390] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:43:12.390] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:43:12.391] INFO sqlite@v1.5.5/migrator.go:413 [523.2µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:43:12.392] INFO sqlite@v1.5.5/migrator.go:423 [556.7µs] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:43:12.392] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:43:12.393] INFO sqlite@v1.5.5/migrator.go:423 [1.1288ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:43:12.395] INFO sqlite@v1.5.5/migrator.go:32 [521.9µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:43:12.395] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:43:12.395] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:43:12.395] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:43:12.395] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:43:12.396] INFO sqlite@v1.5.5/migrator.go:413 [627.4µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:43:12.397] INFO sqlite@v1.5.5/migrator.go:423 [523.3µs] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:43:12.397] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:43:12.399] INFO sqlite@v1.5.5/migrator.go:423 [1.151ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:43:12.400] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:43:12.401] INFO migrator/migrator.go:73 [54.4µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:43:12.401] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:43:12.402] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:43:12.402] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:43:12.403] INFO sqlite@v1.5.5/migrator.go:413 [524.2µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,`enabled` tinyint(1),PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:43:12.403] INFO sqlite@v1.5.5/migrator.go:423 [65.9µs] [rows:2] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:43:12.403] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:43:12.404] INFO sqlite@v1.5.5/migrator.go:423 [1.144ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:43:12.406] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:43:12.406] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:43:12.407] INFO sqlite@v1.5.5/migrator.go:413 [580.2µs] [rows:2] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,`enabled` tinyint(1),PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:43:12.408] INFO sqlite@v1.5.5/migrator.go:423 [555.1µs] [rows:2] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:43:12.408] INFO sqlite@v1.5.5/migrator.go:423 [575.7µs] [rows:2] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:43:12.410] INFO sqlite@v1.5.5/migrator.go:423 [1.7044ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:43:12.412] INFO sqlite@v1.5.5/migrator.go:219 [522.5µs] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:43:12.412] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:43:12.412] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:43:12.412] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:43:12.412] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:43:12.413] INFO script/script.go:61 [946.5µs] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:43:12.413] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:43:15.641] INFO repository/user.go:44 [208.4µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:43:15.644] INFO repository/server.go:63 [2.2543ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 14:43:15.642" WHERE id = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:43:15.663] INFO callbacks/preload.go:261 [504.2µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8"
|
||||||
|
[2024-03-11 14:43:15.663] INFO callbacks/preload.go:261 [504.2µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:43:15.663] INFO repository/server.go:37 [951.9µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:43:15.664] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:43:17.833] ERROR component/wireguard.go:22 解析模板信息失败
|
||||||
|
[2024-03-11 14:43:22.087] ERROR queues/async_wg_config.go:100 同步配置文件失败: template: wg0.conf:12: function "Enabled" not defined
|
||||||
|
[2024-03-11 14:43:37.481] INFO sqlite@v1.5.5/migrator.go:32 [552.5µs] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:43:37.492] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:43:37.493] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:43:37.493] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:43:37.493] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:43:37.494] INFO sqlite@v1.5.5/migrator.go:413 [119.8µs] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:43:37.494] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:43:37.494] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:43:37.496] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:43:37.498] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:43:37.498] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:43:37.499] INFO sqlite@v1.5.5/migrator.go:413 [1.0964ms] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:43:37.499] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:43:37.499] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:43:37.501] INFO sqlite@v1.5.5/migrator.go:423 [999.2µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:43:37.503] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:43:37.503] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:43:37.503] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:43:37.503] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:43:37.503] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:43:37.505] INFO sqlite@v1.5.5/migrator.go:413 [561.2µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:43:37.505] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:43:37.505] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:43:37.506] INFO sqlite@v1.5.5/migrator.go:423 [1.7006ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:43:37.509] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:43:37.509] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:43:37.509] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:43:37.509] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:43:37.510] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:43:37.511] INFO sqlite@v1.5.5/migrator.go:413 [569.1µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,`enabled` tinyint(1),PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:43:37.511] INFO sqlite@v1.5.5/migrator.go:423 [80.1µs] [rows:2] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:43:37.511] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:43:37.513] INFO sqlite@v1.5.5/migrator.go:423 [1.1048ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:43:37.514] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:43:37.515] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:43:37.516] INFO sqlite@v1.5.5/migrator.go:413 [523.7µs] [rows:2] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,`enabled` tinyint(1),PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:43:37.516] INFO sqlite@v1.5.5/migrator.go:423 [546.4µs] [rows:2] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:43:37.517] INFO sqlite@v1.5.5/migrator.go:423 [588.8µs] [rows:2] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:43:37.518] INFO sqlite@v1.5.5/migrator.go:423 [1.6322ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:43:37.520] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:43:37.521] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:43:37.521] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:43:37.521] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:43:37.521] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:43:37.521] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:43:37.521] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:43:40.149] INFO repository/user.go:44 [321.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:43:40.152] INFO repository/server.go:63 [2.5965ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 14:43:40.15" WHERE id = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:43:40.171] INFO callbacks/preload.go:261 [505.5µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8"
|
||||||
|
[2024-03-11 14:43:40.171] INFO callbacks/preload.go:261 [505.5µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:43:40.171] INFO repository/server.go:37 [887.1µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:43:40.171] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:44:40.869] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:44:40.881] INFO migrator/migrator.go:73 [1.0012ms] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:44:40.881] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:44:40.881] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:44:40.882] INFO sqlite@v1.5.5/migrator.go:368 [1ms] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:44:40.884] INFO sqlite@v1.5.5/migrator.go:413 [1.0939ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:44:40.884] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:44:40.884] INFO sqlite@v1.5.5/migrator.go:423 [525.6µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:44:40.885] INFO sqlite@v1.5.5/migrator.go:423 [1.1489ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:44:40.887] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:44:40.888] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:44:40.889] INFO sqlite@v1.5.5/migrator.go:413 [584.4µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:44:40.889] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:44:40.889] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:44:40.890] INFO sqlite@v1.5.5/migrator.go:423 [1.1759ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:44:40.892] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:44:40.893] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:44:40.893] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:44:40.893] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:44:40.893] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:44:40.894] INFO sqlite@v1.5.5/migrator.go:413 [515µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:44:40.894] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:44:40.895] INFO sqlite@v1.5.5/migrator.go:423 [545.4µs] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:44:40.896] INFO sqlite@v1.5.5/migrator.go:423 [1.0638ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:44:40.898] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:44:40.898] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:44:40.898] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:44:40.898] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:44:40.898] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:44:40.900] INFO sqlite@v1.5.5/migrator.go:413 [600.4µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,`enabled` tinyint(1),PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:44:40.900] INFO sqlite@v1.5.5/migrator.go:423 [511.1µs] [rows:2] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:44:40.900] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:44:40.902] INFO sqlite@v1.5.5/migrator.go:423 [1.7306ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:44:40.903] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:44:40.904] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:44:40.904] INFO sqlite@v1.5.5/migrator.go:413 [65.9µs] [rows:2] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,`enabled` tinyint(1),PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:44:40.905] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:44:40.905] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:44:40.906] INFO sqlite@v1.5.5/migrator.go:423 [639.1µs] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:44:40.908] INFO sqlite@v1.5.5/migrator.go:219 [521.1µs] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:44:40.908] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:44:40.908] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:44:40.909] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:44:40.909] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:44:40.909] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:44:40.909] INFO script/script.go:98 [87.9µs] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:44:45.700] INFO repository/user.go:44 [386.4µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:44:45.702] INFO repository/server.go:63 [2.1875ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 14:44:45.7" WHERE id = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:44:45.723] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8"
|
||||||
|
[2024-03-11 14:44:45.723] INFO callbacks/preload.go:261 [551.3µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:44:45.723] INFO repository/server.go:37 [2.0581ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:44:45.723] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:45:02.193] INFO repository/user.go:44 [578.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:45:02.196] INFO repository/server.go:63 [2.6634ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 14:45:02.193" WHERE id = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:45:02.215] INFO callbacks/preload.go:261 [0s] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8"
|
||||||
|
[2024-03-11 14:45:02.216] INFO callbacks/preload.go:261 [508.2µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:45:02.216] INFO repository/server.go:37 [967µs] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:45:02.216] INFO repository/system.go:28 [0s] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:45:31.889] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_user"
|
||||||
|
[2024-03-11 14:45:31.902] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_user" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:45:31.902] INFO sqlite@v1.5.5/migrator.go:125 [61.6µs] [-] SELECT * FROM `t_user` LIMIT 1
|
||||||
|
[2024-03-11 14:45:31.902] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:45:31.902] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:45:31.904] INFO sqlite@v1.5.5/migrator.go:413 [1.1162ms] [rows:0] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:45:31.905] INFO sqlite@v1.5.5/migrator.go:423 [558.8µs] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:45:31.905] INFO sqlite@v1.5.5/migrator.go:423 [505.2µs] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:45:31.906] INFO sqlite@v1.5.5/migrator.go:423 [1.1879ms] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:45:31.908] INFO sqlite@v1.5.5/migrator.go:79 [554.5µs] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:45:31.908] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_user" AND name = "t_user"
|
||||||
|
[2024-03-11 14:45:31.909] INFO sqlite@v1.5.5/migrator.go:413 [567.7µs] [rows:1] CREATE TABLE `t_user__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`avatar` varchar(255) NOT NULL,`name` varchar(50) NOT NULL,`account` varchar(50) NOT NULL,`email` varchar(255),`password` varchar(255) NOT NULL,`is_admin` int(1) NOT NULL,`status` tinyint(1) NOT NULL,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:45:31.909] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_user__temp`(`id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status`) SELECT `id`,`created_at`,`updated_at`,`avatar`,`name`,`account`,`email`,`password`,`is_admin`,`status` FROM `t_user`
|
||||||
|
[2024-03-11 14:45:31.910] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] DROP TABLE `t_user`
|
||||||
|
[2024-03-11 14:45:31.911] INFO sqlite@v1.5.5/migrator.go:423 [619.9µs] [rows:1] ALTER TABLE `t_user__temp` RENAME TO `t_user`
|
||||||
|
[2024-03-11 14:45:31.913] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_server"
|
||||||
|
[2024-03-11 14:45:31.913] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_server" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:45:31.913] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_server` LIMIT 1
|
||||||
|
[2024-03-11 14:45:31.914] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:45:31.914] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_server" AND name = "t_wg_server"
|
||||||
|
[2024-03-11 14:45:31.915] INFO sqlite@v1.5.5/migrator.go:413 [519.1µs] [rows:1] CREATE TABLE `t_wg_server__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`ip_scope` varchar(30) NOT NULL,`listen_port` int(10) NOT NULL,`private_key` text NOT NULL,`public_key` text NOT NULL,`post_up_script` text,`pre_down_script` text,`post_down_script` text,PRIMARY KEY (`id`))
|
||||||
|
[2024-03-11 14:45:31.915] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:1] INSERT INTO `t_wg_server__temp`(`id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script`) SELECT `id`,`created_at`,`updated_at`,`ip_scope`,`listen_port`,`private_key`,`public_key`,`post_up_script`,`pre_down_script`,`post_down_script` FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:45:31.915] INFO sqlite@v1.5.5/migrator.go:423 [539µs] [rows:1] DROP TABLE `t_wg_server`
|
||||||
|
[2024-03-11 14:45:31.917] INFO sqlite@v1.5.5/migrator.go:423 [1.6824ms] [rows:1] ALTER TABLE `t_wg_server__temp` RENAME TO `t_wg_server`
|
||||||
|
[2024-03-11 14:45:31.918] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_wg_client"
|
||||||
|
[2024-03-11 14:45:31.918] INFO migrator/migrator.go:73 [0s] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_wg_client" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:45:31.919] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_wg_client` LIMIT 1
|
||||||
|
[2024-03-11 14:45:31.919] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:45:31.920] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:45:31.921] INFO sqlite@v1.5.5/migrator.go:413 [519.2µs] [rows:1] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,`enabled` tinyint(1),PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:45:31.921] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:45:31.921] INFO sqlite@v1.5.5/migrator.go:423 [514.6µs] [rows:2] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:45:31.923] INFO sqlite@v1.5.5/migrator.go:423 [1.6233ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:45:31.925] INFO sqlite@v1.5.5/migrator.go:79 [0s] [rows:1] PRAGMA foreign_keys
|
||||||
|
[2024-03-11 14:45:31.925] INFO sqlite@v1.5.5/migrator.go:368 [0s] [-] SELECT sql FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND name = "t_wg_client"
|
||||||
|
[2024-03-11 14:45:31.926] INFO sqlite@v1.5.5/migrator.go:413 [515.4µs] [rows:2] CREATE TABLE `t_wg_client__temp` (`id` varchar(36) NOT NULL,`created_at` datetime,`updated_at` datetime,`server_id` varchar(36) NOT NULL,`name` varchar(100) NOT NULL,`email` varchar(100),`subnet_range` varchar(255),`ip_allocation` varchar(30) NOT NULL,`allowed_ips` varchar(30) NOT NULL,`extra_allowed_ips` varchar(30),`endpoint` varchar(255),`use_server_dns` int(1),`enable_after_creation` int(1),`keys` text,`user_id` varchar(36) NOT NULL,`enabled` tinyint(1),PRIMARY KEY (`id`),CONSTRAINT `fk_t_wg_server_clients` FOREIGN KEY (`server_id`) REFERENCES `t_wg_server`(`id`),CONSTRAINT `fk_t_wg_client_user` FOREIGN KEY (`user_id`) REFERENCES `t_user`(`id`))
|
||||||
|
[2024-03-11 14:45:31.926] INFO sqlite@v1.5.5/migrator.go:423 [0s] [rows:2] INSERT INTO `t_wg_client__temp`(`id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled`) SELECT `id`,`created_at`,`updated_at`,`server_id`,`name`,`email`,`subnet_range`,`ip_allocation`,`allowed_ips`,`extra_allowed_ips`,`endpoint`,`use_server_dns`,`enable_after_creation`,`keys`,`user_id`,`enabled` FROM `t_wg_client`
|
||||||
|
[2024-03-11 14:45:31.927] INFO sqlite@v1.5.5/migrator.go:423 [558.8µs] [rows:2] DROP TABLE `t_wg_client`
|
||||||
|
[2024-03-11 14:45:31.928] INFO sqlite@v1.5.5/migrator.go:423 [1.729ms] [rows:2] ALTER TABLE `t_wg_client__temp` RENAME TO `t_wg_client`
|
||||||
|
[2024-03-11 14:45:31.930] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_client_user"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %" OR sql LIKE "%CONSTRAINT `fk_t_wg_client_user`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_client_user]%" OR sql LIKE "%CONSTRAINT fk_t_wg_client_user %")
|
||||||
|
[2024-03-11 14:45:31.930] INFO sqlite@v1.5.5/migrator.go:219 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type = "table" AND tbl_name = "t_wg_client" AND (sql LIKE "%CONSTRAINT ""fk_t_wg_server_clients"" %" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %" OR sql LIKE "%CONSTRAINT `fk_t_wg_server_clients`%" OR sql LIKE "%CONSTRAINT [fk_t_wg_server_clients]%" OR sql LIKE "%CONSTRAINT fk_t_wg_server_clients %")
|
||||||
|
[2024-03-11 14:45:31.930] INFO sqlite@v1.5.5/migrator.go:32 [0s] [-] SELECT count(*) FROM sqlite_master WHERE type='table' AND name="t_setting"
|
||||||
|
[2024-03-11 14:45:31.931] INFO migrator/migrator.go:73 [83.1µs] [rows:1] SELECT sql FROM sqlite_master WHERE type IN ("table","index") AND tbl_name = "t_setting" AND sql IS NOT NULL order by type = "table" desc
|
||||||
|
[2024-03-11 14:45:31.931] INFO sqlite@v1.5.5/migrator.go:125 [0s] [-] SELECT * FROM `t_setting` LIMIT 1
|
||||||
|
[2024-03-11 14:45:31.931] INFO script/script.go:61 [0s] [rows:1] SELECT count(*) FROM `t_user` WHERE is_admin = 1
|
||||||
|
[2024-03-11 14:45:31.931] INFO script/script.go:98 [0s] [rows:1] SELECT count(*) FROM `t_wg_server`
|
||||||
|
[2024-03-11 14:45:33.138] INFO repository/user.go:44 [586.5µs] [rows:1] SELECT * FROM `t_user` WHERE id = "0dbdde3660934396b79a6bad002d82a8" ORDER BY `t_user`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:45:33.141] INFO repository/server.go:63 [2.6069ms] [rows:1] UPDATE `t_wg_server` SET `ip_scope`="10.10.10.1/32",`listen_port`=51820,`post_down_script`="",`post_up_script`="",`pre_down_script`="",`updated_at`="2024-03-11 14:45:33.139" WHERE id = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:45:33.161] INFO callbacks/preload.go:261 [507.6µs] [rows:1] SELECT * FROM `t_user` WHERE `t_user`.`id` = "0dbdde3660934396b79a6bad002d82a8"
|
||||||
|
[2024-03-11 14:45:33.161] INFO callbacks/preload.go:261 [507.6µs] [rows:2] SELECT * FROM `t_wg_client` WHERE `t_wg_client`.`server_id` = "2cc89e0b665c47b683a4042b8654062a"
|
||||||
|
[2024-03-11 14:45:33.161] INFO repository/server.go:37 [1.3902ms] [rows:1] SELECT * FROM `t_wg_server` WHERE id = "2cc89e0b665c47b683a4042b8654062a" ORDER BY `t_wg_server`.`id` LIMIT 1
|
||||||
|
[2024-03-11 14:45:33.161] INFO repository/system.go:28 [532.6µs] [rows:1] SELECT * FROM `t_setting` WHERE code = "SERVER_SETTING" ORDER BY `t_setting`.`id` LIMIT 1
|
||||||
|
1
main.go
1
main.go
@ -24,6 +24,7 @@ func main() {
|
|||||||
route.CaptchaApi,
|
route.CaptchaApi,
|
||||||
route.UserApi,
|
route.UserApi,
|
||||||
route.ServerApi,
|
route.ServerApi,
|
||||||
|
route.ClientApi,
|
||||||
)
|
)
|
||||||
handler := route.InitRouter()
|
handler := route.InitRouter()
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ type Client struct {
|
|||||||
EnableAfterCreation int `json:"enableAfterCreation" gorm:"type:int(1);default 1;comment:'是否创建后启用'"`
|
EnableAfterCreation int `json:"enableAfterCreation" gorm:"type:int(1);default 1;comment:'是否创建后启用'"`
|
||||||
Keys string `json:"keys" gorm:"type:text;default null;comment:'公钥和密钥的json串'"`
|
Keys string `json:"keys" gorm:"type:text;default null;comment:'公钥和密钥的json串'"`
|
||||||
UserId string `json:"userId" gorm:"type:char(36);not null;comment:'创建人id'"`
|
UserId string `json:"userId" gorm:"type:char(36);not null;comment:'创建人id'"`
|
||||||
|
Enabled bool `json:"enabled" gorm:"type:tinyint(1);default 1;comment:'状态(0 - 禁用 | 1 - 正常)'"`
|
||||||
User *User `json:"user" gorm:"foreignKey:UserId"`
|
User *User `json:"user" gorm:"foreignKey:UserId"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,12 +15,14 @@ type Server struct {
|
|||||||
type Client struct {
|
type Client struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
Email string `json:"email"`
|
||||||
PublicKey string `json:"publicKey"`
|
PublicKey string `json:"publicKey"`
|
||||||
PresharedKey string `json:"presharedKey"`
|
PresharedKey string `json:"presharedKey"`
|
||||||
AllowedIPS string `json:"allowedIps"`
|
AllowedIPS string `json:"allowedIps"`
|
||||||
PersistentKeepalive string `json:"persistentKeepalive"`
|
PersistentKeepalive string `json:"persistentKeepalive"`
|
||||||
Endpoint string `json:"endpoint"`
|
Endpoint string `json:"endpoint"`
|
||||||
CreateUser string `json:"createUser"`
|
CreateUser string `json:"createUser"`
|
||||||
|
Enabled bool `json:"enabled"`
|
||||||
CreatedAt string `json:"createdAt"`
|
CreatedAt string `json:"createdAt"`
|
||||||
UpdatedAt string `json:"updatedAt"`
|
UpdatedAt string `json:"updatedAt"`
|
||||||
}
|
}
|
||||||
|
25
model/vo/client.go
Normal file
25
model/vo/client.go
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package vo
|
||||||
|
|
||||||
|
import (
|
||||||
|
"wireguard-dashboard/model/entity"
|
||||||
|
"wireguard-dashboard/model/template_data"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Client struct {
|
||||||
|
Id string `json:"id"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Email string `json:"email"`
|
||||||
|
SubnetRange string `json:"subnetRange"`
|
||||||
|
IpAllocation string `json:"ipAllocation"`
|
||||||
|
AllowedIPS string `json:"allowedIPS"`
|
||||||
|
ExtraAllowedIPS string `json:"extraAllowedIPS"`
|
||||||
|
Endpoint string `json:"endpoint"`
|
||||||
|
UseServerDNS int `json:"useServerDNS"`
|
||||||
|
EnableAfterCreation int `json:"enableAfterCreation"`
|
||||||
|
KeysStr string `json:"-" gorm:"keys_str"`
|
||||||
|
Keys template_data.Keys `json:"keys" gorm:"-"`
|
||||||
|
CreateUser string `json:"createUser"`
|
||||||
|
Enabled bool `json:"enabled"`
|
||||||
|
CreatedAt entity.JsonTime `json:"createAt"`
|
||||||
|
UpdatedAt entity.JsonTime `json:"updatedAt"`
|
||||||
|
}
|
@ -66,6 +66,7 @@ func asyncWireguardConfigFile() {
|
|||||||
Table: globalSetting.Table,
|
Table: globalSetting.Table,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 客户端数据
|
||||||
var renderClients []template_data.Client
|
var renderClients []template_data.Client
|
||||||
for _, v := range serverEnt.Clients {
|
for _, v := range serverEnt.Clients {
|
||||||
var clientKey template_data.Keys
|
var clientKey template_data.Keys
|
||||||
@ -77,6 +78,7 @@ func asyncWireguardConfigFile() {
|
|||||||
renderClients = append(renderClients, template_data.Client{
|
renderClients = append(renderClients, template_data.Client{
|
||||||
ID: v.Id,
|
ID: v.Id,
|
||||||
Name: v.Name,
|
Name: v.Name,
|
||||||
|
Email: v.Email,
|
||||||
PublicKey: clientKey.PublicKey,
|
PublicKey: clientKey.PublicKey,
|
||||||
PresharedKey: clientKey.PrivateKey,
|
PresharedKey: clientKey.PrivateKey,
|
||||||
AllowedIPS: v.AllowedIps,
|
AllowedIPS: v.AllowedIps,
|
||||||
@ -85,6 +87,7 @@ func asyncWireguardConfigFile() {
|
|||||||
CreatedAt: v.CreatedAt.String(),
|
CreatedAt: v.CreatedAt.String(),
|
||||||
UpdatedAt: v.UpdatedAt.String(),
|
UpdatedAt: v.UpdatedAt.String(),
|
||||||
CreateUser: createUserName,
|
CreateUser: createUserName,
|
||||||
|
Enabled: v.Enabled,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
46
repository/client.go
Normal file
46
repository/client.go
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
package repository
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"gorm.io/gorm"
|
||||||
|
"wireguard-dashboard/client"
|
||||||
|
"wireguard-dashboard/http/param"
|
||||||
|
"wireguard-dashboard/model/vo"
|
||||||
|
"wireguard-dashboard/utils"
|
||||||
|
)
|
||||||
|
|
||||||
|
type clientRepo struct {
|
||||||
|
*gorm.DB
|
||||||
|
}
|
||||||
|
|
||||||
|
func Client() clientRepo {
|
||||||
|
return clientRepo{
|
||||||
|
client.DB,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// List
|
||||||
|
// @description: 列表
|
||||||
|
// @receiver r
|
||||||
|
// @param p
|
||||||
|
// @return data
|
||||||
|
// @return total
|
||||||
|
// @return err
|
||||||
|
func (r clientRepo) List(p param.ClientList) (data []vo.Client, total int64, err error) {
|
||||||
|
err = r.Table("t_wg_client as twc").Scopes(utils.Page(p.Current, p.Size)).Joins("LEFT JOIN t_user as tu ON twc.user_id = tu.id").
|
||||||
|
Select("twc.id", "twc.created_at", "twc.updated_at", "twc.name", "twc.email", "twc.subnet_range", "twc.ip_allocation", "twc.allowed_ips",
|
||||||
|
"twc.extra_allowed_ips", "twc.endpoint", "twc.use_server_dns", "twc.enable_after_creation", "twc.enabled", "twc.keys as keys_str", "tu.name as create_user").
|
||||||
|
Find(&data).Offset(-1).Limit(-1).Count(&total).Error
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
for i, v := range data {
|
||||||
|
if v.KeysStr != "" {
|
||||||
|
_ = json.Unmarshal([]byte(v.KeysStr), &data[i].Keys)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
14
route/client.go
Normal file
14
route/client.go
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package route
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"wireguard-dashboard/http/api"
|
||||||
|
"wireguard-dashboard/middleware"
|
||||||
|
)
|
||||||
|
|
||||||
|
func ClientApi(r *gin.Engine) {
|
||||||
|
apiGroup := r.Group("client", middleware.Authorization())
|
||||||
|
{
|
||||||
|
apiGroup.GET("list", api.Client().List) // 客户端列表
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user