|
| 1 | +using Microsoft.EntityFrameworkCore.Migrations; |
| 2 | + |
| 3 | +#nullable disable |
| 4 | + |
| 5 | +namespace CodeBeam.UltimateAuth.IdentityLab.Migrations |
| 6 | +{ |
| 7 | + /// <inheritdoc /> |
| 8 | + public partial class AddProfileFieldLimits : Migration |
| 9 | + { |
| 10 | + /// <inheritdoc /> |
| 11 | + protected override void Up(MigrationBuilder migrationBuilder) |
| 12 | + { |
| 13 | + migrationBuilder.AlterColumn<string>( |
| 14 | + name: "TimeZone", |
| 15 | + table: "UAuth_UserProfiles", |
| 16 | + type: "character varying(128)", |
| 17 | + maxLength: 128, |
| 18 | + nullable: true, |
| 19 | + oldClrType: typeof(string), |
| 20 | + oldType: "text", |
| 21 | + oldNullable: true); |
| 22 | + |
| 23 | + migrationBuilder.AlterColumn<string>( |
| 24 | + name: "LastName", |
| 25 | + table: "UAuth_UserProfiles", |
| 26 | + type: "character varying(128)", |
| 27 | + maxLength: 128, |
| 28 | + nullable: true, |
| 29 | + oldClrType: typeof(string), |
| 30 | + oldType: "text", |
| 31 | + oldNullable: true); |
| 32 | + |
| 33 | + migrationBuilder.AlterColumn<string>( |
| 34 | + name: "Language", |
| 35 | + table: "UAuth_UserProfiles", |
| 36 | + type: "character varying(64)", |
| 37 | + maxLength: 64, |
| 38 | + nullable: true, |
| 39 | + oldClrType: typeof(string), |
| 40 | + oldType: "text", |
| 41 | + oldNullable: true); |
| 42 | + |
| 43 | + migrationBuilder.AlterColumn<string>( |
| 44 | + name: "Gender", |
| 45 | + table: "UAuth_UserProfiles", |
| 46 | + type: "character varying(128)", |
| 47 | + maxLength: 128, |
| 48 | + nullable: true, |
| 49 | + oldClrType: typeof(string), |
| 50 | + oldType: "text", |
| 51 | + oldNullable: true); |
| 52 | + |
| 53 | + migrationBuilder.AlterColumn<string>( |
| 54 | + name: "FirstName", |
| 55 | + table: "UAuth_UserProfiles", |
| 56 | + type: "character varying(128)", |
| 57 | + maxLength: 128, |
| 58 | + nullable: true, |
| 59 | + oldClrType: typeof(string), |
| 60 | + oldType: "text", |
| 61 | + oldNullable: true); |
| 62 | + |
| 63 | + migrationBuilder.AlterColumn<string>( |
| 64 | + name: "DisplayName", |
| 65 | + table: "UAuth_UserProfiles", |
| 66 | + type: "character varying(256)", |
| 67 | + maxLength: 256, |
| 68 | + nullable: true, |
| 69 | + oldClrType: typeof(string), |
| 70 | + oldType: "text", |
| 71 | + oldNullable: true); |
| 72 | + |
| 73 | + migrationBuilder.AlterColumn<string>( |
| 74 | + name: "Culture", |
| 75 | + table: "UAuth_UserProfiles", |
| 76 | + type: "character varying(64)", |
| 77 | + maxLength: 64, |
| 78 | + nullable: true, |
| 79 | + oldClrType: typeof(string), |
| 80 | + oldType: "text", |
| 81 | + oldNullable: true); |
| 82 | + |
| 83 | + migrationBuilder.AlterColumn<string>( |
| 84 | + name: "Bio", |
| 85 | + table: "UAuth_UserProfiles", |
| 86 | + type: "character varying(4096)", |
| 87 | + maxLength: 4096, |
| 88 | + nullable: true, |
| 89 | + oldClrType: typeof(string), |
| 90 | + oldType: "text", |
| 91 | + oldNullable: true); |
| 92 | + } |
| 93 | + |
| 94 | + /// <inheritdoc /> |
| 95 | + protected override void Down(MigrationBuilder migrationBuilder) |
| 96 | + { |
| 97 | + migrationBuilder.AlterColumn<string>( |
| 98 | + name: "TimeZone", |
| 99 | + table: "UAuth_UserProfiles", |
| 100 | + type: "text", |
| 101 | + nullable: true, |
| 102 | + oldClrType: typeof(string), |
| 103 | + oldType: "character varying(128)", |
| 104 | + oldMaxLength: 128, |
| 105 | + oldNullable: true); |
| 106 | + |
| 107 | + migrationBuilder.AlterColumn<string>( |
| 108 | + name: "LastName", |
| 109 | + table: "UAuth_UserProfiles", |
| 110 | + type: "text", |
| 111 | + nullable: true, |
| 112 | + oldClrType: typeof(string), |
| 113 | + oldType: "character varying(128)", |
| 114 | + oldMaxLength: 128, |
| 115 | + oldNullable: true); |
| 116 | + |
| 117 | + migrationBuilder.AlterColumn<string>( |
| 118 | + name: "Language", |
| 119 | + table: "UAuth_UserProfiles", |
| 120 | + type: "text", |
| 121 | + nullable: true, |
| 122 | + oldClrType: typeof(string), |
| 123 | + oldType: "character varying(64)", |
| 124 | + oldMaxLength: 64, |
| 125 | + oldNullable: true); |
| 126 | + |
| 127 | + migrationBuilder.AlterColumn<string>( |
| 128 | + name: "Gender", |
| 129 | + table: "UAuth_UserProfiles", |
| 130 | + type: "text", |
| 131 | + nullable: true, |
| 132 | + oldClrType: typeof(string), |
| 133 | + oldType: "character varying(128)", |
| 134 | + oldMaxLength: 128, |
| 135 | + oldNullable: true); |
| 136 | + |
| 137 | + migrationBuilder.AlterColumn<string>( |
| 138 | + name: "FirstName", |
| 139 | + table: "UAuth_UserProfiles", |
| 140 | + type: "text", |
| 141 | + nullable: true, |
| 142 | + oldClrType: typeof(string), |
| 143 | + oldType: "character varying(128)", |
| 144 | + oldMaxLength: 128, |
| 145 | + oldNullable: true); |
| 146 | + |
| 147 | + migrationBuilder.AlterColumn<string>( |
| 148 | + name: "DisplayName", |
| 149 | + table: "UAuth_UserProfiles", |
| 150 | + type: "text", |
| 151 | + nullable: true, |
| 152 | + oldClrType: typeof(string), |
| 153 | + oldType: "character varying(256)", |
| 154 | + oldMaxLength: 256, |
| 155 | + oldNullable: true); |
| 156 | + |
| 157 | + migrationBuilder.AlterColumn<string>( |
| 158 | + name: "Culture", |
| 159 | + table: "UAuth_UserProfiles", |
| 160 | + type: "text", |
| 161 | + nullable: true, |
| 162 | + oldClrType: typeof(string), |
| 163 | + oldType: "character varying(64)", |
| 164 | + oldMaxLength: 64, |
| 165 | + oldNullable: true); |
| 166 | + |
| 167 | + migrationBuilder.AlterColumn<string>( |
| 168 | + name: "Bio", |
| 169 | + table: "UAuth_UserProfiles", |
| 170 | + type: "text", |
| 171 | + nullable: true, |
| 172 | + oldClrType: typeof(string), |
| 173 | + oldType: "character varying(4096)", |
| 174 | + oldMaxLength: 4096, |
| 175 | + oldNullable: true); |
| 176 | + } |
| 177 | + } |
| 178 | +} |
0 commit comments