-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
770 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
MicrobotApi/Database/Migrations/20240309205050_init.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace MicrobotApi.Database.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class init : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Sessions", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(type: "uuid", nullable: false), | ||
IsLoggedIn = table.Column<bool>(type: "boolean", nullable: false), | ||
Version = table.Column<string>(type: "text", nullable: false), | ||
LastPing = table.Column<DateTime>(type: "timestamp with time zone", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Sessions", x => x.Id); | ||
}); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Sessions"); | ||
} | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
MicrobotApi/Database/Migrations/20240309210806_lastpinged.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
MicrobotApi/Database/Migrations/20240309210806_lastpinged.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace MicrobotApi.Database.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class lastpinged : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
|
||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
|
||
} | ||
} | ||
} |
96 changes: 96 additions & 0 deletions
96
MicrobotApi/Database/Migrations/20240505202109_user.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace MicrobotApi.Database.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class user : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Users", | ||
columns: table => new | ||
{ | ||
Id = table.Column<Guid>(type: "uuid", nullable: false), | ||
Token = table.Column<string>(type: "text", nullable: false), | ||
RefreshToken = table.Column<string>(type: "text", nullable: false), | ||
TokenExpiry = table.Column<DateTime>(type: "timestamp with time zone", nullable: false), | ||
Discriminator = table.Column<string>(type: "character varying(13)", maxLength: 13, nullable: false), | ||
DiscordId = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Users", x => x.Id); | ||
}); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Users_DiscordId", | ||
table: "Users", | ||
column: "DiscordId"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Users"); | ||
} | ||
} | ||
} |
Oops, something went wrong.