Got a login
This commit is contained in:
parent
c771d26995
commit
4b52b6e96e
61 changed files with 7793 additions and 609 deletions
3556
src/Yavsc/Migrations/20230405203545_userreload.Designer.cs
generated
Normal file
3556
src/Yavsc/Migrations/20230405203545_userreload.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
219
src/Yavsc/Migrations/20230405203545_userreload.cs
Normal file
219
src/Yavsc/Migrations/20230405203545_userreload.cs
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class userreload : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Activities_Activities_ParentCode",
|
||||
table: "Activities");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_AspNetUsers_BankIdentity_BankInfoId",
|
||||
table: "AspNetUsers");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_AspNetUsers_Locations_PostalAddressId",
|
||||
table: "AspNetUsers");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_AspNetUsers_BankInfoId",
|
||||
table: "AspNetUsers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BankInfoId",
|
||||
table: "AspNetUsers");
|
||||
|
||||
migrationBuilder.Sql("delete from \"BankIdentity\"");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "UserId",
|
||||
table: "BankIdentity",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "PostalAddressId",
|
||||
table: "AspNetUsers",
|
||||
type: "bigint",
|
||||
nullable: true,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Email",
|
||||
table: "AspNetUsers",
|
||||
type: "character varying(256)",
|
||||
maxLength: 256,
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(256)",
|
||||
oldMaxLength: 256,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "DedicatedGoogleCalendar",
|
||||
table: "AspNetUsers",
|
||||
type: "character varying(512)",
|
||||
maxLength: 512,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(512)",
|
||||
oldMaxLength: 512);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ParentCode",
|
||||
table: "Activities",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AddUniqueConstraint(
|
||||
name: "AK_AspNetUsers_Email",
|
||||
table: "AspNetUsers",
|
||||
column: "Email");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_BankIdentity_UserId",
|
||||
table: "BankIdentity",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Activities_Activities_ParentCode",
|
||||
table: "Activities",
|
||||
column: "ParentCode",
|
||||
principalTable: "Activities",
|
||||
principalColumn: "Code");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AspNetUsers_Locations_PostalAddressId",
|
||||
table: "AspNetUsers",
|
||||
column: "PostalAddressId",
|
||||
principalTable: "Locations",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BankIdentity_AspNetUsers_UserId",
|
||||
table: "BankIdentity",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Activities_Activities_ParentCode",
|
||||
table: "Activities");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_AspNetUsers_Locations_PostalAddressId",
|
||||
table: "AspNetUsers");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_BankIdentity_AspNetUsers_UserId",
|
||||
table: "BankIdentity");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_BankIdentity_UserId",
|
||||
table: "BankIdentity");
|
||||
|
||||
migrationBuilder.DropUniqueConstraint(
|
||||
name: "AK_AspNetUsers_Email",
|
||||
table: "AspNetUsers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UserId",
|
||||
table: "BankIdentity");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "PostalAddressId",
|
||||
table: "AspNetUsers",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Email",
|
||||
table: "AspNetUsers",
|
||||
type: "character varying(256)",
|
||||
maxLength: 256,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(256)",
|
||||
oldMaxLength: 256);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "DedicatedGoogleCalendar",
|
||||
table: "AspNetUsers",
|
||||
type: "character varying(512)",
|
||||
maxLength: 512,
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(512)",
|
||||
oldMaxLength: 512,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "BankInfoId",
|
||||
table: "AspNetUsers",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ParentCode",
|
||||
table: "Activities",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AspNetUsers_BankInfoId",
|
||||
table: "AspNetUsers",
|
||||
column: "BankInfoId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Activities_Activities_ParentCode",
|
||||
table: "Activities",
|
||||
column: "ParentCode",
|
||||
principalTable: "Activities",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AspNetUsers_BankIdentity_BankInfoId",
|
||||
table: "AspNetUsers",
|
||||
column: "BankInfoId",
|
||||
principalTable: "BankIdentity",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AspNetUsers_Locations_PostalAddressId",
|
||||
table: "AspNetUsers",
|
||||
column: "PostalAddressId",
|
||||
principalTable: "Locations",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
3555
src/Yavsc/Migrations/20230405210700_nullableFullname.Designer.cs
generated
Normal file
3555
src/Yavsc/Migrations/20230405210700_nullableFullname.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
42
src/Yavsc/Migrations/20230405210700_nullableFullname.cs
Normal file
42
src/Yavsc/Migrations/20230405210700_nullableFullname.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class nullableFullname : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FullName",
|
||||
table: "AspNetUsers",
|
||||
type: "character varying(512)",
|
||||
maxLength: 512,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(512)",
|
||||
oldMaxLength: 512);
|
||||
|
||||
migrationBuilder.Sql("update \"AspNetUsers\" SET \"UserName\" = \"Email\";");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FullName",
|
||||
table: "AspNetUsers",
|
||||
type: "character varying(512)",
|
||||
maxLength: 512,
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(512)",
|
||||
oldMaxLength: 512,
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -294,9 +294,6 @@ namespace Yavsc.Migrations
|
|||
.HasColumnType("character varying(512)")
|
||||
.HasDefaultValue("/images/Users/icon_user.png");
|
||||
|
||||
b.Property<long>("BankInfoId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken()
|
||||
.HasColumnType("text");
|
||||
|
|
@ -308,7 +305,6 @@ namespace Yavsc.Migrations
|
|||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar")
|
||||
.IsRequired()
|
||||
.HasMaxLength(512)
|
||||
.HasColumnType("character varying(512)");
|
||||
|
||||
|
|
@ -321,6 +317,7 @@ namespace Yavsc.Migrations
|
|||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("character varying(256)");
|
||||
|
||||
|
|
@ -328,7 +325,6 @@ namespace Yavsc.Migrations
|
|||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(512)
|
||||
.HasColumnType("character varying(512)");
|
||||
|
||||
|
|
@ -359,7 +355,6 @@ namespace Yavsc.Migrations
|
|||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<long?>("PostalAddressId")
|
||||
.IsRequired()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
|
|
@ -382,7 +377,7 @@ namespace Yavsc.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BankInfoId");
|
||||
b.HasAlternateKey("Email");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasDatabaseName("EmailIndex");
|
||||
|
|
@ -547,12 +542,18 @@ namespace Yavsc.Migrations
|
|||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("WicketCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("BankIdentity");
|
||||
});
|
||||
|
||||
|
|
@ -2099,7 +2100,6 @@ namespace Yavsc.Migrations
|
|||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("ParentCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Photo")
|
||||
|
|
@ -2685,19 +2685,9 @@ namespace Yavsc.Migrations
|
|||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Bank.BankIdentity", "BankInfo")
|
||||
.WithMany()
|
||||
.HasForeignKey("BankInfoId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Yavsc.Models.Relationship.Location", "PostalAddress")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("BankInfo");
|
||||
.HasForeignKey("PostalAddressId");
|
||||
|
||||
b.Navigation("PostalAddress");
|
||||
});
|
||||
|
|
@ -2713,6 +2703,17 @@ namespace Yavsc.Migrations
|
|||
b.Navigation("Balance");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Bank.BankIdentity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser", "User")
|
||||
.WithMany("BankInfo")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Billing.Estimate", null)
|
||||
|
|
@ -3231,9 +3232,7 @@ namespace Yavsc.Migrations
|
|||
{
|
||||
b.HasOne("Yavsc.Models.Workflow.Activity", "Parent")
|
||||
.WithMany("Children")
|
||||
.HasForeignKey("ParentCode")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
.HasForeignKey("ParentCode");
|
||||
|
||||
b.Navigation("Parent");
|
||||
});
|
||||
|
|
@ -3434,6 +3433,8 @@ namespace Yavsc.Migrations
|
|||
b.Navigation("AccountBalance")
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("BankInfo");
|
||||
|
||||
b.Navigation("BlackList");
|
||||
|
||||
b.Navigation("Book");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue