using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace GroupService.Infrastructure.Migrations { /// public partial class add_column : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "group_invitations", columns: table => new { GroupId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), OperatorId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), State = table.Column(type: "int", nullable: false), GroupProfile_Avatar = table.Column(type: "varchar(100)", maxLength: 100, nullable: false), GroupProfile_GroupName = table.Column(type: "varchar(20)", maxLength: 20, nullable: false), OperatorProfile_Avatar = table.Column(type: "varchar(100)", maxLength: 100, nullable: true), OperatorProfile_NickName = table.Column(type: "varchar(20)", maxLength: 20, nullable: false), UserProfile_Avatar = table.Column(type: "varchar(100)", maxLength: 100, nullable: true), UserProfile_NickName = table.Column(type: "varchar(20)", maxLength: 20, nullable: false), Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), IsDeleted = table.Column(type: "tinyint(1)", nullable: false), CreationTime = table.Column(type: "datetime(6)", nullable: false), Deletion = table.Column(type: "datetime(6)", nullable: true), ModificationTime = table.Column(type: "datetime(6)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_group_invitations", x => new { x.GroupId, x.UserId }); }) .Annotation("MySql:Charset", "utf8mb4"); migrationBuilder.CreateTable( name: "group_join_requests", columns: table => new { GroupId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), UserId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), OperatorId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), State = table.Column(type: "int", nullable: false), Description = table.Column(type: "longtext", nullable: false) .Annotation("MySql:Charset", "utf8mb4"), GroupProfile_Avatar = table.Column(type: "varchar(100)", maxLength: 100, nullable: false), GroupProfile_GroupName = table.Column(type: "varchar(20)", maxLength: 20, nullable: false), OperatorProfile_Avatar = table.Column(type: "varchar(100)", maxLength: 100, nullable: true), OperatorProfile_NickName = table.Column(type: "varchar(20)", maxLength: 20, nullable: false), UserProfile_Avatar = table.Column(type: "varchar(100)", maxLength: 100, nullable: true), UserProfile_NickName = table.Column(type: "varchar(20)", maxLength: 20, nullable: false), Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), IsDeleted = table.Column(type: "tinyint(1)", nullable: false), CreationTime = table.Column(type: "datetime(6)", nullable: false), Deletion = table.Column(type: "datetime(6)", nullable: true), ModificationTime = table.Column(type: "datetime(6)", nullable: true) }, constraints: table => { table.PrimaryKey("PK_group_join_requests", x => new { x.GroupId, x.UserId }); }) .Annotation("MySql:Charset", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "group_invitations"); migrationBuilder.DropTable( name: "group_join_requests"); } } }