Browse Source

Merge branch 'main' into enisn/payment-service

pull/17/head
enisn 5 years ago
parent
commit
357d8348ea
  1. 2
      apps/angular/dynamic-env.json
  2. 2
      apps/angular/src/environments/environment.prod.ts
  3. 2
      apps/angular/src/environments/environment.ts
  4. 1
      apps/auth-server/src/EShopOnAbp.AuthServer/Dockerfile
  5. 4
      apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json
  6. 1
      apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile
  7. 7
      build/build-images-locally.ps1
  8. 6
      build/build-images.ps1
  9. 1
      etc/README.md
  10. 14
      etc/docker/docker-compose.infrastructure.override.yml
  11. 21
      etc/docker/docker-compose.infrastructure.yml
  12. 4
      etc/k8s/eshoponabp/charts/administration/templates/administration-deployment.yaml
  13. 1
      etc/k8s/eshoponabp/charts/administration/values.yaml
  14. 2
      etc/k8s/eshoponabp/charts/authserver/templates/authserver-deployment.yaml
  15. 6
      etc/k8s/eshoponabp/charts/authserver/values.yaml
  16. 13
      etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml
  17. 4
      etc/k8s/eshoponabp/charts/gateway-web/values.yaml
  18. 6
      etc/k8s/eshoponabp/charts/identity/templates/identity-deployment.yaml
  19. 2
      etc/k8s/eshoponabp/charts/identity/values.yaml
  20. 6
      etc/k8s/eshoponabp/charts/saas/Chart.yaml
  21. 27
      etc/k8s/eshoponabp/charts/saas/templates/saas-ingress.yaml
  22. 14
      etc/k8s/eshoponabp/charts/saas/templates/saas-service.yaml
  23. 49
      etc/k8s/eshoponabp/charts/saas/templates/saas.yaml
  24. 25
      etc/k8s/eshoponabp/charts/saas/values.yaml
  25. 9
      etc/k8s/eshoponabp/values.yaml
  26. 7
      etc/scripts/build-images.ps1
  27. 1
      gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile
  28. 1
      gateways/web/src/EShopOnAbp.WebGateway/Dockerfile
  29. 13
      gateways/web/src/EShopOnAbp.WebGateway/appsettings.json
  30. 2
      run-tye.ps1
  31. 2
      services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EShopOnAbp.AdministrationService.EntityFrameworkCore.csproj
  32. 2
      services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EntityFrameworkCore/AdministrationServiceDbContextFactory.cs
  33. 6
      services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EntityFrameworkCore/AdministrationServiceEntityFrameworkCoreModule.cs
  34. 169
      services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211125123421_Initial.Designer.cs
  35. 161
      services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211125123421_Initial.cs
  36. 167
      services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/AdministrationServiceDbContextModelSnapshot.cs
  37. 1
      services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile
  38. 2
      services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json
  39. 2
      services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/BasketServiceHttpApiHostModule.cs
  40. 2
      services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EShopOnAbp.CatalogService.EntityFrameworkCore.csproj
  41. 7
      services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceDbContextFactory.cs
  42. 11
      services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceEntityFrameworkCoreModule.cs
  43. 12
      services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211125124215_Initial.Designer.cs
  44. 0
      services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211125124215_Initial.cs
  45. 10
      services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/CatalogServiceDbContextModelSnapshot.cs
  46. 2
      services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/CatalogServiceHttpApiHostModule.cs
  47. 4
      services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json
  48. 2
      services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EShopOnAbp.IdentityService.EntityFrameworkCore.csproj
  49. 2
      services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContextFactory.cs
  50. 6
      services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceEntityFrameworkCoreModule.cs
  51. 583
      services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211125125938_Initial.Designer.cs
  52. 605
      services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211125125938_Initial.cs
  53. 581
      services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/IdentityServiceDbContextModelSnapshot.cs
  54. 8
      services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs
  55. 1
      services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile
  56. 156
      services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json
  57. 2
      services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EShopOnAbp.OrderingService.EntityFrameworkCore.csproj
  58. 7
      services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceDbContextFactory.cs
  59. 9
      services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceEntityFrameworkCoreModule.cs
  60. 12
      services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211125130659_Initial.Designer.cs
  61. 0
      services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211125130659_Initial.cs
  62. 10
      services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/OrderingServiceDbContextModelSnapshot.cs
  63. 2
      services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/OrderingServiceHttpApiHostModule.cs
  64. 4
      services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/appsettings.json
  65. 2
      services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EShopOnAbp.PaymentService.EntityFrameworkCore.csproj
  66. 7
      services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EntityFrameworkCore/PaymentServiceDbContextFactory.cs
  67. 9
      services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EntityFrameworkCore/PaymentServiceEntityFrameworkCoreModule.cs
  68. 30
      services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211125131248_Initial.Designer.cs
  69. 19
      services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211125131248_Initial.cs
  70. 101
      services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/PaymentServiceDbContextModelSnapshot.cs
  71. 2
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/PaymentServiceHttpApiHostModule.cs
  72. 4
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/appsettings.json
  73. 6
      shared/EShopOnAbp.Shared.Hosting/EShopOnAbpSharedHostingModule.cs

2
apps/angular/dynamic-env.json

