mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
[SG-58] Avatar color selector (#2330)
* chore: backend work * changed typing to match efc * Update User_Update.sql * fix: script cleanup * fix: adjust max length * fix: adjust max length * fix: added missing script changes * fix: use short form for creating objects * add: mysql migrations * chore: add mysql script * chore: posgres migrations * chore: postgres migrations * fix: lint * Update 20221115034053_AvatarColor.cs * fix: removed gravatar inline (#2447) Co-authored-by: Todd Martin <tmartin@bitwarden.com> Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
This commit is contained in:
1676
util/MySqlMigrations/Migrations/20221115030843_AvatarColor.Designer.cs
generated
Normal file
1676
util/MySqlMigrations/Migrations/20221115030843_AvatarColor.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,25 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
namespace Bit.MySqlMigrations.Migrations;
|
||||
|
||||
public partial class AvatarColor : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "AvatarColor",
|
||||
table: "User",
|
||||
type: "varchar(7)",
|
||||
maxLength: 7,
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "AvatarColor",
|
||||
table: "User");
|
||||
}
|
||||
}
|
@ -1160,6 +1160,10 @@ namespace Bit.MySqlMigrations.Migrations
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("varchar(30)");
|
||||
|
||||
b.Property<string>("AvatarColor")
|
||||
.HasMaxLength(7)
|
||||
.HasColumnType("varchar(7)");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
START TRANSACTION;
|
||||
|
||||
ALTER TABLE `User` ADD `AvatarColor` varchar(7) CHARACTER SET utf8mb4 NULL;
|
||||
|
||||
INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`)
|
||||
VALUES ('20221115030843_AvatarColor', '6.0.4');
|
||||
|
||||
COMMIT;
|
||||
|
Reference in New Issue
Block a user