1+ CREATE TABLE `mcpUserConfigurations ` (
2+ ` id` text PRIMARY KEY NOT NULL ,
3+ ` installation_id` text NOT NULL ,
4+ ` user_id` text NOT NULL ,
5+ ` device_name` text ,
6+ ` user_args` text ,
7+ ` user_env` text ,
8+ ` created_at` integer NOT NULL ,
9+ ` updated_at` integer NOT NULL ,
10+ ` last_used_at` integer ,
11+ FOREIGN KEY (` installation_id` ) REFERENCES ` mcpServerInstallations` (` id` ) ON UPDATE no action ON DELETE cascade ,
12+ FOREIGN KEY (` user_id` ) REFERENCES ` authUser` (` id` ) ON UPDATE no action ON DELETE cascade
13+ );
14+ -- > statement-breakpoint
15+ CREATE INDEX `mcp_user_configs_installation_user_idx ` ON ` mcpUserConfigurations` (` installation_id` ,` user_id` );-- > statement-breakpoint
16+ CREATE INDEX `mcp_user_configs_user_idx ` ON ` mcpUserConfigurations` (` user_id` );-- > statement-breakpoint
17+ CREATE INDEX `mcp_user_configs_installation_idx ` ON ` mcpUserConfigurations` (` installation_id` );-- > statement-breakpoint
18+ CREATE INDEX `mcp_user_configs_unique_user_installation ` ON ` mcpUserConfigurations` (` installation_id` ,` user_id` ,` device_name` );-- > statement-breakpoint
19+ PRAGMA foreign_keys= OFF;-- > statement-breakpoint
20+ CREATE TABLE `__new_mcpServerInstallations ` (
21+ ` id` text PRIMARY KEY NOT NULL ,
22+ ` team_id` text NOT NULL ,
23+ ` server_id` text NOT NULL ,
24+ ` created_by` text NOT NULL ,
25+ ` installation_name` text NOT NULL ,
26+ ` installation_type` text DEFAULT ' local' NOT NULL ,
27+ ` team_args` text ,
28+ ` team_env` text ,
29+ ` created_at` integer NOT NULL ,
30+ ` updated_at` integer NOT NULL ,
31+ ` last_used_at` integer ,
32+ FOREIGN KEY (` team_id` ) REFERENCES ` teams` (` id` ) ON UPDATE no action ON DELETE cascade ,
33+ FOREIGN KEY (` server_id` ) REFERENCES ` mcpServers` (` id` ) ON UPDATE no action ON DELETE cascade ,
34+ FOREIGN KEY (` created_by` ) REFERENCES ` authUser` (` id` ) ON UPDATE no action ON DELETE no action
35+ );
36+ -- > statement-breakpoint
37+ INSERT INTO ` __new_mcpServerInstallations` (" id" , " team_id" , " server_id" , " created_by" , " installation_name" , " installation_type" , " team_args" , " team_env" , " created_at" , " updated_at" , " last_used_at" ) SELECT " id" , " team_id" , " server_id" , " created_by" , " installation_name" , " installation_type" , " team_args" , " team_env" , " created_at" , " updated_at" , " last_used_at" FROM ` mcpServerInstallations` ;-- > statement-breakpoint
38+ DROP TABLE ` mcpServerInstallations` ;-- > statement-breakpoint
39+ ALTER TABLE ` __new_mcpServerInstallations` RENAME TO ` mcpServerInstallations` ;-- > statement-breakpoint
40+ PRAGMA foreign_keys= ON ;-- > statement-breakpoint
41+ CREATE INDEX `mcp_installations_team_name_idx ` ON ` mcpServerInstallations` (` team_id` ,` installation_name` );-- > statement-breakpoint
42+ CREATE INDEX `mcp_installations_team_server_idx ` ON ` mcpServerInstallations` (` team_id` ,` server_id` );-- > statement-breakpoint
43+ CREATE INDEX `mcp_installations_created_by_idx ` ON ` mcpServerInstallations` (` created_by` );-- > statement-breakpoint
44+ ALTER TABLE ` mcpServers` ADD ` template_args` text ;-- > statement-breakpoint
45+ ALTER TABLE ` mcpServers` ADD ` template_env` text ;-- > statement-breakpoint
46+ ALTER TABLE ` mcpServers` ADD ` team_args_schema` text ;-- > statement-breakpoint
47+ ALTER TABLE ` mcpServers` ADD ` team_env_schema` text ;-- > statement-breakpoint
48+ ALTER TABLE ` mcpServers` ADD ` user_args_schema` text ;-- > statement-breakpoint
49+ ALTER TABLE ` mcpServers` ADD ` user_env_schema` text ;-- > statement-breakpoint
50+ ALTER TABLE ` mcpServers` DROP COLUMN ` environment_variables` ;-- > statement-breakpoint
51+ ALTER TABLE ` mcpServers` DROP COLUMN ` args` ;
0 commit comments