using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace AsbCloudDb.Migrations { public partial class Enable_nullable_on_Permission_Measure : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "name", table: "t_permission", type: "character varying(255)", maxLength: 255, nullable: false, defaultValue: "", comment: "Название", oldClrType: typeof(string), oldType: "character varying(255)", oldMaxLength: 255, oldNullable: true, oldComment: "Название"); migrationBuilder.AlterColumn( name: "name", table: "t_measure_category", type: "text", nullable: false, defaultValue: "", comment: "Название категории", oldClrType: typeof(string), oldType: "text", oldNullable: true, oldComment: "Название категории"); migrationBuilder.AlterColumn( name: "data", table: "t_measure", type: "jsonb", nullable: false, defaultValue: "{}", comment: "Данные таблицы последних данных", oldClrType: typeof(string), oldType: "jsonb", oldNullable: true, oldComment: "Данные таблицы последних данных"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "name", table: "t_permission", type: "character varying(255)", maxLength: 255, nullable: true, comment: "Название", oldClrType: typeof(string), oldType: "character varying(255)", oldMaxLength: 255, oldComment: "Название"); migrationBuilder.AlterColumn( name: "name", table: "t_measure_category", type: "text", nullable: true, comment: "Название категории", oldClrType: typeof(string), oldType: "text", oldComment: "Название категории"); migrationBuilder.AlterColumn( name: "data", table: "t_measure", type: "jsonb", nullable: true, comment: "Данные таблицы последних данных", oldClrType: typeof(string), oldType: "jsonb", oldComment: "Данные таблицы последних данных"); } } }