using System.Collections.Generic; using Microsoft.EntityFrameworkCore.Migrations; using vendorApproverBackend.Entities; #nullable disable namespace vendorApproverBackend.Migrations { /// public partial class AddLetterProductIdToPaymentDetails : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "description", table: "WorkExperiences", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn>( name: "local_owners", table: "vendor_request_letters", type: "jsonb", nullable: true, oldClrType: typeof(List), oldType: "jsonb"); migrationBuilder.AlterColumn>( name: "contact_persons", table: "vendor_request_letters", type: "jsonb", nullable: true, oldClrType: typeof(List), oldType: "jsonb"); migrationBuilder.AlterColumn>( name: "board_of_directors", table: "vendor_request_letters", type: "jsonb", nullable: true, oldClrType: typeof(List), oldType: "jsonb"); migrationBuilder.AlterColumn>( name: "authorized_signatories", table: "vendor_request_letters", type: "jsonb", nullable: true, oldClrType: typeof(List), oldType: "jsonb"); migrationBuilder.AlterColumn>( name: "associated_companies", table: "vendor_request_letters", type: "jsonb", nullable: true, oldClrType: typeof(List), oldType: "jsonb"); migrationBuilder.AlterColumn( name: "user_name", table: "users_table", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "password", table: "users_table", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "name", table: "users_table", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "email", table: "users_table", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn>( name: "device_ids", table: "users_table", type: "text[]", nullable: true, oldClrType: typeof(List), oldType: "text[]"); migrationBuilder.AlterColumn( name: "signature_data", table: "signatures", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "name", table: "signatures", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "comments", table: "request_renews", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "message", table: "request_renew_clarifications", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "status", table: "renewal_payments", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "criteria", table: "renewal_part2_evaluations", type: "jsonb", nullable: true, oldClrType: typeof(string), oldType: "jsonb"); migrationBuilder.AlterColumn>( name: "RequiredDocuments", table: "renewal_clarifications", type: "jsonb", nullable: true, oldClrType: typeof(List), oldType: "jsonb"); migrationBuilder.AlterColumn( name: "reference", table: "PaymentDetail", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "description", table: "PaymentDetail", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AddColumn( name: "product_id", table: "PaymentDetail", type: "bigint", nullable: true); migrationBuilder.AlterColumn( name: "subject", table: "notificationmodel", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "logUrl", table: "notificationmodel", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "content", table: "notificationmodel", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "file_url", table: "File_model", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "evaluation_date", table: "evaluation_data", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "evaluated_by", table: "evaluation_data", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "Evaluation", table: "evaluation_data", type: "jsonb", nullable: true, oldClrType: typeof(string), oldType: "jsonb"); migrationBuilder.AlterColumn>( name: "certification_ids", table: "employee_applications", type: "bigint[]", nullable: true, oldClrType: typeof(List), oldType: "bigint[]"); migrationBuilder.AlterColumn( name: "supplier_name", table: "certifications", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "certification_type", table: "certifications", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "certification_number", table: "certifications", type: "text", nullable: true, oldClrType: typeof(string), oldType: "text"); migrationBuilder.AlterColumn( name: "Description", table: "CertificationPacks", type: "TEXT", nullable: true, oldClrType: typeof(string), oldType: "TEXT"); migrationBuilder.AlterColumn( name: "LabelAr", table: "Categories", type: "character varying(255)", maxLength: 255, nullable: true, oldClrType: typeof(string), oldType: "character varying(255)", oldMaxLength: 255); migrationBuilder.AlterColumn( name: "Label", table: "Categories", type: "character varying(255)", maxLength: 255, nullable: true, oldClrType: typeof(string), oldType: "character varying(255)", oldMaxLength: 255); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "product_id", table: "PaymentDetail"); migrationBuilder.AlterColumn( name: "description", table: "WorkExperiences", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn>( name: "local_owners", table: "vendor_request_letters", type: "jsonb", nullable: false, oldClrType: typeof(List), oldType: "jsonb", oldNullable: true); migrationBuilder.AlterColumn>( name: "contact_persons", table: "vendor_request_letters", type: "jsonb", nullable: false, oldClrType: typeof(List), oldType: "jsonb", oldNullable: true); migrationBuilder.AlterColumn>( name: "board_of_directors", table: "vendor_request_letters", type: "jsonb", nullable: false, oldClrType: typeof(List), oldType: "jsonb", oldNullable: true); migrationBuilder.AlterColumn>( name: "authorized_signatories", table: "vendor_request_letters", type: "jsonb", nullable: false, oldClrType: typeof(List), oldType: "jsonb", oldNullable: true); migrationBuilder.AlterColumn>( name: "associated_companies", table: "vendor_request_letters", type: "jsonb", nullable: false, oldClrType: typeof(List), oldType: "jsonb", oldNullable: true); migrationBuilder.AlterColumn( name: "user_name", table: "users_table", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "password", table: "users_table", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "name", table: "users_table", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "email", table: "users_table", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn>( name: "device_ids", table: "users_table", type: "text[]", nullable: false, oldClrType: typeof(List), oldType: "text[]", oldNullable: true); migrationBuilder.AlterColumn( name: "signature_data", table: "signatures", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "name", table: "signatures", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "comments", table: "request_renews", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "message", table: "request_renew_clarifications", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "status", table: "renewal_payments", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "criteria", table: "renewal_part2_evaluations", type: "jsonb", nullable: false, defaultValue: "{}", oldClrType: typeof(string), oldType: "jsonb", oldNullable: true); migrationBuilder.AlterColumn>( name: "RequiredDocuments", table: "renewal_clarifications", type: "jsonb", nullable: false, oldClrType: typeof(List), oldType: "jsonb", oldNullable: true); migrationBuilder.AlterColumn( name: "reference", table: "PaymentDetail", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "description", table: "PaymentDetail", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "subject", table: "notificationmodel", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "logUrl", table: "notificationmodel", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "content", table: "notificationmodel", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "file_url", table: "File_model", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "evaluation_date", table: "evaluation_data", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "evaluated_by", table: "evaluation_data", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "Evaluation", table: "evaluation_data", type: "jsonb", nullable: false, defaultValue: "{}", oldClrType: typeof(string), oldType: "jsonb", oldNullable: true); migrationBuilder.AlterColumn>( name: "certification_ids", table: "employee_applications", type: "bigint[]", nullable: false, oldClrType: typeof(List), oldType: "bigint[]", oldNullable: true); migrationBuilder.AlterColumn( name: "supplier_name", table: "certifications", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "certification_type", table: "certifications", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "certification_number", table: "certifications", type: "text", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "text", oldNullable: true); migrationBuilder.AlterColumn( name: "Description", table: "CertificationPacks", type: "TEXT", nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "TEXT", oldNullable: true); migrationBuilder.AlterColumn( name: "LabelAr", table: "Categories", type: "character varying(255)", maxLength: 255, nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "character varying(255)", oldMaxLength: 255, oldNullable: true); migrationBuilder.AlterColumn( name: "Label", table: "Categories", type: "character varying(255)", maxLength: 255, nullable: false, defaultValue: "", oldClrType: typeof(string), oldType: "character varying(255)", oldMaxLength: 255, oldNullable: true); } } }