Created
September 1, 2020 12:15
-
-
Save Mart-Bogdan/53e6b8478ddc0a0053db7e9f7f450add to your computer and use it in GitHub Desktop.
EF track migration apply time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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