Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3658f4b
Add next-auth
SferaDev Feb 27, 2025
c37edb6
Update env
SferaDev Feb 27, 2025
7df6844
Add avatar
SferaDev Feb 27, 2025
7dd6a6a
Add avatar menu
SferaDev Feb 27, 2025
b402828
Add fake auth
SferaDev Feb 27, 2025
4475d9c
Move pages
SferaDev Feb 27, 2025
b4408f5
Merge remote-tracking branch 'origin/main' into multi-tenancy
SferaDev Feb 28, 2025
5c3d82d
Changes in pages
SferaDev Feb 28, 2025
e74d1f9
Add database migration
SferaDev Feb 28, 2025
b0f79e2
Refactor layout
SferaDev Feb 28, 2025
4cd379c
Work in progress
SferaDev Mar 3, 2025
0626511
Merge remote-tracking branch 'origin/main' into multi-tenancy
SferaDev Mar 3, 2025
0c16242
Update schema
SferaDev Mar 3, 2025
b2185e3
Work in progress
SferaDev Mar 4, 2025
af15443
Merge remote-tracking branch 'origin/main' into multi-tenancy
SferaDev Mar 4, 2025
8a3c396
Update schema
SferaDev Mar 4, 2025
015bb59
Undo db migrations
SferaDev Mar 4, 2025
b2edb6f
Reorder schema
SferaDev Mar 4, 2025
e3cf1c0
Update migration
SferaDev Mar 4, 2025
a471d7e
Update dependencies
SferaDev Mar 4, 2025
281c817
Fix tsc
SferaDev Mar 4, 2025
96337b3
Update migration
SferaDev Mar 4, 2025
0b06437
Refactor schema file
SferaDev Mar 4, 2025
229faff
Rename assoc
SferaDev Mar 4, 2025
3481fd4
Merge remote-tracking branch 'origin/schema' into multi-tenancy
SferaDev Mar 4, 2025
067f731
Init db
SferaDev Mar 4, 2025
21bc244
Move layouts
SferaDev Mar 4, 2025
196287b
Fix vercel
SferaDev Mar 4, 2025
92dfdca
Merge remote-tracking branch 'origin/main' into multi-tenancy
SferaDev Mar 4, 2025
9f3d76d
Update pages
SferaDev Mar 4, 2025
b59673d
Fix merge
SferaDev Mar 4, 2025
0a27aba
Merge remote-tracking branch 'origin/main' into multi-tenancy
SferaDev Mar 4, 2025
76f9049
Remove cruft
SferaDev Mar 4, 2025
76acaa3
Refactor
SferaDev Mar 4, 2025
43d2cfc
Clean-up
SferaDev Mar 4, 2025
01415d3
Implement delete and rename
SferaDev Mar 4, 2025
9b30991
Update list page
SferaDev Mar 4, 2025
bb012a3
Don't do this refactor
SferaDev Mar 4, 2025
426adf0
Fix aws actions
SferaDev Mar 4, 2025
c22901b
Rename
SferaDev Mar 4, 2025
b21a5bd
Fix id
SferaDev Mar 4, 2025
494eecb
Load env
SferaDev Mar 4, 2025
6e91b46
Fix vercel
SferaDev Mar 4, 2025
49b1be9
Fix window usage
SferaDev Mar 4, 2025
b298816
Fix hidration issue
SferaDev Mar 4, 2025
e72967e
Add suspense boundary
SferaDev Mar 4, 2025
b642dfa
Fix permissions
SferaDev Mar 4, 2025
c9b338f
Remove debug
SferaDev Mar 4, 2025
cd83d27
Fixed a couple of links
tsg Mar 4, 2025
2188395
Actually fix the links
tsg Mar 4, 2025
216db3c
More relative links fixes
tsg Mar 4, 2025
997f5b4
One more fix
tsg Mar 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 50 additions & 26 deletions apps/dbagent/migrations/0000_init.sql
Original file line number Diff line number Diff line change
@@ -1,63 +1,87 @@
CREATE TYPE "public"."notification_level" AS ENUM('info', 'warning', 'alert');--> statement-breakpoint
CREATE TYPE "public"."schedule_status" AS ENUM('disabled', 'scheduled', 'running');--> statement-breakpoint
CREATE TABLE "assoc_cluster_connections" (
CREATE TABLE "aws_cluster_connections" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"cluster_id" uuid,
"connection_id" uuid
"cluster_id" uuid NOT NULL,
"connection_id" uuid NOT NULL
);
--> statement-breakpoint
CREATE TABLE "clusters" (
CREATE TABLE "aws_clusters" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"cluster_identifier" text NOT NULL,
"integration" text NOT NULL,
"data" jsonb NOT NULL,
"region" text DEFAULT 'us-east-1' NOT NULL,
CONSTRAINT "instances_integration_identifier_unique" UNIQUE("cluster_identifier","integration")
"data" jsonb NOT NULL,
CONSTRAINT "uq_aws_clusters_integration_identifier" UNIQUE("cluster_identifier")
);
--> statement-breakpoint
CREATE TABLE "connection_info" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"connection_id" uuid NOT NULL,
"type" text NOT NULL,
"data" jsonb NOT NULL,
CONSTRAINT "uq_connections_info" UNIQUE("connection_id","type")
);
--> statement-breakpoint
CREATE TABLE "connections" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"project_id" uuid NOT NULL,
"name" text NOT NULL,
"is_default" boolean DEFAULT false NOT NULL,
"connstring" text NOT NULL,
"params" jsonb,
CONSTRAINT "connections_name_unique" UNIQUE("name"),
CONSTRAINT "connections_connstring_unique" UNIQUE("connstring")
"connection_string" text NOT NULL,
CONSTRAINT "uq_connections_name" UNIQUE("project_id","name"),
CONSTRAINT "uq_connections_connection_string" UNIQUE("project_id","connection_string")
);
--> statement-breakpoint
CREATE TABLE "dbinfo" (
CREATE TABLE "integrations" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"connection_id" uuid,
"module" text,
"data" jsonb,
CONSTRAINT "dbinfo_module_unique" UNIQUE("connection_id","module")
"project_id" uuid NOT NULL,
"name" text NOT NULL,
"data" jsonb NOT NULL,
CONSTRAINT "uq_integrations_name" UNIQUE("project_id","name")
);
--> statement-breakpoint
CREATE TABLE "integrations" (
CREATE TABLE "projects" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"name" text NOT NULL,
"owner_id" text NOT NULL,
CONSTRAINT "uq_projects_name" UNIQUE("owner_id","name")
);
--> statement-breakpoint
CREATE TABLE "schedule_runs" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"name" text,
"data" jsonb,
CONSTRAINT "integrations_name_unique" UNIQUE("name")
"schedule_id" uuid NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"result" text NOT NULL,
"summary" text,
"notification_level" "notification_level" DEFAULT 'info' NOT NULL,
"messages" jsonb NOT NULL
);
--> statement-breakpoint
CREATE TABLE "schedules" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"project_id" uuid NOT NULL,
"connection_id" uuid NOT NULL,
"playbook" varchar(255) NOT NULL,
"schedule_type" varchar(255) NOT NULL,
"cron_expression" varchar(255),
"additional_instructions" text,
"min_interval" integer,
"max_interval" integer,
"enabled" boolean NOT NULL,
"enabled" boolean DEFAULT true NOT NULL,
"last_run" timestamp,
"next_run" timestamp,
"status" "schedule_status" DEFAULT 'disabled' NOT NULL,
"failures" integer DEFAULT 0,
"keep_history" integer DEFAULT 300 NOT NULL,
"model" text DEFAULT 'openai-gpt-4o' NOT NULL
);
--> statement-breakpoint
ALTER TABLE "assoc_cluster_connections" ADD CONSTRAINT "assoc_instance_connections_instance_id_fkey" FOREIGN KEY ("cluster_id") REFERENCES "public"."clusters"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "assoc_cluster_connections" ADD CONSTRAINT "assoc_instance_connections_connection_id_fkey" FOREIGN KEY ("connection_id") REFERENCES "public"."connections"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "clusters" ADD CONSTRAINT "instances_integration_fkey" FOREIGN KEY ("integration") REFERENCES "public"."integrations"("name") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "dbinfo" ADD CONSTRAINT "dbinfo_connid_fkey" FOREIGN KEY ("connection_id") REFERENCES "public"."connections"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "schedules" ADD CONSTRAINT "schedules_connection_id_fkey" FOREIGN KEY ("connection_id") REFERENCES "public"."connections"("id") ON DELETE no action ON UPDATE no action;
ALTER TABLE "aws_cluster_connections" ADD CONSTRAINT "fk_aws_cluster_connections_cluster" FOREIGN KEY ("cluster_id") REFERENCES "public"."aws_clusters"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "aws_cluster_connections" ADD CONSTRAINT "fk_aws_cluster_connections_connection" FOREIGN KEY ("connection_id") REFERENCES "public"."connections"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "connection_info" ADD CONSTRAINT "fk_connections_info_connection" FOREIGN KEY ("connection_id") REFERENCES "public"."connections"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "connections" ADD CONSTRAINT "fk_connections_project" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "integrations" ADD CONSTRAINT "fk_integrations_project" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "schedule_runs" ADD CONSTRAINT "fk_schedule_runs_schedule" FOREIGN KEY ("schedule_id") REFERENCES "public"."schedules"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "schedules" ADD CONSTRAINT "fk_schedules_project" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "schedules" ADD CONSTRAINT "fk_schedules_connection" FOREIGN KEY ("connection_id") REFERENCES "public"."connections"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "idx_schedule_runs_created_at" ON "schedule_runs" USING btree ("schedule_id","created_at");
14 changes: 0 additions & 14 deletions apps/dbagent/migrations/0001_lumpy_black_tarantula.sql

This file was deleted.

1 change: 0 additions & 1 deletion apps/dbagent/migrations/0002_lazy_galactus.sql

This file was deleted.

165 changes: 0 additions & 165 deletions apps/dbagent/migrations/0003_optimal_gargoyle.sql

This file was deleted.

12 changes: 0 additions & 12 deletions apps/dbagent/migrations/0004_worthless_thor.sql

This file was deleted.

Loading
Loading