@ -10,7 +10,7 @@
"redirectUri": "https://eshop-st-web",
"clientId": "EShopOnAbp_App",
"responseType": "code",
"scope": "offline_access openid profile email phone IdentityService AdministrationService SaasService"
"scope": "offline_access openid profile email phone IdentityService AdministrationService"
},
"apis": {
"default": {

2
apps/angular/src/environments/environment.prod.ts

@ -14,7 +14,7 @@ export const environment = {
redirectUri: baseUrl,
clientId: 'Web',
responseType: 'code',
scope: 'offline_access openid profile email phone IdentityService AdministrationService SaasService',
scope: 'offline_access openid profile email phone IdentityService AdministrationService',
},
apis: {
default: {

2
apps/angular/src/environments/environment.ts

@ -14,7 +14,7 @@ export const environment = {
clientId: 'Web',
responseType: 'code',
scope:
'offline_access openid profile email phone IdentityService AdministrationService SaasService',
'offline_access openid profile email phone IdentityService AdministrationService',
requireHttps: true,
},
apis: {

1
apps/auth-server/src/EShopOnAbp.AuthServer/Dockerfile

@ -24,7 +24,6 @@ COPY "shared/EShopOnAbp.Shared.Localization/EShopOnAbp.Shared.Localization.cspro
# Microservices
COPY "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj" "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj"
COPY "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj" "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj"
COPY *"services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj" "services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj"
COPY *"services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj" "services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj"
COPY *"services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj"
COPY *"services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj"

4
apps/auth-server/src/EShopOnAbp.AuthServer/appsettings.json

@ -13,8 +13,8 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"IdentityService": "Server=localhost,1434;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true",
"AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true"
"IdentityService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Identity;Pooling=false;",
"AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;"
},
"StringEncryption": {
"DefaultPassPhrase": "gsKnGZ041HLL4IM8"

1
apps/public-web/src/EShopOnAbp.PublicWeb/Dockerfile

@ -24,7 +24,6 @@ COPY "shared/EShopOnAbp.Shared.Localization/EShopOnAbp.Shared.Localization.cspro
# Microservices
COPY "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj" "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj"
COPY "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj" "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj"
COPY *"services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj" "services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj"
COPY *"services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj" "services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj"
COPY *"services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj"
COPY *"services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj"

7
build/build-images-locally.ps1

@ -11,7 +11,6 @@ $webPublicGatewayFolder = Join-Path $slnFolder "gateways/web-public/src/EShopOnA
$identityServiceFolder = Join-Path $slnFolder "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host"
$administrationServiceFolder = Join-Path $slnFolder "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host"
$saasServiceFolder = Join-Path $slnFolder "services/saas/src/EShopOnAbp.SaasService.HttpApi.Host"
### Angular WEB App(WWW)
Write-Host "*** BUILDING WEB (WWW) ****************" -ForegroundColor Green
@ -57,12 +56,6 @@ Set-Location $administrationServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-administration:$version .
### SAAS-SERVICE
Write-Host "*** BUILDING SAAS-SERVICE ****************" -ForegroundColor Green
Set-Location $saasServiceFolder
dotnet publish -c Release
docker build -f Dockerfile.local -t eshoponabp/service-saas:$version .
### ALL COMPLETED
Write-Host "ALL COMPLETED" -ForegroundColor Green
Set-Location $currentFolder

6
build/build-images.ps1

@ -11,7 +11,6 @@ $webPublicGatewayFolder = Join-Path $slnFolder "gateways/web-public/src/EShopOnA
$identityServiceFolder = Join-Path $slnFolder "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host"
$administrationServiceFolder = Join-Path $slnFolder "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host"
$saasServiceFolder = Join-Path $slnFolder "services/saas/src/EShopOnAbp.SaasService.HttpApi.Host"
Write-Host "===== BUILDING APPLICATIONS =====" -ForegroundColor Yellow
@ -54,11 +53,6 @@ Write-Host "**************** BUILDING ADMINISTRATION-SERVICE ****************" -
Set-Location $slnFolder
docker build -f "$administrationServiceFolder/Dockerfile" -t eshoponabp/service-administration:$version .
### SAAS-SERVICE
Write-Host "**************** BUILDING SAAS-SERVICE ****************" -ForegroundColor Green
Set-Location $slnFolder
docker build -f "$saasServiceFolder/Dockerfile" -t eshoponabp/service-saas:$version .
### ALL COMPLETED
Write-Host "ALL COMPLETED" -ForegroundColor Green
Set-Location $currentFolder

1
etc/README.md

@ -23,7 +23,6 @@ helm install ingress-nginx ingress-nginx/ingress-nginx
127.0.0.1 eshop-st-authserver
127.0.0.1 eshop-st-identity
127.0.0.1 eshop-st-administration
127.0.0.1 eshop-st-saas
127.0.0.1 eshop-st-gateway-web
127.0.0.1 eshop-st-gateway-web-public
````

14
etc/docker/docker-compose.infrastructure.override.yml

@ -10,9 +10,15 @@ services:
ports:
- "6379:6379"
sql-server-db:
postgres-db:
ports:
- "1434:1433"
- "5432:5432"
environment:
SA_PASSWORD: "myPassw0rd"
ACCEPT_EULA: "Y"
POSTGRES_PASSWORD: "myPassw0rd"
pgadmin:
ports:
- "${PGADMIN_PORT:-5050}:80"
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}

21
etc/docker/docker-compose.infrastructure.yml

@ -13,16 +13,25 @@ services:
networks:
- eshoponabp-network
sql-server-db:
container_name: sql-server-db
image: mcr.microsoft.com/mssql/server
postgres-db:
container_name: postgres-db
image: postgres:14.1
volumes:
- sqldata:/var/opt/mssql
- postgres_data:/var/opt/postgres
networks:
- eshoponabp-network
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4:6.2
volumes:
- pgadmin_data:/var/lib/pgadmin
networks:
- eshoponabp-network
volumes:
sqldata:
postgres_data:
pgadmin_data:
networks:
eshoponabp-network:

4
etc/k8s/eshoponabp/charts/administration/templates/administration-deployment.yaml

@ -30,9 +30,7 @@ spec:
- name: IdentityClients__Default__Authority
value: "{{ .Values.synchedCommunication.authority }}"
- name: "ConnectionStrings__AdministrationService"
value: "{{ .Values.config.connectionStrings.administrationService }}"
- name: "ConnectionStrings__SaasService"
value: "{{ .Values.config.connectionStrings.saasService }}"
value: "{{ .Values.config.connectionStrings.administrationService }}"
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"

1
etc/k8s/eshoponabp/charts/administration/values.yaml

@ -4,7 +4,6 @@ config:
corsOrigins: # https://eshop-st-gateway-web,https://eshop-st-gateway-public-web,https://eshop-st-gateway-internal
connectionStrings:
administrationService: #
saasService: #
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"

2
etc/k8s/eshoponabp/charts/authserver/templates/authserver-deployment.yaml

@ -31,8 +31,6 @@ spec:
value: "{{ .Values.config.identityService.connString }}"
- name: "ConnectionStrings__AdministrationService"
value: "{{ .Values.config.administrationService.connString }}"
- name: "ConnectionStrings__SaasService"
value: "{{ .Values.config.saasService.connString }}"
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"

6
etc/k8s/eshoponabp/charts/authserver/values.yaml

@ -1,13 +1,11 @@
config:
selfUrl: # https://eshop-st-authserver
corsOrigins: # https://eshop-st-identity,https://eshop-st-administration,https://eshop-st-saas
corsOrigins: # https://eshop-st-identity,https://eshop-st-administration
allowedRedirectUrls: https://eshop-st-web
identityService:
connString: #
administrationService:
connString: #
saasService:
connString: #
connString: #
dotnetEnv: #
redisHost: #
rabbitmqHost: #

13
etc/k8s/eshoponabp/charts/gateway-web/templates/gateway-web-configmap.yaml

@ -32,19 +32,6 @@ data:
"UpstreamPathTemplate": "/api/account/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Saas Service",
"DownstreamPathTemplate": "/api/saas/{everything}",
"DownstreamScheme": "{{ .Values.reRoutes.saasService.schema }}",
"DownstreamHostAndPorts": [
{
"Host": "{{ .Values.reRoutes.saasService.host }}",
"Port": {{ .Values.reRoutes.saasService.port }}
}
],
"UpstreamPathTemplate": "/api/saas/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/abp/{everything}",

4
etc/k8s/eshoponabp/charts/gateway-web/values.yaml

@ -19,10 +19,6 @@ reRoutes:
schema: http
host: eshop-st-administration
port: 80
saasService:
schema: # http
host: # eshop-st-saas
port: # 80
ingress:
host: # eshop-st-gateway-web
tlsSecret: eshop-demo-tls

6
etc/k8s/eshoponabp/charts/identity/templates/identity-deployment.yaml

@ -28,9 +28,7 @@ spec:
- name: "ConnectionStrings__IdentityService"
value: {{ .Values.config.connectionStrings.identityService }}
- name: "ConnectionStrings__AdministrationService"
value: {{ .Values.config.connectionStrings.administrationService }}
- name: "ConnectionStrings__SaasService"
value: {{ .Values.config.connectionStrings.saasService }}
value: {{ .Values.config.connectionStrings.administrationService }}
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"
@ -51,8 +49,6 @@ spec:
value: {{ .Values.identityServerClients.publicWebRootUrl }}
- name: "IdentityServerClients__IdentityService__RootUrl"
value: {{ .Values.identityServerClients.identityServiceRootUrl }}
- name: "IdentityServerClients__SaasService__RootUrl"
value: {{ .Values.identityServerClients.saasServiceRootUrl }}
- name: "IdentityServerClients__AdministrationService__RootUrl"
value: {{ .Values.identityServerClients.administrationServiceRootUrl }}
- name: "IdentityServerClients__InternalGateway__RootUrl"

2
etc/k8s/eshoponabp/charts/identity/values.yaml

@ -4,7 +4,6 @@ config:
connectionStrings:
identityService: #
administrationService: #
saasService: #
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
@ -22,7 +21,6 @@ identityServerClients:
publicWebGatewayRootUrl: #
identityServiceRootUrl: #
administrationServiceRootUrl: #
saasServiceRootUrl: #
ingress:
host: eshop-st-identity

6
etc/k8s/eshoponabp/charts/saas/Chart.yaml

@ -1,6 +0,0 @@
apiVersion: v2
name: saas
appVersion: "1.0"
description: eShopOnAbp Saas Microservice
version: 1.0.0
type: application

27
etc/k8s/eshoponabp/charts/saas/templates/saas-ingress.yaml

@ -1,27 +0,0 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-buffer-size: 32k
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts:
- {{ .Values.ingress.host }}
secretName: {{ .Values.ingress.tlsSecret }}
rules:
- host: "{{ .Values.ingress.host }}"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Release.Name }}-{{ .Chart.Name }}
port:
number: 80

14
etc/k8s/eshoponabp/charts/saas/templates/saas-service.yaml

@ -1,14 +0,0 @@
apiVersion: v1
kind: Service
metadata:
labels:
name: {{ .Release.Name }}-{{ .Chart.Name }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
ports:
- name: "80"
port: 80
- name: "443"
port: 443
selector:
app: {{ .Release.Name }}-{{ .Chart.Name }}

49
etc/k8s/eshoponabp/charts/saas/templates/saas.yaml

@ -1,49 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
containers:
- image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ .Release.Name }}-{{ .Chart.Name }}
ports:
- name: http
containerPort: 80
- name: https
containerPort: 443
env:
- name: App__SelfUrl
value: "{{ .Values.config.selfUrl }}"
- name: App__CorsOrigins
value: "{{ .Values.config.corsOrigins }}"
- name: "ConnectionStrings__AdministrationService"
value: {{ .Values.config.connectionStrings.administrationService }}
- name: "ConnectionStrings__SaasService"
value: {{ .Values.config.connectionStrings.saasService }}
- name: "DOTNET_ENVIRONMENT"
value: "{{ .Values.config.dotnetEnv }}"
- name: "Redis__Configuration"
value: "{{ .Values.config.redisHost }}"
- name: "RabbitMQ__Connections__Default__HostName"
value: "{{ .Values.config.rabbitmqHost }}"
- name: "ElasticSearch__Url"
value: "{{ .Values.config.elasticsearchHost }}"
- name: "AuthServer__Authority"
value: "{{ .Values.config.authServer.authority }}"
- name: "AuthServer__RequireHttpsMetadata"
value: "{{ .Values.config.authServer.requireHttpsMetadata }}"
- name: "StringEncryption__DefaultPassPhrase"
value: "{{ .Values.config.stringEncryptionDefaultPassPhrase }}"
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}

25
etc/k8s/eshoponabp/charts/saas/values.yaml

@ -1,25 +0,0 @@
config:
selfUrl: https://eshop-st-saas
corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-public-web,https://eshop-st-gateway-internal
connectionStrings:
administrationService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
saasService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
elasticsearchHost: es-st-elasticsearch
stringEncryptionDefaultPassPhrase: gsKnGZ041HLL4IM8
ingress:
host: eshop-st-saas
tlsSecret: eshop-demo-tls
image:
repository: eshoponabp/service-saas
tag: latest
pullPolicy: IfNotPresent
env: {}

9
etc/k8s/eshoponabp/values.yaml

@ -8,8 +8,6 @@ authserver:
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
administrationService:
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
saasService:
connString: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
dotnetEnv: Staging
redisHost: es-st-redis
rabbitmqHost: es-st-rabbitmq
@ -57,7 +55,6 @@ identity:
connectionStrings:
identityService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
administrationService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
saasService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
@ -72,7 +69,6 @@ identity:
publicWebGatewayRootUrl: https://eshop-st-gateway-web-public/
identityServiceRootUrl: https://eshop-st-identity/
administrationServiceRootUrl: https://eshop-st-administration/
saasServiceRootUrl: https://eshop-st-saas/
ingress:
host: eshop-st-identity
image:
@ -87,7 +83,6 @@ administration:
corsOrigins: https://eshop-st-gateway-web,https://eshop-st-gateway-web-public,https://eshop-st-gateway-internal
connectionStrings:
administrationService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
saasService: "Server=es-st-sqldb,1433;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw@rd;MultipleActiveResultSets=true"
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
@ -131,10 +126,6 @@ gateway-web:
schema: http
host: eshop-st-administration
port: 80
saasService:
schema: http
host: eshop-st-saas
port: 80
# gateway-web-public sub-chart override
gateway-web-public:

7
etc/scripts/build-images.ps1

