feat: custom widgets (#5889)
This commit is contained in:
1 parent
48e1844b5b
commit
aecbca2b81
69 files changed
+14620
-142
No files matched your search
@@ -0,0 +1,27 @@
|
||||
CREATE TABLE `custom_widget_definition` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`description` text,
|
||||
`icon_url` text,
|
||||
`base_url` text NOT NULL,
|
||||
`auth_type` text DEFAULT 'none' NOT NULL,
|
||||
`header_name` text,
|
||||
`endpoint` text NOT NULL,
|
||||
`method` text DEFAULT 'GET' NOT NULL,
|
||||
`request_body` text,
|
||||
`display_type` text DEFAULT 'singleValue' NOT NULL,
|
||||
`display_config` text DEFAULT '{"json": {}}' NOT NULL,
|
||||
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
|
||||
`updated_at` integer DEFAULT (unixepoch()) NOT NULL,
|
||||
`creator_id` text,
|
||||
FOREIGN KEY (`creator_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE set null
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `custom_widget_secret` (
|
||||
`kind` text NOT NULL,
|
||||
`value` text NOT NULL,
|
||||
`updated_at` integer NOT NULL,
|
||||
`definition_id` text NOT NULL,
|
||||
PRIMARY KEY(`definition_id`, `kind`),
|
||||
FOREIGN KEY (`definition_id`) REFERENCES `custom_widget_definition`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
@@ -0,0 +1,23 @@
|
||||
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
||||
CREATE TABLE `__new_custom_widget_definition` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`description` text,
|
||||
`icon_url` text,
|
||||
`url` text NOT NULL,
|
||||
`auth_type` text DEFAULT 'none' NOT NULL,
|
||||
`header_name` text,
|
||||
`method` text DEFAULT 'GET' NOT NULL,
|
||||
`request_body` text,
|
||||
`display_type` text DEFAULT 'singleValue' NOT NULL,
|
||||
`display_config` text DEFAULT '{"json": {}}' NOT NULL,
|
||||
`enabled` integer DEFAULT true NOT NULL,
|
||||
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
|
||||
`updated_at` integer DEFAULT (unixepoch()) NOT NULL,
|
||||
`creator_id` text,
|
||||
FOREIGN KEY (`creator_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE set null
|
||||
);--> statement-breakpoint
|
||||
INSERT INTO `__new_custom_widget_definition`("id", "name", "description", "icon_url", "url", "auth_type", "header_name", "method", "request_body", "display_type", "display_config", "enabled", "created_at", "updated_at", "creator_id") SELECT "id", "name", "description", "icon_url", "base_url" || "endpoint", "auth_type", "header_name", "method", "request_body", "display_type", "display_config", 1, "created_at", "updated_at", "creator_id" FROM `custom_widget_definition`;--> statement-breakpoint
|
||||
DROP TABLE `custom_widget_definition`;--> statement-breakpoint
|
||||
ALTER TABLE `__new_custom_widget_definition` RENAME TO `custom_widget_definition`;--> statement-breakpoint
|
||||
PRAGMA foreign_keys=ON;
|
||||
File diff suppressed because it is too large.
Load diff
@@ -267,6 +267,20 @@
|
||||
"when": 1779199046805,
|
||||
"tag": "0037_add_user_onboarding_tour_status",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 38,
|
||||
"version": "6",
|
||||
"when": 1780764406810,
|
||||
"tag": "0038_crazy_hobgoblin",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 39,
|
||||
"version": "6",
|
||||
"when": 1780764500000,
|
||||
"tag": "0039_merge_custom_widget_url",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user