Skip to content

Instantly share code, notes, and snippets.

@Mart-Bogdan
Created September 1, 2020 12:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mart-Bogdan/53e6b8478ddc0a0053db7e9f7f450add to your computer and use it in GitHub Desktop.
Save Mart-Bogdan/53e6b8478ddc0a0053db7e9f7f450add to your computer and use it in GitHub Desktop.
EF track migration apply time
public partial class SmartMigrationsTable : Migration
{
protected override void Up(MigrationBuilder builder)
{
builder.Sql("alter table \"__EFMigrationsHistory\" add column IF NOT EXISTS id serial;");
builder.Sql(
"alter table \"__EFMigrationsHistory\" add column IF NOT EXISTS created_ts timestamptz default now();"
);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment