feat: convert secret-sources into a plugin (B20)

This commit is contained in:
LukeGus committed 2026-09-24 16:20:20 -05:00
1 parent 2ac7779eda
commit f4f26a9b8b
72 files changed
+18843 -933

No files matched your search

@@ -0,0 +1,15 @@
-- secret-sources 0001: adopt_secret_sources
-- Generated by termix-plugin migrations. Review before committing.
CREATE TABLE IF NOT EXISTS `secret_sources` (
`id` varchar(255) PRIMARY KEY NOT NULL,
`user_id` varchar(255) NOT NULL,
`name` text NOT NULL,
`kind` text NOT NULL DEFAULT ('onepassword-connect'),
`base_url` text NOT NULL,
`shared` boolean NOT NULL DEFAULT false,
`created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
);
RENAME TABLE `secret_sources` TO `p_secret_sources_sources`;
@@ -0,0 +1,16 @@
-- secret-sources 0001: adopt_secret_sources
-- Generated by termix-plugin migrations. Review before committing.
CREATE TABLE IF NOT EXISTS "secret_sources" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"user_id" varchar(255) NOT NULL,
"name" text NOT NULL,
"kind" text NOT NULL DEFAULT 'onepassword-connect',
"base_url" text NOT NULL,
"shared" boolean NOT NULL DEFAULT false,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_secret_sources_user" ON "secret_sources" ("user_id");
ALTER TABLE "secret_sources" RENAME TO "p_secret_sources_sources";
@@ -0,0 +1,55 @@
{
"version": 1,
"tables": {
"sources": {
"columns": {
"id": {
"type": "varchar",
"length": 255,
"primaryKey": true,
"notNull": true
},
"userId": {
"type": "refUser",
"length": 255,
"notNull": true
},
"name": {
"type": "text",
"notNull": true
},
"kind": {
"type": "text",
"notNull": true,
"defaultValue": "onepassword-connect"
},
"baseUrl": {
"type": "text",
"notNull": true
},
"shared": {
"type": "boolean",
"notNull": true,
"defaultValue": false
},
"createdAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
},
"updatedAt": {
"type": "timestamp",
"notNull": true,
"defaultNow": true
}
},
"indexes": [
{
"name": "idx_secret_sources_user",
"columns": ["userId"]
}
],
"adopts": "secret_sources"
}
}
}
@@ -0,0 +1,16 @@
-- secret-sources 0001: adopt_secret_sources
-- Generated by termix-plugin migrations. Review before committing.
CREATE TABLE IF NOT EXISTS "secret_sources" (
"id" text PRIMARY KEY NOT NULL,
"user_id" text NOT NULL,
"name" text NOT NULL,
"kind" text NOT NULL DEFAULT 'onepassword-connect',
"base_url" text NOT NULL,
"shared" integer NOT NULL DEFAULT 0,
"created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updated_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS "idx_secret_sources_user" ON "secret_sources" ("user_id");
ALTER TABLE "secret_sources" RENAME TO "p_secret_sources_sources";