//#region subgraphs/vetra-cloud-secrets/db/migrations.ts
async function up(db) {
	await db.schema.createTable("tenant_env_vars").addColumn("tenantId", "varchar(255)").addColumn("key", "varchar(255)").addColumn("value", "text").addColumn("updatedAt", "varchar(255)").addPrimaryKeyConstraint("tenant_env_vars_pkey", ["tenantId", "key"]).ifNotExists().execute();
	await db.schema.createTable("tenant_secrets").addColumn("tenantId", "varchar(255)").addColumn("key", "varchar(255)").addColumn("updatedAt", "varchar(255)").addPrimaryKeyConstraint("tenant_secrets_pkey", ["tenantId", "key"]).ifNotExists().execute();
	try {
		await db.schema.alterTable("tenant_secrets").addColumn("ciphertext", "text").execute();
	} catch (err) {
		const msg = err instanceof Error ? err.message : String(err);
		if (!/already exists/i.test(msg)) throw err;
	}
}
//#endregion
export { up as t };

//# sourceMappingURL=migrations-C6u1AGyJ.mjs.map