using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace HrynCo.NotificationService.DAL.EF.Migrations { /// public partial class AddPushChannels : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "push_channels", columns: table => new { id = table.Column(type: "uuid", nullable: false), service_id = table.Column(type: "uuid", nullable: false), firebase_project_id = table.Column(type: "character varying(30)", maxLength: 30, nullable: false), credentials = table.Column(type: "jsonb", nullable: false), is_active = table.Column(type: "boolean", nullable: false), created = table.Column(type: "timestamp with time zone", nullable: false), updated = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { table.PrimaryKey("PK_push_channels", x => x.id); table.ForeignKey( name: "FK_push_channels_services_service_id", column: x => x.service_id, principalTable: "services", principalColumn: "id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_push_channels_service_id", table: "push_channels", column: "service_id", unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "push_channels"); } } }