MySQL.Pomelo
This commit is contained in:
parent
1a4777f86f
commit
1c86475c9c
@ -4,7 +4,7 @@
|
|||||||
"CorsOrigins": "https://*.IoT.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://10.10.90.3:4200"
|
"CorsOrigins": "https://*.IoT.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://10.10.90.3:4200"
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"Default": "Data Source=localhost;Port=33306;Database=JiSheIoTProDB4;uid=root;pwd=123456789;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;"
|
"Default": "Data Source=localhost;Port=33306;Database=JiSheIoTProDB54;uid=root;pwd=123456789;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;"
|
||||||
},
|
},
|
||||||
"Hangfire": {
|
"Hangfire": {
|
||||||
"Redis": {
|
"Redis": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"Default": "Data Source=localhost;Port=33306;Database=JiSheIoTProDB4;uid=root;pwd=123456789;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;"
|
"Default": "Data Source=localhost;Port=33306;Database=JiSheIoTProDB54;uid=root;pwd=123456789;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;TreatTinyAsBoolean=false;SslMode=None;Pooling=true;"
|
||||||
},
|
},
|
||||||
"IoTDBOptions": {
|
"IoTDBOptions": {
|
||||||
"UserName": "root",
|
"UserName": "root",
|
||||||
|
|||||||
@ -10,7 +10,7 @@ namespace JiShe.IoT.EntityFrameworkCore
|
|||||||
{
|
{
|
||||||
[DependsOn(
|
[DependsOn(
|
||||||
typeof(IoTDomainModule),
|
typeof(IoTDomainModule),
|
||||||
typeof(AbpEntityFrameworkCoreMySQLModule),
|
typeof(AbpEntityFrameworkCoreMySQLPomeloModule),
|
||||||
typeof(BasicManagementEntityFrameworkCoreModule),
|
typeof(BasicManagementEntityFrameworkCoreModule),
|
||||||
typeof(DataDictionaryManagementEntityFrameworkCoreModule),
|
typeof(DataDictionaryManagementEntityFrameworkCoreModule),
|
||||||
typeof(NotificationManagementEntityFrameworkCoreModule),
|
typeof(NotificationManagementEntityFrameworkCoreModule),
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
namespace JiShe.IoT.EntityFrameworkCore
|
namespace JiShe.IoT.EntityFrameworkCore
|
||||||
{
|
{
|
||||||
/* This class is needed for EF Core console commands
|
/* This class is needed for EF Core console commands
|
||||||
@ -9,9 +11,9 @@ namespace JiShe.IoT.EntityFrameworkCore
|
|||||||
IoTEfCoreEntityExtensionMappings.Configure();
|
IoTEfCoreEntityExtensionMappings.Configure();
|
||||||
|
|
||||||
var configuration = BuildConfiguration();
|
var configuration = BuildConfiguration();
|
||||||
|
var serverVersion = new MySqlServerVersion(new Version(8, 4, 6));
|
||||||
var builder = new DbContextOptionsBuilder<IoTDbContext>()
|
var builder = new DbContextOptionsBuilder<IoTDbContext>()
|
||||||
.UseMySQL(configuration.GetConnectionString("Default") ?? string.Empty);
|
.UseMySql(configuration.GetConnectionString("Default") , serverVersion);
|
||||||
|
|
||||||
return new IoTDbContext(builder.Options);
|
return new IoTDbContext(builder.Options);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\JiShe.IoT.Domain\JiShe.IoT.Domain.csproj" />
|
<ProjectReference Include="..\JiShe.IoT.Domain\JiShe.IoT.Domain.csproj" />
|
||||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" />
|
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL.Pomelo" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(Configuration)' == 'Debug'" Label="Debug">
|
<ItemGroup Condition=" '$(Configuration)' == 'Debug'" Label="Debug">
|
||||||
|
|||||||
@ -3,15 +3,17 @@ using System;
|
|||||||
using JiShe.IoT.EntityFrameworkCore;
|
using JiShe.IoT.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Volo.Abp.EntityFrameworkCore;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
namespace JiShe.IoT.Migrations
|
namespace JiShe.IoT.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(IoTDbContext))]
|
[DbContext(typeof(IoTDbContext))]
|
||||||
[Migration("20251207050159_InitialCreate")]
|
[Migration("20251207055002_InitialCreate")]
|
||||||
partial class InitialCreate
|
partial class InitialCreate
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
@ -19,9 +21,12 @@ namespace JiShe.IoT.Migrations
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
|
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
|
||||||
.HasAnnotation("ProductVersion", "9.0.6")
|
.HasAnnotation("ProductVersion", "9.0.6")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||||
|
|
||||||
|
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("JiShe.ServicePro.BasicManagement.UserRefreshTokens.UserRefreshToken", b =>
|
modelBuilder.Entity("JiShe.ServicePro.BasicManagement.UserRefreshTokens.UserRefreshToken", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -3019,7 +3024,7 @@ namespace JiShe.IoT.Migrations
|
|||||||
.HasColumnName("LastModifierId");
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastPasswordChangeTime")
|
b.Property<DateTimeOffset?>("LastPasswordChangeTime")
|
||||||
.HasColumnType("datetime");
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled")
|
b.Property<bool>("LockoutEnabled")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -3028,7 +3033,7 @@ namespace JiShe.IoT.Migrations
|
|||||||
.HasColumnName("LockoutEnabled");
|
.HasColumnName("LockoutEnabled");
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||||
.HasColumnType("datetime");
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,9 @@ using System;
|
|||||||
using JiShe.IoT.EntityFrameworkCore;
|
using JiShe.IoT.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Volo.Abp.EntityFrameworkCore;
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@ -16,9 +18,12 @@ namespace JiShe.IoT.Migrations
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
|
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
|
||||||
.HasAnnotation("ProductVersion", "9.0.6")
|
.HasAnnotation("ProductVersion", "9.0.6")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||||
|
|
||||||
|
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("JiShe.ServicePro.BasicManagement.UserRefreshTokens.UserRefreshToken", b =>
|
modelBuilder.Entity("JiShe.ServicePro.BasicManagement.UserRefreshTokens.UserRefreshToken", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -3016,7 +3021,7 @@ namespace JiShe.IoT.Migrations
|
|||||||
.HasColumnName("LastModifierId");
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LastPasswordChangeTime")
|
b.Property<DateTimeOffset?>("LastPasswordChangeTime")
|
||||||
.HasColumnType("datetime");
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.Property<bool>("LockoutEnabled")
|
b.Property<bool>("LockoutEnabled")
|
||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
@ -3025,7 +3030,7 @@ namespace JiShe.IoT.Migrations
|
|||||||
.HasColumnName("LockoutEnabled");
|
.HasColumnName("LockoutEnabled");
|
||||||
|
|
||||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||||
.HasColumnType("datetime");
|
.HasColumnType("datetime(6)");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(64)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user