@ -12,7 +12,6 @@ $internalGatewayFolder = Join-Path $slnFolder "gateways/internal/src/EShopOnAbp.
$identityServiceFolder = Join-Path $slnFolder "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host"
$administrationServiceFolder = Join-Path $slnFolder "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host"
$saasServiceFolder = Join-Path $slnFolder "services/saas/src/EShopOnAbp.SaasService.HttpApi.Host"
### Angular WEB App(WWW)
Write-Host "*** BUILDING WEB (WWW) ****************" -ForegroundColor Green
@ -64,12 +63,6 @@ Set-Location $administrationServiceFolder
dotnet publish -c Release
docker build -t eshoponabp/service-administration:$version .
### SAAS-SERVICE
Write-Host "*** BUILDING SAAS-SERVICE ****************" -ForegroundColor Green
Set-Location $saasServiceFolder
dotnet publish -c Release
docker build -t eshoponabp/service-saas:$version .
### ALL COMPLETED
Write-Host "ALL COMPLETED" -ForegroundColor Green
Set-Location $currentFolder

1
gateways/web-public/src/EShopOnAbp.WebPublicGateway/Dockerfile

@ -24,7 +24,6 @@ COPY "shared/EShopOnAbp.Shared.Localization/EShopOnAbp.Shared.Localization.cspro
# Microservices
COPY "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj" "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj"
COPY "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj" "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj"
COPY *"services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj" "services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj"
COPY *"services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj" "services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj"
COPY *"services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj"
COPY *"services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj"

1
gateways/web/src/EShopOnAbp.WebGateway/Dockerfile

@ -24,7 +24,6 @@ COPY "shared/EShopOnAbp.Shared.Localization/EShopOnAbp.Shared.Localization.cspro
# Microservices
COPY "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj" "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj"
COPY "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj" "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj"
COPY *"services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj" "services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj"
COPY *"services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj" "services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj"
COPY *"services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj"
COPY *"services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj"

13
gateways/web/src/EShopOnAbp.WebGateway/appsettings.json

@ -44,19 +44,6 @@
"UpstreamPathTemplate": "/api/account/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Saas Service",
"DownstreamPathTemplate": "/api/multi-tenancy/{everything}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44352
}
],
"UpstreamPathTemplate": "/api/multi-tenancy/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/api/abp/{everything}",

2
run-tye.ps1

