| | 1 | | // <auto-generated /> |
| | 2 | | using System; |
| | 3 | | using Microsoft.EntityFrameworkCore; |
| | 4 | | using Microsoft.EntityFrameworkCore.Infrastructure; |
| | 5 | | using Microsoft.EntityFrameworkCore.Metadata; |
| | 6 | | using Microsoft.EntityFrameworkCore.Migrations; |
| | 7 | | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
| | 8 | | using NLightning.Infrastructure.Persistence.Contexts; |
| | 9 | |
|
| | 10 | | #nullable disable |
| | 11 | |
|
| | 12 | | namespace NLightning.Infrastructure.Persistence.SqlServer.Migrations |
| | 13 | | { |
| | 14 | | [DbContext(typeof(NLightningDbContext))] |
| | 15 | | [Migration("20250606153446_Initial")] |
| | 16 | | partial class Initial |
| | 17 | | { |
| | 18 | | /// <inheritdoc /> |
| | 19 | | protected override void BuildTargetModel(ModelBuilder modelBuilder) |
| | 20 | | { |
| | 21 | | #pragma warning disable 612, 618 |
| 0 | 22 | | modelBuilder |
| 0 | 23 | | .HasAnnotation("ProductVersion", "8.0.12") |
| 0 | 24 | | .HasAnnotation("Relational:MaxIdentifierLength", 128); |
| | 25 | |
|
| 0 | 26 | | SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); |
| | 27 | |
|
| 0 | 28 | | modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.ChannelConfigEntity", b => |
| 0 | 29 | | { |
| 0 | 30 | | b.Property<byte[]>("ChannelId") |
| 0 | 31 | | .HasColumnType("varbinary(32)"); |
| 0 | 32 | |
|
| 0 | 33 | | b.Property<long?>("ChannelReserveAmountSats") |
| 0 | 34 | | .HasColumnType("bigint"); |
| 0 | 35 | |
|
| 0 | 36 | | b.Property<long>("FeeRatePerKwSatoshis") |
| 0 | 37 | | .HasColumnType("bigint"); |
| 0 | 38 | |
|
| 0 | 39 | | b.Property<decimal>("HtlcMinimumMsat") |
| 0 | 40 | | .HasColumnType("decimal(20,0)"); |
| 0 | 41 | |
|
| 0 | 42 | | b.Property<long>("LocalDustLimitAmountSats") |
| 0 | 43 | | .HasColumnType("bigint"); |
| 0 | 44 | |
|
| 0 | 45 | | b.Property<byte[]>("LocalUpfrontShutdownScript") |
| 0 | 46 | | .HasColumnType("varbinary(max)"); |
| 0 | 47 | |
|
| 0 | 48 | | b.Property<int>("MaxAcceptedHtlcs") |
| 0 | 49 | | .HasColumnType("int"); |
| 0 | 50 | |
|
| 0 | 51 | | b.Property<decimal>("MaxHtlcAmountInFlight") |
| 0 | 52 | | .HasColumnType("decimal(20,0)"); |
| 0 | 53 | |
|
| 0 | 54 | | b.Property<long>("MinimumDepth") |
| 0 | 55 | | .HasColumnType("bigint"); |
| 0 | 56 | |
|
| 0 | 57 | | b.Property<bool>("OptionAnchorOutputs") |
| 0 | 58 | | .HasColumnType("bit"); |
| 0 | 59 | |
|
| 0 | 60 | | b.Property<long>("RemoteDustLimitAmountSats") |
| 0 | 61 | | .HasColumnType("bigint"); |
| 0 | 62 | |
|
| 0 | 63 | | b.Property<byte[]>("RemoteUpfrontShutdownScript") |
| 0 | 64 | | .HasColumnType("varbinary(max)"); |
| 0 | 65 | |
|
| 0 | 66 | | b.Property<int>("ToSelfDelay") |
| 0 | 67 | | .HasColumnType("int"); |
| 0 | 68 | |
|
| 0 | 69 | | b.Property<byte>("UseScidAlias") |
| 0 | 70 | | .HasColumnType("tinyint"); |
| 0 | 71 | |
|
| 0 | 72 | | b.HasKey("ChannelId"); |
| 0 | 73 | |
|
| 0 | 74 | | b.ToTable("ChannelConfigs"); |
| 0 | 75 | | }); |
| | 76 | |
|
| 0 | 77 | | modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.ChannelEntity", b => |
| 0 | 78 | | { |
| 0 | 79 | | b.Property<byte[]>("ChannelId") |
| 0 | 80 | | .HasColumnType("varbinary(32)"); |
| 0 | 81 | |
|
| 0 | 82 | | b.Property<long>("FundingAmountSatoshis") |
| 0 | 83 | | .HasColumnType("bigint"); |
| 0 | 84 | |
|
| 0 | 85 | | b.Property<long>("FundingCreatedAtBlockHeight") |
| 0 | 86 | | .HasColumnType("bigint"); |
| 0 | 87 | |
|
| 0 | 88 | | b.Property<long>("FundingOutputIndex") |
| 0 | 89 | | .HasColumnType("bigint"); |
| 0 | 90 | |
|
| 0 | 91 | | b.Property<byte[]>("FundingTxId") |
| 0 | 92 | | .IsRequired() |
| 0 | 93 | | .HasColumnType("varbinary(32)"); |
| 0 | 94 | |
|
| 0 | 95 | | b.Property<bool>("IsInitiator") |
| 0 | 96 | | .HasColumnType("bit"); |
| 0 | 97 | |
|
| 0 | 98 | | b.Property<byte[]>("LastReceivedSignature") |
| 0 | 99 | | .HasColumnType("varbinary(64)"); |
| 0 | 100 | |
|
| 0 | 101 | | b.Property<byte[]>("LastSentSignature") |
| 0 | 102 | | .HasColumnType("varbinary(64)"); |
| 0 | 103 | |
|
| 0 | 104 | | b.Property<long>("LocalBalanceSatoshis") |
| 0 | 105 | | .HasColumnType("bigint"); |
| 0 | 106 | |
|
| 0 | 107 | | b.Property<decimal>("LocalNextHtlcId") |
| 0 | 108 | | .HasColumnType("decimal(20,0)"); |
| 0 | 109 | |
|
| 0 | 110 | | b.Property<decimal>("LocalRevocationNumber") |
| 0 | 111 | | .HasColumnType("decimal(20,0)"); |
| 0 | 112 | |
|
| 0 | 113 | | b.Property<long>("RemoteBalanceSatoshis") |
| 0 | 114 | | .HasColumnType("bigint"); |
| 0 | 115 | |
|
| 0 | 116 | | b.Property<decimal>("RemoteNextHtlcId") |
| 0 | 117 | | .HasColumnType("decimal(20,0)"); |
| 0 | 118 | |
|
| 0 | 119 | | b.Property<byte[]>("RemoteNodeId") |
| 0 | 120 | | .IsRequired() |
| 0 | 121 | | .HasColumnType("varbinary(32)"); |
| 0 | 122 | |
|
| 0 | 123 | | b.Property<decimal>("RemoteRevocationNumber") |
| 0 | 124 | | .HasColumnType("decimal(20,0)"); |
| 0 | 125 | |
|
| 0 | 126 | | b.Property<byte>("State") |
| 0 | 127 | | .HasColumnType("tinyint"); |
| 0 | 128 | |
|
| 0 | 129 | | b.Property<byte>("Version") |
| 0 | 130 | | .HasColumnType("tinyint"); |
| 0 | 131 | |
|
| 0 | 132 | | b.HasKey("ChannelId"); |
| 0 | 133 | |
|
| 0 | 134 | | b.ToTable("Channels"); |
| 0 | 135 | | }); |
| | 136 | |
|
| 0 | 137 | | modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.ChannelKeySetEntity", b => |
| 0 | 138 | | { |
| 0 | 139 | | b.Property<byte[]>("ChannelId") |
| 0 | 140 | | .HasColumnType("varbinary(32)"); |
| 0 | 141 | |
|
| 0 | 142 | | b.Property<bool>("IsLocal") |
| 0 | 143 | | .HasColumnType("bit"); |
| 0 | 144 | |
|
| 0 | 145 | | b.Property<decimal>("CurrentPerCommitmentIndex") |
| 0 | 146 | | .HasColumnType("decimal(20,0)"); |
| 0 | 147 | |
|
| 0 | 148 | | b.Property<byte[]>("CurrentPerCommitmentPoint") |
| 0 | 149 | | .IsRequired() |
| 0 | 150 | | .HasColumnType("varbinary(33)"); |
| 0 | 151 | |
|
| 0 | 152 | | b.Property<byte[]>("DelayedPaymentBasepoint") |
| 0 | 153 | | .IsRequired() |
| 0 | 154 | | .HasColumnType("varbinary(33)"); |
| 0 | 155 | |
|
| 0 | 156 | | b.Property<byte[]>("FundingPubKey") |
| 0 | 157 | | .IsRequired() |
| 0 | 158 | | .HasColumnType("varbinary(33)"); |
| 0 | 159 | |
|
| 0 | 160 | | b.Property<byte[]>("HtlcBasepoint") |
| 0 | 161 | | .IsRequired() |
| 0 | 162 | | .HasColumnType("varbinary(33)"); |
| 0 | 163 | |
|
| 0 | 164 | | b.Property<long>("KeyIndex") |
| 0 | 165 | | .HasColumnType("bigint"); |
| 0 | 166 | |
|
| 0 | 167 | | b.Property<byte[]>("LastRevealedPerCommitmentSecret") |
| 0 | 168 | | .HasColumnType("varbinary(max)"); |
| 0 | 169 | |
|
| 0 | 170 | | b.Property<byte[]>("PaymentBasepoint") |
| 0 | 171 | | .IsRequired() |
| 0 | 172 | | .HasColumnType("varbinary(33)"); |
| 0 | 173 | |
|
| 0 | 174 | | b.Property<byte[]>("RevocationBasepoint") |
| 0 | 175 | | .IsRequired() |
| 0 | 176 | | .HasColumnType("varbinary(33)"); |
| 0 | 177 | |
|
| 0 | 178 | | b.HasKey("ChannelId", "IsLocal"); |
| 0 | 179 | |
|
| 0 | 180 | | b.ToTable("ChannelKeySets"); |
| 0 | 181 | | }); |
| | 182 | |
|
| 0 | 183 | | modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.HtlcEntity", b => |
| 0 | 184 | | { |
| 0 | 185 | | b.Property<byte[]>("ChannelId") |
| 0 | 186 | | .HasColumnType("varbinary(32)"); |
| 0 | 187 | |
|
| 0 | 188 | | b.Property<decimal>("HtlcId") |
| 0 | 189 | | .HasColumnType("decimal(20,0)"); |
| 0 | 190 | |
|
| 0 | 191 | | b.Property<byte>("Direction") |
| 0 | 192 | | .HasColumnType("tinyint"); |
| 0 | 193 | |
|
| 0 | 194 | | b.Property<byte[]>("AddMessageBytes") |
| 0 | 195 | | .IsRequired() |
| 0 | 196 | | .HasColumnType("varbinary(max)"); |
| 0 | 197 | |
|
| 0 | 198 | | b.Property<decimal>("AmountMsat") |
| 0 | 199 | | .HasColumnType("decimal(20,0)"); |
| 0 | 200 | |
|
| 0 | 201 | | b.Property<long>("CltvExpiry") |
| 0 | 202 | | .HasColumnType("bigint"); |
| 0 | 203 | |
|
| 0 | 204 | | b.Property<decimal>("ObscuredCommitmentNumber") |
| 0 | 205 | | .HasColumnType("decimal(20,0)"); |
| 0 | 206 | |
|
| 0 | 207 | | b.Property<byte[]>("PaymentHash") |
| 0 | 208 | | .IsRequired() |
| 0 | 209 | | .HasColumnType("varbinary(32)"); |
| 0 | 210 | |
|
| 0 | 211 | | b.Property<byte[]>("PaymentPreimage") |
| 0 | 212 | | .HasColumnType("varbinary(32)"); |
| 0 | 213 | |
|
| 0 | 214 | | b.Property<byte[]>("Signature") |
| 0 | 215 | | .HasColumnType("varbinary(max)"); |
| 0 | 216 | |
|
| 0 | 217 | | b.Property<byte>("State") |
| 0 | 218 | | .HasColumnType("tinyint"); |
| 0 | 219 | |
|
| 0 | 220 | | b.HasKey("ChannelId", "HtlcId", "Direction"); |
| 0 | 221 | |
|
| 0 | 222 | | b.ToTable("Htlcs"); |
| 0 | 223 | | }); |
| | 224 | |
|
| 0 | 225 | | modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.ChannelConfigEntity", b => |
| 0 | 226 | | { |
| 0 | 227 | | b.HasOne("NLightning.Infrastructure.Persistence.Entities.ChannelEntity", null) |
| 0 | 228 | | .WithOne("Config") |
| 0 | 229 | | .HasForeignKey("NLightning.Infrastructure.Persistence.Entities.ChannelConfigEntity", "ChannelId" |
| 0 | 230 | | .OnDelete(DeleteBehavior.Cascade) |
| 0 | 231 | | .IsRequired(); |
| 0 | 232 | | }); |
| | 233 | |
|
| 0 | 234 | | modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.ChannelKeySetEntity", b => |
| 0 | 235 | | { |
| 0 | 236 | | b.HasOne("NLightning.Infrastructure.Persistence.Entities.ChannelEntity", null) |
| 0 | 237 | | .WithMany("KeySets") |
| 0 | 238 | | .HasForeignKey("ChannelId") |
| 0 | 239 | | .OnDelete(DeleteBehavior.Cascade) |
| 0 | 240 | | .IsRequired(); |
| 0 | 241 | | }); |
| | 242 | |
|
| 0 | 243 | | modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.HtlcEntity", b => |
| 0 | 244 | | { |
| 0 | 245 | | b.HasOne("NLightning.Infrastructure.Persistence.Entities.ChannelEntity", null) |
| 0 | 246 | | .WithMany("Htlcs") |
| 0 | 247 | | .HasForeignKey("ChannelId") |
| 0 | 248 | | .OnDelete(DeleteBehavior.Cascade) |
| 0 | 249 | | .IsRequired(); |
| 0 | 250 | | }); |
| | 251 | |
|
| 0 | 252 | | modelBuilder.Entity("NLightning.Infrastructure.Persistence.Entities.ChannelEntity", b => |
| 0 | 253 | | { |
| 0 | 254 | | b.Navigation("Config"); |
| 0 | 255 | |
|
| 0 | 256 | | b.Navigation("Htlcs"); |
| 0 | 257 | |
|
| 0 | 258 | | b.Navigation("KeySets"); |
| 0 | 259 | | }); |
| | 260 | | #pragma warning restore 612, 618 |
| 0 | 261 | | } |
| | 262 | | } |
| | 263 | | } |