chore: format via csharpier

This commit is contained in:
2026-01-09 15:13:57 -05:00
parent 284c5e927e
commit 7a2eb699f4
35 changed files with 784 additions and 464 deletions
@@ -14,7 +14,8 @@ namespace SharpbinV3.Server.Migrations
name: "Users",
columns: table => new
{
UID = table.Column<int>(type: "INTEGER", nullable: false)
UID = table
.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
UUID = table.Column<Guid>(type: "TEXT", nullable: false),
Username = table.Column<string>(type: "TEXT", nullable: false),
@@ -23,18 +24,20 @@ namespace SharpbinV3.Server.Migrations
DisplayName = table.Column<string>(type: "TEXT", nullable: true),
LastLogin = table.Column<long>(type: "INTEGER", nullable: true),
Roles = table.Column<string>(type: "TEXT", nullable: false),
Visiblity = table.Column<int>(type: "INTEGER", nullable: false)
Visiblity = table.Column<int>(type: "INTEGER", nullable: false),
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.UID);
});
}
);
migrationBuilder.CreateTable(
name: "Pastes",
columns: table => new
{
PID = table.Column<int>(type: "INTEGER", nullable: false)
PID = table
.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
UUID = table.Column<string>(type: "TEXT", nullable: false),
ID = table.Column<string>(type: "TEXT", nullable: true),
@@ -48,7 +51,7 @@ namespace SharpbinV3.Server.Migrations
Views = table.Column<int>(type: "INTEGER", nullable: false),
Syntax = table.Column<string>(type: "TEXT", nullable: true),
Visiblity = table.Column<int>(type: "INTEGER", nullable: false),
ExpiresAt = table.Column<long>(type: "INTEGER", nullable: false)
ExpiresAt = table.Column<long>(type: "INTEGER", nullable: false),
},
constraints: table =>
{
@@ -57,8 +60,10 @@ namespace SharpbinV3.Server.Migrations
name: "FK_Pastes_Users_UserUID",
column: x => x.UserUID,
principalTable: "Users",
principalColumn: "UID");
});
principalColumn: "UID"
);
}
);
migrationBuilder.CreateTable(
name: "RefreshTokens",
@@ -70,7 +75,7 @@ namespace SharpbinV3.Server.Migrations
CreatedAt = table.Column<long>(type: "INTEGER", nullable: false),
ExpiresAt = table.Column<long>(type: "INTEGER", nullable: false),
Used = table.Column<bool>(type: "INTEGER", nullable: false),
UserUID = table.Column<int>(type: "INTEGER", nullable: true)
UserUID = table.Column<int>(type: "INTEGER", nullable: true),
},
constraints: table =>
{
@@ -79,81 +84,87 @@ namespace SharpbinV3.Server.Migrations
name: "FK_RefreshTokens_Users_UserUID",
column: x => x.UserUID,
principalTable: "Users",
principalColumn: "UID");
});
principalColumn: "UID"
);
}
);
migrationBuilder.CreateIndex(
name: "IX_Pastes_AuthorUUID",
table: "Pastes",
column: "AuthorUUID");
column: "AuthorUUID"
);
migrationBuilder.CreateIndex(
name: "IX_Pastes_ExpiresAt",
table: "Pastes",
column: "ExpiresAt");
column: "ExpiresAt"
);
migrationBuilder.CreateIndex(
name: "IX_Pastes_ID",
table: "Pastes",
column: "ID",
unique: true);
unique: true
);
migrationBuilder.CreateIndex(
name: "IX_Pastes_PID",
table: "Pastes",
column: "PID",
unique: true);
unique: true
);
migrationBuilder.CreateIndex(
name: "IX_Pastes_UserUID",
table: "Pastes",
column: "UserUID");
column: "UserUID"
);
migrationBuilder.CreateIndex(
name: "IX_Pastes_UUID",
table: "Pastes",
column: "UUID",
unique: true);
unique: true
);
migrationBuilder.CreateIndex(
name: "IX_Pastes_Views",
table: "Pastes",
column: "Views");
migrationBuilder.CreateIndex(name: "IX_Pastes_Views", table: "Pastes", column: "Views");
migrationBuilder.CreateIndex(
name: "IX_Pastes_Visiblity",
table: "Pastes",
column: "Visiblity");
column: "Visiblity"
);
migrationBuilder.CreateIndex(
name: "IX_RefreshTokens_UserUID",
table: "RefreshTokens",
column: "UserUID");
column: "UserUID"
);
migrationBuilder.CreateIndex(
name: "IX_Users_UID",
table: "Users",
column: "UID",
unique: true);
unique: true
);
migrationBuilder.CreateIndex(
name: "IX_Users_UUID",
table: "Users",
column: "UUID",
unique: true);
unique: true
);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Pastes");
migrationBuilder.DropTable(name: "Pastes");
migrationBuilder.DropTable(
name: "RefreshTokens");
migrationBuilder.DropTable(name: "RefreshTokens");
migrationBuilder.DropTable(
name: "Users");
migrationBuilder.DropTable(name: "Users");
}
}
}