using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Marco.Pms.DataAccess.Migrations { /// public partial class Added_FCMTokenMApping_Table : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "FCMTokenMappings", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), EmployeeId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), FcmToken = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), TenantId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci") }, constraints: table => { table.PrimaryKey("PK_FCMTokenMappings", x => x.Id); table.ForeignKey( name: "FK_FCMTokenMappings_Tenants_TenantId", column: x => x.TenantId, principalTable: "Tenants", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateIndex( name: "IX_FCMTokenMappings_TenantId", table: "FCMTokenMappings", column: "TenantId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "FCMTokenMappings"); } } }