Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
4e2eb7b0a0
|
@ -580,6 +580,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
public string UserFullName { get; set; }
|
public string UserFullName { get; set; }
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
public string IP { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TrialIamgeDownQuery:PageInput
|
public class TrialIamgeDownQuery:PageInput
|
||||||
|
|
|
@ -20,4 +20,4 @@ https://www.cnblogs.com/cqpanda/p/16815263.html
|
||||||
5、撤销某次更新到数据库的迁移(自动执行down 方法)
|
5、撤销某次更新到数据库的迁移(自动执行down 方法)
|
||||||
dotnet ef database update 某次迁移的前一次迁移名称 -p IRaCIS.Core.Test -c IRCContext
|
dotnet ef database update 某次迁移的前一次迁移名称 -p IRaCIS.Core.Test -c IRCContext
|
||||||
|
|
||||||
|
dotnet ef migrations add RemoveForeignKey -p IRaCIS.Core.Test -c IRCContext -o CodeFirstTest/MSSQL/Migrations
|
||||||
|
|
|
@ -42,10 +42,11 @@ public partial class IRCContext : DbContext
|
||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
{
|
{
|
||||||
optionsBuilder.UseSqlServer("Server=106.14.89.110,1433;Database=IRC_Code;User ID=sa;Password=mssql_KnTs2a;TrustServerCertificate=true");
|
|
||||||
|
|
||||||
//移除外键约束
|
//移除外键约束
|
||||||
optionsBuilder.ReplaceService<IMigrationsSqlGenerator, MigrationRemoveForeignKeysSqlGenerator>();
|
optionsBuilder.ReplaceService<IMigrationsSqlGenerator, MigrationRemoveForeignKeysSqlGenerator>();
|
||||||
|
optionsBuilder.UseSqlServer("Server=106.14.89.110,1433;Database=IRC_Code;User ID=sa;Password=mssql_KnTs2a;TrustServerCertificate=true");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
|
|
|
@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
|
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(IRCContext))]
|
[DbContext(typeof(IRCContext))]
|
||||||
[Migration("20240911151956_RemoveForeignKeys")]
|
[Migration("20240912012757_RemoveForeignKey")]
|
||||||
partial class RemoveForeignKeys
|
partial class RemoveForeignKey
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
|
namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class RemoveForeignKeys : Migration
|
public partial class RemoveForeignKey : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
Loading…
Reference in New Issue