41 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using Microsoft.EntityFrameworkCore.Migrations;
 | |
| 
 | |
| #nullable disable
 | |
| 
 | |
| namespace MareSynchronosServer.Migrations
 | |
| {
 | |
|     /// <inheritdoc />
 | |
|     public partial class UserProfileData : Migration
 | |
|     {
 | |
|         /// <inheritdoc />
 | |
|         protected override void Up(MigrationBuilder migrationBuilder)
 | |
|         {
 | |
|             migrationBuilder.CreateTable(
 | |
|                 name: "user_profile_data",
 | |
|                 columns: table => new
 | |
|                 {
 | |
|                     user_uid = table.Column<string>(type: "character varying(10)", nullable: false),
 | |
|                     base64profile_image = table.Column<string>(type: "text", nullable: true),
 | |
|                     user_description = table.Column<string>(type: "text", nullable: true)
 | |
|                 },
 | |
|                 constraints: table =>
 | |
|                 {
 | |
|                     table.PrimaryKey("pk_user_profile_data", x => x.user_uid);
 | |
|                     table.ForeignKey(
 | |
|                         name: "fk_user_profile_data_users_user_uid",
 | |
|                         column: x => x.user_uid,
 | |
|                         principalTable: "users",
 | |
|                         principalColumn: "uid",
 | |
|                         onDelete: ReferentialAction.Cascade);
 | |
|                 });
 | |
|         }
 | |
| 
 | |
|         /// <inheritdoc />
 | |
|         protected override void Down(MigrationBuilder migrationBuilder)
 | |
|         {
 | |
|             migrationBuilder.DropTable(
 | |
|                 name: "user_profile_data");
 | |
|         }
 | |
|     }
 | |
| }
 | 
