using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Nexus.Api.Data.Migrations { /// public partial class AddOpenClawConnectionProfile : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "OpenClawConnectionProfiles", columns: table => new { ProfileId = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), Endpoint = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: false), DiscoverySource = table.Column(type: "character varying(80)", maxLength: 80, nullable: false), RequiredVersion = table.Column(type: "character varying(120)", maxLength: 120, nullable: true), TlsCertificateFingerprint = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), AdoptionState = table.Column(type: "character varying(40)", maxLength: 40, nullable: false), ManagementEnabled = table.Column(type: "boolean", nullable: false), CapabilityHash = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), DeviceId = table.Column(type: "character varying(240)", maxLength: 240, nullable: true), Revision = table.Column(type: "integer", nullable: false), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(type: "timestamp with time zone", nullable: false), LastProbedAt = table.Column(type: "timestamp with time zone", nullable: true), LastVerifiedAt = table.Column(type: "timestamp with time zone", nullable: true), AdoptedAt = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_OpenClawConnectionProfiles", x => x.ProfileId); table.CheckConstraint("CK_OpenClawConnectionProfiles_Primary", "\"ProfileId\" = 'primary'"); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "OpenClawConnectionProfiles"); } } }