mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-11 08:55:22 +02:00
- Added components for handling and displaying Docker networks, including creation, editing, and listing of networks. - Introduced a new API router for network operations, integrating with the database schema for network management. - Updated the sidebar layout to include a link to the networks dashboard, ensuring user access to network features. - Created necessary database migrations for the network table and its associated types. - Enhanced the dashboard layout to support the new network management interface.
20 lines
1.1 KiB
SQL
20 lines
1.1 KiB
SQL
CREATE TYPE "public"."networkDriver" AS ENUM('bridge', 'host', 'overlay', 'macvlan', 'none', 'ipvlan');--> statement-breakpoint
|
|
CREATE TABLE "network" (
|
|
"networkId" text PRIMARY KEY NOT NULL,
|
|
"name" text NOT NULL,
|
|
"driver" "networkDriver" DEFAULT 'bridge' NOT NULL,
|
|
"scope" text,
|
|
"internal" boolean DEFAULT false NOT NULL,
|
|
"attachable" boolean DEFAULT false NOT NULL,
|
|
"ingress" boolean DEFAULT false NOT NULL,
|
|
"configOnly" boolean DEFAULT false NOT NULL,
|
|
"enableIPv4" boolean DEFAULT true NOT NULL,
|
|
"enableIPv6" boolean DEFAULT false NOT NULL,
|
|
"ipam" jsonb DEFAULT '{}'::jsonb,
|
|
"createdAt" text NOT NULL,
|
|
"organizationId" text NOT NULL,
|
|
"serverId" text
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "network" ADD CONSTRAINT "network_organizationId_organization_id_fk" FOREIGN KEY ("organizationId") REFERENCES "public"."organization"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
ALTER TABLE "network" ADD CONSTRAINT "network_serverId_server_serverId_fk" FOREIGN KEY ("serverId") REFERENCES "public"."server"("serverId") ON DELETE cascade ON UPDATE no action; |