| 
									
										
										
										
											2024-10-02 00:28:07 +02:00
										 |  |  |  | using Microsoft.EntityFrameworkCore.Infrastructure; | 
					
						
							|  |  |  |  | using Microsoft.EntityFrameworkCore.Migrations; | 
					
						
							| 
									
										
										
										
											2024-09-26 15:08:08 +02:00
										 |  |  |  | using NodaTime; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | #nullable disable | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | namespace Foxnouns.Backend.Database.Migrations | 
					
						
							|  |  |  |  | { | 
					
						
							|  |  |  |  |     /// <inheritdoc /> | 
					
						
							| 
									
										
										
										
											2024-09-26 17:11:52 +02:00
										 |  |  |  |     [DbContext(typeof(DatabaseContext))] | 
					
						
							|  |  |  |  |     [Migration("20240926130208_NonNullableSids")] | 
					
						
							| 
									
										
										
										
											2024-09-26 15:08:08 +02:00
										 |  |  |  |     public partial class NonNullableSids : Migration | 
					
						
							|  |  |  |  |     { | 
					
						
							|  |  |  |  |         /// <inheritdoc /> | 
					
						
							|  |  |  |  |         protected override void Up(MigrationBuilder migrationBuilder) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             migrationBuilder.AlterColumn<string>( | 
					
						
							|  |  |  |  |                 name: "sid", | 
					
						
							|  |  |  |  |                 table: "users", | 
					
						
							|  |  |  |  |                 type: "text", | 
					
						
							|  |  |  |  |                 nullable: false, | 
					
						
							|  |  |  |  |                 defaultValueSql: "find_free_user_sid()", | 
					
						
							|  |  |  |  |                 oldClrType: typeof(string), | 
					
						
							|  |  |  |  |                 oldType: "text", | 
					
						
							| 
									
										
										
										
											2024-10-02 00:28:07 +02:00
										 |  |  |  |                 oldNullable: true | 
					
						
							|  |  |  |  |             ); | 
					
						
							| 
									
										
										
										
											2024-09-26 15:08:08 +02:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |             migrationBuilder.AlterColumn<string>( | 
					
						
							|  |  |  |  |                 name: "sid", | 
					
						
							|  |  |  |  |                 table: "members", | 
					
						
							|  |  |  |  |                 type: "text", | 
					
						
							|  |  |  |  |                 nullable: false, | 
					
						
							|  |  |  |  |                 defaultValueSql: "find_free_member_sid()", | 
					
						
							|  |  |  |  |                 oldClrType: typeof(string), | 
					
						
							|  |  |  |  |                 oldType: "text", | 
					
						
							| 
									
										
										
										
											2024-10-02 00:28:07 +02:00
										 |  |  |  |                 oldNullable: true | 
					
						
							|  |  |  |  |             ); | 
					
						
							| 
									
										
										
										
											2024-09-26 15:08:08 +02:00
										 |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <inheritdoc /> | 
					
						
							|  |  |  |  |         protected override void Down(MigrationBuilder migrationBuilder) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             migrationBuilder.AlterColumn<string>( | 
					
						
							|  |  |  |  |                 name: "sid", | 
					
						
							|  |  |  |  |                 table: "users", | 
					
						
							|  |  |  |  |                 type: "text", | 
					
						
							|  |  |  |  |                 nullable: true, | 
					
						
							|  |  |  |  |                 oldClrType: typeof(string), | 
					
						
							|  |  |  |  |                 oldType: "text", | 
					
						
							| 
									
										
										
										
											2024-10-02 00:28:07 +02:00
										 |  |  |  |                 oldDefaultValueSql: "find_free_user_sid()" | 
					
						
							|  |  |  |  |             ); | 
					
						
							| 
									
										
										
										
											2024-09-26 15:08:08 +02:00
										 |  |  |  | 
 | 
					
						
							|  |  |  |  |             migrationBuilder.AlterColumn<string>( | 
					
						
							|  |  |  |  |                 name: "sid", | 
					
						
							|  |  |  |  |                 table: "members", | 
					
						
							|  |  |  |  |                 type: "text", | 
					
						
							|  |  |  |  |                 nullable: true, | 
					
						
							|  |  |  |  |                 oldClrType: typeof(string), | 
					
						
							|  |  |  |  |                 oldType: "text", | 
					
						
							| 
									
										
										
										
											2024-10-02 00:28:07 +02:00
										 |  |  |  |                 oldDefaultValueSql: "find_free_member_sid()" | 
					
						
							|  |  |  |  |             ); | 
					
						
							| 
									
										
										
										
											2024-09-26 15:08:08 +02:00
										 |  |  |  |         } | 
					
						
							|  |  |  |  |     } | 
					
						
							|  |  |  |  | } |