feat(rcon): add admin server console
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
CREATE TABLE "rcon_servers" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"name" varchar(100) NOT NULL,
|
||||
"host" varchar(253) NOT NULL,
|
||||
"port" integer DEFAULT 25575 NOT NULL,
|
||||
"encrypted_password" text NOT NULL,
|
||||
"enabled" boolean DEFAULT false NOT NULL,
|
||||
"created_at" timestamp (3) with time zone DEFAULT now() NOT NULL,
|
||||
"updated_at" timestamp (3) with time zone DEFAULT now() NOT NULL,
|
||||
CONSTRAINT "rcon_servers_port_check" CHECK ("rcon_servers"."port" between 1 and 65535)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX "rcon_servers_name_uidx" ON "rcon_servers" USING btree (lower("name"));
|
||||
File diff suppressed because it is too large
Load Diff
@@ -43,6 +43,13 @@
|
||||
"when": 1785692345708,
|
||||
"tag": "0005_young_vertigo",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 6,
|
||||
"version": "7",
|
||||
"when": 1786151282526,
|
||||
"tag": "0006_curious_lester",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -206,6 +206,23 @@ export const appSettings = pgTable("app_settings", {
|
||||
...timestamps(),
|
||||
});
|
||||
|
||||
export const rconServers = pgTable(
|
||||
"rcon_servers",
|
||||
{
|
||||
id: uuid("id").primaryKey().defaultRandom(),
|
||||
name: varchar("name", { length: 100 }).notNull(),
|
||||
host: varchar("host", { length: 253 }).notNull(),
|
||||
port: integer("port").notNull().default(25575),
|
||||
encryptedPassword: text("encrypted_password").notNull(),
|
||||
enabled: boolean("enabled").notNull().default(false),
|
||||
...timestamps(),
|
||||
},
|
||||
(table) => [
|
||||
uniqueIndex("rcon_servers_name_uidx").on(sql`lower(${table.name})`),
|
||||
check("rcon_servers_port_check", sql`${table.port} between 1 and 65535`),
|
||||
],
|
||||
);
|
||||
|
||||
export const ipIntelligence = pgTable("ip_intelligence", {
|
||||
ipAddress: inet("ip_address").primaryKey(),
|
||||
classification: ipClassification("classification").notNull().default("unknown"),
|
||||
|
||||
Reference in New Issue
Block a user