db testing
This commit is contained in:
parent
555087232c
commit
b75d0add7d
3 changed files with 38 additions and 10 deletions
|
|
@ -11,6 +11,10 @@ namespace Yavsc.Migrations
|
|||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
var declarationDateDefaultSql = ActiveProvider == "Microsoft.EntityFrameworkCore.Sqlite"
|
||||
? "CURRENT_TIMESTAMP"
|
||||
: "LOCALTIMESTAMP";
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Activities",
|
||||
columns: table => new
|
||||
|
|
@ -1484,7 +1488,7 @@ namespace Yavsc.Migrations
|
|||
Platform = table.Column<string>(type: "text", nullable: true),
|
||||
Version = table.Column<string>(type: "text", nullable: true),
|
||||
DeviceOwnerId = table.Column<string>(type: "text", nullable: true),
|
||||
DeclarationDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "LOCALTIMESTAMP"),
|
||||
DeclarationDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: declarationDateDefaultSql),
|
||||
LatestActivityUpdate = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue