using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using System; using System.Collections.Generic; namespace SharedLibraryCore.Migrations.Sqlite { public partial class AddClientMeta : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "EFMeta", columns: table => new { MetaId = table.Column(nullable: false) .Annotation("Sqlite:Autoincrement", true) .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), Active = table.Column(nullable: false), ClientId = table.Column(nullable: false), Created = table.Column(nullable: false), Extra = table.Column(nullable: true), Key = table.Column(nullable: false), Updated = table.Column(nullable: false), Value = table.Column(nullable: false) }, constraints: table => { table.PrimaryKey("PK_EFMeta", x => x.MetaId); table.ForeignKey( name: "FK_EFMeta_EFClients_ClientId", column: x => x.ClientId, principalTable: "EFClients", principalColumn: "ClientId", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_EFMeta_ClientId", table: "EFMeta", column: "ClientId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "EFMeta"); } } }