Add network protection and administrator account support

This commit is contained in:
2026-10-15 12:05:52 +09:00
parent 471e2653d8
commit 4d527f74e6
20 changed files with 2913 additions and 106 deletions

View File

@@ -0,0 +1,19 @@
CREATE TABLE `automatic_blocks` (
`ip` text PRIMARY KEY NOT NULL,
`countryCode` text,
`reason` text NOT NULL,
`createdAt` integer NOT NULL,
`expiresAt` integer NOT NULL
);
--> statement-breakpoint
CREATE INDEX `automatic_block_expiry` ON `automatic_blocks` (`expiresAt`);
--> statement-breakpoint
CREATE TABLE `user_activity` (
`userId` text PRIMARY KEY NOT NULL,
`lastSeenAt` integer NOT NULL,
`ip` text,
`countryCode` text,
`region` text,
`city` text,
FOREIGN KEY (`userId`) REFERENCES `users`(`id`) ON DELETE CASCADE
);