@ -12,7 +12,7 @@ if (! ( Test-Path ".\etc\dev-cert\localhost.pfx" -PathType Leaf ) ){
docker network create eshoponabp-network
$requiredServices = @(
'sql-server-db',
'postgres-db',
'rabbitmq',
'redis'
)

2
services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EShopOnAbp.AdministrationService.EntityFrameworkCore.csproj

@ -13,7 +13,7 @@
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.AdministrationService.Domain\EShopOnAbp.AdministrationService.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="5.0.0-rc.1" />

2
services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EntityFrameworkCore/AdministrationServiceDbContextFactory.cs

@ -10,7 +10,7 @@ namespace EShopOnAbp.AdministrationService.EntityFrameworkCore
public AdministrationServiceDbContext CreateDbContext(string[] args)
{
var builder = new DbContextOptionsBuilder<AdministrationServiceDbContext>()
.UseSqlServer(GetConnectionStringFromConfiguration(), b =>
.UseNpgsql(GetConnectionStringFromConfiguration(), b =>
{
b.MigrationsHistoryTable("__AdministrationService_Migrations");
});

6
services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/EntityFrameworkCore/AdministrationServiceEntityFrameworkCoreModule.cs

@ -2,7 +2,7 @@
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BlobStoring.Database.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.EntityFrameworkCore.PostgreSql;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
@ -12,7 +12,7 @@ namespace EShopOnAbp.AdministrationService.EntityFrameworkCore
{
[DependsOn(
typeof(AdministrationServiceDomainModule),
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpEntityFrameworkCorePostgreSqlModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
@ -38,7 +38,7 @@ namespace EShopOnAbp.AdministrationService.EntityFrameworkCore
{
options.Configure<AdministrationServiceDbContext>(c =>
{
c.UseSqlServer(b =>
c.UseNpgsql(b =>
{
b.MigrationsHistoryTable("__AdministrationService_Migrations");
});

169
services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211006102113_Initial.Designer.cs → services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211125123421_Initial.Designer.cs

@ -3,9 +3,9 @@ using System;
using EShopOnAbp.AdministrationService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
@ -13,115 +13,115 @@ using Volo.Abp.EntityFrameworkCore;
namespace EShopOnAbp.AdministrationService.Migrations
{
[DbContext(typeof(AdministrationServiceDbContext))]
[Migration("20211006102113_Initial")]
[Migration("20211125123421_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("ApplicationName")
.HasMaxLength(96)
.HasColumnType("nvarchar(96)")
.HasColumnType("character varying(96)")
.HasColumnName("ApplicationName");
b.Property<string>("BrowserInfo")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasColumnType("character varying(512)")
.HasColumnName("BrowserInfo");
b.Property<string>("ClientId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnType("character varying(64)")
.HasColumnName("ClientId");
b.Property<string>("ClientIpAddress")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnType("character varying(64)")
.HasColumnName("ClientIpAddress");
b.Property<string>("ClientName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasColumnType("character varying(128)")
.HasColumnName("ClientName");
b.Property<string>("Comments")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnType("character varying(256)")
.HasColumnName("Comments");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("CorrelationId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnType("character varying(64)")
.HasColumnName("CorrelationId");
b.Property<string>("Exceptions")
.HasColumnType("nvarchar(max)");
.HasColumnType("text");
b.Property<int>("ExecutionDuration")
.HasColumnType("int")
.HasColumnType("integer")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime2");
.HasColumnType("timestamp with time zone");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("HttpMethod")
.HasMaxLength(16)
.HasColumnType("nvarchar(16)")
.HasColumnType("character varying(16)")
.HasColumnName("HttpMethod");
b.Property<int?>("HttpStatusCode")
.HasColumnType("int")
.HasColumnType("integer")
.HasColumnName("HttpStatusCode");
b.Property<Guid?>("ImpersonatorTenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("ImpersonatorTenantId");
b.Property<Guid?>("ImpersonatorUserId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("ImpersonatorUserId");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<string>("TenantName")
.HasColumnType("nvarchar(max)");
.HasColumnType("text");
b.Property<string>("Url")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnType("character varying(256)")
.HasColumnName("Url");
b.Property<Guid?>("UserId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("UserId");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnType("character varying(256)")
.HasColumnName("UserName");
b.HasKey("Id");
@ -136,41 +136,41 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<Guid>("AuditLogId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("AuditLogId");
b.Property<int>("ExecutionDuration")
.HasColumnType("int")
.HasColumnType("integer")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime2")
.HasColumnType("timestamp with time zone")
.HasColumnName("ExecutionTime");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("MethodName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasColumnType("character varying(128)")
.HasColumnName("MethodName");
b.Property<string>("Parameters")
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)")
.HasColumnType("character varying(2000)")
.HasColumnName("Parameters");
b.Property<string>("ServiceName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnType("character varying(256)")
.HasColumnName("ServiceName");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -185,41 +185,41 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<Guid>("AuditLogId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("AuditLogId");
b.Property<DateTime>("ChangeTime")
.HasColumnType("datetime2")
.HasColumnType("timestamp with time zone")
.HasColumnName("ChangeTime");
b.Property<byte>("ChangeType")
.HasColumnType("tinyint")
.HasColumnType("smallint")
.HasColumnName("ChangeType");
b.Property<string>("EntityId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasColumnType("character varying(128)")
.HasColumnName("EntityId");
b.Property<Guid?>("EntityTenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasColumnType("character varying(128)")
.HasColumnName("EntityTypeFullName");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -234,35 +234,35 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<Guid>("EntityChangeId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("NewValue")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasColumnType("character varying(512)")
.HasColumnName("NewValue");
b.Property<string>("OriginalValue")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasColumnType("character varying(512)")
.HasColumnName("OriginalValue");
b.Property<string>("PropertyName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasColumnType("character varying(128)")
.HasColumnName("PropertyName");
b.Property<string>("PropertyTypeFullName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnType("character varying(64)")
.HasColumnName("PropertyTypeFullName");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -275,32 +275,32 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<Guid>("ContainerId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<byte[]>("Content")
.HasMaxLength(2147483647)
.HasColumnType("varbinary(max)");
.HasColumnType("bytea");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
.HasColumnType("character varying(256)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -315,25 +315,25 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("character varying(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -346,29 +346,30 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("character varying(128)");
b.Property<string>("ProviderKey")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
.HasColumnType("character varying(64)");
b.Property<string>("ProviderName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
.HasColumnType("character varying(64)");
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("character varying(128)");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.HasIndex("Name", "ProviderName", "ProviderKey")
.IsUnique();
b.ToTable("AbpFeatureValues", (string)null);
});
@ -376,30 +377,31 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("character varying(128)");
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
.HasColumnType("character varying(64)");
b.Property<string>("ProviderName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
.HasColumnType("character varying(64)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey")
.IsUnique();
b.ToTable("AbpPermissionGrants", (string)null);
});
@ -407,29 +409,30 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("character varying(128)");
b.Property<string>("ProviderKey")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
.HasColumnType("character varying(64)");
b.Property<string>("ProviderName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
.HasColumnType("character varying(64)");
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("nvarchar(2048)");
.HasColumnType("character varying(2048)");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.HasIndex("Name", "ProviderName", "ProviderKey")
.IsUnique();
b.ToTable("AbpSettings", (string)null);
});

161
services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211006102113_Initial.cs → services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/20211125123421_Initial.cs

@ -13,28 +13,28 @@ namespace EShopOnAbp.AdministrationService.Migrations
name: "AbpAuditLogs",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ApplicationName = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantName = table.Column<string>(type: "nvarchar(max)", nullable: true),
ImpersonatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ImpersonatorTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ExecutionTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExecutionDuration = table.Column<int>(type: "int", nullable: false),
ClientIpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ClientName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CorrelationId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
BrowserInfo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
HttpMethod = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
Url = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
Exceptions = table.Column<string>(type: "nvarchar(max)", nullable: true),
Comments = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
HttpStatusCode = table.Column<int>(type: "int", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
ApplicationName = table.Column<string>(type: "character varying(96)", maxLength: 96, nullable: true),
UserId = table.Column<Guid>(type: "uuid", nullable: true),
UserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
TenantName = table.Column<string>(type: "text", nullable: true),
ImpersonatorUserId = table.Column<Guid>(type: "uuid", nullable: true),
ImpersonatorTenantId = table.Column<Guid>(type: "uuid", nullable: true),
ExecutionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ExecutionDuration = table.Column<int>(type: "integer", nullable: false),
ClientIpAddress = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
ClientName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
ClientId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
CorrelationId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
BrowserInfo = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
HttpMethod = table.Column<string>(type: "character varying(16)", maxLength: 16, nullable: true),
Url = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
Exceptions = table.Column<string>(type: "text", nullable: true),
Comments = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
HttpStatusCode = table.Column<int>(type: "integer", nullable: true),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
@ -45,11 +45,11 @@ namespace EShopOnAbp.AdministrationService.Migrations
name: "AbpBlobContainers",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
Name = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
@ -60,11 +60,11 @@ namespace EShopOnAbp.AdministrationService.Migrations
name: "AbpFeatureValues",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Value = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
Name = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
Value = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
ProviderName = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
ProviderKey = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true)
},
constraints: table =>
{
@ -75,11 +75,11 @@ namespace EShopOnAbp.AdministrationService.Migrations
name: "AbpPermissionGrants",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
Name = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
ProviderName = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
ProviderKey = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
@ -90,11 +90,11 @@ namespace EShopOnAbp.AdministrationService.Migrations
name: "AbpSettings",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Value = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: false),
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
Name = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
Value = table.Column<string>(type: "character varying(2048)", maxLength: 2048, nullable: false),
ProviderName = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
ProviderKey = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true)
},
constraints: table =>
{
@ -105,15 +105,15 @@ namespace EShopOnAbp.AdministrationService.Migrations
name: "AbpAuditLogActions",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AuditLogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ServiceName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
MethodName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Parameters = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
ExecutionTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExecutionDuration = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
AuditLogId = table.Column<Guid>(type: "uuid", nullable: false),
ServiceName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
MethodName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
Parameters = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
ExecutionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ExecutionDuration = table.Column<int>(type: "integer", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
@ -130,15 +130,15 @@ namespace EShopOnAbp.AdministrationService.Migrations
name: "AbpEntityChanges",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AuditLogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ChangeTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ChangeType = table.Column<byte>(type: "tinyint", nullable: false),
EntityTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
EntityId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
EntityTypeFullName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
AuditLogId = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
ChangeTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ChangeType = table.Column<byte>(type: "smallint", nullable: false),
EntityTenantId = table.Column<Guid>(type: "uuid", nullable: true),
EntityId = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
EntityTypeFullName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
@ -155,13 +155,13 @@ namespace EShopOnAbp.AdministrationService.Migrations
name: "AbpBlobs",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ContainerId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Content = table.Column<byte[]>(type: "varbinary(max)", maxLength: 2147483647, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
ContainerId = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
Name = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
Content = table.Column<byte[]>(type: "bytea", maxLength: 2147483647, nullable: true),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
@ -178,13 +178,13 @@ namespace EShopOnAbp.AdministrationService.Migrations
name: "AbpEntityPropertyChanges",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
EntityChangeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
NewValue = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
OriginalValue = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
PropertyName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
PropertyTypeFullName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
EntityChangeId = table.Column<Guid>(type: "uuid", nullable: false),
NewValue = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
OriginalValue = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
PropertyName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
PropertyTypeFullName = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
@ -203,7 +203,7 @@ namespace EShopOnAbp.AdministrationService.Migrations
column: "AuditLogId");
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime",
name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_Executio~",
table: "AbpAuditLogActions",
columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" });
@ -250,17 +250,20 @@ namespace EShopOnAbp.AdministrationService.Migrations
migrationBuilder.CreateIndex(
name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey",
table: "AbpFeatureValues",
columns: new[] { "Name", "ProviderName", "ProviderKey" });
columns: new[] { "Name", "ProviderName", "ProviderKey" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey",
name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey",
table: "AbpPermissionGrants",
columns: new[] { "Name", "ProviderName", "ProviderKey" });
columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_AbpSettings_Name_ProviderName_ProviderKey",
table: "AbpSettings",
columns: new[] { "Name", "ProviderName", "ProviderKey" });
columns: new[] { "Name", "ProviderName", "ProviderKey" },
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)

167
services/administration/src/EShopOnAbp.AdministrationService.EntityFrameworkCore/Migrations/AdministrationServiceDbContextModelSnapshot.cs

@ -3,8 +3,8 @@ using System;
using EShopOnAbp.AdministrationService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
@ -18,108 +18,108 @@ namespace EShopOnAbp.AdministrationService.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("ApplicationName")
.HasMaxLength(96)
.HasColumnType("nvarchar(96)")
.HasColumnType("character varying(96)")
.HasColumnName("ApplicationName");
b.Property<string>("BrowserInfo")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasColumnType("character varying(512)")
.HasColumnName("BrowserInfo");
b.Property<string>("ClientId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnType("character varying(64)")
.HasColumnName("ClientId");
b.Property<string>("ClientIpAddress")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnType("character varying(64)")
.HasColumnName("ClientIpAddress");
b.Property<string>("ClientName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasColumnType("character varying(128)")
.HasColumnName("ClientName");
b.Property<string>("Comments")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnType("character varying(256)")
.HasColumnName("Comments");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("CorrelationId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnType("character varying(64)")
.HasColumnName("CorrelationId");
b.Property<string>("Exceptions")
.HasColumnType("nvarchar(max)");
.HasColumnType("text");
b.Property<int>("ExecutionDuration")
.HasColumnType("int")
.HasColumnType("integer")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime2");
.HasColumnType("timestamp with time zone");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("HttpMethod")
.HasMaxLength(16)
.HasColumnType("nvarchar(16)")
.HasColumnType("character varying(16)")
.HasColumnName("HttpMethod");
b.Property<int?>("HttpStatusCode")
.HasColumnType("int")
.HasColumnType("integer")
.HasColumnName("HttpStatusCode");
b.Property<Guid?>("ImpersonatorTenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("ImpersonatorTenantId");
b.Property<Guid?>("ImpersonatorUserId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("ImpersonatorUserId");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<string>("TenantName")
.HasColumnType("nvarchar(max)");
.HasColumnType("text");
b.Property<string>("Url")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnType("character varying(256)")
.HasColumnName("Url");
b.Property<Guid?>("UserId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("UserId");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnType("character varying(256)")
.HasColumnName("UserName");
b.HasKey("Id");
@ -134,41 +134,41 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<Guid>("AuditLogId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("AuditLogId");
b.Property<int>("ExecutionDuration")
.HasColumnType("int")
.HasColumnType("integer")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime2")
.HasColumnType("timestamp with time zone")
.HasColumnName("ExecutionTime");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("MethodName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasColumnType("character varying(128)")
.HasColumnName("MethodName");
b.Property<string>("Parameters")
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)")
.HasColumnType("character varying(2000)")
.HasColumnName("Parameters");
b.Property<string>("ServiceName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnType("character varying(256)")
.HasColumnName("ServiceName");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -183,41 +183,41 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<Guid>("AuditLogId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("AuditLogId");
b.Property<DateTime>("ChangeTime")
.HasColumnType("datetime2")
.HasColumnType("timestamp with time zone")
.HasColumnName("ChangeTime");
b.Property<byte>("ChangeType")
.HasColumnType("tinyint")
.HasColumnType("smallint")
.HasColumnName("ChangeType");
b.Property<string>("EntityId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasColumnType("character varying(128)")
.HasColumnName("EntityId");
b.Property<Guid?>("EntityTenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasColumnType("character varying(128)")
.HasColumnName("EntityTypeFullName");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -232,35 +232,35 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<Guid>("EntityChangeId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("NewValue")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasColumnType("character varying(512)")
.HasColumnName("NewValue");
b.Property<string>("OriginalValue")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasColumnType("character varying(512)")
.HasColumnName("OriginalValue");
b.Property<string>("PropertyName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasColumnType("character varying(128)")
.HasColumnName("PropertyName");
b.Property<string>("PropertyTypeFullName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnType("character varying(64)")
.HasColumnName("PropertyTypeFullName");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -273,32 +273,32 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<Guid>("ContainerId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<byte[]>("Content")
.HasMaxLength(2147483647)
.HasColumnType("varbinary(max)");
.HasColumnType("bytea");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
.HasColumnType("character varying(256)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -313,25 +313,25 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("character varying(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -344,29 +344,30 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("character varying(128)");
b.Property<string>("ProviderKey")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
.HasColumnType("character varying(64)");
b.Property<string>("ProviderName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
.HasColumnType("character varying(64)");
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("character varying(128)");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.HasIndex("Name", "ProviderName", "ProviderKey")
.IsUnique();
b.ToTable("AbpFeatureValues", (string)null);
});
@ -374,30 +375,31 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("character varying(128)");
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
.HasColumnType("character varying(64)");
b.Property<string>("ProviderName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
.HasColumnType("character varying(64)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey")
.IsUnique();
b.ToTable("AbpPermissionGrants", (string)null);
});
@ -405,29 +407,30 @@ namespace EShopOnAbp.AdministrationService.Migrations
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
.HasColumnType("uuid");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
.HasColumnType("character varying(128)");
b.Property<string>("ProviderKey")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
.HasColumnType("character varying(64)");
b.Property<string>("ProviderName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
.HasColumnType("character varying(64)");
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("nvarchar(2048)");
.HasColumnType("character varying(2048)");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.HasIndex("Name", "ProviderName", "ProviderKey")
.IsUnique();
b.ToTable("AbpSettings", (string)null);
});

1
services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/Dockerfile

@ -24,7 +24,6 @@ COPY "shared/EShopOnAbp.Shared.Localization/EShopOnAbp.Shared.Localization.cspro
# Microservices
COPY "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj" "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj"
COPY "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj" "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj"
COPY *"services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj" "services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj"
COPY *"services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj" "services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj"
COPY *"services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj"
COPY *"services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj"

2
services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/appsettings.json

@ -33,7 +33,7 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true"
"AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;"
},
"StringEncryption": {
"DefaultPassPhrase": "gsKnGZ041HLL4IM8"

2
services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/BasketServiceHttpApiHostModule.cs

@ -77,7 +77,7 @@ namespace EShopOnAbp.BasketService
app.UseAbpClaimsMap();
app.UseAuthorization();
app.UseSwagger();
app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "Saas Service API"); });
app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "Basket Service API"); });
app.UseAbpSerilogEnrichers();
app.UseAuditing();
app.UseUnitOfWork();

2
services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EShopOnAbp.CatalogService.EntityFrameworkCore.csproj

@ -12,7 +12,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="5.0.0-rc.1" />
</ItemGroup>
<ItemGroup>

7
services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceDbContextFactory.cs

@ -16,7 +16,12 @@ namespace EShopOnAbp.CatalogService.EntityFrameworkCore
var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<CatalogServiceDbContext>()
.UseSqlServer(configuration.GetConnectionString(CatalogServiceDbProperties.ConnectionStringName));
.UseNpgsql(
configuration.GetConnectionString(CatalogServiceDbProperties.ConnectionStringName),
b =>
{
b.MigrationsHistoryTable("__CatalogService_Migrations");
});
return new CatalogServiceDbContext(builder.Options);
}

11
services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/EntityFrameworkCore/CatalogServiceEntityFrameworkCoreModule.cs

@ -1,13 +1,13 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.EntityFrameworkCore.PostgreSql;
using Volo.Abp.Modularity;
namespace EShopOnAbp.CatalogService.EntityFrameworkCore
{
[DependsOn(
typeof(CatalogServiceDomainModule),
typeof(AbpEntityFrameworkCoreSqlServerModule)
typeof(AbpEntityFrameworkCorePostgreSqlModule)
)]
public class CatalogServiceEntityFrameworkCoreModule : AbpModule
{
@ -27,9 +27,10 @@ namespace EShopOnAbp.CatalogService.EntityFrameworkCore
Configure<AbpDbContextOptions>(options =>
{
/* The main point to change your DBMS.
* See also CatalogServiceMigrationsDbContextFactory for EF Core tooling. */
options.UseSqlServer();
options.UseNpgsql(b =>
{
b.MigrationsHistoryTable("__CatalogService_Migrations");
});
});
}
}

12
services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211011132527_Initial.Designer.cs → services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211125124215_Initial.Designer.cs

@ -2,9 +2,9 @@
using EShopOnAbp.CatalogService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
@ -12,18 +12,18 @@ using Volo.Abp.EntityFrameworkCore;
namespace EShopOnAbp.CatalogService.Migrations
{
[DbContext(typeof(CatalogServiceDbContext))]
[Migration("20211011132527_Initial")]
[Migration("20211125124215_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
#pragma warning restore 612, 618
}
}

0
services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211011132527_Initial.cs → services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/20211125124215_Initial.cs

10
services/catalog/src/EShopOnAbp.CatalogService.EntityFrameworkCore/Migrations/CatalogServiceDbContextModelSnapshot.cs

@ -2,8 +2,8 @@
using EShopOnAbp.CatalogService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
@ -17,11 +17,11 @@ namespace EShopOnAbp.CatalogService.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
#pragma warning restore 612, 618
}
}

2
services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/CatalogServiceHttpApiHostModule.cs

@ -82,7 +82,7 @@ namespace EShopOnAbp.CatalogService
app.UseAbpClaimsMap();
app.UseAuthorization();
app.UseSwagger();
app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "Saas Service API"); });
app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "Catalog Service API"); });
app.UseAbpSerilogEnrichers();
app.UseAuditing();
app.UseUnitOfWork();

4
services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/appsettings.json

@ -18,8 +18,8 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"CatalogService": "Server=localhost,1434;Database=EShopOnAbp_Catalog;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true",
"AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true"
"CatalogService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Catalog;Pooling=false;",
"AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;"
},
"StringEncryption": {
"DefaultPassPhrase": "cca88WgRXnVk07rx"

2
services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EShopOnAbp.IdentityService.EntityFrameworkCore.csproj

@ -16,7 +16,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="5.0.0-rc.1" />
</ItemGroup>

2
services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceDbContextFactory.cs

@ -15,7 +15,7 @@ namespace EShopOnAbp.IdentityService.EntityFrameworkCore
IdentityServiceEfCoreEntityExtensionMappings.Configure();
var builder = new DbContextOptionsBuilder<IdentityServiceDbContext>()
.UseSqlServer(GetConnectionStringFromConfiguration(), b =>
.UseNpgsql(GetConnectionStringFromConfiguration(), b =>
{
b.MigrationsHistoryTable("__IdentityService_Migrations");
});

6
services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/EntityFrameworkCore/IdentityServiceEntityFrameworkCoreModule.cs

@ -1,6 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.EntityFrameworkCore.PostgreSql;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.Modularity;
@ -9,7 +9,7 @@ namespace EShopOnAbp.IdentityService.EntityFrameworkCore
{
[DependsOn(
typeof(IdentityServiceDomainModule),
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpEntityFrameworkCorePostgreSqlModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpIdentityServerEntityFrameworkCoreModule)
)]
@ -34,7 +34,7 @@ namespace EShopOnAbp.IdentityService.EntityFrameworkCore
{
options.Configure<IdentityServiceDbContext>(c =>
{
c.UseSqlServer(b => { b.MigrationsHistoryTable("__IdentityService_Migrations"); });
c.UseNpgsql(b => { b.MigrationsHistoryTable("__IdentityService_Migrations"); });
});
});
}

583
services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211006102143_Initial.Designer.cs → services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211125125938_Initial.Designer.cs

File diff suppressed because it is too large

605
services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211006102143_Initial.cs → services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/20211125125938_Initial.cs

@ -13,16 +13,16 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpClaimTypes",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Required = table.Column<bool>(type: "bit", nullable: false),
IsStatic = table.Column<bool>(type: "bit", nullable: false),
Regex = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
RegexDescription = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Description = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
ValueType = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
Name = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
Required = table.Column<bool>(type: "boolean", nullable: false),
IsStatic = table.Column<bool>(type: "boolean", nullable: false),
Regex = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
RegexDescription = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true),
Description = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
ValueType = table.Column<int>(type: "integer", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
@ -33,11 +33,11 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpLinkUsers",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SourceUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SourceTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TargetUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TargetTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
SourceUserId = table.Column<Guid>(type: "uuid", nullable: false),
SourceTenantId = table.Column<Guid>(type: "uuid", nullable: true),
TargetUserId = table.Column<Guid>(type: "uuid", nullable: false),
TargetTenantId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
{
@ -48,20 +48,20 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpOrganizationUnits",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Code = table.Column<string>(type: "nvarchar(95)", maxLength: 95, nullable: false),
DisplayName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
ParentId = table.Column<Guid>(type: "uuid", nullable: true),
Code = table.Column<string>(type: "character varying(95)", maxLength: 95, nullable: false),
DisplayName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
@ -77,15 +77,15 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpRoles",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
NormalizedName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
IsDefault = table.Column<bool>(type: "bit", nullable: false),
IsStatic = table.Column<bool>(type: "bit", nullable: false),
IsPublic = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
Name = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
NormalizedName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
IsDefault = table.Column<bool>(type: "boolean", nullable: false),
IsStatic = table.Column<bool>(type: "boolean", nullable: false),
IsPublic = table.Column<bool>(type: "boolean", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
@ -96,21 +96,21 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpSecurityLogs",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ApplicationName = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true),
Identity = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true),
Action = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
TenantName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CorrelationId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ClientIpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
BrowserInfo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
ApplicationName = table.Column<string>(type: "character varying(96)", maxLength: 96, nullable: true),
Identity = table.Column<string>(type: "character varying(96)", maxLength: 96, nullable: true),
Action = table.Column<string>(type: "character varying(96)", maxLength: 96, nullable: true),
UserId = table.Column<Guid>(type: "uuid", nullable: true),
UserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
TenantName = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
ClientId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
CorrelationId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
ClientIpAddress = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
BrowserInfo = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
@ -121,34 +121,34 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpUsers",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
NormalizedUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Surname = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
NormalizedEmail = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
EmailConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
PasswordHash = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
SecurityStamp = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
IsExternal = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
PhoneNumber = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
TwoFactorEnabled = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
LockoutEnabled = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AccessFailedCount = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
UserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
NormalizedUserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
Name = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
Surname = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
Email = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
NormalizedEmail = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
EmailConfirmed = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
PasswordHash = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: true),
SecurityStamp = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
IsExternal = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
PhoneNumber = table.Column<string>(type: "character varying(16)", maxLength: 16, nullable: true),
PhoneNumberConfirmed = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
IsActive = table.Column<bool>(type: "boolean", nullable: false),
TwoFactorEnabled = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
LockoutEnd = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: true),
LockoutEnabled = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
AccessFailedCount = table.Column<int>(type: "integer", nullable: false, defaultValue: 0),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
@ -159,22 +159,22 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerApiResources",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
DisplayName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Enabled = table.Column<bool>(type: "bit", nullable: false),
AllowedAccessTokenSigningAlgorithms = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ShowInDiscoveryDocument = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
Name = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
DisplayName = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
Description = table.Column<string>(type: "character varying(1000)", maxLength: 1000, nullable: true),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
AllowedAccessTokenSigningAlgorithms = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
ShowInDiscoveryDocument = table.Column<bool>(type: "boolean", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
@ -185,23 +185,23 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerApiScopes",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
DisplayName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Required = table.Column<bool>(type: "bit", nullable: false),
Emphasize = table.Column<bool>(type: "bit", nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
Name = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
DisplayName = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
Description = table.Column<string>(type: "character varying(1000)", maxLength: 1000, nullable: true),
Required = table.Column<bool>(type: "boolean", nullable: false),
Emphasize = table.Column<bool>(type: "boolean", nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(type: "boolean", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
@ -212,55 +212,55 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerClients",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ClientId = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
ClientName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
ClientUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
LogoUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
Enabled = table.Column<bool>(type: "bit", nullable: false),
ProtocolType = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
RequireClientSecret = table.Column<bool>(type: "bit", nullable: false),
RequireConsent = table.Column<bool>(type: "bit", nullable: false),
AllowRememberConsent = table.Column<bool>(type: "bit", nullable: false),
AlwaysIncludeUserClaimsInIdToken = table.Column<bool>(type: "bit", nullable: false),
RequirePkce = table.Column<bool>(type: "bit", nullable: false),
AllowPlainTextPkce = table.Column<bool>(type: "bit", nullable: false),
RequireRequestObject = table.Column<bool>(type: "bit", nullable: false),
AllowAccessTokensViaBrowser = table.Column<bool>(type: "bit", nullable: false),
FrontChannelLogoutUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
FrontChannelLogoutSessionRequired = table.Column<bool>(type: "bit", nullable: false),
BackChannelLogoutUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
BackChannelLogoutSessionRequired = table.Column<bool>(type: "bit", nullable: false),
AllowOfflineAccess = table.Column<bool>(type: "bit", nullable: false),
IdentityTokenLifetime = table.Column<int>(type: "int", nullable: false),
AllowedIdentityTokenSigningAlgorithms = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
AccessTokenLifetime = table.Column<int>(type: "int", nullable: false),
AuthorizationCodeLifetime = table.Column<int>(type: "int", nullable: false),
ConsentLifetime = table.Column<int>(type: "int", nullable: true),
AbsoluteRefreshTokenLifetime = table.Column<int>(type: "int", nullable: false),
SlidingRefreshTokenLifetime = table.Column<int>(type: "int", nullable: false),
RefreshTokenUsage = table.Column<int>(type: "int", nullable: false),
UpdateAccessTokenClaimsOnRefresh = table.Column<bool>(type: "bit", nullable: false),
RefreshTokenExpiration = table.Column<int>(type: "int", nullable: false),
AccessTokenType = table.Column<int>(type: "int", nullable: false),
EnableLocalLogin = table.Column<bool>(type: "bit", nullable: false),
IncludeJwtId = table.Column<bool>(type: "bit", nullable: false),
AlwaysSendClientClaims = table.Column<bool>(type: "bit", nullable: false),
ClientClaimsPrefix = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
PairWiseSubjectSalt = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
UserSsoLifetime = table.Column<int>(type: "int", nullable: true),
UserCodeType = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
DeviceCodeLifetime = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
ClientId = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
ClientName = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
Description = table.Column<string>(type: "character varying(1000)", maxLength: 1000, nullable: true),
ClientUri = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
LogoUri = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
ProtocolType = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
RequireClientSecret = table.Column<bool>(type: "boolean", nullable: false),
RequireConsent = table.Column<bool>(type: "boolean", nullable: false),
AllowRememberConsent = table.Column<bool>(type: "boolean", nullable: false),
AlwaysIncludeUserClaimsInIdToken = table.Column<bool>(type: "boolean", nullable: false),
RequirePkce = table.Column<bool>(type: "boolean", nullable: false),
AllowPlainTextPkce = table.Column<bool>(type: "boolean", nullable: false),
RequireRequestObject = table.Column<bool>(type: "boolean", nullable: false),
AllowAccessTokensViaBrowser = table.Column<bool>(type: "boolean", nullable: false),
FrontChannelLogoutUri = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
FrontChannelLogoutSessionRequired = table.Column<bool>(type: "boolean", nullable: false),
BackChannelLogoutUri = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
BackChannelLogoutSessionRequired = table.Column<bool>(type: "boolean", nullable: false),
AllowOfflineAccess = table.Column<bool>(type: "boolean", nullable: false),
IdentityTokenLifetime = table.Column<int>(type: "integer", nullable: false),
AllowedIdentityTokenSigningAlgorithms = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
AccessTokenLifetime = table.Column<int>(type: "integer", nullable: false),
AuthorizationCodeLifetime = table.Column<int>(type: "integer", nullable: false),
ConsentLifetime = table.Column<int>(type: "integer", nullable: true),
AbsoluteRefreshTokenLifetime = table.Column<int>(type: "integer", nullable: false),
SlidingRefreshTokenLifetime = table.Column<int>(type: "integer", nullable: false),
RefreshTokenUsage = table.Column<int>(type: "integer", nullable: false),
UpdateAccessTokenClaimsOnRefresh = table.Column<bool>(type: "boolean", nullable: false),
RefreshTokenExpiration = table.Column<int>(type: "integer", nullable: false),
AccessTokenType = table.Column<int>(type: "integer", nullable: false),
EnableLocalLogin = table.Column<bool>(type: "boolean", nullable: false),
IncludeJwtId = table.Column<bool>(type: "boolean", nullable: false),
AlwaysSendClientClaims = table.Column<bool>(type: "boolean", nullable: false),
ClientClaimsPrefix = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
PairWiseSubjectSalt = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
UserSsoLifetime = table.Column<int>(type: "integer", nullable: true),
UserCodeType = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
DeviceCodeLifetime = table.Column<int>(type: "integer", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
@ -271,19 +271,19 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerDeviceFlowCodes",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
DeviceCode = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
UserCode = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
SubjectId = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
SessionId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ClientId = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
Description = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
Expiration = table.Column<DateTime>(type: "datetime2", nullable: false),
Data = table.Column<string>(type: "nvarchar(max)", maxLength: 50000, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
DeviceCode = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
UserCode = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
SubjectId = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
SessionId = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
ClientId = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
Description = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
Expiration = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
Data = table.Column<string>(type: "character varying(50000)", maxLength: 50000, nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
{
@ -294,23 +294,23 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerIdentityResources",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
DisplayName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Required = table.Column<bool>(type: "bit", nullable: false),
Emphasize = table.Column<bool>(type: "bit", nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
Name = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
DisplayName = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
Description = table.Column<string>(type: "character varying(1000)", maxLength: 1000, nullable: true),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
Required = table.Column<bool>(type: "boolean", nullable: false),
Emphasize = table.Column<bool>(type: "boolean", nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(type: "boolean", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastModifierId = table.Column<Guid>(type: "uuid", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uuid", nullable: true),
DeletionTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
@ -321,19 +321,19 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerPersistedGrants",
columns: table => new
{
Key = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
Type = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
SubjectId = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
SessionId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ClientId = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
Description = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Expiration = table.Column<DateTime>(type: "datetime2", nullable: true),
ConsumedTime = table.Column<DateTime>(type: "datetime2", nullable: true),
Data = table.Column<string>(type: "nvarchar(max)", maxLength: 50000, nullable: false),
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
Key = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
Type = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
SubjectId = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
SessionId = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
ClientId = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
Description = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
Expiration = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
ConsumedTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
Data = table.Column<string>(type: "character varying(50000)", maxLength: 50000, nullable: false),
Id = table.Column<Guid>(type: "uuid", nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
@ -344,17 +344,17 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpOrganizationUnitRoles",
columns: table => new
{
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OrganizationUnitId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
RoleId = table.Column<Guid>(type: "uuid", nullable: false),
OrganizationUnitId = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId });
table.ForeignKey(
name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId",
name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationU~",
column: x => x.OrganizationUnitId,
principalTable: "AbpOrganizationUnits",
principalColumn: "Id",
@ -371,11 +371,11 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpRoleClaims",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ClaimType = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
ClaimValue = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
RoleId = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
ClaimType = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
ClaimValue = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true)
},
constraints: table =>
{
@ -392,11 +392,11 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpUserClaims",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ClaimType = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
ClaimValue = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true)
Id = table.Column<Guid>(type: "uuid", nullable: false),
UserId = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
ClaimType = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
ClaimValue = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true)
},
constraints: table =>
{
@ -413,11 +413,11 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpUserLogins",
columns: table => new
{
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
LoginProvider = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ProviderKey = table.Column<string>(type: "nvarchar(196)", maxLength: 196, nullable: false),
ProviderDisplayName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true)
UserId = table.Column<Guid>(type: "uuid", nullable: false),
LoginProvider = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
ProviderKey = table.Column<string>(type: "character varying(196)", maxLength: 196, nullable: false),
ProviderDisplayName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true)
},
constraints: table =>
{
@ -434,17 +434,17 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpUserOrganizationUnits",
columns: table => new
{
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OrganizationUnitId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
UserId = table.Column<Guid>(type: "uuid", nullable: false),
OrganizationUnitId = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId });
table.ForeignKey(
name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId",
name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationU~",
column: x => x.OrganizationUnitId,
principalTable: "AbpOrganizationUnits",
principalColumn: "Id",
@ -461,9 +461,9 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpUserRoles",
columns: table => new
{
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
UserId = table.Column<Guid>(type: "uuid", nullable: false),
RoleId = table.Column<Guid>(type: "uuid", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
{
@ -486,11 +486,11 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "AbpUserTokens",
columns: table => new
{
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
LoginProvider = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Value = table.Column<string>(type: "nvarchar(max)", nullable: true)
UserId = table.Column<Guid>(type: "uuid", nullable: false),
LoginProvider = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
Name = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
Value = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
@ -507,14 +507,14 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerApiResourceClaims",
columns: table => new
{
Type = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
ApiResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
Type = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
ApiResourceId = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiResourceClaims", x => new { x.ApiResourceId, x.Type });
table.ForeignKey(
name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_ApiResourceId",
name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_~",
column: x => x.ApiResourceId,
principalTable: "IdentityServerApiResources",
principalColumn: "Id",
@ -525,15 +525,15 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerApiResourceProperties",
columns: table => new
{
ApiResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Key = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false)
ApiResourceId = table.Column<Guid>(type: "uuid", nullable: false),
Key = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value });
table.ForeignKey(
name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResources_ApiResourceId",
name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResour~",
column: x => x.ApiResourceId,
principalTable: "IdentityServerApiResources",
principalColumn: "Id",
@ -544,14 +544,14 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerApiResourceScopes",
columns: table => new
{
ApiResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Scope = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false)
ApiResourceId = table.Column<Guid>(type: "uuid", nullable: false),
Scope = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiResourceScopes", x => new { x.ApiResourceId, x.Scope });
table.ForeignKey(
name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_ApiResourceId",
name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_~",
column: x => x.ApiResourceId,
principalTable: "IdentityServerApiResources",
principalColumn: "Id",
@ -562,17 +562,17 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerApiResourceSecrets",
columns: table => new
{
Type = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: false),
ApiResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Expiration = table.Column<DateTime>(type: "datetime2", nullable: true)
Type = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "character varying(4000)", maxLength: 4000, nullable: false),
ApiResourceId = table.Column<Guid>(type: "uuid", nullable: false),
Description = table.Column<string>(type: "character varying(1000)", maxLength: 1000, nullable: true),
Expiration = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiResourceSecrets", x => new { x.ApiResourceId, x.Type, x.Value });
table.ForeignKey(
name: "FK_IdentityServerApiResourceSecrets_IdentityServerApiResources_ApiResourceId",
name: "FK_IdentityServerApiResourceSecrets_IdentityServerApiResources~",
column: x => x.ApiResourceId,
principalTable: "IdentityServerApiResources",
principalColumn: "Id",
@ -583,14 +583,14 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerApiScopeClaims",
columns: table => new
{
Type = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
ApiScopeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
Type = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
ApiScopeId = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Type });
table.ForeignKey(
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScopeId",
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiSco~",
column: x => x.ApiScopeId,
principalTable: "IdentityServerApiScopes",
principalColumn: "Id",
@ -601,15 +601,15 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerApiScopeProperties",
columns: table => new
{
ApiScopeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Key = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false)
ApiScopeId = table.Column<Guid>(type: "uuid", nullable: false),
Key = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value });
table.ForeignKey(
name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_ApiScopeId",
name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_Ap~",
column: x => x.ApiScopeId,
principalTable: "IdentityServerApiScopes",
principalColumn: "Id",
@ -620,9 +620,9 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerClientClaims",
columns: table => new
{
ClientId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Type = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false)
ClientId = table.Column<Guid>(type: "uuid", nullable: false),
Type = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false)
},
constraints: table =>
{
@ -639,14 +639,14 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerClientCorsOrigins",
columns: table => new
{
ClientId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Origin = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: false)
ClientId = table.Column<Guid>(type: "uuid", nullable: false),
Origin = table.Column<string>(type: "character varying(150)", maxLength: 150, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin });
table.ForeignKey(
name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_ClientId",
name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_Clien~",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
@ -657,14 +657,14 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerClientGrantTypes",
columns: table => new
{
ClientId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
GrantType = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false)
ClientId = table.Column<Guid>(type: "uuid", nullable: false),
GrantType = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientGrantTypes", x => new { x.ClientId, x.GrantType });
table.ForeignKey(
name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_ClientId",
name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_Client~",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
@ -675,14 +675,14 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerClientIdPRestrictions",
columns: table => new
{
ClientId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Provider = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false)
ClientId = table.Column<Guid>(type: "uuid", nullable: false),
Provider = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider });
table.ForeignKey(
name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_ClientId",
name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_C~",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
@ -693,14 +693,14 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerClientPostLogoutRedirectUris",
columns: table => new
{
ClientId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PostLogoutRedirectUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false)
ClientId = table.Column<Guid>(type: "uuid", nullable: false),
PostLogoutRedirectUri = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri });
table.ForeignKey(
name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId",
name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerCl~",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
@ -711,15 +711,15 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerClientProperties",
columns: table => new
{
ClientId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Key = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false)
ClientId = table.Column<Guid>(type: "uuid", nullable: false),
Key = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key, x.Value });
table.ForeignKey(
name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId",
name: "FK_IdentityServerClientProperties_IdentityServerClients_Client~",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
@ -730,14 +730,14 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerClientRedirectUris",
columns: table => new
{
ClientId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RedirectUri = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false)
ClientId = table.Column<Guid>(type: "uuid", nullable: false),
RedirectUri = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri });
table.ForeignKey(
name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId",
name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_Clie~",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
@ -748,8 +748,8 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerClientScopes",
columns: table => new
{
ClientId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Scope = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false)
ClientId = table.Column<Guid>(type: "uuid", nullable: false),
Scope = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false)
},
constraints: table =>
{
@ -766,11 +766,11 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerClientSecrets",
columns: table => new
{
Type = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: false),
ClientId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Description = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
Expiration = table.Column<DateTime>(type: "datetime2", nullable: true)
Type = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "character varying(4000)", maxLength: 4000, nullable: false),
ClientId = table.Column<Guid>(type: "uuid", nullable: false),
Description = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
Expiration = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
@ -787,14 +787,14 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerIdentityResourceClaims",
columns: table => new
{
Type = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
IdentityResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
Type = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
IdentityResourceId = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerIdentityResourceClaims", x => new { x.IdentityResourceId, x.Type });
table.ForeignKey(
name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentityResources_IdentityResourceId",
name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentity~",
column: x => x.IdentityResourceId,
principalTable: "IdentityServerIdentityResources",
principalColumn: "Id",
@ -805,15 +805,15 @@ namespace EShopOnAbp.IdentityService.Migrations
name: "IdentityServerIdentityResourceProperties",
columns: table => new
{
IdentityResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Key = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false)
IdentityResourceId = table.Column<Guid>(type: "uuid", nullable: false),
Key = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value });
table.ForeignKey(
name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIdentityResources_IdentityResourceId",
name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIden~",
column: x => x.IdentityResourceId,
principalTable: "IdentityServerIdentityResources",
principalColumn: "Id",
@ -821,11 +821,10 @@ namespace EShopOnAbp.IdentityService.Migrations
});
migrationBuilder.CreateIndex(
name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId",
name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_Targe~",
table: "AbpLinkUsers",
columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" },
unique: true,
filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL");
unique: true);
migrationBuilder.CreateIndex(
name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId",

581
services/identity/src/EShopOnAbp.IdentityService.EntityFrameworkCore/Migrations/IdentityServiceDbContextModelSnapshot.cs

File diff suppressed because it is too large

8
services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/DbMigrations/IdentityServerDataSeeder.cs

@ -85,7 +85,6 @@ namespace EShopOnAbp.IdentityService.DbMigrations
await CreateApiResourceAsync("IdentityService", commonApiUserClaims);
await CreateApiResourceAsync("AdministrationService", commonApiUserClaims);
await CreateApiResourceAsync("SaasService", commonApiUserClaims);
await CreateApiResourceAsync("CatalogService", commonApiUserClaims);
await CreateApiResourceAsync("BasketService", commonApiUserClaims);
await CreateApiResourceAsync("OrderingService", commonApiUserClaims);
@ -96,7 +95,6 @@ namespace EShopOnAbp.IdentityService.DbMigrations
{
await CreateApiScopeAsync("IdentityService");
await CreateApiScopeAsync("AdministrationService");
await CreateApiScopeAsync("SaasService");
await CreateApiScopeAsync("CatalogService");
await CreateApiScopeAsync("BasketService");
await CreateApiScopeAsync("OrderingService");
@ -108,9 +106,6 @@ namespace EShopOnAbp.IdentityService.DbMigrations
await CreateSwaggerClientAsync("IdentityService",
new[] { "IdentityService"});
await CreateSwaggerClientAsync("SaasService",
new[] { "SaasService" });
await CreateSwaggerClientAsync("AdministrationService",
new[] { "AdministrationService" });
@ -239,8 +234,7 @@ namespace EShopOnAbp.IdentityService.DbMigrations
scopes: commonScopes.Union(new[]
{
"IdentityService",
"AdministrationService",
"SaasService"
"AdministrationService"
}),
grantTypes: new[] { "authorization_code", "LinkLogin" },
secret: "1q2w3e*".Sha256(),

1
services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/Dockerfile

@ -24,7 +24,6 @@ COPY "shared/EShopOnAbp.Shared.Localization/EShopOnAbp.Shared.Localization.cspro
# Microservices
COPY "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj" "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj"
COPY "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj" "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj"
COPY *"services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj" "services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj"
COPY *"services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj" "services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj"
COPY *"services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj"
COPY *"services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj"

156
services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/appsettings.json

@ -1,80 +1,76 @@
{
"App": {
"SelfUrl": "https://localhost:44351",
"CorsOrigins": "https://localhost:44372,https://localhost:44373"
},
"AuthServer": {
"Authority": "https://localhost:44330",
"RequireHttpsMetadata": "true",
"SwaggerClientId": "IdentityService_Swagger",
"SwaggerClientSecret": "1q2w3e*"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"IdentityService": "Server=localhost,1434;Database=EShopOnAbp_Identity;User Id=sa;password=myPassw0rd",
"AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd",
"SaasService": "Server=localhost,1434;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw0rd"
},
"StringEncryption": {
"DefaultPassPhrase": "gsKnGZ041HLL4IM8"
},
"Redis": {
"Configuration": "localhost:6379"
},
"RabbitMQ": {
"Connections": {
"Default": {
"HostName": "localhost"
}
},
"EventBus": {
"ClientName": "EShopOnAbp_IdentityService",
"ExchangeName": "EShopOnAbp"
}
},
"ElasticSearch": {
"Url": "http://localhost:9200"
},
"IdentityServerClients": {
"Web": {
"RootUrl": "http://localhost:4200"
},
"PublicWeb": {
"RootUrl": "https://localhost:44335/"
},
"WebGateway": {
"RootUrl": "https://localhost:44372"
},
"PublicWebGateway": {
"RootUrl": "https://localhost:44373"
},
"IdentityService": {
"RootUrl": "https://localhost:44351"
},
"SaasService": {
"RootUrl": "https://localhost:44352"
},
"AdministrationService": {
"RootUrl": "https://localhost:44353"
},
"CatalogService": {
"RootUrl": "https://localhost:44354"
},
"BasketService": {
"RootUrl": "https://localhost:44355"
},
"OrderingService": {
"RootUrl": "https://localhost:44356"
},
"PaymentService": {
"RootUrl": "https://localhost:44357"
}
}
}
{
"App": {
"SelfUrl": "https://localhost:44351",
"CorsOrigins": "https://localhost:44372,https://localhost:44373"
},
"AuthServer": {
"Authority": "https://localhost:44330",
"RequireHttpsMetadata": "true",
"SwaggerClientId": "IdentityService_Swagger",
"SwaggerClientSecret": "1q2w3e*"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"IdentityService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Identity;Pooling=false;",
"AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;"
},
"StringEncryption": {
"DefaultPassPhrase": "gsKnGZ041HLL4IM8"
},
"Redis": {
"Configuration": "localhost:6379"
},
"RabbitMQ": {
"Connections": {
"Default": {
"HostName": "localhost"
}
},
"EventBus": {
"ClientName": "EShopOnAbp_IdentityService",
"ExchangeName": "EShopOnAbp"
}
},
"ElasticSearch": {
"Url": "http://localhost:9200"
},
"IdentityServerClients": {
"Web": {
"RootUrl": "http://localhost:4200"
},
"PublicWeb": {
"RootUrl": "https://localhost:44335/"
},
"WebGateway": {
"RootUrl": "https://localhost:44372"
},
"PublicWebGateway": {
"RootUrl": "https://localhost:44373"
},
"IdentityService": {
"RootUrl": "https://localhost:44351"
},
"AdministrationService": {
"RootUrl": "https://localhost:44353"
},
"CatalogService": {
"RootUrl": "https://localhost:44354"
},
"BasketService": {
"RootUrl": "https://localhost:44355"
},
"OrderingService": {
"RootUrl": "https://localhost:44356"
},
"PaymentService": {
"RootUrl": "https://localhost:44357"
}
}
}

2
services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EShopOnAbp.OrderingService.EntityFrameworkCore.csproj

@ -9,7 +9,7 @@
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.OrderingService.Domain\EShopOnAbp.OrderingService.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="5.0.0-rc.1" />
</ItemGroup>
<ItemGroup>

7
services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceDbContextFactory.cs

@ -16,7 +16,12 @@ namespace EShopOnAbp.OrderingService.EntityFrameworkCore
var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<OrderingServiceDbContext>()
.UseSqlServer(configuration.GetConnectionString("Default"));
.UseNpgsql(
configuration.GetConnectionString(OrderingServiceDbProperties.ConnectionStringName),
b =>
{
b.MigrationsHistoryTable("__OrderingService_Migrations");
});
return new OrderingServiceDbContext(builder.Options);
}

9
services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/EntityFrameworkCore/OrderingServiceEntityFrameworkCoreModule.cs

@ -1,13 +1,13 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.EntityFrameworkCore.PostgreSql;
using Volo.Abp.Modularity;
namespace EShopOnAbp.OrderingService.EntityFrameworkCore
{
[DependsOn(
typeof(OrderingServiceDomainModule),
typeof(AbpEntityFrameworkCoreSqlServerModule)
typeof(AbpEntityFrameworkCorePostgreSqlModule)
)]
public class OrderingServiceEntityFrameworkCoreModule : AbpModule
{
@ -29,7 +29,10 @@ namespace EShopOnAbp.OrderingService.EntityFrameworkCore
{
/* The main point to change your DBMS.
* See also OrderingServiceMigrationsDbContextFactory for EF Core tooling. */
options.UseSqlServer();
options.UseNpgsql(b =>
{
b.MigrationsHistoryTable("__OrderingService_Migrations");
});
});
}
}

12
services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211012121150_Initial.Designer.cs → services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211125130659_Initial.Designer.cs

@ -2,9 +2,9 @@
using EShopOnAbp.OrderingService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
@ -12,18 +12,18 @@ using Volo.Abp.EntityFrameworkCore;
namespace EShopOnAbp.OrderingService.Migrations
{
[DbContext(typeof(OrderingServiceDbContext))]
[Migration("20211012121150_Initial")]
[Migration("20211125130659_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
#pragma warning restore 612, 618
}
}

0
services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211012121150_Initial.cs → services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/20211125130659_Initial.cs

10
services/ordering/src/EShopOnAbp.OrderingService.EntityFrameworkCore/Migrations/OrderingServiceDbContextModelSnapshot.cs

@ -2,8 +2,8 @@
using EShopOnAbp.OrderingService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
@ -17,11 +17,11 @@ namespace EShopOnAbp.OrderingService.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
#pragma warning restore 612, 618
}
}

2
services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/OrderingServiceHttpApiHostModule.cs

@ -82,7 +82,7 @@ namespace EShopOnAbp.OrderingService
app.UseAbpClaimsMap();
app.UseAuthorization();
app.UseSwagger();
app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "Saas Service API"); });
app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "Ordering Service API"); });
app.UseAbpSerilogEnrichers();
app.UseAuditing();
app.UseUnitOfWork();

4
services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/appsettings.json

@ -18,8 +18,8 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"OrderingService": "Server=localhost,1434;Database=EShopOnAbp_Ordering;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true",
"AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true"
"OrderingService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Ordering;Pooling=false",
"AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;"
},
"StringEncryption": {
"DefaultPassPhrase": "0f000WgRXnVk0704"

2
services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EShopOnAbp.PaymentService.EntityFrameworkCore.csproj

@ -9,7 +9,7 @@
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.PaymentService.Domain\EShopOnAbp.PaymentService.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="5.0.0-rc.1" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="5.0.0-rc.1" />
</ItemGroup>
<ItemGroup>

7
services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EntityFrameworkCore/PaymentServiceDbContextFactory.cs

@ -16,7 +16,12 @@ namespace EShopOnAbp.PaymentService.EntityFrameworkCore
var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<PaymentServiceDbContext>()
.UseSqlServer(configuration.GetConnectionString(PaymentServiceDbProperties.ConnectionStringName));
.UseNpgsql(
configuration.GetConnectionString(PaymentServiceDbProperties.ConnectionStringName),
b =>
{
b.MigrationsHistoryTable("__PaymentService_Migrations");
});
return new PaymentServiceDbContext(builder.Options);
}

9
services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/EntityFrameworkCore/PaymentServiceEntityFrameworkCoreModule.cs

@ -1,14 +1,14 @@
using EShopOnAbp.PaymentService.PaymentRequests;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.EntityFrameworkCore.PostgreSql;
using Volo.Abp.Modularity;
namespace EShopOnAbp.PaymentService.EntityFrameworkCore
{
[DependsOn(
typeof(PaymentServiceDomainModule),
typeof(AbpEntityFrameworkCoreSqlServerModule)
typeof(AbpEntityFrameworkCorePostgreSqlModule)
)]
public class PaymentServiceEntityFrameworkCoreModule : AbpModule
{
@ -28,7 +28,10 @@ namespace EShopOnAbp.PaymentService.EntityFrameworkCore
{
/* The main point to change your DBMS.
* See also PaymentServiceMigrationsDbContextFactory for EF Core tooling. */
options.UseSqlServer();
options.UseNpgsql(b =>
{
b.MigrationsHistoryTable("__PaymentService_Migrations");
});
});
}
}

30
services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211125131248_Initial.Designer.cs

@ -0,0 +1,30 @@
// <auto-generated />
using EShopOnAbp.PaymentService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace EShopOnAbp.PaymentService.Migrations
{
[DbContext(typeof(PaymentServiceDbContext))]
[Migration("20211125131248_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
#pragma warning restore 612, 618
}
}
}

19
services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/20211125131248_Initial.cs

@ -0,0 +1,19 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EShopOnAbp.PaymentService.Migrations
{
public partial class Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

101
services/payment/src/EShopOnAbp.PaymentService.EntityFrameworkCore/Migrations/PaymentServiceDbContextModelSnapshot.cs

@ -1,10 +1,9 @@
// <auto-generated />
using System;
using EShopOnAbp.PaymentService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
@ -18,103 +17,11 @@ namespace EShopOnAbp.PaymentService.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
.HasAnnotation("Relational:MaxIdentifierLength", 63);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("EShopOnAbp.PaymentService.PaymentRequests.PaymentRequest", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("BuyerId")
.HasColumnType("nvarchar(max)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("Currency")
.IsRequired()
.HasMaxLength(3)
.HasColumnType("nvarchar(3)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("FailReason")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<int>("State")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("PaymentRequests");
});
modelBuilder.Entity("EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestProduct", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("PaymentRequestId")
.HasColumnType("uniqueidentifier");
b.Property<int>("Quantity")
.HasColumnType("int");
b.Property<string>("ReferenceId")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("TotalPrice")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("UnitPrice")
.HasColumnType("decimal(18,2)");
b.HasKey("Id");
b.HasIndex("PaymentRequestId");
b.ToTable("PaymentRequestProduct");
});
modelBuilder.Entity("EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestProduct", b =>
{
b.HasOne("EShopOnAbp.PaymentService.PaymentRequests.PaymentRequest", null)
.WithMany("Products")
.HasForeignKey("PaymentRequestId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("EShopOnAbp.PaymentService.PaymentRequests.PaymentRequest", b =>
{
b.Navigation("Products");
});
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
#pragma warning restore 612, 618
}
}

2
services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/PaymentServiceHttpApiHostModule.cs

@ -81,7 +81,7 @@ namespace EShopOnAbp.PaymentService
app.UseAbpClaimsMap();
app.UseAuthorization();
app.UseSwagger();
app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "Saas Service API"); });
app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "Payment Service API"); });
app.UseAbpSerilogEnrichers();
app.UseAuditing();
app.UseUnitOfWork();

4
services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/appsettings.json

@ -18,8 +18,8 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"PaymentService": "Server=localhost,1434;Database=EShopOnAbp_Payment;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true",
"AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true"
"PaymentService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Payment;Pooling=false;",
"AdministrationService": "User ID=postgres;Password=myPassw0rd;Host=localhost;Port=5432;Database=EShopOnAbp_Administration;Pooling=false;"
},
"StringEncryption": {
"DefaultPassPhrase": "abc55ABArnzv0407"

6
shared/EShopOnAbp.Shared.Hosting/EShopOnAbpSharedHostingModule.cs

@ -18,12 +18,6 @@ namespace EShopOnAbp.Shared.Hosting
{
Configure<AbpDbConnectionOptions>(options =>
{
options.Databases.Configure("SaasService", database =>
{
database.MappedConnections.Add("AbpTenantManagement");
database.IsUsedByTenants = false;
});
options.Databases.Configure("AdministrationService", database =>
{
database.MappedConnections.Add("AbpAuditLogging");

Loading…
Cancel
Save