diff --git a/Tzkt.Data/Migrations/20210714124853_Initial.Designer.cs b/Tzkt.Data/Migrations/20210714124853_Initial.Designer.cs
deleted file mode 100644
index 817427094..000000000
--- a/Tzkt.Data/Migrations/20210714124853_Initial.Designer.cs
+++ /dev/null
@@ -1,2852 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-using Tzkt.Data;
-
-namespace Tzkt.Data.Migrations
-{
- [DbContext(typeof(TzktContext))]
- [Migration("20210714124853_Initial")]
- partial class Initial
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("Relational:MaxIdentifierLength", 63)
- .HasAnnotation("ProductVersion", "5.0.6")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- modelBuilder.Entity("Tzkt.Data.Models.Account", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("Address")
- .IsRequired()
- .HasMaxLength(36)
- .HasColumnType("character(36)")
- .IsFixedLength(true);
-
- b.Property("Balance")
- .HasColumnType("bigint");
-
- b.Property("ContractsCount")
- .HasColumnType("integer");
-
- b.Property("Counter")
- .HasColumnType("integer");
-
- b.Property("DelegateId")
- .HasColumnType("integer");
-
- b.Property("DelegationLevel")
- .HasColumnType("integer");
-
- b.Property("DelegationsCount")
- .HasColumnType("integer");
-
- b.Property("FirstLevel")
- .HasColumnType("integer");
-
- b.Property("LastLevel")
- .HasColumnType("integer");
-
- b.Property("Metadata")
- .HasColumnType("jsonb");
-
- b.Property("MigrationsCount")
- .HasColumnType("integer");
-
- b.Property("OriginationsCount")
- .HasColumnType("integer");
-
- b.Property("RevealsCount")
- .HasColumnType("integer");
-
- b.Property("Staked")
- .HasColumnType("boolean");
-
- b.Property("TransactionsCount")
- .HasColumnType("integer");
-
- b.Property("Type")
- .HasColumnType("smallint");
-
- b.HasKey("Id");
-
- b.HasIndex("Address")
- .IsUnique();
-
- b.HasIndex("DelegateId");
-
- b.HasIndex("FirstLevel");
-
- b.HasIndex("Id")
- .IsUnique();
-
- b.HasIndex("Metadata")
- .HasMethod("gin")
- .HasOperators(new[] { "jsonb_path_ops" });
-
- b.HasIndex("Staked");
-
- b.HasIndex("Type");
-
- b.ToTable("Accounts");
-
- b.HasDiscriminator("Type");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.ActivationOperation", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("AccountId")
- .HasColumnType("integer");
-
- b.Property("Balance")
- .HasColumnType("bigint");
-
- b.Property("Level")
- .HasColumnType("integer");
-
- b.Property("OpHash")
- .IsRequired()
- .HasMaxLength(51)
- .HasColumnType("character(51)")
- .IsFixedLength(true);
-
- b.Property("Timestamp")
- .HasColumnType("timestamp without time zone");
-
- b.HasKey("Id");
-
- b.HasIndex("AccountId")
- .IsUnique();
-
- b.HasIndex("Level");
-
- b.HasIndex("OpHash");
-
- b.ToTable("ActivationOps");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.AppState", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("AccountCounter")
- .HasColumnType("integer");
-
- b.Property("AccountsCount")
- .HasColumnType("integer");
-
- b.Property("ActivationOpsCount")
- .HasColumnType("integer");
-
- b.Property("BallotOpsCount")
- .HasColumnType("integer");
-
- b.Property("BigMapCounter")
- .HasColumnType("integer");
-
- b.Property("BigMapKeyCounter")
- .HasColumnType("integer");
-
- b.Property("BigMapUpdateCounter")
- .HasColumnType("integer");
-
- b.Property("BlocksCount")
- .HasColumnType("integer");
-
- b.Property("Chain")
- .HasColumnType("text");
-
- b.Property("ChainId")
- .HasColumnType("text");
-
- b.Property("CommitmentsCount")
- .HasColumnType("integer");
-
- b.Property("Cycle")
- .HasColumnType("integer");
-
- b.Property("CyclesCount")
- .HasColumnType("integer");
-
- b.Property("DelegationOpsCount")
- .HasColumnType("integer");
-
- b.Property("DoubleBakingOpsCount")
- .HasColumnType("integer");
-
- b.Property("DoubleEndorsingOpsCount")
- .HasColumnType("integer");
-
- b.Property("EndorsementOpsCount")
- .HasColumnType("integer");
-
- b.Property("Hash")
- .HasColumnType("text");
-
- b.Property("KnownHead")
- .HasColumnType("integer");
-
- b.Property("LastSync")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Level")
- .HasColumnType("integer");
-
- b.Property("ManagerCounter")
- .HasColumnType("integer");
-
- b.Property("Metadata")
- .HasColumnType("jsonb");
-
- b.Property("MigrationOpsCount")
- .HasColumnType("integer");
-
- b.Property("NextProtocol")
- .HasColumnType("text");
-
- b.Property("NonceRevelationOpsCount")
- .HasColumnType("integer");
-
- b.Property("OperationCounter")
- .HasColumnType("integer");
-
- b.Property("OriginationOpsCount")
- .HasColumnType("integer");
-
- b.Property("ProposalOpsCount")
- .HasColumnType("integer");
-
- b.Property("ProposalsCount")
- .HasColumnType("integer");
-
- b.Property("Protocol")
- .HasColumnType("text");
-
- b.Property("ProtocolsCount")
- .HasColumnType("integer");
-
- b.Property("QuoteBtc")
- .HasColumnType("double precision");
-
- b.Property("QuoteCny")
- .HasColumnType("double precision");
-
- b.Property("QuoteEth")
- .HasColumnType("double precision");
-
- b.Property("QuoteEur")
- .HasColumnType("double precision");
-
- b.Property("QuoteJpy")
- .HasColumnType("double precision");
-
- b.Property("QuoteKrw")
- .HasColumnType("double precision");
-
- b.Property("QuoteLevel")
- .HasColumnType("integer");
-
- b.Property("QuoteUsd")
- .HasColumnType("double precision");
-
- b.Property("RevealOpsCount")
- .HasColumnType("integer");
-
- b.Property("RevelationPenaltyOpsCount")
- .HasColumnType("integer");
-
- b.Property("ScriptCounter")
- .HasColumnType("integer");
-
- b.Property("StorageCounter")
- .HasColumnType("integer");
-
- b.Property("Timestamp")
- .HasColumnType("timestamp without time zone");
-
- b.Property("TransactionOpsCount")
- .HasColumnType("integer");
-
- b.Property("VotingEpoch")
- .HasColumnType("integer");
-
- b.Property("VotingPeriod")
- .HasColumnType("integer");
-
- b.HasKey("Id");
-
- b.ToTable("AppState");
-
- b.HasData(
- new
- {
- Id = -1,
- AccountCounter = 0,
- AccountsCount = 0,
- ActivationOpsCount = 0,
- BallotOpsCount = 0,
- BigMapCounter = 0,
- BigMapKeyCounter = 0,
- BigMapUpdateCounter = 0,
- BlocksCount = 0,
- CommitmentsCount = 0,
- Cycle = -1,
- CyclesCount = 0,
- DelegationOpsCount = 0,
- DoubleBakingOpsCount = 0,
- DoubleEndorsingOpsCount = 0,
- EndorsementOpsCount = 0,
- Hash = "",
- KnownHead = 0,
- LastSync = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
- Level = -1,
- ManagerCounter = 0,
- MigrationOpsCount = 0,
- NextProtocol = "",
- NonceRevelationOpsCount = 0,
- OperationCounter = 0,
- OriginationOpsCount = 0,
- ProposalOpsCount = 0,
- ProposalsCount = 0,
- Protocol = "",
- ProtocolsCount = 0,
- QuoteBtc = 0.0,
- QuoteCny = 0.0,
- QuoteEth = 0.0,
- QuoteEur = 0.0,
- QuoteJpy = 0.0,
- QuoteKrw = 0.0,
- QuoteLevel = -1,
- QuoteUsd = 0.0,
- RevealOpsCount = 0,
- RevelationPenaltyOpsCount = 0,
- ScriptCounter = 0,
- StorageCounter = 0,
- Timestamp = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
- TransactionOpsCount = 0,
- VotingEpoch = -1,
- VotingPeriod = -1
- });
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.BakerCycle", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("BakerId")
- .HasColumnType("integer");
-
- b.Property("BlockDeposits")
- .HasColumnType("bigint");
-
- b.Property("Cycle")
- .HasColumnType("integer");
-
- b.Property("DelegatedBalance")
- .HasColumnType("bigint");
-
- b.Property("DelegatorsCount")
- .HasColumnType("integer");
-
- b.Property("DoubleBakingLostDeposits")
- .HasColumnType("bigint");
-
- b.Property("DoubleBakingLostFees")
- .HasColumnType("bigint");
-
- b.Property("DoubleBakingLostRewards")
- .HasColumnType("bigint");
-
- b.Property("DoubleBakingRewards")
- .HasColumnType("bigint");
-
- b.Property("DoubleEndorsingLostDeposits")
- .HasColumnType("bigint");
-
- b.Property("DoubleEndorsingLostFees")
- .HasColumnType("bigint");
-
- b.Property("DoubleEndorsingLostRewards")
- .HasColumnType("bigint");
-
- b.Property("DoubleEndorsingRewards")
- .HasColumnType("bigint");
-
- b.Property("EndorsementDeposits")
- .HasColumnType("bigint");
-
- b.Property("EndorsementRewards")
- .HasColumnType("bigint");
-
- b.Property("Endorsements")
- .HasColumnType("integer");
-
- b.Property("ExpectedBlocks")
- .HasColumnType("double precision");
-
- b.Property("ExpectedEndorsements")
- .HasColumnType("double precision");
-
- b.Property("ExtraBlockFees")
- .HasColumnType("bigint");
-
- b.Property("ExtraBlockRewards")
- .HasColumnType("bigint");
-
- b.Property("ExtraBlocks")
- .HasColumnType("integer");
-
- b.Property("FutureBlockDeposits")
- .HasColumnType("bigint");
-
- b.Property("FutureBlockRewards")
- .HasColumnType("bigint");
-
- b.Property("FutureBlocks")
- .HasColumnType("integer");
-
- b.Property("FutureEndorsementDeposits")
- .HasColumnType("bigint");
-
- b.Property("FutureEndorsementRewards")
- .HasColumnType("bigint");
-
- b.Property("FutureEndorsements")
- .HasColumnType("integer");
-
- b.Property("MissedEndorsementRewards")
- .HasColumnType("bigint");
-
- b.Property("MissedEndorsements")
- .HasColumnType("integer");
-
- b.Property("MissedExtraBlockFees")
- .HasColumnType("bigint");
-
- b.Property("MissedExtraBlockRewards")
- .HasColumnType("bigint");
-
- b.Property("MissedExtraBlocks")
- .HasColumnType("integer");
-
- b.Property("MissedOwnBlockFees")
- .HasColumnType("bigint");
-
- b.Property("MissedOwnBlockRewards")
- .HasColumnType("bigint");
-
- b.Property("MissedOwnBlocks")
- .HasColumnType("integer");
-
- b.Property("OwnBlockFees")
- .HasColumnType("bigint");
-
- b.Property("OwnBlockRewards")
- .HasColumnType("bigint");
-
- b.Property("OwnBlocks")
- .HasColumnType("integer");
-
- b.Property("RevelationLostFees")
- .HasColumnType("bigint");
-
- b.Property("RevelationLostRewards")
- .HasColumnType("bigint");
-
- b.Property("RevelationRewards")
- .HasColumnType("bigint");
-
- b.Property("Rolls")
- .HasColumnType("integer");
-
- b.Property("StakingBalance")
- .HasColumnType("bigint");
-
- b.Property("UncoveredEndorsementRewards")
- .HasColumnType("bigint");
-
- b.Property("UncoveredEndorsements")
- .HasColumnType("integer");
-
- b.Property("UncoveredExtraBlockFees")
- .HasColumnType("bigint");
-
- b.Property("UncoveredExtraBlockRewards")
- .HasColumnType("bigint");
-
- b.Property("UncoveredExtraBlocks")
- .HasColumnType("integer");
-
- b.Property("UncoveredOwnBlockFees")
- .HasColumnType("bigint");
-
- b.Property("UncoveredOwnBlockRewards")
- .HasColumnType("bigint");
-
- b.Property("UncoveredOwnBlocks")
- .HasColumnType("integer");
-
- b.HasKey("Id");
-
- b.HasIndex("BakerId");
-
- b.HasIndex("Cycle");
-
- b.HasIndex("Id")
- .IsUnique();
-
- b.HasIndex("Cycle", "BakerId")
- .IsUnique();
-
- b.ToTable("BakerCycles");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.BakingRight", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("BakerId")
- .HasColumnType("integer");
-
- b.Property("Cycle")
- .HasColumnType("integer");
-
- b.Property("Level")
- .HasColumnType("integer");
-
- b.Property("Priority")
- .HasColumnType("integer");
-
- b.Property("Slots")
- .HasColumnType("integer");
-
- b.Property("Status")
- .HasColumnType("smallint");
-
- b.Property("Type")
- .HasColumnType("smallint");
-
- b.HasKey("Id");
-
- b.HasIndex("Cycle");
-
- b.HasIndex("Level");
-
- b.HasIndex("Cycle", "BakerId");
-
- b.ToTable("BakingRights");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.BallotOperation", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("Epoch")
- .HasColumnType("integer");
-
- b.Property("Level")
- .HasColumnType("integer");
-
- b.Property("OpHash")
- .IsRequired()
- .HasMaxLength(51)
- .HasColumnType("character(51)")
- .IsFixedLength(true);
-
- b.Property("Period")
- .HasColumnType("integer");
-
- b.Property("ProposalId")
- .HasColumnType("integer");
-
- b.Property("Rolls")
- .HasColumnType("integer");
-
- b.Property("SenderId")
- .HasColumnType("integer");
-
- b.Property("Timestamp")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Vote")
- .HasColumnType("integer");
-
- b.HasKey("Id");
-
- b.HasIndex("Epoch");
-
- b.HasIndex("Level");
-
- b.HasIndex("OpHash");
-
- b.HasIndex("Period");
-
- b.HasIndex("ProposalId");
-
- b.HasIndex("SenderId");
-
- b.ToTable("BallotOps");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.BigMap", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("Active")
- .HasColumnType("boolean");
-
- b.Property("ActiveKeys")
- .HasColumnType("integer");
-
- b.Property("ContractId")
- .HasColumnType("integer");
-
- b.Property("FirstLevel")
- .HasColumnType("integer");
-
- b.Property("KeyType")
- .HasColumnType("bytea");
-
- b.Property("LastLevel")
- .HasColumnType("integer");
-
- b.Property("Ptr")
- .HasColumnType("integer");
-
- b.Property("StoragePath")
- .HasColumnType("text");
-
- b.Property("Tags")
- .HasColumnType("integer");
-
- b.Property("TotalKeys")
- .HasColumnType("integer");
-
- b.Property("Updates")
- .HasColumnType("integer");
-
- b.Property("ValueType")
- .HasColumnType("bytea");
-
- b.HasKey("Id");
-
- b.HasAlternateKey("Ptr");
-
- b.HasIndex("ContractId");
-
- b.HasIndex("Id")
- .IsUnique();
-
- b.HasIndex("Ptr")
- .IsUnique();
-
- b.ToTable("BigMaps");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.BigMapKey", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("Active")
- .HasColumnType("boolean");
-
- b.Property("BigMapPtr")
- .HasColumnType("integer");
-
- b.Property("FirstLevel")
- .HasColumnType("integer");
-
- b.Property("JsonKey")
- .HasColumnType("jsonb");
-
- b.Property("JsonValue")
- .HasColumnType("jsonb");
-
- b.Property("KeyHash")
- .HasMaxLength(54)
- .HasColumnType("character varying(54)");
-
- b.Property("LastLevel")
- .HasColumnType("integer");
-
- b.Property("RawKey")
- .HasColumnType("bytea");
-
- b.Property("RawValue")
- .HasColumnType("bytea");
-
- b.Property("Updates")
- .HasColumnType("integer");
-
- b.HasKey("Id");
-
- b.HasIndex("BigMapPtr");
-
- b.HasIndex("Id")
- .IsUnique();
-
- b.HasIndex("JsonKey")
- .HasMethod("gin")
- .HasOperators(new[] { "jsonb_path_ops" });
-
- b.HasIndex("JsonValue")
- .HasMethod("gin")
- .HasOperators(new[] { "jsonb_path_ops" });
-
- b.HasIndex("LastLevel");
-
- b.HasIndex("BigMapPtr", "Active")
- .HasFilter("\"Active\" = true");
-
- b.HasIndex("BigMapPtr", "KeyHash");
-
- b.ToTable("BigMapKeys");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.BigMapUpdate", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("Action")
- .HasColumnType("integer");
-
- b.Property("BigMapKeyId")
- .HasColumnType("integer");
-
- b.Property("BigMapPtr")
- .HasColumnType("integer");
-
- b.Property("JsonValue")
- .HasColumnType("jsonb");
-
- b.Property("Level")
- .HasColumnType("integer");
-
- b.Property("MigrationId")
- .HasColumnType("integer");
-
- b.Property("OriginationId")
- .HasColumnType("integer");
-
- b.Property("RawValue")
- .HasColumnType("bytea");
-
- b.Property("TransactionId")
- .HasColumnType("integer");
-
- b.HasKey("Id");
-
- b.HasIndex("BigMapKeyId")
- .HasFilter("\"BigMapKeyId\" is not null");
-
- b.HasIndex("BigMapPtr");
-
- b.HasIndex("Id")
- .IsUnique();
-
- b.HasIndex("Level");
-
- b.HasIndex("MigrationId")
- .HasFilter("\"MigrationId\" is not null");
-
- b.HasIndex("OriginationId")
- .HasFilter("\"OriginationId\" is not null");
-
- b.HasIndex("TransactionId")
- .HasFilter("\"TransactionId\" is not null");
-
- b.ToTable("BigMapUpdates");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.Block", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("BakerId")
- .HasColumnType("integer");
-
- b.Property("Cycle")
- .HasColumnType("integer");
-
- b.Property("Deposit")
- .HasColumnType("bigint");
-
- b.Property("Events")
- .HasColumnType("integer");
-
- b.Property("Fees")
- .HasColumnType("bigint");
-
- b.Property("Hash")
- .IsRequired()
- .HasMaxLength(51)
- .HasColumnType("character(51)")
- .IsFixedLength(true);
-
- b.Property("LBEscapeEma")
- .HasColumnType("integer");
-
- b.Property("LBEscapeVote")
- .HasColumnType("boolean");
-
- b.Property("Level")
- .HasColumnType("integer");
-
- b.Property("Metadata")
- .HasColumnType("jsonb");
-
- b.Property("Operations")
- .HasColumnType("integer");
-
- b.Property("Priority")
- .HasColumnType("integer");
-
- b.Property("ProtoCode")
- .HasColumnType("integer");
-
- b.Property("ResetDeactivation")
- .HasColumnType("integer");
-
- b.Property("RevelationId")
- .HasColumnType("integer");
-
- b.Property("Reward")
- .HasColumnType("bigint");
-
- b.Property("SoftwareId")
- .HasColumnType("integer");
-
- b.Property("Timestamp")
- .HasColumnType("timestamp without time zone");
-
- b.Property("Validations")
- .HasColumnType("integer");
-
- b.HasKey("Id");
-
- b.HasIndex("BakerId");
-
- b.HasIndex("Hash")
- .IsUnique();
-
- b.HasIndex("Level")
- .IsUnique();
-
- b.HasIndex("ProtoCode");
-
- b.HasIndex("RevelationId")
- .IsUnique();
-
- b.HasIndex("SoftwareId");
-
- b.ToTable("Blocks");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.Commitment", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("AccountId")
- .HasColumnType("integer");
-
- b.Property("Address")
- .IsRequired()
- .HasMaxLength(37)
- .HasColumnType("character(37)")
- .IsFixedLength(true);
-
- b.Property("Balance")
- .HasColumnType("bigint");
-
- b.Property("Level")
- .HasColumnType("integer");
-
- b.HasKey("Id");
-
- b.HasIndex("Address")
- .IsUnique();
-
- b.HasIndex("Id")
- .IsUnique();
-
- b.ToTable("Commitments");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.Cycle", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("FirstLevel")
- .HasColumnType("integer");
-
- b.Property("Index")
- .HasColumnType("integer");
-
- b.Property("LastLevel")
- .HasColumnType("integer");
-
- b.Property("Seed")
- .IsRequired()
- .HasMaxLength(64)
- .HasColumnType("character(64)")
- .IsFixedLength(true);
-
- b.Property("SnapshotIndex")
- .HasColumnType("integer");
-
- b.Property("SnapshotLevel")
- .HasColumnType("integer");
-
- b.Property("TotalBakers")
- .HasColumnType("integer");
-
- b.Property("TotalDelegated")
- .HasColumnType("bigint");
-
- b.Property("TotalDelegators")
- .HasColumnType("integer");
-
- b.Property("TotalRolls")
- .HasColumnType("integer");
-
- b.Property("TotalStaking")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasAlternateKey("Index");
-
- b.HasIndex("Index")
- .IsUnique();
-
- b.ToTable("Cycles");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.DelegationOperation", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("AllocationFee")
- .HasColumnType("bigint");
-
- b.Property("Amount")
- .HasColumnType("bigint");
-
- b.Property("BakerFee")
- .HasColumnType("bigint");
-
- b.Property("Counter")
- .HasColumnType("integer");
-
- b.Property("DelegateId")
- .HasColumnType("integer");
-
- b.Property("Errors")
- .HasColumnType("text");
-
- b.Property("GasLimit")
- .HasColumnType("integer");
-
- b.Property("GasUsed")
- .HasColumnType("integer");
-
- b.Property("InitiatorId")
- .HasColumnType("integer");
-
- b.Property("Level")
- .HasColumnType("integer");
-
- b.Property("Nonce")
- .HasColumnType("integer");
-
- b.Property("OpHash")
- .IsRequired()
- .HasMaxLength(51)
- .HasColumnType("character(51)")
- .IsFixedLength(true);
-
- b.Property("PrevDelegateId")
- .HasColumnType("integer");
-
- b.Property("ResetDeactivation")
- .HasColumnType("integer");
-
- b.Property("SenderId")
- .HasColumnType("integer");
-
- b.Property("Status")
- .HasColumnType("smallint");
-
- b.Property("StorageFee")
- .HasColumnType("bigint");
-
- b.Property("StorageLimit")
- .HasColumnType("integer");
-
- b.Property("StorageUsed")
- .HasColumnType("integer");
-
- b.Property("Timestamp")
- .HasColumnType("timestamp without time zone");
-
- b.HasKey("Id");
-
- b.HasIndex("DelegateId");
-
- b.HasIndex("InitiatorId");
-
- b.HasIndex("Level");
-
- b.HasIndex("OpHash");
-
- b.HasIndex("PrevDelegateId");
-
- b.HasIndex("SenderId");
-
- b.ToTable("DelegationOps");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.DelegatorCycle", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("BakerId")
- .HasColumnType("integer");
-
- b.Property("Balance")
- .HasColumnType("bigint");
-
- b.Property("Cycle")
- .HasColumnType("integer");
-
- b.Property("DelegatorId")
- .HasColumnType("integer");
-
- b.HasKey("Id");
-
- b.HasIndex("Cycle");
-
- b.HasIndex("DelegatorId");
-
- b.HasIndex("Cycle", "BakerId");
-
- b.HasIndex("Cycle", "DelegatorId")
- .IsUnique();
-
- b.ToTable("DelegatorCycles");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.DoubleBakingOperation", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("AccusedLevel")
- .HasColumnType("integer");
-
- b.Property("AccuserId")
- .HasColumnType("integer");
-
- b.Property("AccuserReward")
- .HasColumnType("bigint");
-
- b.Property("Level")
- .HasColumnType("integer");
-
- b.Property("OffenderId")
- .HasColumnType("integer");
-
- b.Property("OffenderLostDeposit")
- .HasColumnType("bigint");
-
- b.Property("OffenderLostFee")
- .HasColumnType("bigint");
-
- b.Property("OffenderLostReward")
- .HasColumnType("bigint");
-
- b.Property("OpHash")
- .IsRequired()
- .HasMaxLength(51)
- .HasColumnType("character(51)")
- .IsFixedLength(true);
-
- b.Property("Timestamp")
- .HasColumnType("timestamp without time zone");
-
- b.HasKey("Id");
-
- b.HasIndex("AccuserId");
-
- b.HasIndex("Level");
-
- b.HasIndex("OffenderId");
-
- b.HasIndex("OpHash");
-
- b.ToTable("DoubleBakingOps");
- });
-
- modelBuilder.Entity("Tzkt.Data.Models.DoubleEndorsingOperation", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("integer")
- .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
-
- b.Property("AccusedLevel")
- .HasColumnType("integer");
-
- b.Property("AccuserId")
- .HasColumnType("integer");
-
- b.Property