diff --git a/ASC.Migrations.sln b/ASC.Migrations.sln
new file mode 100644
index 0000000000..e0bb82c87d
--- /dev/null
+++ b/ASC.Migrations.sln
@@ -0,0 +1,91 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.2.32616.157
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.MySql", "migrations\mysql\ASC.Migrations.MySql.csproj", "{78FD997A-8A30-4B8B-B81E-46E6EE05390D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Backup.Core", "common\ASC.Data.Backup.Core\ASC.Data.Backup.Core.csproj", "{93D91A49-A397-40FC-90DE-85D8ED774803}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Storage", "common\ASC.Data.Storage\ASC.Data.Storage.csproj", "{582AF3E8-ACA4-49B8-809D-36A586C4307E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files.Core", "products\ASC.Files\Core\ASC.Files.Core.csproj", "{03B5483D-2EEF-4A42-83E7-487592434D3B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.EventBus.Extensions.Logger", "common\ASC.EventBus.Extensions.Logger\ASC.EventBus.Extensions.Logger.csproj", "{1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Webhooks.Core", "common\ASC.Webhooks.Core\ASC.Webhooks.Core.csproj", "{FD61091C-F0C1-47B3-B442-9B69CEA603DF}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Feed", "common\ASC.Feed\ASC.Feed.csproj", "{71A964E2-0075-46A3-AE58-9F2A78F6A5BB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.PostgreSql", "migrations\postgre\ASC.Migrations.PostgreSql.csproj", "{B06C5E36-BB67-4B4B-9E23-0326245BFCBB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Core.Common", "common\ASC.Core.Common\ASC.Core.Common.csproj", "{A51D0454-4AFA-46DE-89D4-B03D37E1816C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Migration.Creator", "common\Tools\Migration.Creator\Migration.Creator.csproj", "{4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Migration.Core", "common\Tools\Migration.Core\Migration.Core.csproj", "{4E971C04-8D1F-4C07-8D6F-C062C114CF7F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Migration.Runner", "common\Tools\Migration.Runner\Migration.Runner.csproj", "{249DC522-AC3B-475C-B77E-52CE0322E686}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {78FD997A-8A30-4B8B-B81E-46E6EE05390D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {78FD997A-8A30-4B8B-B81E-46E6EE05390D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {78FD997A-8A30-4B8B-B81E-46E6EE05390D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {78FD997A-8A30-4B8B-B81E-46E6EE05390D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {93D91A49-A397-40FC-90DE-85D8ED774803}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {93D91A49-A397-40FC-90DE-85D8ED774803}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {93D91A49-A397-40FC-90DE-85D8ED774803}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {93D91A49-A397-40FC-90DE-85D8ED774803}.Release|Any CPU.Build.0 = Release|Any CPU
+ {582AF3E8-ACA4-49B8-809D-36A586C4307E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {582AF3E8-ACA4-49B8-809D-36A586C4307E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {582AF3E8-ACA4-49B8-809D-36A586C4307E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {582AF3E8-ACA4-49B8-809D-36A586C4307E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {03B5483D-2EEF-4A42-83E7-487592434D3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {03B5483D-2EEF-4A42-83E7-487592434D3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {03B5483D-2EEF-4A42-83E7-487592434D3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {03B5483D-2EEF-4A42-83E7-487592434D3B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B06C5E36-BB67-4B4B-9E23-0326245BFCBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B06C5E36-BB67-4B4B-9E23-0326245BFCBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B06C5E36-BB67-4B4B-9E23-0326245BFCBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B06C5E36-BB67-4B4B-9E23-0326245BFCBB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4E971C04-8D1F-4C07-8D6F-C062C114CF7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4E971C04-8D1F-4C07-8D6F-C062C114CF7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4E971C04-8D1F-4C07-8D6F-C062C114CF7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4E971C04-8D1F-4C07-8D6F-C062C114CF7F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {249DC522-AC3B-475C-B77E-52CE0322E686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {249DC522-AC3B-475C-B77E-52CE0322E686}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {249DC522-AC3B-475C-B77E-52CE0322E686}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {249DC522-AC3B-475C-B77E-52CE0322E686}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {933E5EEB-E9B0-4389-B318-11E283E7FCF7}
+ EndGlobalSection
+EndGlobal
diff --git a/ASC.Tests.sln b/ASC.Tests.sln
index 95b4f1eba6..8524d8db98 100644
--- a/ASC.Tests.sln
+++ b/ASC.Tests.sln
@@ -76,6 +76,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
EndProjectSection
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.MySql", "migrations\mysql\ASC.Migrations.MySql.csproj", "{E81DC433-3555-4151-BDBC-16368A0FE14E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -217,6 +219,10 @@ Global
{B53587B7-58F6-48A9-B122-69BEA3E2572A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B53587B7-58F6-48A9-B122-69BEA3E2572A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B53587B7-58F6-48A9-B122-69BEA3E2572A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E81DC433-3555-4151-BDBC-16368A0FE14E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E81DC433-3555-4151-BDBC-16368A0FE14E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E81DC433-3555-4151-BDBC-16368A0FE14E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E81DC433-3555-4151-BDBC-16368A0FE14E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/ASC.Tools.sln b/ASC.Tools.sln
deleted file mode 100644
index e0f5d32031..0000000000
--- a/ASC.Tools.sln
+++ /dev/null
@@ -1,37 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.0.31815.197
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Core.Common", "common\ASC.Core.Common\ASC.Core.Common.csproj", "{A51D0454-4AFA-46DE-89D4-B03D37E1816C}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoMigrationCreator", "common\Tools\AutoMigrationCreator\AutoMigrationCreator.csproj", "{D779E2D7-1060-43D3-B8F2-F76A73CCFEBC}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files.Core", "products\ASC.Files\Core\ASC.Files.Core.csproj", "{B3D98EF4-B9A3-4082-AE78-7CF4C5CF5211}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.Build.0 = Release|Any CPU
- {D779E2D7-1060-43D3-B8F2-F76A73CCFEBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D779E2D7-1060-43D3-B8F2-F76A73CCFEBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D779E2D7-1060-43D3-B8F2-F76A73CCFEBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D779E2D7-1060-43D3-B8F2-F76A73CCFEBC}.Release|Any CPU.Build.0 = Release|Any CPU
- {B3D98EF4-B9A3-4082-AE78-7CF4C5CF5211}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B3D98EF4-B9A3-4082-AE78-7CF4C5CF5211}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B3D98EF4-B9A3-4082-AE78-7CF4C5CF5211}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B3D98EF4-B9A3-4082-AE78-7CF4C5CF5211}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {3A1E5FB1-22F6-4394-BFF3-8733F4A23003}
- EndGlobalSection
-EndGlobal
diff --git a/build/createMigrations.bat b/build/createMigrations.bat
index db2b0d2bf8..e5726af891 100644
--- a/build/createMigrations.bat
+++ b/build/createMigrations.bat
@@ -1,5 +1,5 @@
@echo "MIGRATIONS"
@echo off
-PUSHD %~dp0..\common\Tools\AutoMigrationCreator
-dotnet run --project AutoMigrationCreator.csproj
\ No newline at end of file
+PUSHD %~dp0..\common\Tools\Migration.Creator
+dotnet run --project Migration.Creator.csproj
\ No newline at end of file
diff --git a/build/install/common/build-backend.sh b/build/install/common/build-backend.sh
index 627a422a47..2a50a728d1 100644
--- a/build/install/common/build-backend.sh
+++ b/build/install/common/build-backend.sh
@@ -47,7 +47,6 @@ dotnet build ASC.Web.slnf ${ARGS}
# Array of names backend services in directory common (Nodejs)
services_name_backend_nodejs=()
-services_name_backend_nodejs+=(ASC.Thumbnails)
services_name_backend_nodejs+=(ASC.UrlShortener)
services_name_backend_nodejs+=(ASC.Socket.IO)
services_name_backend_nodejs+=(ASC.SsoAuth)
diff --git a/build/install/common/publish-backend.sh b/build/install/common/publish-backend.sh
index d79cf64726..4db72e6e87 100644
--- a/build/install/common/publish-backend.sh
+++ b/build/install/common/publish-backend.sh
@@ -78,9 +78,9 @@ services_name_backend+=(ASC.TelegramService)
services_name_backend+=(ASC.UrlShortener.Svc)
services_name_backend+=(ASC.Web.Api)
services_name_backend+=(ASC.Web.Studio)
-#services_name_backend+=(ASC.Thumbnails.Svc)
services_name_backend+=(ASC.Data.Backup.BackgroundTasks)
services_name_backend+=(ASC.ClearEvents)
+services_name_backend+=(ASC.Migration)
services_name_backend+=(ASC.Webhooks.Service)
# Publish backend services
@@ -93,7 +93,6 @@ done
# Array of names backend services in directory common (Nodejs)
services_name_backend_nodejs=()
-#services_name_backend_nodejs+=(ASC.Thumbnails)
services_name_backend_nodejs+=(ASC.UrlShortener)
services_name_backend_nodejs+=(ASC.Socket.IO)
services_name_backend_nodejs+=(ASC.SsoAuth)
diff --git a/build/install/docker/.env b/build/install/docker/.env
index 7414cd93b6..30ad9b3a18 100644
--- a/build/install/docker/.env
+++ b/build/install/docker/.env
@@ -49,6 +49,10 @@
# service host #
API_SYSTEM_HOST=${CONTAINER_PREFIX}api-system
BACKUP_HOST=${CONTAINER_PREFIX}backup
+ BACKUP_BACKGRUOND_TASKS_HOST=${CONTAINER_PREFIX}backup-background-tasks
+ CLEAR_EVENTS_HOST=${CONTAINER_PREFIX}clear-events
+ MIGRATION_HOST=${CONTAINER_PREFIX}migration
+ WEBHOOKS_SERVICE_HOST=${CONTAINER_PREFIX}webhooks-service
STORAGE_ENCRYPTION_HOST=${CONTAINER_PREFIX}storage-encryption
FILES_HOST=${CONTAINER_PREFIX}files
FILES_SERVICES_HOST=${CONTAINER_PREFIX}files-services
@@ -58,7 +62,6 @@
SOCKET_HOST=${CONTAINER_PREFIX}socket
STUDIO_NOTIFY_HOST=${CONTAINER_PREFIX}studio-notify
TELEGRAM_SERVICE_HOST=${CONTAINER_PREFIX}telegram-service
- THUMBNAILS_HOST=${CONTAINER_PREFIX}thumbnails
URLSHORTENER_HOST=${CONTAINER_PREFIX}urlshortener
API_HOST=${CONTAINER_PREFIX}api
STUDIO_HOST=${CONTAINER_PREFIX}studio
@@ -68,6 +71,10 @@
# proxy upstream environment #
SERVICE_API_SYSTEM=${API_SYSTEM_HOST}:${SERVICE_PORT}
SERVICE_BACKUP=${BACKUP_HOST}:${SERVICE_PORT}
+ SERVICE_BACKUP_BACKGRUOND_TASKS=${BACKUP_BACKGRUOND_TASKS_HOST}:${SERVICE_PORT}
+ SERVICE_CLEAR_EVENTS=${CLEAR_EVENTS_HOST}:${SERVICE_PORT}
+ SERVICE_MIGRATION=${MIGRATION_HOST}:${SERVICE_PORT}
+ SERVICE_WEBHOOKS_SERVICE=${WEBHOOKS_SERVICE_HOST}:${SERVICE_PORT}
SERVICE_STORAGE_ENCRYPTION=${STORAGE_ENCRYPTION_HOST}:${SERVICE_PORT}
SERVICE_FILES=${FILES_HOST}:${SERVICE_PORT}
SERVICE_FILES_SERVICES=${FILES_SERVICES_HOST}:${SERVICE_PORT}
@@ -77,7 +84,6 @@
SERVICE_SOCKET=${SOCKET_HOST}:${SERVICE_PORT}
SERVICE_STUDIO_NOTIFY=${STUDIO_NOTIFY_HOST}:${SERVICE_PORT}
SERVICE_TELEGRAM_SERVICE=${TELEGRAM_SERVICE_HOST}:${SERVICE_PORT}
- SERVICE_THUMBNAILS=${THUMBNAILS_HOST}:${SERVICE_PORT}
SERVICE_URLSHORTENER=${URLSHORTENER_HOST}:${SERVICE_PORT}
SERVICE_API=${API_HOST}:${SERVICE_PORT}
SERVICE_STUDIO=${STUDIO_HOST}:${SERVICE_PORT}
diff --git a/build/install/docker/Dockerfile.app b/build/install/docker/Dockerfile.app
index 375f550ecb..43ff3fac9a 100644
--- a/build/install/docker/Dockerfile.app
+++ b/build/install/docker/Dockerfile.app
@@ -161,35 +161,36 @@ RUN chown nginx:nginx /etc/nginx/* -R && \
sed -i 's/localhost:9834/$service_sso/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/localhost:5022/$service_mail/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/localhost:9999/$service_urlshortener/' /etc/nginx/conf.d/onlyoffice.conf && \
+ sed -i 's/localhost:5034/$service_migration/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/172.*/$document_server;/' /etc/nginx/conf.d/onlyoffice.conf
-## ASC.Webhooks.Service ##
-FROM builder AS webhooks-wervice
-WORKDIR ${BUILD_PATH}/services/ASC.Webhooks.Service/
-
-COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py
-COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Webhooks.Service/ .
-
-CMD ["ASC.Webhooks.Service.dll", "ASC.Webhooks.Service"]
-
-## ASC.ClearEvents ##
-FROM builder AS clear-events
-WORKDIR ${BUILD_PATH}/services/ASC.ClearEvents/
-
-COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py
-COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.ClearEvents/ .
-
-CMD ["ASC.ClearEvents.dll", "ASC.ClearEvents"]
-
## ASC.Data.Backup.BackgroundTasks ##
FROM builder AS backup_background
WORKDIR ${BUILD_PATH}/services/ASC.Data.Backup.BackgroundTasks/
COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py
-COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Data.Backup.BackgroundTasks/ .
+COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Data.Backup.BackgroundTasks/service/ .
CMD ["ASC.Data.Backup.BackgroundTasks.dll", "ASC.Data.Backup.BackgroundTasks"]
+## ASC.ClearEvents ##
+FROM builder AS clear-events
+WORKDIR ${BUILD_PATH}/services/ASC.ClearEvents/
+
+COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py
+COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.ClearEvents/service/ .
+
+CMD ["ASC.ClearEvents.dll", "ASC.ClearEvents"]
+
+## ASC.Migration ##
+FROM builder AS migration
+WORKDIR ${BUILD_PATH}/services/ASC.Migration/
+
+COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py
+COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Migration/service/ .
+
+CMD ["ASC.Migration.dll", "ASC.Migration"]
+
## ASC.Data.Backup ##
FROM builder AS backup
WORKDIR ${BUILD_PATH}/services/ASC.Data.Backup/
@@ -244,6 +245,15 @@ COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Socket
CMD ["server.js", "ASC.Socket.IO"]
+## ASC.SsoAuth ##
+FROM nodeBuild AS ssoauth
+WORKDIR ${BUILD_PATH}/services/ASC.SsoAuth/
+
+COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py
+COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.SsoAuth/service/ .
+
+CMD ["app.js", "ASC.SsoAuth"]
+
## ASC.Studio.Notify ##
FROM builder AS studio_notify
WORKDIR ${BUILD_PATH}/services/ASC.Studio.Notify/service/
@@ -280,6 +290,15 @@ COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Web.Ap
CMD ["ASC.Web.Api.dll", "ASC.Web.Api"]
+## ASC.Webhooks.Service ##
+FROM builder AS webhooks-service
+WORKDIR ${BUILD_PATH}/services/ASC.Webhooks.Service/
+
+COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py
+COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Webhooks.Service/service/ .
+
+CMD ["ASC.Webhooks.Service.dll", "ASC.Webhooks.Service"]
+
## ASC.Web.Studio ##
FROM builder AS studio
WORKDIR ${BUILD_PATH}/studio/ASC.Web.Studio/
@@ -289,15 +308,6 @@ COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Web.St
CMD ["ASC.Web.Studio.dll", "ASC.Web.Studio"]
-## ASC.SsoAuth ##
-FROM nodeBuild AS ssoauth
-WORKDIR ${BUILD_PATH}/services/ASC.SsoAuth/
-
-COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py
-COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.SsoAuth/service/ .
-
-CMD ["app.js", "ASC.SsoAuth"]
-
## image for k8s bin-share ##
FROM busybox:latest AS bin_share
RUN mkdir -p /app/appserver/ASC.Files/server && \
diff --git a/build/install/docker/appserver.yml b/build/install/docker/appserver.yml
index b3f31a5c2e..3df3437b87 100644
--- a/build/install/docker/appserver.yml
+++ b/build/install/docker/appserver.yml
@@ -49,12 +49,26 @@ services:
expose:
- "9200"
- "9300"
-
+ onlyoffice-backup-background-tasks:
+ <<: *x-service-base
+ image: "${REPO}/${STATUS}appserver-backup-background:${DOCKER_TAG}"
+ container_name: ${BACKUP_BACKGRUOND_TASKS_HOST}
+
onlyoffice-backup:
<<: *x-service-base
image: "${REPO}/${STATUS}appserver-backup:${DOCKER_TAG}"
container_name: ${BACKUP_HOST}
+ onlyoffice-clear-events:
+ <<: *x-service-base
+ image: "${REPO}/${STATUS}appserver-clear-events:${DOCKER_TAG}"
+ container_name: ${CLEAR_EVENTS_HOST}
+
+ onlyoffice-migration:
+ <<: *x-service-base
+ image: "${REPO}/${STATUS}appserver-migration:${DOCKER_TAG}"
+ container_name: ${MIGRATION_HOST}
+
onlyoffice-files:
<<: *x-service-base
image: "${REPO}/${STATUS}appserver-files:${DOCKER_TAG}"
@@ -76,7 +90,6 @@ services:
container_name: ${SOCKET_HOST}
expose:
- ${SERVICE_PORT}
- - "9899"
onlyoffice-studio-notify:
<<: *x-service-base
@@ -88,14 +101,6 @@ services:
image: "${REPO}/${STATUS}appserver-telegram-service:${DOCKER_TAG}"
container_name: ${TELEGRAM_SERVICE_HOST}
- # onlyoffice-thumbnails:
- # <<: *x-service-base
- # image: "${REPO}/${STATUS}appserver-thumbnails:${DOCKER_TAG}"
- # container_name: ${THUMBNAILS_HOST}
- # expose:
- # - ${SERVICE_PORT}
- # - "9800"
-
onlyoffice-urlshortener:
<<: *x-service-base
image: "${REPO}/${STATUS}appserver-urlshortener:${DOCKER_TAG}"
@@ -122,6 +127,11 @@ services:
- ${SERVICE_PORT}
- "9834"
+ onlyoffice-webhooks-service:
+ <<: *x-service-base
+ image: "${REPO}/${STATUS}appserver-webhooks-service:${DOCKER_TAG}"
+ container_name: ${WEBHOOKS_SERVICE_HOST}
+
onlyoffice-proxy:
image: "${REPO}/${STATUS}appserver-proxy:${DOCKER_TAG}"
container_name: ${PROXY_HOST}
@@ -133,14 +143,17 @@ services:
ports:
- 8092:8092
depends_on:
+ - onlyoffice-backup-background-tasks
- onlyoffice-backup
+ - onlyoffice-clear-events
+ - onlyoffice-migration
+ - onlyoffice-webhooks-service
- onlyoffice-files
- onlyoffice-files-services
- onlyoffice-people-server
- onlyoffice-socket
- onlyoffice-studio-notify
- onlyoffice-telegram-service
- # - onlyoffice-thumbnails
- onlyoffice-urlshortener
- onlyoffice-api
- onlyoffice-studio
@@ -149,12 +162,14 @@ services:
- SERVICE_BACKUP=${SERVICE_BACKUP}
- SERVICE_FILES=${SERVICE_FILES}
- SERVICE_FILES_SERVICES=${SERVICE_FILES_SERVICES}
+ - SERVICE_CLEAR_EVENTS=${SERVICE_CLEAR_EVENTS}
+ - SERVICE_MIGRATION=${SERVICE_MIGRATION}
+ - SERVICE_WEBHOOKS_SERVICE=${SERVICE_WEBHOOKS_SERVICE}
- SERVICE_NOTIFY=${SERVICE_NOTIFY}
- SERVICE_PEOPLE_SERVER=${SERVICE_PEOPLE_SERVER}
- SERVICE_SOCKET=${SERVICE_SOCKET}
- SERVICE_STUDIO_NOTIFY=${SERVICE_STUDIO_NOTIFY}
- SERVICE_TELEGRAM_SERVICE=${SERVICE_TELEGRAM_SERVICE}
- - SERVICE_THUMBNAILS=${SERVICE_THUMBNAILS}
- SERVICE_URLSHORTENER=${SERVICE_URLSHORTENER}
- SERVICE_API=${SERVICE_API}
- SERVICE_STUDIO=${SERVICE_STUDIO}
diff --git a/build/install/docker/build.yml b/build/install/docker/build.yml
index 04d6afae1f..c9cc6f5a15 100644
--- a/build/install/docker/build.yml
+++ b/build/install/docker/build.yml
@@ -14,13 +14,13 @@ services:
dockerfile: "${DOCKERFILE}"
target: clear-events
image: "${REPO}/${STATUS}appserver-clear-events:${DOCKER_TAG}"
-
- onlyoffice-webhooks-wervice:
+
+ onlyoffice-migration:
build:
context: ./
dockerfile: "${DOCKERFILE}"
- target: webhooks-wervice
- image: "${REPO}/${STATUS}appserver-webhooks-wervice:${DOCKER_TAG}"
+ target: migration
+ image: "${REPO}/${STATUS}appserver-migration:${DOCKER_TAG}"
onlyoffice-backup:
build:
@@ -106,6 +106,13 @@ services:
target: ssoauth
image: "${REPO}/${STATUS}appserver-ssoauth:${DOCKER_TAG}"
+ onlyoffice-webhooks-service:
+ build:
+ context: ./
+ dockerfile: "${DOCKERFILE}"
+ target: webhooks-service
+ image: "${REPO}/${STATUS}appserver-webhooks-service:${DOCKER_TAG}"
+
onlyoffice-bin-share:
build:
context: ./
diff --git a/build/install/docker/config/nginx/templates/upstream.conf.template b/build/install/docker/config/nginx/templates/upstream.conf.template
index d364ff08fe..54153917c8 100644
--- a/build/install/docker/config/nginx/templates/upstream.conf.template
+++ b/build/install/docker/config/nginx/templates/upstream.conf.template
@@ -1,5 +1,10 @@
resolver $DNS_NAMESERVER valid=30s;
+map $SERVICE_MIGRATION $service_migration {
+ volatile;
+ $SERVICE_MIGRATION $SERVICE_MIGRATION;
+}
+
map $SERVICE_API_SYSTEM $service_api_system {
volatile;
$SERVICE_API_SYSTEM $SERVICE_API_SYSTEM;
diff --git a/build/install/docker/notify.yml b/build/install/docker/notify.yml
index e0d1f828bf..cea935e06f 100644
--- a/build/install/docker/notify.yml
+++ b/build/install/docker/notify.yml
@@ -11,6 +11,7 @@ x-service:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
+ DATABASE_MIGRATION: ${DATABASE_MIGRATION}
APP_DOTNET_ENV: ${APP_DOTNET_ENV}
APP_CORE_BASE_DOMAIN: ${APP_CORE_BASE_DOMAIN}
APP_CORE_MACHINEKEY: ${APP_CORE_MACHINEKEY}
@@ -26,10 +27,6 @@ x-service:
- app_data:/app/onlyoffice/data
- files_data:/var/www/products/ASC.Files/server/
- people_data:/var/www/products/ASC.People/server/
- - crm_data:/var/www/products/ASC.CRM/server/
- - project_data:/var/www/products/ASC.Projects/server/
- - calendar_data:/var/www/products/ASC.Calendar/server/
- - mail_data:/var/www/products/ASC.Mail/server/
services:
onlyoffice-notify:
diff --git a/build/run/Editors.xml b/build/run/Editors.xml
new file mode 100644
index 0000000000..d9d94457ef
--- /dev/null
+++ b/build/run/Editors.xml
@@ -0,0 +1,10 @@
+
+ OnlyofficeEditors
+ ONLYOFFICE Editors SSR
+ manual
+ node
+ ../../build/deploy/products/ASC.Files/editor/server.js
+
+ true
+
+
\ No newline at end of file
diff --git a/build/runMigrations.bat b/build/runMigrations.bat
new file mode 100644
index 0000000000..75ff86edb0
--- /dev/null
+++ b/build/runMigrations.bat
@@ -0,0 +1,6 @@
+@echo "MIGRATIONS"
+@echo off
+
+PUSHD %~dp0..\common\Tools\Migration.Runner
+dotnet run --project Migration.Runner.csproj
+dotnet run --project Migration.Runner.csproj --options:Path=C:\Git\portals_core\common\ASC.Data.Backup.Core\bin\Debug\net6.0
\ No newline at end of file
diff --git a/common/ASC.Api.Core/GlobalUsings.cs b/common/ASC.Api.Core/GlobalUsings.cs
index 7d1e52f0ea..3eeb366b38 100644
--- a/common/ASC.Api.Core/GlobalUsings.cs
+++ b/common/ASC.Api.Core/GlobalUsings.cs
@@ -71,8 +71,8 @@ global using ASC.EventBus.Abstractions;
global using ASC.EventBus.RabbitMQ;
global using ASC.IPSecurity;
global using ASC.MessagingSystem.Core;
-global using ASC.MessagingSystem.Data;
-global using ASC.MessagingSystem.Models;
+global using ASC.MessagingSystem.EF.Context;
+global using ASC.MessagingSystem.EF.Model;
global using ASC.Security.Cryptography;
global using ASC.Web.Api.Routing;
global using ASC.Web.Core;
diff --git a/common/ASC.Common/Log/CommonLogger.cs b/common/ASC.Common/Log/CommonLogger.cs
index b0cca15d02..b49dd2a5b7 100644
--- a/common/ASC.Common/Log/CommonLogger.cs
+++ b/common/ASC.Common/Log/CommonLogger.cs
@@ -30,7 +30,7 @@ public static partial class CommonLogger
[LoggerMessage(Level = LogLevel.Error)]
public static partial void ErrorWithException(this ILogger logger, Exception exception);
- [LoggerMessage(Level = LogLevel.Error, Message = "{message}")]
+ [LoggerMessage(Level = LogLevel.Error)]
public static partial void ErrorWithException(this ILogger logger, string message, Exception exception);
[LoggerMessage(Level = LogLevel.Error, Message = "{message}")]
@@ -48,6 +48,6 @@ public static partial class CommonLogger
[LoggerMessage(Level = LogLevel.Warning)]
public static partial void WarningWithException(this ILogger logger, Exception exception);
- [LoggerMessage(Level = LogLevel.Warning, Message = "{message}")]
+ [LoggerMessage(Level = LogLevel.Warning)]
public static partial void WarningWithException(this ILogger logger, string message, Exception exception);
}
diff --git a/common/ASC.Common/Mapping/MappingProfile.cs b/common/ASC.Common/Mapping/MappingProfile.cs
index 0cf07ce3f2..6693002386 100644
--- a/common/ASC.Common/Mapping/MappingProfile.cs
+++ b/common/ASC.Common/Mapping/MappingProfile.cs
@@ -41,7 +41,7 @@ public class MappingProfile : Profile
return;
}
- var types = assembly.GetExportedTypes().Where(t => t.IsClosedTypeOf(typeof(IMapFrom<>)));
+ var types = assembly.GetExportedTypes().Where(t => t.IsClosedTypeOf(typeof(IMapFrom<>)) || (t.IsGenericType && t.GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IMapFrom<>))));
foreach (var type in types)
{
diff --git a/common/ASC.Core.Common/ASC.Core.Common.csproj b/common/ASC.Core.Common/ASC.Core.Common.csproj
index c76bbb1194..4b88667795 100644
--- a/common/ASC.Core.Common/ASC.Core.Common.csproj
+++ b/common/ASC.Core.Common/ASC.Core.Common.csproj
@@ -80,8 +80,4 @@
-
-
-
-
\ No newline at end of file
diff --git a/common/ASC.Core.Common/Billing/TariffService.cs b/common/ASC.Core.Common/Billing/TariffService.cs
index 6b1c705759..a0bebfd0cb 100644
--- a/common/ASC.Core.Common/Billing/TariffService.cs
+++ b/common/ASC.Core.Common/Billing/TariffService.cs
@@ -603,6 +603,7 @@ public class TariffService : ITariffService
foreach (var t in tariffs)
{
t.Tenant = -2;
+ t.CreateOn = DateTime.UtcNow;
}
CoreDbContext.SaveChanges();
diff --git a/common/ASC.Core.Common/Core/DBResourceManager.cs b/common/ASC.Core.Common/Core/DBResourceManager.cs
index 3620d4aa91..2633da7e03 100644
--- a/common/ASC.Core.Common/Core/DBResourceManager.cs
+++ b/common/ASC.Core.Common/Core/DBResourceManager.cs
@@ -26,243 +26,6 @@
namespace TMResourceData;
-public class DBResourceManager : ResourceManager
-{
- public static readonly bool WhiteLableEnabled;
- private readonly ConcurrentDictionary _resourceSets = new ConcurrentDictionary();
- private readonly IMemoryCache _memoryCache;
-
- public DBResourceManager(string filename, Assembly assembly)
- : base(filename, assembly)
- {
- }
-
- public DBResourceManager(
- IMemoryCache memoryCache,
- IConfiguration configuration,
- ILogger option,
- DbContextManager dbContext,
- string filename,
- Assembly assembly)
- : base(filename, assembly)
- {
- _memoryCache = memoryCache;
- _configuration = configuration;
- _option = option;
- _dbContext = dbContext;
- }
-
- public static void PatchAssemblies(ILogger option)
- {
- AppDomain.CurrentDomain.AssemblyLoad += (_, a) => PatchAssembly(option, a.LoadedAssembly);
- Array.ForEach(AppDomain.CurrentDomain.GetAssemblies(), a => PatchAssembly(option, a));
- }
-
- public static void PatchAssembly(ILogger logger, Assembly a, bool onlyAsc = true)
- {
- var log = logger;
-
- if (!onlyAsc || Accept(a))
- {
- var types = Array.Empty();
- try
- {
- types = a.GetTypes();
- }
- catch (ReflectionTypeLoadException rtle)
- {
- log.CanNotGetType(nameof(a.GetType), a.FullName, nameof(a.GetExportedTypes), rtle);
- foreach (var e in rtle.LoaderExceptions)
- {
- log.Information(e.Message);
- }
-
- try
- {
- types = a.GetExportedTypes();
- }
- catch (Exception err)
- {
- log.CanNotGetExportedTypes(a.FullName, nameof(a.GetExportedTypes), err);
- }
- }
- foreach (var type in types)
- {
- var prop = type.GetProperty("ResourceManager", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public);
- if (prop != null)
- {
- var rm = (ResourceManager)prop.GetValue(type);
- if (rm is not DBResourceManager)
- {
- var dbrm = new DBResourceManager(rm.BaseName, a);
- type.InvokeMember("resourceMan", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.SetField, null, type, new object[] { dbrm });
- }
- }
- }
- }
- }
-
- private static bool Accept(Assembly a)
- {
- var n = a.GetName().Name;
-
- return (n.StartsWith("ASC.") || n.StartsWith("App_GlobalResources")) && a.GetManifestResourceNames().Length > 0;
- }
-
- public override Type ResourceSetType => typeof(DBResourceSet);
-
- private readonly IConfiguration _configuration;
- private readonly ILogger _option;
- private readonly DbContextManager _dbContext;
-
- protected override ResourceSet InternalGetResourceSet(CultureInfo culture, bool createIfNotExists, bool tryParents)
- {
- _resourceSets.TryGetValue(culture.Name, out var set);
- if (set == null)
- {
- var invariant = culture == CultureInfo.InvariantCulture ? base.InternalGetResourceSet(CultureInfo.InvariantCulture, true, true) : null;
- set = new DBResourceSet(_memoryCache, _configuration, _option, _dbContext, invariant, culture, BaseName);
- _resourceSets.AddOrUpdate(culture.Name, set, (k, v) => set);
- }
-
- return set;
- }
-
- class DBResourceSet : ResourceSet
- {
- private const string NeutralCulture = "Neutral";
-
- private readonly TimeSpan _cacheTimeout = TimeSpan.FromMinutes(120); // for performance
- private readonly object _locker = new object();
- private readonly IMemoryCache _cache;
- private readonly ResourceSet _invariant;
- private readonly string _culture;
- private readonly string _fileName;
- private readonly ILogger _logger;
- private readonly DbContextManager _dbContext;
-
- public DBResourceSet(
- IMemoryCache memoryCache,
- IConfiguration configuration,
- ILogger logger,
- DbContextManager dbContext,
- ResourceSet invariant,
- CultureInfo culture,
- string filename)
- {
- ArgumentNullException.ThrowIfNull(culture);
- ArgumentNullOrEmptyException.ThrowIfNullOrEmpty(filename);
-
- _dbContext = dbContext;
- _logger = logger;
-
- try
- {
- var defaultValue = ((int)_cacheTimeout.TotalMinutes).ToString();
- _cacheTimeout = TimeSpan.FromMinutes(Convert.ToInt32(configuration["resources:cache-timeout"] ?? defaultValue));
- }
- catch (Exception err)
- {
- _logger.ErrorDBResourceSet(err);
- }
-
- _invariant = invariant;
- _culture = invariant != null ? NeutralCulture : culture.Name;
- _fileName = filename.Split('.').Last() + ".resx";
- _cache = memoryCache;
- }
-
- public override string GetString(string name, bool ignoreCase)
- {
- var result = (string)null;
- try
- {
- var dic = GetResources();
- dic.TryGetValue(name, out result);
- }
- catch (Exception err)
- {
- _logger.CanNotGetResource(_fileName, _culture, name, err);
- }
-
- if (_invariant != null && result == null)
- {
- result = _invariant.GetString(name, ignoreCase);
- }
-
- return result;
- }
-
- public override IDictionaryEnumerator GetEnumerator()
- {
- var result = new Hashtable();
- if (_invariant != null)
- {
- foreach (DictionaryEntry e in _invariant)
- {
- result[e.Key] = e.Value;
- }
- }
- try
- {
- var dic = GetResources();
- foreach (var e in dic)
- {
- result[e.Key] = e.Value;
- }
- }
- catch (Exception err)
- {
- _logger.ErrorDBResourceSet(err);
- }
-
- return result.GetEnumerator();
- }
-
- private Dictionary GetResources()
- {
- var key = $"{_fileName}/{_culture}";
- if (_cache.Get(key) is not Dictionary dic)
- {
- lock (_locker)
- {
- dic = _cache.Get(key) as Dictionary;
-
- if (dic == null)
- {
-
- dic = LoadResourceSet(_fileName, _culture);
-
- if (_cacheTimeout == TimeSpan.Zero)
- {
- _cache.Set(key, dic);
- }
- else
- {
- _cache.Set(key, dic, DateTimeOffset.Now.Add(_cacheTimeout));
- }
-
- }
- }
- }
-
- return dic;
- }
-
- private Dictionary LoadResourceSet(string filename, string culture)
- {
- using var context = _dbContext.Get("tmresource");
- var q = context.ResData
- .Where(r => r.CultureTitle == culture)
- .Join(context.ResFiles, r => r.FileId, a => a.Id, (d, f) => new { data = d, files = f })
- .Where(r => r.files.ResName == filename);
-
- return q
- .ToDictionary(r => r.data.Title, r => r.data.TextValue, StringComparer.InvariantCultureIgnoreCase);
- }
- }
-}
-
[Singletone]
public class WhiteLabelHelper
{
@@ -303,55 +66,4 @@ public class WhiteLabelHelper
_logger.ErrorRestoreOldText(e);
}
}
-
- internal string ReplaceLogo(TenantManager tenantManager, IHttpContextAccessor httpContextAccessor, string resourceName, string resourceValue)
- {
- if (string.IsNullOrEmpty(resourceValue))
- {
- return resourceValue;
- }
- if (!DBResourceManager.WhiteLableEnabled)
- {
- return resourceValue;
- }
-
- if (httpContextAccessor.HttpContext != null) //if in Notify Service or other process without HttpContext
- {
- try
- {
- var tenant = tenantManager.GetCurrentTenant(false);
- if (tenant == null)
- {
- return resourceValue;
- }
-
- if (_whiteLabelDictionary.TryGetValue(tenant.Id, out var newText))
- {
- var newTextReplacement = newText;
-
- if (resourceValue.IndexOf('<') >= 0 && resourceValue.IndexOf('>') >= 0 || resourceName.StartsWith("pattern_"))
- {
- newTextReplacement = HttpUtility.HtmlEncode(newTextReplacement);
- }
- if (resourceValue.Contains("{0"))
- {
- //Hack for string which used in string.Format
- newTextReplacement = newTextReplacement.Replace("{", "{{").Replace("}", "}}");
- }
-
- var replPattern = _configuration["resources:whitelabel-text.replacement.pattern"] ?? "(?<=[^@/\\\\]|^)({0})(?!\\.com)";
- var pattern = string.Format(replPattern, DefaultLogoText);
- //Hack for resource strings with mails looked like ...@onlyoffice... or with website http://www.onlyoffice.com link or with the https://www.facebook.com/pages/OnlyOffice/833032526736775
-
- return Regex.Replace(resourceValue, pattern, newTextReplacement, RegexOptions.IgnoreCase).Replace("™", "");
- }
- }
- catch (Exception e)
- {
- _logger.ErrorReplaceLogo(e);
- }
- }
-
- return resourceValue;
- }
}
diff --git a/common/ASC.Core.Common/Data/DbLoginEventsManager.cs b/common/ASC.Core.Common/Data/DbLoginEventsManager.cs
index 531a60d6a2..0cba2e1eae 100644
--- a/common/ASC.Core.Common/Data/DbLoginEventsManager.cs
+++ b/common/ASC.Core.Common/Data/DbLoginEventsManager.cs
@@ -68,7 +68,7 @@ public class DbLoginEventsManager
{
var date = DateTime.UtcNow.AddYears(-1);
var resultList = await LoginEventContext.LoginEvents
- .Where(r => r.TenantId == tenantId && r.UserId == userId && _loginActions.Contains(r.Action) && r.Date >= date && r.Active)
+ .Where(r => r.TenantId == tenantId && r.UserId == userId && _loginActions.Contains(r.Action ?? 0) && r.Date >= date && r.Active)
.Select(r => r.Id)
.ToListAsync();
@@ -79,7 +79,7 @@ public class DbLoginEventsManager
{
var date = DateTime.UtcNow.AddYears(-1);
var loginInfo = await LoginEventContext.LoginEvents
- .Where(r => r.TenantId == tenantId && r.UserId == userId && _loginActions.Contains(r.Action) && r.Date >= date && r.Active)
+ .Where(r => r.TenantId == tenantId && r.UserId == userId && _loginActions.Contains(r.Action ?? 0) && r.Date >= date && r.Active)
.OrderByDescending(r => r.Id)
.ToListAsync();
diff --git a/common/ASC.Core.Common/Data/DbUserService.cs b/common/ASC.Core.Common/Data/DbUserService.cs
index 9d07f5b2de..346059c0c7 100644
--- a/common/ASC.Core.Common/Data/DbUserService.cs
+++ b/common/ASC.Core.Common/Data/DbUserService.cs
@@ -181,7 +181,7 @@ public class EFUserService : IUserService
q = q.Where(r => r.Tenant == tenant);
}
- return q.Where(r => r.GroupId == groupId && r.RefType == refType && !r.Removed)
+ return q.Where(r => r.UserGroupId == groupId && r.RefType == refType && !r.Removed)
.ProjectTo(_mapper.ConfigurationProvider).SingleOrDefault();
}
@@ -287,7 +287,7 @@ public class EFUserService : IUserService
UserDbContext.Subscriptions.RemoveRange(UserDbContext.Subscriptions.Where(r => r.Tenant == tenant && stringIds.Any(i => i == r.Recipient)));
UserDbContext.SubscriptionMethods.RemoveRange(UserDbContext.SubscriptionMethods.Where(r => r.Tenant == tenant && stringIds.Any(i => i == r.Recipient)));
- var userGroups = UserDbContext.UserGroups.Where(r => r.Tenant == tenant && ids.Any(i => i == r.GroupId));
+ var userGroups = UserDbContext.UserGroups.Where(r => r.Tenant == tenant && ids.Any(i => i == r.UserGroupId));
var groups = UserDbContext.Groups.Where(r => r.Tenant == tenant && ids.Any(i => i == r.Id));
if (immediate)
@@ -332,7 +332,7 @@ public class EFUserService : IUserService
UserDbContext.SubscriptionMethods.RemoveRange(UserDbContext.SubscriptionMethods.Where(r => r.Tenant == tenant && r.Recipient == id.ToString()));
UserDbContext.Photos.RemoveRange(UserDbContext.Photos.Where(r => r.Tenant == tenant && r.UserId == id));
- var userGroups = UserDbContext.UserGroups.Where(r => r.Tenant == tenant && r.UserId == id);
+ var userGroups = UserDbContext.UserGroups.Where(r => r.Tenant == tenant && r.Userid == id);
var users = UserDbContext.Users.Where(r => r.Tenant == tenant && r.Id == id);
var userSecurity = UserDbContext.UserSecurity.Where(r => r.Tenant == tenant && r.UserId == id);
@@ -378,7 +378,7 @@ public class EFUserService : IUserService
{
using var tr = UserDbContext.Database.BeginTransaction();
- var userGroups = UserDbContext.UserGroups.Where(r => r.Tenant == tenant && r.UserId == userId && r.GroupId == groupId && r.RefType == refType);
+ var userGroups = UserDbContext.UserGroups.Where(r => r.Tenant == tenant && r.Userid == userId && r.UserGroupId == groupId && r.RefType == refType);
if (immediate)
{
UserDbContext.UserGroups.RemoveRange(userGroups);
@@ -605,7 +605,7 @@ public class EFUserService : IUserService
{
foreach (var ig in includeGroups)
{
- q = q.Where(r => r.Groups.Any(a => !a.Removed && a.Tenant == r.Tenant && a.UserId == r.Id && ig.Any(r => r == a.GroupId)));
+ q = q.Where(r => UserDbContext.UserGroups.Any(a => !a.Removed && a.Tenant == r.Tenant && a.Userid == r.Id && ig.Any(r => r == a.UserGroupId)));
}
}
@@ -613,7 +613,7 @@ public class EFUserService : IUserService
{
foreach (var eg in excludeGroups)
{
- q = q.Where(r => !r.Groups.Any(a => !a.Removed && a.Tenant == r.Tenant && a.UserId == r.Id && a.GroupId == eg));
+ q = q.Where(r => !UserDbContext.UserGroups.Any(a => !a.Removed && a.Tenant == r.Tenant && a.Userid == r.Id && a.UserGroupId == eg));
}
}
diff --git a/common/ASC.Core.Common/EF/Context/AccountLinkContext.cs b/common/ASC.Core.Common/EF/Context/AccountLinkContext.cs
index 625f5d3a10..afe2f9a50a 100644
--- a/common/ASC.Core.Common/EF/Context/AccountLinkContext.cs
+++ b/common/ASC.Core.Common/EF/Context/AccountLinkContext.cs
@@ -26,24 +26,10 @@
namespace ASC.Core.Common.EF.Context;
-public class MySqlAccountLinkContext : AccountLinkContext { }
-public class PostgreSqlAccountLinkContext : AccountLinkContext { }
public class AccountLinkContext : BaseDbContext
{
public DbSet AccountLinks { get; set; }
- protected override Dictionary> ProviderContext
- {
- get
- {
- return new Dictionary>()
- {
- { Provider.MySql, () => new MySqlAccountLinkContext() } ,
- { Provider.PostgreSql, () => new PostgreSqlAccountLinkContext() } ,
- };
- }
- }
-
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper
diff --git a/common/ASC.Core.Common/EF/Context/BaseDbContext.cs b/common/ASC.Core.Common/EF/Context/BaseDbContext.cs
index fa992684b3..796eb4c9b6 100644
--- a/common/ASC.Core.Common/EF/Context/BaseDbContext.cs
+++ b/common/ASC.Core.Common/EF/Context/BaseDbContext.cs
@@ -37,35 +37,14 @@ public enum Provider
public class BaseDbContext : DbContext
{
public ConnectionStringSettings ConnectionStringSettings { get; set; }
- internal string MigrateAssembly { get; set; }
+ public string MigrateAssembly { get; set; }
internal ILoggerFactory LoggerFactory { get; set; }
public static readonly ServerVersion ServerVersion = ServerVersion.Parse("8.0.25");
-
- protected virtual Dictionary> ProviderContext => null;
protected Provider _provider;
public BaseDbContext() { }
public BaseDbContext(DbContextOptions options) : base(options) { }
- public void Migrate()
- {
- if (ProviderContext != null)
- {
- var provider = GetProviderByConnectionString();
-
- using var sqlProvider = ProviderContext[provider]();
- sqlProvider.ConnectionStringSettings = ConnectionStringSettings;
- sqlProvider.LoggerFactory = LoggerFactory;
- sqlProvider.MigrateAssembly = MigrateAssembly;
-
- sqlProvider.Database.Migrate();
- }
- else
- {
- Database.Migrate();
- }
- }
-
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseLoggerFactory(LoggerFactory);
@@ -74,6 +53,7 @@ public class BaseDbContext : DbContext
switch (_provider)
{
case Provider.MySql:
+ optionsBuilder.ReplaceService();
optionsBuilder.UseMySql(ConnectionStringSettings.ConnectionString, ServerVersion, providerOptions =>
{
if (!string.IsNullOrEmpty(MigrateAssembly))
@@ -86,7 +66,13 @@ public class BaseDbContext : DbContext
});
break;
case Provider.PostgreSql:
- optionsBuilder.UseNpgsql(ConnectionStringSettings.ConnectionString);
+ optionsBuilder.UseNpgsql(ConnectionStringSettings.ConnectionString, providerOptions =>
+ {
+ if (!string.IsNullOrEmpty(MigrateAssembly))
+ {
+ providerOptions.MigrationsAssembly(MigrateAssembly);
+ }
+ });
break;
}
}
diff --git a/common/ASC.Core.Common/EF/Context/CoreDbContext.cs b/common/ASC.Core.Common/EF/Context/CoreDbContext.cs
index 7b2dad9457..c83a71f4f3 100644
--- a/common/ASC.Core.Common/EF/Context/CoreDbContext.cs
+++ b/common/ASC.Core.Common/EF/Context/CoreDbContext.cs
@@ -26,31 +26,17 @@
namespace ASC.Core.Common.EF;
-public class MySqlCoreDbContext : CoreDbContext { }
-public class PostgreSqlCoreDbContext : CoreDbContext { }
public class CoreDbContext : BaseDbContext
{
public DbSet Tariffs { get; set; }
public DbSet Buttons { get; set; }
public DbSet Quotas { get; set; }
public DbSet QuotaRows { get; set; }
-
- protected override Dictionary> ProviderContext
- {
- get
- {
- return new Dictionary>()
- {
- { Provider.MySql, () => new MySqlCoreDbContext() } ,
- { Provider.PostgreSql, () => new PostgreSqlCoreDbContext() } ,
- };
- }
- }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper
.From(modelBuilder, _provider)
- .AddDbButton()
+ .AddDbButton()
.AddDbQuotaRow()
.AddDbQuota()
.AddDbTariff();
diff --git a/common/ASC.Core.Common/EF/Context/DbContext.cs b/common/ASC.Core.Common/EF/Context/CustomDbContext.cs
similarity index 73%
rename from common/ASC.Core.Common/EF/Context/DbContext.cs
rename to common/ASC.Core.Common/EF/Context/CustomDbContext.cs
index 69748588c2..c278ce7eeb 100644
--- a/common/ASC.Core.Common/EF/Context/DbContext.cs
+++ b/common/ASC.Core.Common/EF/Context/CustomDbContext.cs
@@ -1,68 +1,61 @@
-// (c) Copyright Ascensio System SIA 2010-2022
-//
-// This program is a free software product.
-// You can redistribute it and/or modify it under the terms
-// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
-// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
-// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
-// any third-party rights.
-//
-// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
-// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
-// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
-//
-// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
-//
-// The interactive user interfaces in modified source and object code versions of the Program must
-// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
-//
-// Pursuant to Section 7(b) of the License you must retain the original Product logo when
-// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
-// trademark law for use of our trademarks.
-//
-// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
-// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
-// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-
-namespace ASC.Core.Common.EF.Context;
-
-public class MySqlDbContext : DbContext { }
-public class PostgreSqlDbContext : DbContext { }
-public class DbContext : BaseDbContext
+// (c) Copyright Ascensio System SIA 2010-2022
+//
+// This program is a free software product.
+// You can redistribute it and/or modify it under the terms
+// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
+// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
+// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
+// any third-party rights.
+//
+// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
+// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+//
+// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
+//
+// The interactive user interfaces in modified source and object code versions of the Program must
+// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
+//
+// Pursuant to Section 7(b) of the License you must retain the original Product logo when
+// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
+// trademark law for use of our trademarks.
+//
+// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
+// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
+// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+
+namespace ASC.Core.Common.EF.Context;
+
+public class CustomDbContext : BaseDbContext
{
- public DbSet MobileAppInstall { get; set; }
- public DbSet DbipLocation { get; set; }
- public DbSet Regions { get; set; }
-
- public DbContext() { }
-
- public DbContext(DbContextOptions options) : base(options) { }
-
- protected override Dictionary> ProviderContext
+ public CustomDbContext()
{
- get
- {
- return new Dictionary>()
- {
- { Provider.MySql, () => new MySqlDbContext() } ,
- { Provider.PostgreSql, () => new PostgreSqlDbContext() } ,
- };
- }
- }
- protected override void OnModelCreating(ModelBuilder modelBuilder)
- {
- ModelBuilderWrapper
- .From(modelBuilder, _provider)
- .AddMobileAppInstall()
- .AddDbipLocation()
- .AddRegions();
- }
-}
-public static class DbContextExtension
-{
- public static DIHelper AddDbContextService(this DIHelper services)
- {
- return services.AddDbContextManagerService();
}
-}
+
+ public CustomDbContext(DbContextOptions options) : base(options)
+ {
+
+ }
+
+ public DbSet MobileAppInstall { get; set; }
+ public DbSet DbipLocation { get; set; }
+ public DbSet Regions { get; set; }
+
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ ModelBuilderWrapper
+ .From(modelBuilder, _provider)
+ .AddMobileAppInstall()
+ .AddDbipLocation()
+ .AddRegions();
+ }
+}
+
+public static class CustomDbContextExtension
+{
+ public static DIHelper AddDbContextService(this DIHelper services)
+ {
+ return services.AddDbContextManagerService();
+ }
+}
diff --git a/common/ASC.Core.Common/EF/Context/DbContextManager.cs b/common/ASC.Core.Common/EF/Context/DbContextManager.cs
index 4fb191cf55..e317bfe919 100644
--- a/common/ASC.Core.Common/EF/Context/DbContextManager.cs
+++ b/common/ASC.Core.Common/EF/Context/DbContextManager.cs
@@ -29,19 +29,14 @@ namespace ASC.Core.Common.EF;
public class BaseDbContextManager : OptionsManager, IDisposable where T : class, IDisposable, IAsyncDisposable, new()
{
private readonly Dictionary _pairs;
- private readonly MigrationHistory _migrationHistory;
private readonly List _asyncList;
private readonly IOptionsFactory _factory;
- private readonly IConfiguration _configuration;
- public BaseDbContextManager(IOptionsFactory factory, IConfiguration configuration,
- MigrationHistory migrationHistory) : base(factory)
+ public BaseDbContextManager(IOptionsFactory factory) : base(factory)
{
_pairs = new Dictionary();
_asyncList = new List();
_factory = factory;
- _configuration = configuration;
- _migrationHistory = migrationHistory;
}
public override T Get(string name)
@@ -50,15 +45,6 @@ public class BaseDbContextManager : OptionsManager, IDisposable where T :
{
var t = base.Get(name);
_pairs.Add(name, t);
-
- if (t is BaseDbContext dbContext)
- {
- if (_configuration["migration:enabled"] == "true"
- && _migrationHistory.TryAddMigratedContext(t.GetType()))
- {
- dbContext.Migrate();
- }
- }
}
return _pairs[name];
@@ -90,16 +76,14 @@ public class BaseDbContextManager : OptionsManager, IDisposable where T :
[Scope(typeof(ConfigureDbContext<>))]
public class DbContextManager : BaseDbContextManager where T : BaseDbContext, new()
{
- public DbContextManager(IOptionsFactory factory, IConfiguration configuration,
- MigrationHistory migrationHistory) : base(factory, configuration, migrationHistory)
+ public DbContextManager(IOptionsFactory factory) : base(factory)
{
}
}
public class MultiRegionalDbContextManager : BaseDbContextManager> where T : BaseDbContext, new()
{
- public MultiRegionalDbContextManager(IOptionsFactory> factory, IConfiguration configuration,
- MigrationHistory migrationHistory) : base(factory, configuration, migrationHistory)
+ public MultiRegionalDbContextManager(IOptionsFactory> factory) : base(factory)
{
}
}
diff --git a/common/ASC.Core.Common/EF/Context/MailDbContext.cs b/common/ASC.Core.Common/EF/Context/MailDbContext.cs
deleted file mode 100644
index 287bd17cd3..0000000000
--- a/common/ASC.Core.Common/EF/Context/MailDbContext.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-// (c) Copyright Ascensio System SIA 2010-2022
-//
-// This program is a free software product.
-// You can redistribute it and/or modify it under the terms
-// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
-// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
-// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
-// any third-party rights.
-//
-// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
-// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
-// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
-//
-// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
-//
-// The interactive user interfaces in modified source and object code versions of the Program must
-// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
-//
-// Pursuant to Section 7(b) of the License you must retain the original Product logo when
-// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
-// trademark law for use of our trademarks.
-//
-// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
-// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
-// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-
-namespace ASC.Core.Common.EF.Context;
-
-public class MySqlMailDbContext : MailDbContext { }
-public class PostgreSqlMailDbContext : MailDbContext { }
-public class MailDbContext : BaseDbContext
-{
- public DbSet MailboxServer { get; set; }
- public DbSet ServerServer { get; set; }
- public DbSet MailboxProvider { get; set; }
- public DbSet Mailbox { get; set; }
- public DbSet ApiKeys { get; set; }
- public DbSet GreyListingWhiteList { get; set; }
-
- public MailDbContext() { }
- public MailDbContext(DbContextOptions options) : base(options) { }
-
- protected override Dictionary> ProviderContext
- {
- get
- {
- return new Dictionary>()
- {
- { Provider.MySql, () => new MySqlMailDbContext() } ,
- { Provider.PostgreSql, () => new PostgreSqlMailDbContext() } ,
- };
- }
- }
- protected override void OnModelCreating(ModelBuilder modelBuilder)
- {
- ModelBuilderWrapper
- .From(modelBuilder, _provider)
- .AddMailbox()
- .AddMailboxProvider()
- .AddServerServer()
- .AddGreyListingWhiteList();
- }
-}
-public static class MailDbExtension
-{
- public static DIHelper AddMailDbContextService(this DIHelper services)
- {
- return services.AddDbContextManagerService();
- }
-}
diff --git a/common/ASC.Core.Common/EF/Context/NotifyDbContext.cs b/common/ASC.Core.Common/EF/Context/NotifyDbContext.cs
index 0984a63b03..9e420778c0 100644
--- a/common/ASC.Core.Common/EF/Context/NotifyDbContext.cs
+++ b/common/ASC.Core.Common/EF/Context/NotifyDbContext.cs
@@ -26,23 +26,10 @@
namespace ASC.Core.Common.EF.Context;
-public class MySqlNotifyDbContext : NotifyDbContext { }
-public class PostgreSqlNotifyDbContext : NotifyDbContext { }
public class NotifyDbContext : BaseDbContext
{
public DbSet NotifyInfo { get; set; }
public DbSet NotifyQueue { get; set; }
- protected override Dictionary> ProviderContext
- {
- get
- {
- return new Dictionary>()
- {
- { Provider.MySql, () => new MySqlNotifyDbContext() } ,
- { Provider.PostgreSql, () => new PostgreSqlNotifyDbContext() } ,
- };
- }
- }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
diff --git a/common/ASC.Core.Common/EF/Context/TelegramDbContext.cs b/common/ASC.Core.Common/EF/Context/TelegramDbContext.cs
index 39f3ff2087..653c917442 100644
--- a/common/ASC.Core.Common/EF/Context/TelegramDbContext.cs
+++ b/common/ASC.Core.Common/EF/Context/TelegramDbContext.cs
@@ -26,30 +26,10 @@
namespace ASC.Core.Common.EF.Context;
-public class MySqlTelegramDbContext : TelegramDbContext { }
-public class PostgreSqlTelegramDbContext : TelegramDbContext { }
public class TelegramDbContext : BaseDbContext
{
public DbSet Users { get; set; }
- public TelegramDbContext() { }
- public TelegramDbContext(DbContextOptions options)
- : base(options)
- {
- }
-
- protected override Dictionary> ProviderContext
- {
- get
- {
- return new Dictionary>()
- {
- { Provider.MySql, () => new MySqlTelegramDbContext() } ,
- { Provider.PostgreSql, () => new PostgreSqlTelegramDbContext() } ,
- };
- }
- }
-
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper
diff --git a/common/ASC.Core.Common/EF/Context/TenantDbContext.cs b/common/ASC.Core.Common/EF/Context/TenantDbContext.cs
index e26cb32c4f..26775e8079 100644
--- a/common/ASC.Core.Common/EF/Context/TenantDbContext.cs
+++ b/common/ASC.Core.Common/EF/Context/TenantDbContext.cs
@@ -26,8 +26,6 @@
namespace ASC.Core.Common.EF.Context;
-public class MySqlTenantDbContext : TenantDbContext { }
-public class PostgreSqlTenantDbContext : TenantDbContext { }
public class TenantDbContext : BaseDbContext
{
public DbSet Tenants { get; set; }
@@ -37,24 +35,6 @@ public class TenantDbContext : BaseDbContext
public DbSet TenantIpRestrictions { get; set; }
public DbSet CoreSettings { get; set; }
- public TenantDbContext() { }
- public TenantDbContext(DbContextOptions options)
- : base(options)
- {
- }
-
- protected override Dictionary> ProviderContext
- {
- get
- {
- return new Dictionary>()
- {
- { Provider.MySql, () => new MySqlTenantDbContext() } ,
- { Provider.PostgreSql, () => new PostgreSqlTenantDbContext() } ,
- };
- }
- }
-
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper
diff --git a/common/ASC.Core.Common/EF/Context/FilesDbContext.cs b/common/ASC.Core.Common/EF/Context/UrlShortenerFakeDbContext.cs
similarity index 66%
rename from common/ASC.Core.Common/EF/Context/FilesDbContext.cs
rename to common/ASC.Core.Common/EF/Context/UrlShortenerFakeDbContext.cs
index e7f24417e3..af2de3cec7 100644
--- a/common/ASC.Core.Common/EF/Context/FilesDbContext.cs
+++ b/common/ASC.Core.Common/EF/Context/UrlShortenerFakeDbContext.cs
@@ -1,60 +1,37 @@
-// (c) Copyright Ascensio System SIA 2010-2022
-//
-// This program is a free software product.
-// You can redistribute it and/or modify it under the terms
-// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
-// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
-// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
-// any third-party rights.
-//
-// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
-// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
-// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
-//
-// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
-//
-// The interactive user interfaces in modified source and object code versions of the Program must
-// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
-//
-// Pursuant to Section 7(b) of the License you must retain the original Product logo when
-// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
-// trademark law for use of our trademarks.
-//
-// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
-// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
-// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-
+// (c) Copyright Ascensio System SIA 2010-2022
+//
+// This program is a free software product.
+// You can redistribute it and/or modify it under the terms
+// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
+// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
+// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
+// any third-party rights.
+//
+// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
+// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+//
+// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
+//
+// The interactive user interfaces in modified source and object code versions of the Program must
+// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
+//
+// Pursuant to Section 7(b) of the License you must retain the original Product logo when
+// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
+// trademark law for use of our trademarks.
+//
+// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
+// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
+// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+
namespace ASC.Core.Common.EF.Context;
-
-public class MySqlFilesDbContext : FilesDbContext { }
-public class PostgreSqlFilesDbContext : FilesDbContext { }
-public class FilesDbContext : BaseDbContext
-{
- public DbSet FilesConverts { get; set; }
-
- protected override Dictionary> ProviderContext
- {
- get
- {
- return new Dictionary>()
- {
- { Provider.MySql, () => new MySqlFilesDbContext() } ,
- { Provider.PostgreSql, () => new PostgreSqlFilesDbContext() } ,
- };
- }
- }
- protected override void OnModelCreating(ModelBuilder modelBuilder)
- {
- ModelBuilderWrapper
- .From(modelBuilder, _provider)
- .AddFilesConverts();
- }
-}
-
-public static class FilesDbExtension
-{
- public static DIHelper AddFilesDbContextService(this DIHelper services)
- {
- return services.AddDbContextManagerService();
- }
-}
+
+public class UrlShortenerFakeDbContext : BaseDbContext
+{
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ ModelBuilderWrapper
+ .From(modelBuilder, _provider)
+ .AddShortLinks();
+ }
+}
diff --git a/common/ASC.Core.Common/EF/Context/UserDbContext.cs b/common/ASC.Core.Common/EF/Context/UserDbContext.cs
index 40e7363a6b..c674d8c106 100644
--- a/common/ASC.Core.Common/EF/Context/UserDbContext.cs
+++ b/common/ASC.Core.Common/EF/Context/UserDbContext.cs
@@ -26,9 +26,6 @@
namespace ASC.Core.Common.EF;
-public class MySqlUserDbContext : UserDbContext { }
-public class PostgreSqlUserDbContext : UserDbContext { }
-
public class UserDbContext : BaseDbContext
{
public DbSet Users { get; set; }
@@ -41,18 +38,6 @@ public class UserDbContext : BaseDbContext
public DbSet SubscriptionMethods { get; set; }
public DbSet UsersDav { get; set; }
- protected override Dictionary> ProviderContext
- {
- get
- {
- return new Dictionary>()
- {
- { Provider.MySql, () => new MySqlUserDbContext() } ,
- { Provider.PostgreSql, () => new PostgreSqlUserDbContext() } ,
- };
- }
- }
-
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper
diff --git a/common/ASC.Core.Common/EF/Context/WebstudioDbContext.cs b/common/ASC.Core.Common/EF/Context/WebstudioDbContext.cs
index 309f608954..94da3fed16 100644
--- a/common/ASC.Core.Common/EF/Context/WebstudioDbContext.cs
+++ b/common/ASC.Core.Common/EF/Context/WebstudioDbContext.cs
@@ -26,8 +26,6 @@
namespace ASC.Core.Common.EF.Context;
-public class MySqlWebstudioDbContext : WebstudioDbContext { }
-public class PostgreSqlWebstudioDbContext : WebstudioDbContext { }
public class WebstudioDbContext : BaseDbContext
{
public DbSet Tenants { get; set; }
@@ -35,18 +33,6 @@ public class WebstudioDbContext : BaseDbContext
public DbSet WebstudioUserVisit { get; set; }
public DbSet WebstudioIndex { get; set; }
- protected override Dictionary> ProviderContext
- {
- get
- {
- return new Dictionary>()
- {
- { Provider.MySql, () => new MySqlWebstudioDbContext() } ,
- { Provider.PostgreSql, () => new PostgreSqlWebstudioDbContext() } ,
- };
- }
- }
-
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper
diff --git a/common/ASC.Core.Common/EF/CustomSqlGenerator.cs b/common/ASC.Core.Common/EF/CustomSqlGenerator.cs
new file mode 100644
index 0000000000..5b1485411e
--- /dev/null
+++ b/common/ASC.Core.Common/EF/CustomSqlGenerator.cs
@@ -0,0 +1,158 @@
+// (c) Copyright Ascensio System SIA 2010-2022
+//
+// This program is a free software product.
+// You can redistribute it and/or modify it under the terms
+// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
+// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
+// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
+// any third-party rights.
+//
+// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
+// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+//
+// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
+//
+// The interactive user interfaces in modified source and object code versions of the Program must
+// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
+//
+// Pursuant to Section 7(b) of the License you must retain the original Product logo when
+// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
+// trademark law for use of our trademarks.
+//
+// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
+// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
+// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+
+
+namespace ASC.Core.Common.EF;
+public class CustomMySqlMigrationsSqlGenerator : MySqlMigrationsSqlGenerator
+{
+ public CustomMySqlMigrationsSqlGenerator(
+ MigrationsSqlGeneratorDependencies dependencies,
+ IRelationalAnnotationProvider migrationsAnnotations,
+ IMySqlOptions mySqlOptions)
+ : base(dependencies, migrationsAnnotations, mySqlOptions)
+ {
+ }
+
+ public override IReadOnlyList Generate(IReadOnlyList operations, IModel model = null, MigrationsSqlGenerationOptions options = MigrationsSqlGenerationOptions.Default)
+ {
+ NotNull(operations, "operations");
+
+ Options = options;
+ var migrationCommandListBuilder = new CustomMigrationCommandListBuilder(Dependencies);
+ try
+ {
+ foreach (var operation in operations)
+ {
+ Generate(operation, model, migrationCommandListBuilder);
+ }
+ }
+ finally
+ {
+ Options = MigrationsSqlGenerationOptions.Default;
+ }
+
+ var test = migrationCommandListBuilder.GetCommandList();
+
+ return migrationCommandListBuilder.GetCommandList();
+ }
+
+ private void NotNull(IReadOnlyList value, string parameterName)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(parameterName);
+ }
+ }
+}
+
+public class CustomMigrationCommandListBuilder : MigrationCommandListBuilder
+{
+ private string _operationContainer;
+ private bool _isIndexOperation;
+
+ public CustomMigrationCommandListBuilder(MigrationsSqlGeneratorDependencies dependencies)
+ : base(dependencies) { }
+
+ public override MigrationCommandListBuilder Append(string o)
+ {
+ if (o.StartsWith("INSERT INTO "))
+ {
+ o = o.Replace("INSERT INTO ", "INSERT IGNORE INTO ");
+ }
+ else if (o.StartsWith("CREATE TABLE "))
+ {
+ o = o.Replace("CREATE TABLE ", "CREATE TABLE IF NOT EXISTS ");
+ }
+ else if (o == "CREATE ")
+ {
+ _isIndexOperation = true;
+ }
+
+ if (_isIndexOperation == true)
+ {
+ _operationContainer += o;
+ }
+ else
+ {
+ base.Append(o);
+ }
+
+ return this;
+ }
+
+ public override MigrationCommandListBuilder AppendLine(string value)
+ {
+ if (_isIndexOperation == true)
+ {
+ AppendIndexOpeartion(_operationContainer);
+
+ _operationContainer = "";
+ _isIndexOperation = false;
+ }
+
+ return base.AppendLine(value);
+ }
+
+ private void AppendIndexOpeartion(string indexOperation)
+ {
+ const string startOpearation = "CREATE ";
+ const string startUnique = "UNIQUE ";
+ const string startIndexName = "INDEX `";
+ const string startTableName = "` ON `";
+ const string StartColumnsName = "` (`";
+ const string endColumnsName = "`)";
+
+ var separatingStrings = new[] { startOpearation, startUnique, startIndexName, startTableName, StartColumnsName, endColumnsName };
+ var separatedOpearion = indexOperation.Split(separatingStrings, StringSplitOptions.RemoveEmptyEntries);
+
+ var indexName = separatedOpearion[0];
+ var tableName = separatedOpearion[1];
+
+ var createIndexForMySQL =
+ $"set @x := (select count(*) from information_schema.statistics where table_name = '{tableName}' and index_name = '{indexName}' and table_schema = database()); " +
+ $"set @sql := if (@x > 0, 'select ''Index exists.''', '{indexOperation};'); " +
+ $"PREPARE stmt FROM @sql; " +
+ $"EXECUTE stmt";
+
+ switch (Dependencies.CurrentContext.Context.Database.ProviderName)
+ {
+ case "Npgsql.EntityFrameworkCore.PostgreSQL":
+ base.Append(createIndexForMySQL);
+ break;
+
+ case "Microsoft.EntityFrameworkCore.SqlServer":
+ base.Append(createIndexForMySQL);
+ break;
+
+ case "Microsoft.EntityFrameworkCore.MySql":
+ base.Append(createIndexForMySQL);
+ break;
+ default:
+ base.Append(createIndexForMySQL);
+ break;
+ }
+ }
+}
diff --git a/common/ASC.Core.Common/EF/Model/AccountLinks.cs b/common/ASC.Core.Common/EF/Model/AccountLinks.cs
index 9521d21c5d..32ed16ddf9 100644
--- a/common/ASC.Core.Common/EF/Model/AccountLinks.cs
+++ b/common/ASC.Core.Common/EF/Model/AccountLinks.cs
@@ -58,7 +58,8 @@ public static class AccountLinksExtension
entity.HasKey(e => new { e.Id, e.UId })
.HasName("PRIMARY");
- entity.ToTable("account_links");
+ entity.ToTable("account_links")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.UId)
.HasDatabaseName("uid");
diff --git a/common/ASC.Core.Common/EF/Model/CRM/CrmContact.cs b/common/ASC.Core.Common/EF/Model/CRM/CrmContact.cs
index dfd5a563f6..7c7532f316 100644
--- a/common/ASC.Core.Common/EF/Model/CRM/CrmContact.cs
+++ b/common/ASC.Core.Common/EF/Model/CRM/CrmContact.cs
@@ -42,10 +42,10 @@ public class CrmContact
public int ContactTypeId { get; set; }
public Guid CreateBy { get; set; }
public DateTime CreateOn { get; set; }
- public Guid LastModifedBy { get; set; }
- public DateTime LastModifedOn { get; set; }
+ public Guid? LastModifedBy { get; set; }
+ public DateTime? LastModifedOn { get; set; }
public string DisplayName { get; set; }
- public bool IsShared { get; set; }
+ public bool? IsShared { get; set; }
public string Currency { get; set; }
}
public static class CrmContactExtension
@@ -62,7 +62,8 @@ public static class CrmContactExtension
{
modelBuilder.Entity(entity =>
{
- entity.ToTable("crm_contact");
+ entity.ToTable("crm_contact")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.CreateOn)
.HasDatabaseName("create_on");
@@ -78,7 +79,8 @@ public static class CrmContactExtension
entity.Property(e => e.Id).HasColumnName("id");
- entity.Property(e => e.CompanyId).HasColumnName("company_id");
+ entity.Property(e => e.CompanyId)
+ .HasColumnName("company_id");
entity.Property(e => e.CompanyName)
.HasColumnName("company_name")
@@ -86,7 +88,9 @@ public static class CrmContactExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.ContactTypeId).HasColumnName("contact_type_id");
+ entity.Property(e => e.ContactTypeId)
+ .HasColumnName("contact_type_id")
+ .HasDefaultValueSql("'0'");
entity.Property(e => e.CreateBy)
.IsRequired()
@@ -123,19 +127,26 @@ public static class CrmContactExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.IsCompany).HasColumnName("is_company");
+ entity.Property(e => e.IsCompany)
+ .HasColumnType("tinyint(1)")
+ .HasColumnName("is_company");
- entity.Property(e => e.IsShared).HasColumnName("is_shared");
+ entity.Property(e => e.IsShared)
+ .HasColumnName("is_shared")
+ .HasColumnType("tinyint(1)")
+ .IsRequired(false);
entity.Property(e => e.LastModifedBy)
.HasColumnName("last_modifed_by")
.HasColumnType("char(38)")
.HasCharSet("utf8")
+ .IsRequired(false)
.UseCollation("utf8_general_ci");
entity.Property(e => e.LastModifedOn)
.HasColumnName("last_modifed_on")
- .HasColumnType("datetime");
+ .HasColumnType("datetime")
+ .IsRequired(false);
entity.Property(e => e.LastName)
.HasColumnName("last_name")
@@ -149,9 +160,12 @@ public static class CrmContactExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.StatusId).HasColumnName("status_id");
+ entity.Property(e => e.StatusId)
+ .HasColumnName("status_id")
+ .HasDefaultValueSql("'0'");
- entity.Property(e => e.TenantId).HasColumnName("tenant_id");
+ entity.Property(e => e.TenantId)
+ .HasColumnName("tenant_id");
entity.Property(e => e.Title)
.HasColumnName("title")
@@ -224,6 +238,7 @@ public static class CrmContactExtension
entity.Property(e => e.LastModifedBy)
.HasColumnName("last_modifed_by")
.HasMaxLength(38)
+ .IsRequired(false)
.HasDefaultValueSql("NULL");
entity.Property(e => e.LastModifedOn)
diff --git a/common/ASC.Core.Common/EF/Model/Core/Acl.cs b/common/ASC.Core.Common/EF/Model/Core/Acl.cs
index 1b0f4020e3..1c1aeac99d 100644
--- a/common/ASC.Core.Common/EF/Model/Core/Acl.cs
+++ b/common/ASC.Core.Common/EF/Model/Core/Acl.cs
@@ -103,19 +103,18 @@ public static class AclExtension
new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960", AceType = 0 },
new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d", AceType = 0 },
new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4", AceType = 0 },
- new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", AceType = AceType.Deny },
+ new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", AceType = (AceType)1 },
new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086", AceType = 0 },
new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e", AceType = 0 },
new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f", AceType = 0 },
new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|f4d98afdd336433287783c6945c81ea0", AceType = 0 },
- new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", AceType = AceType.Deny },
- new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", AceType = AceType.Deny },
- new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", AceType = AceType.Deny },
- new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", AceType = AceType.Deny },
- new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", AceType = AceType.Deny },
+ new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", AceType = (AceType)1 },
+ new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", AceType = (AceType)1 },
+ new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", AceType = (AceType)1 },
+ new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", AceType = (AceType)1 },
+ new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", AceType = (AceType)1 },
new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", AceType = 0 },
- new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", AceType = 0 }
- );
+ new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", AceType = 0 });
return modelBuilder;
}
@@ -127,7 +126,8 @@ public static class AclExtension
entity.HasKey(e => new { e.Tenant, e.Subject, e.Action, e.Object })
.HasName("PRIMARY");
- entity.ToTable("core_acl");
+ entity.ToTable("core_acl")
+ .HasCharSet("utf8");
entity.Property(e => e.Tenant).HasColumnName("tenant");
diff --git a/common/ASC.Core.Common/EF/Model/Core/DbCoreSettings.cs b/common/ASC.Core.Common/EF/Model/Core/DbCoreSettings.cs
index 61be5ccbad..d6b6740ca7 100644
--- a/common/ASC.Core.Common/EF/Model/Core/DbCoreSettings.cs
+++ b/common/ASC.Core.Common/EF/Model/Core/DbCoreSettings.cs
@@ -47,9 +47,9 @@ public static class CoreSettingsExtension
.Add(MySqlAddCoreSettings, Provider.MySql)
.Add(PgSqlAddCoreSettings, Provider.PostgreSql)
.HasData(
- new DbCoreSettings { Tenant = -1, Id = "CompanyWhiteLabelSettings", Value = new byte[] { 245, 71, 4, 138, 72, 101, 23, 21, 135, 217, 206, 188, 138, 73, 108, 96, 29, 150, 3, 31, 44, 28, 62, 145, 96, 53, 57, 66, 238, 118, 93, 172, 211, 22, 244, 181, 244, 40, 146, 67, 111, 196, 162, 27, 154, 109, 248, 255, 211, 188, 64, 54, 180, 126, 58, 90, 27, 76, 136, 27, 38, 96, 152, 105, 254, 187, 104, 72, 189, 136, 192, 46, 234, 198, 164, 204, 179, 232, 244, 4, 41, 8, 18, 240, 230, 225, 36, 165, 82, 190, 129, 165, 140, 100, 187, 139, 211, 201, 168, 192, 237, 225, 249, 66, 18, 129, 222, 12, 122, 248, 39, 51, 164, 188, 229, 21, 232, 86, 148, 196, 221, 167, 142, 34, 101, 43, 162, 137, 31, 206, 149, 120, 249, 114, 133, 168, 30, 18, 254, 223, 93, 101, 88, 97, 30, 58, 163, 224, 62, 173, 220, 170, 152, 40, 124, 100, 165, 81, 7, 87, 168, 129, 176, 12, 51, 69, 230, 252, 30, 34, 182, 7, 202, 45, 117, 60, 99, 241, 237, 148, 201, 35, 102, 219, 160, 228, 194, 230, 219, 22, 244, 74, 138, 176, 145, 0, 122, 167, 80, 93, 23, 228, 21, 48, 100, 60, 31, 250, 232, 34, 248, 249, 159, 210, 227, 12, 13, 239, 130, 223, 101, 196, 51, 36, 80, 127, 62, 92, 104, 228, 197, 226, 43, 232, 164, 12, 36, 66, 52, 133 }, LastModified = DateTime.UtcNow },
- new DbCoreSettings { Tenant = -1, Id = "FullTextSearchSettings", Value = new byte[] { 8, 120, 207, 5, 153, 181, 23, 202, 162, 211, 218, 237, 157, 6, 76, 62, 220, 238, 175, 67, 31, 53, 166, 246, 66, 220, 173, 160, 72, 23, 227, 81, 50, 39, 187, 177, 222, 110, 43, 171, 235, 158, 16, 119, 178, 207, 49, 140, 72, 152, 20, 84, 94, 135, 117, 1, 246, 51, 251, 190, 148, 2, 44, 252, 221, 2, 91, 83, 149, 151, 58, 245, 16, 148, 52, 8, 187, 86, 150, 46, 227, 93, 163, 95, 47, 131, 116, 207, 95, 209, 38, 149, 53, 148, 73, 215, 206, 251, 194, 199, 189, 17, 42, 229, 135, 82, 23, 154, 162, 165, 158, 94, 23, 128, 30, 88, 12, 204, 96, 250, 236, 142, 189, 211, 214, 18, 196, 136, 102, 102, 217, 109, 108, 240, 96, 96, 94, 100, 201, 10, 31, 170, 128, 192 }, LastModified = DateTime.UtcNow },
- new DbCoreSettings { Tenant = -1, Id = "SmtpSettings", Value = new byte[] { 240, 82, 224, 144, 161, 163, 117, 13, 173, 205, 78, 153, 97, 218, 4, 170, 81, 239, 1, 151, 226, 192, 98, 60, 241, 44, 88, 56, 191, 164, 10, 155, 72, 186, 239, 203, 227, 113, 88, 119, 49, 215, 227, 220, 158, 124, 96, 9, 116, 47, 158, 65, 93, 86, 219, 15, 10, 224, 142, 50, 248, 144, 75, 44, 68, 28, 198, 87, 198, 69, 67, 234, 238, 38, 32, 68, 162, 139, 67, 53, 220, 176, 240, 196, 233, 64, 29, 137, 31, 160, 99, 105, 249, 132, 202, 45, 71, 92, 134, 194, 55, 145, 121, 97, 197, 130, 119, 105, 131, 21, 133, 35, 10, 102, 172, 119, 135, 230, 251, 86, 253, 62, 55, 56, 146, 103, 164, 106 }, LastModified = DateTime.UtcNow }
+ new DbCoreSettings { Tenant = -1, Id = "CompanyWhiteLabelSettings", Value = new byte[] { 245, 71, 4, 138, 72, 101, 23, 21, 135, 217, 206, 188, 138, 73, 108, 96, 29, 150, 3, 31, 44, 28, 62, 145, 96, 53, 57, 66, 238, 118, 93, 172, 211, 22, 244, 181, 244, 40, 146, 67, 111, 196, 162, 27, 154, 109, 248, 255, 181, 17, 253, 127, 42, 65, 19, 90, 26, 206, 203, 145, 159, 159, 243, 105, 24, 71, 188, 165, 53, 85, 57, 37, 186, 251, 57, 96, 18, 162, 218, 80, 0, 101, 250, 100, 66, 97, 24, 51, 240, 215, 216, 169, 105, 100, 15, 253, 29, 83, 182, 236, 203, 53, 68, 251, 2, 150, 149, 148, 58, 136, 84, 37, 151, 82, 92, 227, 30, 52, 111, 40, 154, 155, 7, 126, 149, 100, 169, 87, 10, 129, 228, 138, 177, 101, 77, 67, 177, 216, 189, 201, 1, 213, 136, 216, 107, 198, 253, 221, 106, 255, 198, 17, 68, 14, 110, 90, 174, 182, 68, 222, 188, 77, 157, 19, 26, 68, 86, 97, 15, 81, 24, 171, 214, 114, 191, 175, 56, 56, 48, 52, 125, 82, 253, 113, 71, 41, 201, 5, 8, 118, 162, 191, 99, 196, 48, 198, 223, 79, 204, 174, 31, 97, 236, 20, 213, 218, 85, 34, 16, 74, 196, 209, 235, 14, 71, 209, 32, 131, 195, 84, 11, 66, 74, 19, 115, 255, 99, 69, 235, 210, 204, 15, 13, 4, 143, 127, 152, 125, 212, 91 }, LastModified = new DateTime(2022, 7, 8) },
+ new DbCoreSettings { Tenant = -1, Id = "FullTextSearchSettings", Value = new byte[] { 8, 120, 207, 5, 153, 181, 23, 202, 162, 211, 218, 237, 157, 6, 76, 62, 220, 238, 175, 67, 31, 53, 166, 246, 66, 220, 173, 160, 72, 23, 227, 81, 50, 39, 187, 177, 222, 110, 43, 171, 235, 158, 16, 119, 178, 207, 49, 140, 72, 152, 20, 84, 94, 135, 117, 1, 246, 51, 251, 190, 148, 2, 44, 252, 221, 2, 91, 83, 149, 151, 58, 245, 16, 148, 52, 8, 187, 86, 150, 46, 227, 93, 163, 95, 47, 131, 116, 207, 95, 209, 38, 149, 53, 148, 73, 215, 206, 251, 194, 199, 189, 17, 42, 229, 135, 82, 23, 154, 162, 165, 158, 94, 23, 128, 30, 88, 12, 204, 96, 250, 236, 142, 189, 211, 214, 18, 196, 136, 102, 102, 217, 109, 108, 240, 96, 96, 94, 100, 201, 10, 31, 170, 128, 192 }, LastModified = new DateTime(2022, 7, 8) },
+ new DbCoreSettings { Tenant = -1, Id = "SmtpSettings", Value = new byte[] { 240, 82, 224, 144, 161, 163, 117, 13, 173, 205, 78, 153, 97, 218, 4, 170, 81, 239, 1, 151, 226, 192, 98, 60, 241, 44, 88, 56, 191, 164, 10, 155, 72, 186, 239, 203, 227, 113, 88, 119, 49, 215, 227, 220, 158, 124, 96, 9, 116, 47, 158, 65, 93, 86, 219, 15, 10, 224, 142, 50, 248, 144, 75, 44, 68, 28, 198, 87, 198, 69, 67, 234, 238, 38, 32, 68, 162, 139, 67, 53, 220, 176, 240, 196, 233, 64, 29, 137, 31, 160, 99, 105, 249, 132, 202, 45, 71, 92, 134, 194, 55, 145, 121, 97, 197, 130, 119, 105, 131, 21, 133, 35, 10, 102, 172, 119, 135, 230, 251, 86, 253, 62, 55, 56, 146, 103, 164, 106 }, LastModified = new DateTime(2022, 7, 8) }
);
return modelBuilder;
@@ -62,7 +62,8 @@ public static class CoreSettingsExtension
entity.HasKey(e => new { e.Tenant, e.Id })
.HasName("PRIMARY");
- entity.ToTable("core_settings");
+ entity.ToTable("core_settings")
+ .HasCharSet("utf8");
entity.Property(e => e.Tenant).HasColumnName("tenant");
@@ -74,9 +75,7 @@ public static class CoreSettingsExtension
entity.Property(e => e.LastModified)
.HasColumnName("last_modified")
- .HasColumnType("timestamp")
- .HasDefaultValueSql("CURRENT_TIMESTAMP")
- .ValueGeneratedOnAddOrUpdate();
+ .HasColumnType("timestamp");
entity.Property(e => e.Value)
.IsRequired()
diff --git a/common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs b/common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs
index 893f7f39e2..cbcc48dc3c 100644
--- a/common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs
+++ b/common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs
@@ -77,7 +77,7 @@ public static class SubscriptionMethodExtension
new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "ResponsibleForTask", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 },
new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "AddRelationshipEvent", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 },
new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "ExportCompleted", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 },
- new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "CreateNewContact", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender", Tenant = -1 },
+ new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "CreateNewContact", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 },
new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "ResponsibleForOpportunity", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 },
new DbSubscriptionMethod { Source = "asc.web.studio", Action = "periodic_notify", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Sender = "email.sender", Tenant = -1 }
);
@@ -92,7 +92,8 @@ public static class SubscriptionMethodExtension
entity.HasKey(e => new { e.Tenant, e.Source, e.Action, e.Recipient })
.HasName("PRIMARY");
- entity.ToTable("core_subscriptionmethod");
+ entity.ToTable("core_subscriptionmethod")
+ .HasCharSet("utf8");
entity.Property(e => e.Tenant).HasColumnName("tenant");
diff --git a/common/ASC.Core.Common/EF/Model/Core/Subscription.cs b/common/ASC.Core.Common/EF/Model/Core/Subscription.cs
index 35f77ec877..9d9f615293 100644
--- a/common/ASC.Core.Common/EF/Model/Core/Subscription.cs
+++ b/common/ASC.Core.Common/EF/Model/Core/Subscription.cs
@@ -53,10 +53,10 @@ public static class SubscriptionExtension
new Subscription { Source = "6504977c-75af-4691-9099-084d3ddeea04", Action = "new feed", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 },
new Subscription { Source = "6a598c74-91ae-437d-a5f4-ad339bd11bb2", Action = "new post", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 },
new Subscription { Source = "853b6eb9-73ee-438d-9b09-8ffeedf36234", Action = "new topic in forum", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 },
- new Subscription { Source = "9d51954f-db9b-4aed-94e3-ed70b914e10", Action = "new photo uploaded", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 },
+ new Subscription { Source = "9d51954f-db9b-4aed-94e3-ed70b914e101", Action = "new photo uploaded", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 },
new Subscription { Source = "28b10049-dd20-4f54-b986-873bc14ccfc7", Action = "new bookmark created", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 },
new Subscription { Source = "742cf945-cbbc-4a57-82d6-1600a12cf8ca", Action = "new wiki page", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 },
- new Subscription { Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", Action = "BirthdayReminderd", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Object = "", Tenant = -1 },
+ new Subscription { Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", Action = "BirthdayReminder", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Object = "", Tenant = -1 },
new Subscription { Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", Action = "sharedocument", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 },
new Subscription { Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", Action = "sharefolder", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 },
new Subscription { Source = "40650da3-f7c1-424c-8c89-b9c115472e08", Action = "calendar_sharing", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 },
@@ -81,7 +81,8 @@ public static class SubscriptionExtension
entity.HasKey(e => new { e.Tenant, e.Source, e.Action, e.Recipient, e.Object })
.HasName("PRIMARY");
- entity.ToTable("core_subscription");
+ entity.ToTable("core_subscription")
+ .HasCharSet("utf8");
entity.Property(e => e.Tenant).HasColumnName("tenant");
@@ -109,7 +110,11 @@ public static class SubscriptionExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.Unsubscribed).HasColumnName("unsubscribed");
+ entity.Property(e => e.Unsubscribed)
+ .HasColumnName("unsubscribed")
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValueSql("'0'");
+
});
}
public static void PgSqlAddSubscription(this ModelBuilder modelBuilder)
diff --git a/common/ASC.Core.Common/EF/Model/DbWebstudioIndex.cs b/common/ASC.Core.Common/EF/Model/DbWebstudioIndex.cs
index 507be84520..7118ef5e26 100644
--- a/common/ASC.Core.Common/EF/Model/DbWebstudioIndex.cs
+++ b/common/ASC.Core.Common/EF/Model/DbWebstudioIndex.cs
@@ -54,7 +54,8 @@ public static class DbWebstudioIndexExtension
entity.HasKey(e => e.IndexName)
.HasName("PRIMARY");
- entity.ToTable("webstudio_index");
+ entity.ToTable("webstudio_index")
+ .HasCharSet("utf8");
entity.Property(e => e.IndexName)
.HasColumnName("index_name")
@@ -64,9 +65,7 @@ public static class DbWebstudioIndexExtension
entity.Property(e => e.LastModified)
.HasColumnName("last_modified")
- .HasColumnType("timestamp")
- .HasDefaultValueSql("CURRENT_TIMESTAMP")
- .ValueGeneratedOnAddOrUpdate();
+ .HasColumnType("timestamp");
});
}
public static void PgSqlAddDbWebstudioIndex(this ModelBuilder modelBuilder)
diff --git a/common/ASC.Core.Common/EF/Model/DbWebstudioSettings.cs b/common/ASC.Core.Common/EF/Model/DbWebstudioSettings.cs
index 5b410e55a7..f78215372b 100644
--- a/common/ASC.Core.Common/EF/Model/DbWebstudioSettings.cs
+++ b/common/ASC.Core.Common/EF/Model/DbWebstudioSettings.cs
@@ -64,7 +64,8 @@ public static class WebstudioSettingsExtension
entity.HasKey(e => new { e.TenantId, e.Id, e.UserId })
.HasName("PRIMARY");
- entity.ToTable("webstudio_settings");
+ entity.ToTable("webstudio_settings")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.Id)
.HasDatabaseName("ID");
diff --git a/common/ASC.Core.Common/EF/Model/DbWebstudioUservisit.cs b/common/ASC.Core.Common/EF/Model/DbWebstudioUservisit.cs
index 875d8d79af..330db0b51c 100644
--- a/common/ASC.Core.Common/EF/Model/DbWebstudioUservisit.cs
+++ b/common/ASC.Core.Common/EF/Model/DbWebstudioUservisit.cs
@@ -33,8 +33,8 @@ public class DbWebstudioUserVisit
public Guid ProductId { get; set; }
public Guid UserId { get; set; }
public int VisitCount { get; set; }
- public DateTime FirstVisitTime { get; set; }
- public DateTime LastVisitTime { get; set; }
+ public DateTime? FirstVisitTime { get; set; }
+ public DateTime? LastVisitTime { get; set; }
}
public static class WebstudioUserVisitExtension
@@ -87,7 +87,8 @@ public static class WebstudioUserVisitExtension
entity.HasKey(e => new { e.TenantId, e.VisitDate, e.ProductId, e.UserId })
.HasName("PRIMARY");
- entity.ToTable("webstudio_uservisit");
+ entity.ToTable("webstudio_uservisit")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.VisitDate)
.HasDatabaseName("visitdate");
@@ -112,13 +113,19 @@ public static class WebstudioUserVisitExtension
entity.Property(e => e.FirstVisitTime)
.HasColumnName("firstvisittime")
- .HasColumnType("datetime");
+ .HasColumnType("datetime")
+ .IsRequired(false)
+ .HasDefaultValueSql("NULL");
entity.Property(e => e.LastVisitTime)
.HasColumnName("lastvisittime")
- .HasColumnType("datetime");
+ .HasColumnType("datetime")
+ .IsRequired(false)
+ .HasDefaultValueSql("NULL");
- entity.Property(e => e.VisitCount).HasColumnName("visitcount");
+ entity.Property(e => e.VisitCount)
+ .HasColumnName("visitcount")
+ .HasDefaultValueSql("'0'");
});
}
public static void PgSqlAddWebstudioUserVisit(this ModelBuilder modelBuilder)
diff --git a/common/ASC.Core.Common/EF/Model/DbipLocation.cs b/common/ASC.Core.Common/EF/Model/DbipLocation.cs
index 40fdb0e6f3..02f9e138e0 100644
--- a/common/ASC.Core.Common/EF/Model/DbipLocation.cs
+++ b/common/ASC.Core.Common/EF/Model/DbipLocation.cs
@@ -37,10 +37,10 @@ public class DbipLocation
public string District { get; set; }
public string City { get; set; }
public string ZipCode { get; set; }
- public long Latitude { get; set; }
- public long Longitude { get; set; }
- public int GeonameId { get; set; }
- public double TimezoneOffset { get; set; }
+ public long? Latitude { get; set; }
+ public long? Longitude { get; set; }
+ public int? GeonameId { get; set; }
+ public double? TimezoneOffset { get; set; }
public string TimezoneName { get; set; }
public int Processed { get; set; }
}
@@ -60,7 +60,8 @@ public static class DbipLocationExtension
{
modelBuilder.Entity(entity =>
{
- entity.ToTable("dbip_location");
+ entity.ToTable("dbip_location")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.IPStart)
.HasDatabaseName("ip_start");
@@ -94,7 +95,10 @@ public static class DbipLocationExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.GeonameId).HasColumnName("geoname_id");
+ entity.Property(e => e.GeonameId)
+ .HasColumnName("geoname_id")
+ .IsRequired(false)
+ .HasDefaultValueSql("NULL");
entity.Property(e => e.IPEnd)
.IsRequired()
@@ -110,9 +114,17 @@ public static class DbipLocationExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.Latitude).HasColumnName("latitude");
+ entity.Property(e => e.Latitude)
+ .HasColumnName("latitude")
+ .HasColumnType("float")
+ .IsRequired(false)
+ .HasDefaultValueSql("NULL");
- entity.Property(e => e.Longitude).HasColumnName("longitude");
+ entity.Property(e => e.Longitude)
+ .HasColumnName("longitude")
+ .HasColumnType("float")
+ .IsRequired(false)
+ .HasDefaultValueSql("NULL");
entity.Property(e => e.Processed)
.HasColumnName("processed")
@@ -131,7 +143,11 @@ public static class DbipLocationExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.TimezoneOffset).HasColumnName("timezone_offset");
+ entity.Property(e => e.TimezoneOffset)
+ .HasColumnType("int")
+ .HasColumnName("timezone_offset")
+ .IsRequired(false)
+ .HasDefaultValueSql("NULL");
entity.Property(e => e.ZipCode)
.HasColumnName("zipcode")
diff --git a/common/ASC.Core.Common/EF/Model/FilesConverts.cs b/common/ASC.Core.Common/EF/Model/FilesConverts.cs
index f8e2fc9609..191ac8023a 100644
--- a/common/ASC.Core.Common/EF/Model/FilesConverts.cs
+++ b/common/ASC.Core.Common/EF/Model/FilesConverts.cs
@@ -39,16 +39,33 @@ public static class FilesConvertsExtension
modelBuilder
.Add(MySqlAddFilesConverts, Provider.MySql)
.Add(PgSqlAddFilesConverts, Provider.PostgreSql)
- .HasData(
+ .HasData(
new FilesConverts { Input = ".csv", Output = ".ods" },
new FilesConverts { Input = ".csv", Output = ".pdf" },
+ new FilesConverts { Input = ".csv", Output = ".ots" },
new FilesConverts { Input = ".csv", Output = ".xlsx" },
+ new FilesConverts { Input = ".csv", Output = ".xlsm" },
+ new FilesConverts { Input = ".csv", Output = ".xltm" },
+ new FilesConverts { Input = ".csv", Output = ".xltx" },
new FilesConverts { Input = ".doc", Output = ".docx" },
+ new FilesConverts { Input = ".doc", Output = ".docm" },
+ new FilesConverts { Input = ".doc", Output = ".dotm" },
+ new FilesConverts { Input = ".doc", Output = ".dotx" },
+ new FilesConverts { Input = ".doc", Output = ".epub" },
+ new FilesConverts { Input = ".doc", Output = ".fb2" },
+ new FilesConverts { Input = ".doc", Output = ".html" },
+ new FilesConverts { Input = ".doc", Output = ".ott" },
new FilesConverts { Input = ".doc", Output = ".odt" },
new FilesConverts { Input = ".doc", Output = ".pdf" },
new FilesConverts { Input = ".doc", Output = ".rtf" },
new FilesConverts { Input = ".doc", Output = ".txt" },
new FilesConverts { Input = ".docm", Output = ".docx" },
+ new FilesConverts { Input = ".docm", Output = ".dotm" },
+ new FilesConverts { Input = ".docm", Output = ".html" },
+ new FilesConverts { Input = ".docm", Output = ".dotx" },
+ new FilesConverts { Input = ".docm", Output = ".epub" },
+ new FilesConverts { Input = ".docm", Output = ".fb2" },
+ new FilesConverts { Input = ".docm", Output = ".ott" },
new FilesConverts { Input = ".docm", Output = ".odt" },
new FilesConverts { Input = ".docm", Output = ".pdf" },
new FilesConverts { Input = ".docm", Output = ".rtf" },
@@ -58,150 +75,321 @@ public static class FilesConvertsExtension
new FilesConverts { Input = ".docx", Output = ".pdf" },
new FilesConverts { Input = ".docx", Output = ".rtf" },
new FilesConverts { Input = ".docx", Output = ".txt" },
+ new FilesConverts { Input = ".docx", Output = ".html" },
+ new FilesConverts { Input = ".docx", Output = ".dotm" },
+ new FilesConverts { Input = ".docx", Output = ".dotx" },
+ new FilesConverts { Input = ".docx", Output = ".epub" },
+ new FilesConverts { Input = ".docx", Output = ".fb2" },
+ new FilesConverts { Input = ".docx", Output = ".ott" },
+ new FilesConverts { Input = ".docx", Output = ".docm" },
new FilesConverts { Input = ".docx", Output = ".docxf" },
new FilesConverts { Input = ".docxf", Output = ".docx" },
+ new FilesConverts { Input = ".docxf", Output = ".odt" },
+ new FilesConverts { Input = ".docxf", Output = ".oform" },
+ new FilesConverts { Input = ".docxf", Output = ".pdf" },
+ new FilesConverts { Input = ".docxf", Output = ".rtf" },
+ new FilesConverts { Input = ".docxf", Output = ".txt" },
new FilesConverts { Input = ".docxf", Output = ".dotx" },
new FilesConverts { Input = ".docxf", Output = ".epub" },
new FilesConverts { Input = ".docxf", Output = ".fb2" },
new FilesConverts { Input = ".docxf", Output = ".html" },
- new FilesConverts { Input = ".docxf", Output = ".odt" },
- new FilesConverts { Input = ".docxf", Output = ".oform" },
new FilesConverts { Input = ".docxf", Output = ".ott" },
- new FilesConverts { Input = ".docxf", Output = ".pdf" },
- new FilesConverts { Input = ".docxf", Output = ".rtf" },
- new FilesConverts { Input = ".docxf", Output = ".txt" },
new FilesConverts { Input = ".dot", Output = ".docx" },
new FilesConverts { Input = ".dot", Output = ".odt" },
new FilesConverts { Input = ".dot", Output = ".pdf" },
new FilesConverts { Input = ".dot", Output = ".rtf" },
new FilesConverts { Input = ".dot", Output = ".txt" },
+ new FilesConverts { Input = ".dot", Output = ".docm" },
+ new FilesConverts { Input = ".dot", Output = ".dotm" },
+ new FilesConverts { Input = ".dot", Output = ".dotx" },
+ new FilesConverts { Input = ".dot", Output = ".epub" },
+ new FilesConverts { Input = ".dot", Output = ".fb2" },
+ new FilesConverts { Input = ".dot", Output = ".html" },
+ new FilesConverts { Input = ".dot", Output = ".ott" },
new FilesConverts { Input = ".dotm", Output = ".docx" },
new FilesConverts { Input = ".dotm", Output = ".odt" },
new FilesConverts { Input = ".dotm", Output = ".pdf" },
new FilesConverts { Input = ".dotm", Output = ".rtf" },
new FilesConverts { Input = ".dotm", Output = ".txt" },
+ new FilesConverts { Input = ".dotm", Output = ".docm" },
+ new FilesConverts { Input = ".dotm", Output = ".dotx" },
+ new FilesConverts { Input = ".dotm", Output = ".epub" },
+ new FilesConverts { Input = ".dotm", Output = ".fb2" },
+ new FilesConverts { Input = ".dotm", Output = ".html" },
+ new FilesConverts { Input = ".dotm", Output = ".ott" },
new FilesConverts { Input = ".dotx", Output = ".docx" },
new FilesConverts { Input = ".dotx", Output = ".odt" },
new FilesConverts { Input = ".dotx", Output = ".pdf" },
new FilesConverts { Input = ".dotx", Output = ".rtf" },
new FilesConverts { Input = ".dotx", Output = ".txt" },
+ new FilesConverts { Input = ".dotx", Output = ".docm" },
+ new FilesConverts { Input = ".dotx", Output = ".dotm" },
+ new FilesConverts { Input = ".dotx", Output = ".epub" },
+ new FilesConverts { Input = ".dotx", Output = ".fb2" },
+ new FilesConverts { Input = ".dotx", Output = ".html" },
+ new FilesConverts { Input = ".dotx", Output = ".ott" },
new FilesConverts { Input = ".epub", Output = ".docx" },
new FilesConverts { Input = ".epub", Output = ".odt" },
new FilesConverts { Input = ".epub", Output = ".pdf" },
new FilesConverts { Input = ".epub", Output = ".rtf" },
new FilesConverts { Input = ".epub", Output = ".txt" },
+ new FilesConverts { Input = ".epub", Output = ".docm" },
+ new FilesConverts { Input = ".epub", Output = ".dotm" },
+ new FilesConverts { Input = ".epub", Output = ".dotx" },
+ new FilesConverts { Input = ".epub", Output = ".fb2" },
+ new FilesConverts { Input = ".epub", Output = ".html" },
+ new FilesConverts { Input = ".epub", Output = ".ott" },
new FilesConverts { Input = ".fb2", Output = ".docx" },
new FilesConverts { Input = ".fb2", Output = ".odt" },
new FilesConverts { Input = ".fb2", Output = ".pdf" },
new FilesConverts { Input = ".fb2", Output = ".rtf" },
new FilesConverts { Input = ".fb2", Output = ".txt" },
+ new FilesConverts { Input = ".fb2", Output = ".docm" },
+ new FilesConverts { Input = ".fb2", Output = ".dotm" },
+ new FilesConverts { Input = ".fb2", Output = ".dotx" },
+ new FilesConverts { Input = ".fb2", Output = ".epub" },
+ new FilesConverts { Input = ".fb2", Output = ".html" },
+ new FilesConverts { Input = ".fb2", Output = ".ott" },
new FilesConverts { Input = ".fodp", Output = ".odp" },
new FilesConverts { Input = ".fodp", Output = ".pdf" },
new FilesConverts { Input = ".fodp", Output = ".pptx" },
+ new FilesConverts { Input = ".fodp", Output = ".otp" },
+ new FilesConverts { Input = ".fodp", Output = ".potm" },
+ new FilesConverts { Input = ".fodp", Output = ".potx" },
+ new FilesConverts { Input = ".fodp", Output = ".pptm" },
new FilesConverts { Input = ".fods", Output = ".csv" },
new FilesConverts { Input = ".fods", Output = ".ods" },
new FilesConverts { Input = ".fods", Output = ".pdf" },
new FilesConverts { Input = ".fods", Output = ".xlsx" },
+ new FilesConverts { Input = ".fods", Output = ".xlsm" },
+ new FilesConverts { Input = ".fods", Output = ".xltm" },
+ new FilesConverts { Input = ".fods", Output = ".xltx" },
+ new FilesConverts { Input = ".fods", Output = ".ots" },
new FilesConverts { Input = ".fodt", Output = ".docx" },
new FilesConverts { Input = ".fodt", Output = ".odt" },
+ new FilesConverts { Input = ".fodt", Output = ".docm" },
new FilesConverts { Input = ".fodt", Output = ".pdf" },
new FilesConverts { Input = ".fodt", Output = ".rtf" },
new FilesConverts { Input = ".fodt", Output = ".txt" },
+ new FilesConverts { Input = ".fodt", Output = ".dotm" },
+ new FilesConverts { Input = ".fodt", Output = ".dotx" },
+ new FilesConverts { Input = ".fodt", Output = ".epub" },
+ new FilesConverts { Input = ".fodt", Output = ".fb2" },
+ new FilesConverts { Input = ".fodt", Output = ".html" },
+ new FilesConverts { Input = ".fodt", Output = ".ott" },
new FilesConverts { Input = ".html", Output = ".docx" },
new FilesConverts { Input = ".html", Output = ".odt" },
new FilesConverts { Input = ".html", Output = ".pdf" },
new FilesConverts { Input = ".html", Output = ".rtf" },
new FilesConverts { Input = ".html", Output = ".txt" },
+ new FilesConverts { Input = ".html", Output = ".docm" },
+ new FilesConverts { Input = ".html", Output = ".dotm" },
+ new FilesConverts { Input = ".html", Output = ".dotx" },
+ new FilesConverts { Input = ".html", Output = ".epub" },
+ new FilesConverts { Input = ".html", Output = ".fb2" },
+ new FilesConverts { Input = ".html", Output = ".ott" },
new FilesConverts { Input = ".mht", Output = ".docx" },
new FilesConverts { Input = ".mht", Output = ".odt" },
new FilesConverts { Input = ".mht", Output = ".pdf" },
new FilesConverts { Input = ".mht", Output = ".rtf" },
new FilesConverts { Input = ".mht", Output = ".txt" },
+ new FilesConverts { Input = ".mht", Output = ".docm" },
+ new FilesConverts { Input = ".mht", Output = ".dotm" },
+ new FilesConverts { Input = ".mht", Output = ".dotx" },
+ new FilesConverts { Input = ".mht", Output = ".epub" },
+ new FilesConverts { Input = ".mht", Output = ".fb2" },
+ new FilesConverts { Input = ".mht", Output = ".ott" },
new FilesConverts { Input = ".odp", Output = ".pdf" },
new FilesConverts { Input = ".odp", Output = ".pptx" },
+ new FilesConverts { Input = ".odp", Output = ".otp" },
+ new FilesConverts { Input = ".odp", Output = ".potm" },
+ new FilesConverts { Input = ".odp", Output = ".potx" },
+ new FilesConverts { Input = ".odp", Output = ".pptm" },
new FilesConverts { Input = ".otp", Output = ".odp" },
new FilesConverts { Input = ".otp", Output = ".pdf" },
+ new FilesConverts { Input = ".otp", Output = ".potm" },
+ new FilesConverts { Input = ".otp", Output = ".potx" },
+ new FilesConverts { Input = ".otp", Output = ".pptm" },
new FilesConverts { Input = ".otp", Output = ".pptx" },
new FilesConverts { Input = ".ods", Output = ".csv" },
new FilesConverts { Input = ".ods", Output = ".pdf" },
new FilesConverts { Input = ".ods", Output = ".xlsx" },
+ new FilesConverts { Input = ".ods", Output = ".ots" },
+ new FilesConverts { Input = ".ods", Output = ".xlsm" },
+ new FilesConverts { Input = ".ods", Output = ".xltm" },
+ new FilesConverts { Input = ".ods", Output = ".xltx" },
new FilesConverts { Input = ".ots", Output = ".csv" },
new FilesConverts { Input = ".ots", Output = ".ods" },
new FilesConverts { Input = ".ots", Output = ".pdf" },
+ new FilesConverts { Input = ".ots", Output = ".xlsm" },
+ new FilesConverts { Input = ".ots", Output = ".xltm" },
+ new FilesConverts { Input = ".ots", Output = ".xltx" },
new FilesConverts { Input = ".ots", Output = ".xlsx" },
+ new FilesConverts { Input = ".oxps", Output = ".pdf" },
new FilesConverts { Input = ".odt", Output = ".docx" },
new FilesConverts { Input = ".odt", Output = ".pdf" },
new FilesConverts { Input = ".odt", Output = ".rtf" },
new FilesConverts { Input = ".odt", Output = ".txt" },
+ new FilesConverts { Input = ".odt", Output = ".docm" },
+ new FilesConverts { Input = ".odt", Output = ".dotm" },
+ new FilesConverts { Input = ".odt", Output = ".dotx" },
+ new FilesConverts { Input = ".odt", Output = ".epub" },
+ new FilesConverts { Input = ".odt", Output = ".fb2" },
+ new FilesConverts { Input = ".odt", Output = ".html" },
+ new FilesConverts { Input = ".odt", Output = ".ott" },
new FilesConverts { Input = ".ott", Output = ".docx" },
new FilesConverts { Input = ".ott", Output = ".odt" },
new FilesConverts { Input = ".ott", Output = ".pdf" },
new FilesConverts { Input = ".ott", Output = ".rtf" },
new FilesConverts { Input = ".ott", Output = ".txt" },
+ new FilesConverts { Input = ".ott", Output = ".docm" },
+ new FilesConverts { Input = ".ott", Output = ".dotm" },
+ new FilesConverts { Input = ".ott", Output = ".dotx" },
+ new FilesConverts { Input = ".ott", Output = ".epub" },
+ new FilesConverts { Input = ".ott", Output = ".fb2" },
+ new FilesConverts { Input = ".ott", Output = ".html" },
new FilesConverts { Input = ".pot", Output = ".odp" },
new FilesConverts { Input = ".pot", Output = ".pdf" },
new FilesConverts { Input = ".pot", Output = ".pptx" },
+ new FilesConverts { Input = ".pot", Output = ".otp" },
+ new FilesConverts { Input = ".pot", Output = ".potm" },
+ new FilesConverts { Input = ".pot", Output = ".potx" },
+ new FilesConverts { Input = ".pot", Output = ".pptm" },
new FilesConverts { Input = ".potm", Output = ".odp" },
new FilesConverts { Input = ".potm", Output = ".pdf" },
new FilesConverts { Input = ".potm", Output = ".pptx" },
+ new FilesConverts { Input = ".potm", Output = ".otp" },
+ new FilesConverts { Input = ".potm", Output = ".potx" },
+ new FilesConverts { Input = ".potm", Output = ".pptm" },
new FilesConverts { Input = ".potx", Output = ".odp" },
new FilesConverts { Input = ".potx", Output = ".pdf" },
new FilesConverts { Input = ".potx", Output = ".pptx" },
+ new FilesConverts { Input = ".potx", Output = ".otp" },
+ new FilesConverts { Input = ".potx", Output = ".potm" },
+ new FilesConverts { Input = ".potx", Output = ".pptm" },
new FilesConverts { Input = ".pps", Output = ".odp" },
new FilesConverts { Input = ".pps", Output = ".pdf" },
new FilesConverts { Input = ".pps", Output = ".pptx" },
+ new FilesConverts { Input = ".pps", Output = ".otp" },
+ new FilesConverts { Input = ".pps", Output = ".potm" },
+ new FilesConverts { Input = ".pps", Output = ".potx" },
+ new FilesConverts { Input = ".pps", Output = ".pptm" },
new FilesConverts { Input = ".ppsm", Output = ".odp" },
new FilesConverts { Input = ".ppsm", Output = ".pdf" },
new FilesConverts { Input = ".ppsm", Output = ".pptx" },
+ new FilesConverts { Input = ".ppsm", Output = ".otp" },
+ new FilesConverts { Input = ".ppsm", Output = ".potm" },
+ new FilesConverts { Input = ".ppsm", Output = ".potx" },
+ new FilesConverts { Input = ".ppsm", Output = ".pptm" },
new FilesConverts { Input = ".ppsx", Output = ".odp" },
new FilesConverts { Input = ".ppsx", Output = ".pdf" },
new FilesConverts { Input = ".ppsx", Output = ".pptx" },
+ new FilesConverts { Input = ".ppsx", Output = ".otp" },
+ new FilesConverts { Input = ".ppsx", Output = ".potm" },
+ new FilesConverts { Input = ".ppsx", Output = ".potx" },
+ new FilesConverts { Input = ".ppsx", Output = ".pptm" },
new FilesConverts { Input = ".ppt", Output = ".odp" },
new FilesConverts { Input = ".ppt", Output = ".pdf" },
new FilesConverts { Input = ".ppt", Output = ".pptx" },
+ new FilesConverts { Input = ".ppt", Output = ".otp" },
+ new FilesConverts { Input = ".ppt", Output = ".potm" },
+ new FilesConverts { Input = ".ppt", Output = ".potx" },
+ new FilesConverts { Input = ".ppt", Output = ".pptm" },
new FilesConverts { Input = ".pptm", Output = ".odp" },
new FilesConverts { Input = ".pptm", Output = ".pdf" },
new FilesConverts { Input = ".pptm", Output = ".pptx" },
- new FilesConverts { Input = ".pptt", Output = ".odp" },
- new FilesConverts { Input = ".pptt", Output = ".pdf" },
+ new FilesConverts { Input = ".pptm", Output = ".otp" },
+ new FilesConverts { Input = ".pptm", Output = ".potm" },
+ new FilesConverts { Input = ".pptm", Output = ".potx" },
new FilesConverts { Input = ".pptt", Output = ".pptx" },
new FilesConverts { Input = ".pptx", Output = ".odp" },
new FilesConverts { Input = ".pptx", Output = ".pdf" },
- new FilesConverts { Input = ".rtf", Output = ".odp" },
+ new FilesConverts { Input = ".pptx", Output = ".otp" },
+ new FilesConverts { Input = ".pptx", Output = ".potm" },
+ new FilesConverts { Input = ".pptx", Output = ".potx" },
+ new FilesConverts { Input = ".pptx", Output = ".pptm" },
+ new FilesConverts { Input = ".rtf", Output = ".odt" },
new FilesConverts { Input = ".rtf", Output = ".pdf" },
new FilesConverts { Input = ".rtf", Output = ".docx" },
new FilesConverts { Input = ".rtf", Output = ".txt" },
+ new FilesConverts { Input = ".rtf", Output = ".docm" },
+ new FilesConverts { Input = ".rtf", Output = ".dotm" },
+ new FilesConverts { Input = ".rtf", Output = ".dotx" },
+ new FilesConverts { Input = ".rtf", Output = ".epub" },
+ new FilesConverts { Input = ".rtf", Output = ".fb2" },
+ new FilesConverts { Input = ".rtf", Output = ".html" },
+ new FilesConverts { Input = ".rtf", Output = ".ott" },
new FilesConverts { Input = ".txt", Output = ".pdf" },
new FilesConverts { Input = ".txt", Output = ".docx" },
- new FilesConverts { Input = ".txt", Output = ".odp" },
- new FilesConverts { Input = ".txt", Output = ".rtx" },
+ new FilesConverts { Input = ".txt", Output = ".odt" },
+ new FilesConverts { Input = ".txt", Output = ".rtf" },
+ new FilesConverts { Input = ".txt", Output = ".docm" },
+ new FilesConverts { Input = ".txt", Output = ".dotm" },
+ new FilesConverts { Input = ".txt", Output = ".dotx" },
+ new FilesConverts { Input = ".txt", Output = ".epub" },
+ new FilesConverts { Input = ".txt", Output = ".fb2" },
+ new FilesConverts { Input = ".txt", Output = ".html" },
+ new FilesConverts { Input = ".txt", Output = ".ott" },
new FilesConverts { Input = ".xls", Output = ".csv" },
new FilesConverts { Input = ".xls", Output = ".ods" },
new FilesConverts { Input = ".xls", Output = ".pdf" },
new FilesConverts { Input = ".xls", Output = ".xlsx" },
+ new FilesConverts { Input = ".xls", Output = ".ots" },
+ new FilesConverts { Input = ".xls", Output = ".xlsm" },
+ new FilesConverts { Input = ".xls", Output = ".xltm" },
+ new FilesConverts { Input = ".xls", Output = ".xltx" },
new FilesConverts { Input = ".xlsm", Output = ".csv" },
+ new FilesConverts { Input = ".xlsm", Output = ".xltm" },
+ new FilesConverts { Input = ".xlsm", Output = ".xltx" },
+ new FilesConverts { Input = ".xlsm", Output = ".ots" },
new FilesConverts { Input = ".xlsm", Output = ".pdf" },
new FilesConverts { Input = ".xlsm", Output = ".ods" },
new FilesConverts { Input = ".xlsm", Output = ".xlsx" },
- new FilesConverts { Input = ".xlst", Output = ".pdf" },
+ new FilesConverts { Input = ".xlsx", Output = ".csv" },
+ new FilesConverts { Input = ".xlsx", Output = ".ods" },
+ new FilesConverts { Input = ".xlsx", Output = ".ots" },
+ new FilesConverts { Input = ".xlsx", Output = ".pdf" },
+ new FilesConverts { Input = ".xlsx", Output = ".xlsm" },
+ new FilesConverts { Input = ".xlsx", Output = ".xltm" },
+ new FilesConverts { Input = ".xlsx", Output = ".xltx" },
new FilesConverts { Input = ".xlst", Output = ".xlsx" },
- new FilesConverts { Input = ".xlst", Output = ".csv" },
- new FilesConverts { Input = ".xlst", Output = ".ods" },
new FilesConverts { Input = ".xlt", Output = ".csv" },
new FilesConverts { Input = ".xlt", Output = ".ods" },
new FilesConverts { Input = ".xlt", Output = ".pdf" },
new FilesConverts { Input = ".xlt", Output = ".xlsx" },
+ new FilesConverts { Input = ".xlt", Output = ".ots" },
+ new FilesConverts { Input = ".xlt", Output = ".xlsm" },
+ new FilesConverts { Input = ".xlt", Output = ".xltm" },
+ new FilesConverts { Input = ".xlt", Output = ".xltx" },
new FilesConverts { Input = ".xltm", Output = ".csv" },
new FilesConverts { Input = ".xltm", Output = ".ods" },
new FilesConverts { Input = ".xltm", Output = ".pdf" },
+ new FilesConverts { Input = ".xltm", Output = ".ots" },
+ new FilesConverts { Input = ".xltm", Output = ".xlsm" },
+ new FilesConverts { Input = ".xltm", Output = ".xltx" },
new FilesConverts { Input = ".xltm", Output = ".xlsx" },
new FilesConverts { Input = ".xltx", Output = ".pdf" },
new FilesConverts { Input = ".xltx", Output = ".csv" },
new FilesConverts { Input = ".xltx", Output = ".ods" },
+ new FilesConverts { Input = ".xltx", Output = ".ots" },
+ new FilesConverts { Input = ".xltx", Output = ".xlsm" },
+ new FilesConverts { Input = ".xltx", Output = ".xltm" },
new FilesConverts { Input = ".xltx", Output = ".xlsx" },
- new FilesConverts { Input = ".xps", Output = ".pdf" }
+ new FilesConverts { Input = ".xps", Output = ".pdf" },
+ new FilesConverts { Input = ".xml", Output = ".docm" },
+ new FilesConverts { Input = ".xml", Output = ".docx" },
+ new FilesConverts { Input = ".xml", Output = ".dotm" },
+ new FilesConverts { Input = ".xml", Output = ".dotx" },
+ new FilesConverts { Input = ".xml", Output = ".epub" },
+ new FilesConverts { Input = ".xml", Output = ".fb2" },
+ new FilesConverts { Input = ".xml", Output = ".html" },
+ new FilesConverts { Input = ".xml", Output = ".odt" },
+ new FilesConverts { Input = ".xml", Output = ".ott" },
+ new FilesConverts { Input = ".xml", Output = ".pdf" },
+ new FilesConverts { Input = ".xml", Output = ".rtf" },
+ new FilesConverts { Input = ".xml", Output = ".txt" }
);
return modelBuilder;
@@ -214,7 +402,8 @@ public static class FilesConvertsExtension
entity.HasKey(e => new { e.Input, e.Output })
.HasName("PRIMARY");
- entity.ToTable("files_converts");
+ entity.ToTable("files_converts")
+ .HasCharSet("utf8");
entity.Property(e => e.Input)
.HasColumnName("input")
diff --git a/common/ASC.Core.Common/EF/Model/Mail/Mailbox.cs b/common/ASC.Core.Common/EF/Model/Mail/Mailbox.cs
deleted file mode 100644
index 09febfa9e2..0000000000
--- a/common/ASC.Core.Common/EF/Model/Mail/Mailbox.cs
+++ /dev/null
@@ -1,341 +0,0 @@
-// (c) Copyright Ascensio System SIA 2010-2022
-//
-// This program is a free software product.
-// You can redistribute it and/or modify it under the terms
-// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
-// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
-// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
-// any third-party rights.
-//
-// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
-// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
-// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
-//
-// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
-//
-// The interactive user interfaces in modified source and object code versions of the Program must
-// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
-//
-// Pursuant to Section 7(b) of the License you must retain the original Product logo when
-// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
-// trademark law for use of our trademarks.
-//
-// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
-// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
-// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-
-namespace ASC.Core.Common.EF.Model.Mail;
-
-public class Mailbox
-{
- public int Id { get; set; }
- public int Tenant { get; set; }
- public string IdUser { get; set; }
- public string Address { get; set; }
- public string Name { get; set; }
- public bool Enabled { get; set; }
- public bool IsRemoved { get; set; }
- public bool IsProcessed { get; set; }
- public bool IsServerMailbox { get; set; }
- public bool IsTeamlabMailbox { get; set; }
- public bool Imap { get; set; }
- public bool UserOnline { get; set; }
- public bool IsDefault { get; set; }
- public int MsgCountLast { get; set; }
- public int SizeLast { get; set; }
- public int LoginDelay { get; set; }
- public bool QuotaError { get; set; }
- public string ImapIntervals { get; set; }
- public DateTime BeginDate { get; set; }
- public string EmailInFolder { get; set; }
- public string Pop3Password { get; set; }
- public string SmtpPassword { get; set; }
- public int TokenType { get; set; }
- public string Token { get; set; }
- public int IdSmtpServer { get; set; }
- public int IdInServer { get; set; }
- public DateTime DateChecked { get; set; }
- public DateTime DateUserChecked { get; set; }
- public DateTime DateLoginDelayExpires { get; set; }
- public DateTime? DateAuthError { get; set; }
- public DateTime DateCreated { get; set; }
- public DateTime DateModified { get; set; }
-}
-
-public static class MailboxExtension
-{
- public static ModelBuilderWrapper AddMailbox(this ModelBuilderWrapper modelBuilder)
- {
- modelBuilder
- .Add(MySqlAddMailbox, Provider.MySql)
- .Add(PgSqlAddMailbox, Provider.PostgreSql);
-
- return modelBuilder;
- }
- public static void MySqlAddMailbox(this ModelBuilder modelBuilder)
- {
- modelBuilder.Entity(entity =>
- {
- entity.ToTable("mail_mailbox");
-
- entity.HasIndex(e => e.Address)
- .HasDatabaseName("address_index");
-
- entity.HasIndex(e => e.IdInServer)
- .HasDatabaseName("main_mailbox_id_in_server_mail_mailbox_server_id");
-
- entity.HasIndex(e => e.IdSmtpServer)
- .HasDatabaseName("main_mailbox_id_smtp_server_mail_mailbox_server_id");
-
- entity.HasIndex(e => new { e.DateChecked, e.DateLoginDelayExpires })
- .HasDatabaseName("date_login_delay_expires");
-
- entity.HasIndex(e => new { e.Tenant, e.IdUser })
- .HasDatabaseName("user_id_index");
-
- entity.Property(e => e.Id).HasColumnName("id");
-
- entity.Property(e => e.Address)
- .IsRequired()
- .HasColumnName("address")
- .HasColumnType("varchar(255)")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.BeginDate)
- .HasColumnName("begin_date")
- .HasColumnType("timestamp")
- .HasDefaultValueSql("'1975-01-01 00:00:00'");
-
- entity.Property(e => e.DateAuthError)
- .HasColumnName("date_auth_error")
- .HasColumnType("datetime");
-
- entity.Property(e => e.DateChecked)
- .HasColumnName("date_checked")
- .HasColumnType("datetime");
-
- entity.Property(e => e.DateCreated)
- .HasColumnName("date_created")
- .HasColumnType("datetime");
-
- entity.Property(e => e.DateLoginDelayExpires)
- .HasColumnName("date_login_delay_expires")
- .HasColumnType("datetime")
- .HasDefaultValueSql("'1975-01-01 00:00:00'");
-
- entity.Property(e => e.DateModified)
- .HasColumnName("date_modified")
- .HasColumnType("timestamp")
- .HasDefaultValueSql("CURRENT_TIMESTAMP")
- .ValueGeneratedOnAddOrUpdate();
-
- entity.Property(e => e.DateUserChecked)
- .HasColumnName("date_user_checked")
- .HasColumnType("datetime");
-
- entity.Property(e => e.EmailInFolder)
- .HasColumnName("email_in_folder")
- .HasColumnType("text")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.Enabled)
- .HasColumnName("enabled")
- .HasDefaultValueSql("'1'");
-
- entity.Property(e => e.IdInServer).HasColumnName("id_in_server");
-
- entity.Property(e => e.IdSmtpServer).HasColumnName("id_smtp_server");
-
- entity.Property(e => e.IdUser)
- .IsRequired()
- .HasColumnName("id_user")
- .HasColumnType("varchar(38)")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.Imap).HasColumnName("imap");
-
- entity.Property(e => e.ImapIntervals)
- .HasColumnName("imap_intervals")
- .HasColumnType("mediumtext")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.IsDefault).HasColumnName("is_default");
-
- entity.Property(e => e.IsProcessed).HasColumnName("is_processed");
-
- entity.Property(e => e.IsRemoved).HasColumnName("is_removed");
-
- entity.Property(e => e.IsServerMailbox).HasColumnName("is_server_mailbox");
-
- entity.Property(e => e.LoginDelay)
- .HasColumnName("login_delay")
- .HasDefaultValueSql("'30'");
-
- entity.Property(e => e.MsgCountLast).HasColumnName("msg_count_last");
-
- entity.Property(e => e.Name)
- .HasColumnName("name")
- .HasColumnType("varchar(255)")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.Pop3Password)
- .HasColumnName("pop3_password")
- .HasColumnType("varchar(255)")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.QuotaError).HasColumnName("quota_error");
-
- entity.Property(e => e.SizeLast).HasColumnName("size_last");
-
- entity.Property(e => e.SmtpPassword)
- .HasColumnName("smtp_password")
- .HasColumnType("varchar(255)")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.Tenant).HasColumnName("tenant");
-
- entity.Property(e => e.Token)
- .HasColumnName("token")
- .HasColumnType("text")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.TokenType).HasColumnName("token_type");
-
- entity.Property(e => e.UserOnline).HasColumnName("user_online");
- });
- }
-
- public static void PgSqlAddMailbox(this ModelBuilder modelBuilder)
- {
- modelBuilder.Entity(entity =>
- {
- entity.ToTable("mail_mailbox", "onlyoffice");
-
- entity.HasIndex(e => e.Address)
- .HasDatabaseName("address_index");
-
- entity.HasIndex(e => e.IdInServer)
- .HasDatabaseName("main_mailbox_id_in_server_mail_mailbox_server_id");
-
- entity.HasIndex(e => e.IdSmtpServer)
- .HasDatabaseName("main_mailbox_id_smtp_server_mail_mailbox_server_id");
-
- entity.HasIndex(e => new { e.DateChecked, e.DateLoginDelayExpires })
- .HasDatabaseName("date_login_delay_expires");
-
- entity.HasIndex(e => new { e.Tenant, e.IdUser })
- .HasDatabaseName("user_id_index");
-
- entity.Property(e => e.Id).HasColumnName("id");
-
- entity.Property(e => e.Address)
- .IsRequired()
- .HasColumnName("address")
- .HasMaxLength(255);
-
- entity.Property(e => e.BeginDate)
- .HasColumnName("begin_date")
- .HasDefaultValueSql("'1975-01-01 00:00:00'");
-
- entity.Property(e => e.DateAuthError).HasColumnName("date_auth_error");
-
- entity.Property(e => e.DateChecked).HasColumnName("date_checked");
-
- entity.Property(e => e.DateCreated).HasColumnName("date_created");
-
- entity.Property(e => e.DateLoginDelayExpires)
- .HasColumnName("date_login_delay_expires")
- .HasDefaultValueSql("'1975-01-01 00:00:00'");
-
- entity.Property(e => e.DateModified)
- .HasColumnName("date_modified")
- .HasDefaultValueSql("CURRENT_TIMESTAMP");
-
- entity.Property(e => e.DateUserChecked).HasColumnName("date_user_checked");
-
- entity.Property(e => e.EmailInFolder).HasColumnName("email_in_folder");
-
- entity.Property(e => e.Enabled)
- .HasColumnName("enabled")
- .HasDefaultValueSql("'1'::smallint");
-
- entity.Property(e => e.IdInServer).HasColumnName("id_in_server");
-
- entity.Property(e => e.IdSmtpServer).HasColumnName("id_smtp_server");
-
- entity.Property(e => e.IdUser)
- .IsRequired()
- .HasColumnName("id_user")
- .HasMaxLength(38);
-
- entity.Property(e => e.Imap)
- .HasColumnName("imap")
- .HasDefaultValueSql("'0'");
-
- entity.Property(e => e.ImapIntervals).HasColumnName("imap_intervals");
-
- entity.Property(e => e.IsDefault)
- .HasColumnName("is_default")
- .HasDefaultValueSql("'0'");
-
- entity.Property(e => e.IsProcessed)
- .HasColumnName("is_processed")
- .HasDefaultValueSql("'0'");
-
- entity.Property(e => e.IsRemoved)
- .HasColumnName("is_removed")
- .HasDefaultValueSql("'0'");
-
- entity.Property(e => e.IsServerMailbox)
- .HasColumnName("is_server_mailbox")
- .HasDefaultValueSql("'0'");
-
- entity.Property(e => e.LoginDelay)
- .HasColumnName("login_delay")
- .HasDefaultValueSql("'30'");
-
- entity.Property(e => e.MsgCountLast).HasColumnName("msg_count_last");
-
- entity.Property(e => e.Name)
- .HasColumnName("name")
- .HasMaxLength(255)
- .HasDefaultValueSql("NULL");
-
- entity.Property(e => e.Pop3Password)
- .HasColumnName("pop3_password")
- .HasMaxLength(255)
- .HasDefaultValueSql("NULL");
-
- entity.Property(e => e.QuotaError)
- .HasColumnName("quota_error")
- .HasDefaultValueSql("'0'");
-
- entity.Property(e => e.SizeLast).HasColumnName("size_last");
-
- entity.Property(e => e.SmtpPassword)
- .HasColumnName("smtp_password")
- .HasMaxLength(255)
- .HasDefaultValueSql("NULL");
-
- entity.Property(e => e.Tenant).HasColumnName("tenant");
-
- entity.Property(e => e.Token).HasColumnName("token");
-
- entity.Property(e => e.TokenType)
- .HasColumnName("token_type")
- .HasDefaultValueSql("'0'");
-
- entity.Property(e => e.UserOnline)
- .HasColumnName("user_online")
- .HasDefaultValueSql("'0'");
- });
- }
-}
diff --git a/common/ASC.Core.Common/EF/Model/Mail/MailboxProvider.cs b/common/ASC.Core.Common/EF/Model/Mail/MailboxProvider.cs
deleted file mode 100644
index 73311dbe32..0000000000
--- a/common/ASC.Core.Common/EF/Model/Mail/MailboxProvider.cs
+++ /dev/null
@@ -1,332 +0,0 @@
-// (c) Copyright Ascensio System SIA 2010-2022
-//
-// This program is a free software product.
-// You can redistribute it and/or modify it under the terms
-// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
-// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
-// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
-// any third-party rights.
-//
-// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
-// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
-// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
-//
-// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
-//
-// The interactive user interfaces in modified source and object code versions of the Program must
-// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
-//
-// Pursuant to Section 7(b) of the License you must retain the original Product logo when
-// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
-// trademark law for use of our trademarks.
-//
-// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
-// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
-// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-
-namespace ASC.Core.Common.EF.Model.Mail;
-
-public class MailboxProvider
-{
- public int Id { get; set; }
- public string Name { get; set; }
- public string DisplayName { get; set; }
- public string DisplayShortName { get; set; }
- public string Documentation { get; set; }
-}
-public static class MailboxProviderExtension
-{
- public static ModelBuilderWrapper AddMailboxProvider(this ModelBuilderWrapper modelBuilder)
- {
- modelBuilder
- .Add(MySqlAddMailboxProvider, Provider.MySql)
- .Add(PgSqlAddMailboxProvider, Provider.PostgreSql)
- .HasData(
- new MailboxProvider { Id = 1, Name = "1und1.de", DisplayName = "1&1", DisplayShortName = "1&1", Documentation = "http://hilfe-center.1und1.de/access/search/go.php?t=e698123" },
- new MailboxProvider { Id = 2, Name = "abc.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 3, Name = "agate.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 4, Name = "alice.it", DisplayName = "Alice Italy", DisplayShortName = "Alice", Documentation = "http://aiuto.alice.it/informazioni/clientemail/thunderbird.html" },
- new MailboxProvider { Id = 5, Name = "amail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 6, Name = "amber.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 7, Name = "aol.com", DisplayName = "AOL Mail", DisplayShortName = "AOL", Documentation = null },
- new MailboxProvider { Id = 8, Name = "apost.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 9, Name = "aqua.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 10, Name = "arcor.de", DisplayName = "Arcor", DisplayShortName = "Arcor", Documentation = null },
- new MailboxProvider { Id = 11, Name = "arubapec.it", DisplayName = "Aruba PEC", DisplayShortName = "Aruba", Documentation = "http://pec.aruba.it/guide_filmate.asp" },
- new MailboxProvider { Id = 12, Name = "att.net", DisplayName = "AT&T", DisplayShortName = "AT&T", Documentation = "http://www.att.com/esupport/article.jsp?sid=KB401570&ct=9000152" },
- new MailboxProvider { Id = 13, Name = "ballade.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 14, Name = "bay.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null },
- new MailboxProvider { Id = 15, Name = "bb-niigata.jp", DisplayName = "BB????", DisplayShortName = "BB-NIIGATA", Documentation = null },
- new MailboxProvider { Id = 16, Name = "beige.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 17, Name = "biglobe.ne.jp", DisplayName = "Biglobe", DisplayShortName = "Biglobe", Documentation = null },
- new MailboxProvider { Id = 18, Name = "bigpond.com", DisplayName = "Telstra Bigpond", DisplayShortName = "Bigpond", Documentation = null },
- new MailboxProvider { Id = 19, Name = "blue.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 20, Name = "bluemail.ch", DisplayName = "bluewin.ch", DisplayShortName = "bluewin.ch", Documentation = "http://smtphelp.bluewin.ch/swisscomdtg/setup/?" },
- new MailboxProvider { Id = 21, Name = "bluewin.ch", DisplayName = "bluewin.ch", DisplayShortName = "bluewin.ch", Documentation = "http://smtphelp.bluewin.ch/swisscomdtg/setup/" },
- new MailboxProvider { Id = 22, Name = "bmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 23, Name = "bolero.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 24, Name = "bpost.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 25, Name = "broba.cc", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 26, Name = "brown.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 27, Name = "camel.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 28, Name = "cameo.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 29, Name = "cc9.ne.jp", DisplayName = "CC9???????????", DisplayShortName = "CC9", Documentation = null },
- new MailboxProvider { Id = 30, Name = "cek.ne.jp", DisplayName = "???????????", DisplayShortName = "CEK-Net", Documentation = null },
- new MailboxProvider { Id = 31, Name = "cgl.ucsf.edu", DisplayName = "UCSF CGL email", DisplayShortName = "CGL emai", Documentation = null },
- new MailboxProvider { Id = 32, Name = "charter.com", DisplayName = "Charter Commuications", DisplayShortName = "Charter", Documentation = null },
- new MailboxProvider { Id = 33, Name = "clio.ne.jp", DisplayName = "CLIO-Net??????", DisplayShortName = "CLIO-Net", Documentation = null },
- new MailboxProvider { Id = 34, Name = "cmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 35, Name = "co1.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null },
- new MailboxProvider { Id = 36, Name = "co2.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null },
- new MailboxProvider { Id = 37, Name = "co3.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null },
- new MailboxProvider { Id = 38, Name = "cocoa.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 39, Name = "coda.plala.or.jp", DisplayName = "???", DisplayShortName = "Arcor", Documentation = null },
- new MailboxProvider { Id = 40, Name = "comcast.net", DisplayName = "???", DisplayShortName = "Comcast", Documentation = null },
- new MailboxProvider { Id = 41, Name = "concerto.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 42, Name = "coral.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 43, Name = "courante.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 44, Name = "cpost.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 45, Name = "cream.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 46, Name = "dan.wind.ne.jp", DisplayName = "???", DisplayShortName = "wind", Documentation = null },
- new MailboxProvider { Id = 47, Name = "dance.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 48, Name = "dd.iij4u.or.jp", DisplayName = "IIJ4U", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 49, Name = "df.eu", DisplayName = "domainFACTORY", DisplayShortName = "domainFACTORY", Documentation = "http://www.df.eu/de/service/df-faq/e-mail/mail-programme/" },
- new MailboxProvider { Id = 50, Name = "dmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 51, Name = "earthlink.net", DisplayName = "EarthLink", DisplayShortName = "EarthLink", Documentation = "http://support.earthlink.net/email/email-server-settings.php" },
- new MailboxProvider { Id = 52, Name = "ebony.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 53, Name = "email.it", DisplayName = "email.it", DisplayShortName = "email.it", Documentation = "http://www.email.it/ita/config/thunder.php" },
- new MailboxProvider { Id = 54, Name = "email.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 55, Name = "ewetel.de", DisplayName = "EWE Tel", DisplayShortName = "EWE Tel", Documentation = null },
- new MailboxProvider { Id = 56, Name = "fantasy.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 57, Name = "flamenco.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 58, Name = "fmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 59, Name = "francetelecom.fr", DisplayName = "France Telecom / Orange", DisplayShortName = "Orange", Documentation = null },
- new MailboxProvider { Id = 60, Name = "free.fr", DisplayName = "Free Telecom", DisplayShortName = "free.fr", Documentation = "http://www.free.fr/assistance/599-thunderbird.html" },
- new MailboxProvider { Id = 61, Name = "freenet.de", DisplayName = "Freenet Mail", DisplayShortName = "Freenet", Documentation = null },
- new MailboxProvider { Id = 62, Name = "fuga.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 63, Name = "gandi.net", DisplayName = "Gandi Mail", DisplayShortName = "Gandi", Documentation = null },
- new MailboxProvider { Id = 64, Name = "gmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 65, Name = "gmx.com", DisplayName = "GMX Freemail", DisplayShortName = "GMX", Documentation = null },
- new MailboxProvider { Id = 66, Name = "gmx.net", DisplayName = "GMX Freemail", DisplayShortName = "GMX", Documentation = null },
- new MailboxProvider { Id = 67, Name = "go.tvm.ne.jp", DisplayName = "????????????????????", DisplayShortName = "TVM-Net", Documentation = null },
- new MailboxProvider { Id = 68, Name = "goo.jp", DisplayName = "goo ????????", DisplayShortName = "goo", Documentation = null },
- new MailboxProvider { Id = 69, Name = "googlemail.com", DisplayName = "Google Mail", DisplayShortName = "GMail", Documentation = null },
- new MailboxProvider { Id = 70, Name = "grape.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 71, Name = "gray.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 72, Name = "hal.ne.jp", DisplayName = "?????????", DisplayShortName = "HAL", Documentation = null },
- new MailboxProvider { Id = 73, Name = "hana.or.jp", DisplayName = "????????", DisplayShortName = "????", Documentation = null },
- new MailboxProvider { Id = 74, Name = "hotmail.com", DisplayName = "Microsoft Live Hotmail", DisplayShortName = "Hotmail", Documentation = null },
- new MailboxProvider { Id = 75, Name = "i.softbank.jp", DisplayName = "SoftBank", DisplayShortName = "SoftBank", Documentation = null },
- new MailboxProvider { Id = 76, Name = "ic-net.or.jp", DisplayName = "IC-NET", DisplayShortName = "IC-NET", Documentation = null },
- new MailboxProvider { Id = 77, Name = "iijmio-mail.jp", DisplayName = "IIJmio ????????", DisplayShortName = "IIJmio", Documentation = null },
- new MailboxProvider { Id = 78, Name = "iiyama-catv.ne.jp", DisplayName = "???????i?????", DisplayShortName = "i?????", Documentation = null },
- new MailboxProvider { Id = 79, Name = "imail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 80, Name = "inbox.lt", DisplayName = "Inbox.lt", DisplayShortName = "Inbox.lt", Documentation = null },
- new MailboxProvider { Id = 81, Name = "inbox.lv", DisplayName = "Inbox.lv", DisplayShortName = "Inbox.lv", Documentation = null },
- new MailboxProvider { Id = 82, Name = "indigo.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 83, Name = "inet-shibata.or.jp", DisplayName = "??????????", DisplayShortName = "INET-SHIBATA", Documentation = null },
- new MailboxProvider { Id = 84, Name = "internode.on.net", DisplayName = "Internode", DisplayShortName = "Internode", Documentation = "http://www.internode.on.net/support/guides/email/secure_email/" },
- new MailboxProvider { Id = 85, Name = "ipax.at", DisplayName = "IPAX Internet Services", DisplayShortName = "IPAX", Documentation = null },
- new MailboxProvider { Id = 86, Name = "ivory.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 87, Name = "iwafune.ne.jp", DisplayName = "???????????", DisplayShortName = "IWAFUNE", Documentation = null },
- new MailboxProvider { Id = 88, Name = "jade.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 89, Name = "janis.or.jp", DisplayName = "Janis", DisplayShortName = "Janis", Documentation = null },
- new MailboxProvider { Id = 90, Name = "jet.ne.jp", DisplayName = "JETINTERNET", DisplayShortName = "JET", Documentation = null },
- new MailboxProvider { Id = 91, Name = "ji.jet.ne.jp", DisplayName = "JETINTERNET", DisplayShortName = "JET", Documentation = null },
- new MailboxProvider { Id = 92, Name = "jmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 93, Name = "kabelmail.de", DisplayName = "Kabel Deutschland", DisplayShortName = "Kabel D", Documentation = null },
- new MailboxProvider { Id = 94, Name = "kelcom.net", DisplayName = "KELCOM Internet", DisplayShortName = "KELCOM", Documentation = null },
- new MailboxProvider { Id = 95, Name = "khaki.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 96, Name = "kl.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null },
- new MailboxProvider { Id = 97, Name = "kmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 98, Name = "kokuyou.ne.jp", DisplayName = "????????????", DisplayShortName = "?????", Documentation = null },
- new MailboxProvider { Id = 99, Name = "lapis.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 100, Name = "laposte.net", DisplayName = "LaPoste", DisplayShortName = "LaPoste", Documentation = "http://www.geckozone.org/forum/viewtopic.php?f=4&t=93118" },
- new MailboxProvider { Id = 101, Name = "lemon.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 102, Name = "libero.it", DisplayName = "Libero Mail", DisplayShortName = "Libero", Documentation = "http://aiuto.libero.it/mail/istruzioni/configura-mozilla-thunderbird-per-windows-a11.phtml" },
- new MailboxProvider { Id = 103, Name = "lilac.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 104, Name = "lime.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 105, Name = "mahoroba.ne.jp", DisplayName = "???????????", DisplayShortName = "????", Documentation = null },
- new MailboxProvider { Id = 106, Name = "mail.com", DisplayName = "mail.com", DisplayShortName = "mail.com", Documentation = null },
- new MailboxProvider { Id = 107, Name = "mail.dk", DisplayName = "TDC (DK)", DisplayShortName = "TDC", Documentation = null },
- new MailboxProvider { Id = 108, Name = "mail.iwafune.ne.jp", DisplayName = "???????????", DisplayShortName = "IWAFUNE", Documentation = null },
- new MailboxProvider { Id = 109, Name = "mail.ru", DisplayName = "mail.ru", DisplayShortName = "mail.ru", Documentation = null },
- new MailboxProvider { Id = 110, Name = "mail.telenor.dk", DisplayName = "Telenor Danmark", DisplayShortName = "Telenor", Documentation = null },
- new MailboxProvider { Id = 111, Name = "mail.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 112, Name = "maroon.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 113, Name = "me.com", DisplayName = "Apple iCloud", DisplayShortName = "Apple", Documentation = null },
- new MailboxProvider { Id = 114, Name = "minuet.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 115, Name = "ml.murakami.ne.jp", DisplayName = "???????????", DisplayShortName = "IWAFUNE", Documentation = null },
- new MailboxProvider { Id = 116, Name = "mnet.ne.jp", DisplayName = "Mnet ??? ????", DisplayShortName = "Mnet???", Documentation = null },
- new MailboxProvider { Id = 117, Name = "'mopera.net", DisplayName = "mopera U", DisplayShortName = "mopera U", Documentation = null },
- new MailboxProvider { Id = 118, Name = "mozilla.com", DisplayName = "Mozilla Corporation and Mozilla Foundation internal email addresses", DisplayShortName = "mozilla.com", Documentation = null },
- new MailboxProvider { Id = 119, Name = "mx1.tiki.ne.jp", DisplayName = "TikiTiki???????", DisplayShortName = "TikiTiki", Documentation = null },
- new MailboxProvider { Id = 120, Name = "navy.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 121, Name = "nctsoft.com", DisplayName = "nctsoft", DisplayShortName = "nct", Documentation = null },
- new MailboxProvider { Id = 122, Name = "nifty.com", DisplayName = "@nifty", DisplayShortName = "@nifty", Documentation = null },
- new MailboxProvider { Id = 123, Name = "nsat.jp", DisplayName = "BB????", DisplayShortName = "NSAT", Documentation = null },
- new MailboxProvider { Id = 124, Name = "o2.pl", DisplayName = "o2 Poczta", DisplayShortName = "o2", Documentation = null },
- new MailboxProvider { Id = 125, Name = "olive.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 126, Name = "onet.pl", DisplayName = "Poczta Onet", DisplayShortName = "Onet", Documentation = null },
- new MailboxProvider { Id = 127, Name = "opal.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 128, Name = "orange.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 129, Name = "orchid.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 130, Name = "ovh.net", DisplayName = "OVH", DisplayShortName = "OVH", Documentation = "http://guides.ovh.com/ConfigurationEmail" },
- new MailboxProvider { Id = 131, Name = "pal.kijimadaira.jp", DisplayName = "????FTTH", DisplayShortName = "????FTTH", Documentation = null },
- new MailboxProvider { Id = 132, Name = "palette.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 133, Name = "parabox.or.jp", DisplayName = "??????", DisplayShortName = "PARABOX", Documentation = null },
- new MailboxProvider { Id = 134, Name = "pdx.edu", DisplayName = "Portland State University Mail", DisplayShortName = "PSU Mail", Documentation = null },
- new MailboxProvider { Id = 135, Name = "peach.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 136, Name = "peoplepc.com", DisplayName = "PeoplePC", DisplayShortName = "PeoplePC", Documentation = null },
- new MailboxProvider { Id = 137, Name = "plum.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 138, Name = "po.dcn.ne.jp", DisplayName = "DCN???????????", DisplayShortName = "DCN", Documentation = null },
- new MailboxProvider { Id = 139, Name = "po.wind.ne.jp", DisplayName = "'?????????", DisplayShortName = "wind", Documentation = null },
- new MailboxProvider { Id = 140, Name = "polka.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 141, Name = "pop.shibata.ne.jp", DisplayName = "??????????", DisplayShortName = "INET-SHIBATA", Documentation = null },
- new MailboxProvider { Id = 142, Name = "posteo.de", DisplayName = "Posteo", DisplayShortName = "Posteo", Documentation = null },
- new MailboxProvider { Id = 143, Name = "purple.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 144, Name = "qip.ru", DisplayName = "qip.ru", DisplayShortName = "qip.ru", Documentation = null },
- new MailboxProvider { Id = 145, Name = "rainbow.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 146, Name = "rambler.ru", DisplayName = "Rambler Mail", DisplayShortName = "Rambler", Documentation = null },
- new MailboxProvider { Id = 147, Name = "red.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 148, Name = "rmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 149, Name = "rondo.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 150, Name = "rose.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 151, Name = "rouge.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 152, Name = "rr.com", DisplayName = "RoadRunner", DisplayShortName = "RR", Documentation = "http://help.rr.com/HMSFaqs/e_emailserveraddys.aspx" },
- new MailboxProvider { Id = 153, Name = "ruby.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 154, Name = "sakunet.ne.jp", DisplayName = "?????????", DisplayShortName = "Saku-Net", Documentation = null },
- new MailboxProvider { Id = 155, Name = "sea.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 156, Name = "sepia.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 157, Name = "serenade.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 158, Name = "seznam.cz", DisplayName = "Seznam", DisplayShortName = "Seznam", Documentation = "http://napoveda.seznam.cz/cz/jake-jsou-adresy-pop3-a-smtp-serveru.html" },
- new MailboxProvider { Id = 159, Name = "sfr.fr", DisplayName = "SFR / Neuf", DisplayShortName = "SFR", Documentation = "http://assistance.sfr.fr/internet_neufbox-de-SFR/utiliser-email/parametrer-id-sfr/fc-505-50680" },
- new MailboxProvider { Id = 160, Name = "silk.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 161, Name = "silver.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 162, Name = "sky.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 163, Name = "skynet.be", DisplayName = "skynet", DisplayShortName = "skynet", Documentation = "http://support.en.belgacom.be/app/answers/detail/a_id/14337/kw/thunderbird" },
- new MailboxProvider { Id = 164, Name = "smail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 165, Name = "snow.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 166, Name = "so.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null },
- new MailboxProvider { Id = 167, Name = "sonata.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 168, Name = "strato.de", DisplayName = "Strato", DisplayShortName = "Strato", Documentation = null },
- new MailboxProvider { Id = 169, Name = "studenti.univr.it", DisplayName = "Universita degli Studi di Verona", DisplayShortName = "UniVR", Documentation = null },
- new MailboxProvider { Id = 170, Name = "suite.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 171, Name = "sympatico.ca", DisplayName = "Sympatico Email", DisplayShortName = "Sympatico", Documentation = "http://internet.bell.ca/index.cfm?method=content.view&category_id=585&content_id=12767" },
- new MailboxProvider { Id = 172, Name = "symphony.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 173, Name = "t-online.de", DisplayName = "T-Online", DisplayShortName = "T-Online", Documentation = null },
- new MailboxProvider { Id = 174, Name = "taupe.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 175, Name = "terra.es", DisplayName = "Correo Terra", DisplayShortName = "Terra", Documentation = null },
- new MailboxProvider { Id = 176, Name = "tiki.ne.jp", DisplayName = "TikiTiki???????", DisplayShortName = "TikiTiki", Documentation = null },
- new MailboxProvider { Id = 177, Name = "tiscali.cz", DisplayName = "Tiscali", DisplayShortName = "Tiscali", Documentation = null },
- new MailboxProvider { Id = 178, Name = "tiscali.it", DisplayName = "Tiscali Italy", DisplayShortName = "Tiscali", Documentation = "http://assistenza.tiscali.it/tecnica/posta/configurazioni/" },
- new MailboxProvider { Id = 179, Name = "tmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 180, Name = "toccata.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 181, Name = "topaz.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 182, Name = "trio.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 183, Name = "umail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 184, Name = "umich.edu", DisplayName = "UM ITCS Email", DisplayShortName = "UM ITCS", Documentation = null },
- new MailboxProvider { Id = 185, Name = "upcmail.nl", DisplayName = "UPC Nederland", DisplayShortName = "UPC", Documentation = null },
- new MailboxProvider { Id = 186, Name = "verizon.net", DisplayName = "Verizon Online", DisplayShortName = "Verizon", Documentation = null },
- new MailboxProvider { Id = 187, Name = "versatel.de", DisplayName = "Versatel", DisplayShortName = "Versatel", Documentation = "http://www.versatel.de/hilfe/index_popup.php?einrichtung_email_programm" },
- new MailboxProvider { Id = 188, Name = "violet.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 189, Name = "vm.aikis.or.jp", DisplayName = "aikis", DisplayShortName = "aikis", Documentation = null },
- new MailboxProvider { Id = 190, Name = "vmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 191, Name = "vp.tiki.ne.jp", DisplayName = "TikiTiki???????", DisplayShortName = "TikiTiki", Documentation = null },
- new MailboxProvider { Id = 192, Name = "waltz.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 193, Name = "wave.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 194, Name = "web.de", DisplayName = "WEB.DE Freemail", DisplayShortName = "Web.de", Documentation = "http://hilfe.freemail.web.de/freemail/e-mail/pop3/thunderbird/" },
- new MailboxProvider { Id = 195, Name = "white.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 196, Name = "wildwestdomains.com", DisplayName = "Your WildWest domain", DisplayShortName = "WildWest", Documentation = null },
- new MailboxProvider { Id = 197, Name = "wine.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 198, Name = "wmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 199, Name = "wp.pl", DisplayName = "Poczta Wirtualna Polska", DisplayShortName = "Poczta WP", Documentation = null },
- new MailboxProvider { Id = 200, Name = "xmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 201, Name = "xp.wind.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null },
- new MailboxProvider { Id = 202, Name = "xpost.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 203, Name = "xs4all.nl", DisplayName = "XS4All", DisplayShortName = "XS4All", Documentation = null },
- new MailboxProvider { Id = 204, Name = "xtra.co.nz", DisplayName = "Yahoo! Mail", DisplayShortName = "Yahoo", Documentation = null },
- new MailboxProvider { Id = 205, Name = "yahoo.co.jp", DisplayName = "Yahoo! ???", DisplayShortName = "Yahoo! ??? ", Documentation = null },
- new MailboxProvider { Id = 206, Name = "yahoo.com", DisplayName = "Yahoo! Mail", DisplayShortName = "Yahoo", Documentation = null },
- new MailboxProvider { Id = 207, Name = "yandex.ru", DisplayName = "Yandex Mail", DisplayShortName = "Yandex", Documentation = null },
- new MailboxProvider { Id = 208, Name = "ybb.ne.jp", DisplayName = "Yahoo! BB", DisplayShortName = "Yahoo! BB", Documentation = null },
- new MailboxProvider { Id = 209, Name = "yellow.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 210, Name = "ymail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 211, Name = "ypost.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 212, Name = "ziggo.nl", DisplayName = "Ziggo", DisplayShortName = "Ziggo", Documentation = null },
- new MailboxProvider { Id = 213, Name = "zmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 214, Name = "zpost.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null },
- new MailboxProvider { Id = 215, Name = "avsmedia.com", DisplayName = "avsmedia.com", DisplayShortName = "avsmedia", Documentation = null },
- new MailboxProvider { Id = 216, Name = "avsmedia.net", DisplayName = "avsmedia.net", DisplayShortName = "avsmedia", Documentation = null },
- new MailboxProvider { Id = 218, Name = "ilearney.com", DisplayName = "ilearney.com", DisplayShortName = "ilearney.com", Documentation = null },
- new MailboxProvider { Id = 219, Name = "fpl -technology.com", DisplayName = "fpl-technology.com", DisplayShortName = "fpl-technology.com", Documentation = "http://fpl-technology.com" },
- new MailboxProvider { Id = 220, Name = "icloud.com", DisplayName = "Apple iCloud", DisplayShortName = "Apple", Documentation = null },
- new MailboxProvider { Id = 221, Name = "office365.com", DisplayName = "Microsoft Office 365", DisplayShortName = "Office365", Documentation = "https://products.office.com" });
-
- return modelBuilder;
- }
-
- public static void MySqlAddMailboxProvider(this ModelBuilder modelBuilder)
- {
- modelBuilder.Entity(entity =>
- {
- entity.ToTable("mail_mailbox_provider");
-
- entity.Property(e => e.Id).HasColumnName("id");
-
- entity.Property(e => e.DisplayName)
- .HasColumnName("display_name")
- .HasColumnType("varchar(255)")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.DisplayShortName)
- .HasColumnName("display_short_name")
- .HasColumnType("varchar(255)")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.Documentation)
- .HasColumnName("documentation")
- .HasColumnType("varchar(255)")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.Name)
- .IsRequired()
- .HasColumnName("name")
- .HasColumnType("varchar(255)")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
- });
- }
- public static void PgSqlAddMailboxProvider(this ModelBuilder modelBuilder)
- {
- modelBuilder.Entity(entity =>
- {
- entity.ToTable("mail_mailbox_provider", "onlyoffice");
-
- entity.Property(e => e.Id).HasColumnName("id");
-
- entity.Property(e => e.DisplayName)
- .HasColumnName("display_name")
- .HasMaxLength(255)
- .HasDefaultValueSql("NULL::character varying");
-
- entity.Property(e => e.DisplayShortName)
- .HasColumnName("display_short_name")
- .HasMaxLength(255)
- .HasDefaultValueSql("NULL");
-
- entity.Property(e => e.Documentation)
- .HasColumnName("documentation")
- .HasMaxLength(255)
- .HasDefaultValueSql("NULL");
-
- entity.Property(e => e.Name)
- .IsRequired()
- .HasColumnName("name")
- .HasMaxLength(255);
- });
- }
-}
diff --git a/common/ASC.Core.Common/EF/Model/Mail/ServerServer.cs b/common/ASC.Core.Common/EF/Model/Mail/ServerServer.cs
deleted file mode 100644
index 5f6e8e697e..0000000000
--- a/common/ASC.Core.Common/EF/Model/Mail/ServerServer.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-// (c) Copyright Ascensio System SIA 2010-2022
-//
-// This program is a free software product.
-// You can redistribute it and/or modify it under the terms
-// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
-// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
-// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
-// any third-party rights.
-//
-// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
-// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
-// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
-//
-// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
-//
-// The interactive user interfaces in modified source and object code versions of the Program must
-// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
-//
-// Pursuant to Section 7(b) of the License you must retain the original Product logo when
-// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
-// trademark law for use of our trademarks.
-//
-// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
-// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
-// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-
-namespace ASC.Core.Common.EF.Model.Mail;
-
-public class ServerServer
-{
- public int Id { get; set; }
- public string MxRecord { get; set; }
- public string ConnectionString { get; set; }
- public int ServerType { get; set; }
- public int SmtpSettingsId { get; set; }
- public int ImapSettingsId { get; set; }
-}
-
-public static class ServerServerExtension
-{
- public static ModelBuilderWrapper AddServerServer(this ModelBuilderWrapper modelBuilder)
- {
- modelBuilder
- .Add(MySqlAddServerServer, Provider.MySql)
- .Add(PgSqlAddServerServer, Provider.PostgreSql);
-
- return modelBuilder;
- }
- public static void MySqlAddServerServer(this ModelBuilder modelBuilder)
- {
- modelBuilder.Entity(entity =>
- {
- entity.ToTable("mail_server_server");
-
- entity.HasIndex(e => e.ServerType)
- .HasDatabaseName("mail_server_server_type_server_type_fk_id");
-
- entity.Property(e => e.Id).HasColumnName("id");
-
- entity.Property(e => e.ConnectionString)
- .IsRequired()
- .HasColumnName("connection_string")
- .HasColumnType("text")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.ImapSettingsId).HasColumnName("imap_settings_id");
-
- entity.Property(e => e.MxRecord)
- .IsRequired()
- .HasColumnName("mx_record")
- .HasColumnType("varchar(128)")
- .HasDefaultValueSql("''")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
-
- entity.Property(e => e.ServerType).HasColumnName("server_type");
-
- entity.Property(e => e.SmtpSettingsId).HasColumnName("smtp_settings_id");
- });
- }
- public static void PgSqlAddServerServer(this ModelBuilder modelBuilder)
- {
- modelBuilder.Entity(entity =>
- {
- entity.ToTable("mail_server_server", "onlyoffice");
-
- entity.HasIndex(e => e.ServerType)
- .HasDatabaseName("mail_server_server_type_server_type_fk_id");
-
- entity.Property(e => e.Id).HasColumnName("id");
-
- entity.Property(e => e.ConnectionString)
- .IsRequired()
- .HasColumnName("connection_string");
-
- entity.Property(e => e.ImapSettingsId).HasColumnName("imap_settings_id");
-
- entity.Property(e => e.MxRecord)
- .IsRequired()
- .HasColumnName("mx_record")
- .HasMaxLength(128)
- .HasDefaultValueSql("' '");
-
- entity.Property(e => e.ServerType).HasColumnName("server_type");
-
- entity.Property(e => e.SmtpSettingsId).HasColumnName("smtp_settings_id");
- });
- }
-}
diff --git a/common/ASC.Core.Common/EF/Model/MobileAppInstall.cs b/common/ASC.Core.Common/EF/Model/MobileAppInstall.cs
index 25152d780b..a5a985468b 100644
--- a/common/ASC.Core.Common/EF/Model/MobileAppInstall.cs
+++ b/common/ASC.Core.Common/EF/Model/MobileAppInstall.cs
@@ -31,7 +31,7 @@ public class MobileAppInstall
public string UserEmail { get; set; }
public int AppType { get; set; }
public DateTime RegisteredOn { get; set; }
- public DateTime LastSign { get; set; }
+ public DateTime? LastSign { get; set; }
}
public static class MobileAppInstallExtension
@@ -52,7 +52,8 @@ public static class MobileAppInstallExtension
entity.HasKey(e => new { e.UserEmail, e.AppType })
.HasName("PRIMARY");
- entity.ToTable("mobile_app_install");
+ entity.ToTable("mobile_app_install")
+ .HasCharSet("utf8");
entity.Property(e => e.UserEmail)
.HasColumnName("user_email")
@@ -60,11 +61,14 @@ public static class MobileAppInstallExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.AppType).HasColumnName("app_type");
+ entity.Property(e => e.AppType)
+ .HasColumnName("app_type");
entity.Property(e => e.LastSign)
.HasColumnName("last_sign")
- .HasColumnType("datetime");
+ .IsRequired(false)
+ .HasColumnType("datetime")
+ .HasDefaultValueSql("NULL");
entity.Property(e => e.RegisteredOn)
.HasColumnName("registered_on")
diff --git a/common/ASC.Core.Common/EF/Model/Notify/NotifyInfo.cs b/common/ASC.Core.Common/EF/Model/Notify/NotifyInfo.cs
index 17e459bdbe..9b1040803d 100644
--- a/common/ASC.Core.Common/EF/Model/Notify/NotifyInfo.cs
+++ b/common/ASC.Core.Common/EF/Model/Notify/NotifyInfo.cs
@@ -51,22 +51,31 @@ public static class NotifyInfoExtension
entity.HasKey(e => e.NotifyId)
.HasName("PRIMARY");
- entity.ToTable("notify_info");
+ entity.ToTable("notify_info")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.State)
.HasDatabaseName("state");
- entity.Property(e => e.NotifyId).HasColumnName("notify_id");
+ entity.Property(e => e.NotifyId)
+ .HasColumnName("notify_id")
+ .ValueGeneratedNever();
- entity.Property(e => e.Attempts).HasColumnName("attempts");
+ entity.Property(e => e.Attempts)
+ .HasColumnName("attempts")
+ .HasDefaultValueSql("'0'");
entity.Property(e => e.ModifyDate)
.HasColumnName("modify_date")
.HasColumnType("datetime");
- entity.Property(e => e.Priority).HasColumnName("priority");
+ entity.Property(e => e.Priority)
+ .HasColumnName("priority")
+ .HasDefaultValueSql("'0'");
- entity.Property(e => e.State).HasColumnName("state");
+ entity.Property(e => e.State)
+ .HasColumnName("state")
+ .HasDefaultValueSql("'0'");
});
}
public static void PgSqlAddNotifyInfo(this ModelBuilder modelBuilder)
diff --git a/common/ASC.Core.Common/EF/Model/Notify/NotifyQueue.cs b/common/ASC.Core.Common/EF/Model/Notify/NotifyQueue.cs
index 20a1f2846f..73b22beeff 100644
--- a/common/ASC.Core.Common/EF/Model/Notify/NotifyQueue.cs
+++ b/common/ASC.Core.Common/EF/Model/Notify/NotifyQueue.cs
@@ -58,7 +58,8 @@ public static class NotifyQueueExtension
entity.HasKey(e => e.NotifyId)
.HasName("PRIMARY");
- entity.ToTable("notify_queue");
+ entity.ToTable("notify_queue")
+ .HasCharSet("utf8");
entity.Property(e => e.NotifyId).HasColumnName("notify_id");
diff --git a/common/ASC.Core.Common/EF/Model/Regions.cs b/common/ASC.Core.Common/EF/Model/Regions.cs
index 6ed9820a99..6c4df9a884 100644
--- a/common/ASC.Core.Common/EF/Model/Regions.cs
+++ b/common/ASC.Core.Common/EF/Model/Regions.cs
@@ -48,6 +48,7 @@ public static class RegionsExtension
{
modelBuilder.Entity(entity =>
{
+ entity.HasCharSet("utf8");
entity.HasKey(e => e.Region);
});
}
diff --git a/common/ASC.Core.Common/EF/Model/ShortLinks.cs b/common/ASC.Core.Common/EF/Model/ShortLinks.cs
new file mode 100644
index 0000000000..bad0cb6c29
--- /dev/null
+++ b/common/ASC.Core.Common/EF/Model/ShortLinks.cs
@@ -0,0 +1,114 @@
+// (c) Copyright Ascensio System SIA 2010-2022
+//
+// This program is a free software product.
+// You can redistribute it and/or modify it under the terms
+// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
+// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
+// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
+// any third-party rights.
+//
+// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
+// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+//
+// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
+//
+// The interactive user interfaces in modified source and object code versions of the Program must
+// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
+//
+// Pursuant to Section 7(b) of the License you must retain the original Product logo when
+// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
+// trademark law for use of our trademarks.
+//
+// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
+// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
+// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+
+
+namespace ASC.Core.Common.EF.Model;
+public class ShortLinks
+{
+ public int Id { get; set; }
+ public string Short { get; set; }
+ public string Link { get; set; }
+}
+
+public static class ShortLinksExtension
+{
+ public static ModelBuilderWrapper AddShortLinks(this ModelBuilderWrapper modelBuilder)
+ {
+ modelBuilder
+ .Add(MySqlAddShortLinks, Provider.MySql)
+ .Add(PgSqlAddShortLinks, Provider.PostgreSql);
+
+ return modelBuilder;
+ }
+
+ public static void MySqlAddShortLinks(this ModelBuilder modelBuilder)
+ {
+ modelBuilder.Entity(entity =>
+ {
+ entity.ToTable("short_links")
+ .HasCharSet("utf8")
+ .UseCollation("utf8_general_ci");
+
+ entity.HasIndex(e => e.Short)
+ .IsUnique();
+
+ entity.HasKey(e => e.Id)
+ .HasName("PRIMARY");
+
+ entity.Property(e => e.Id)
+ .HasColumnName("id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int(10)");
+
+ entity.Property(e => e.Short)
+ .HasColumnName("short")
+ .HasColumnType("varchar(12)")
+ .HasCharSet("utf8")
+ .UseCollation("utf8_general_ci")
+ .IsRequired(false);
+
+ entity.Property(e => e.Link)
+ .HasColumnName("link")
+ .HasColumnType("text")
+ .UseCollation("utf8_bin")
+ .IsRequired(false);
+ });
+ }
+
+ public static void PgSqlAddShortLinks(this ModelBuilder modelBuilder)
+ {
+ modelBuilder.Entity(entity =>
+ {
+ entity.ToTable("short_links")
+ .HasCharSet("utf8")
+ .UseCollation("utf8_general_ci");
+
+ entity.HasIndex(e => e.Short)
+ .IsUnique();
+
+ entity.HasKey(e => e.Id)
+ .HasName("PRIMARY");
+
+ entity.Property(e => e.Id)
+ .HasColumnName("id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int(10)");
+
+ entity.Property(e => e.Short)
+ .HasColumnName("short")
+ .HasColumnType("varchar(12)")
+ .HasCharSet("utf8")
+ .UseCollation("utf8_general_ci")
+ .IsRequired(false);
+
+ entity.Property(e => e.Link)
+ .HasColumnName("link")
+ .HasColumnType("text")
+ .UseCollation("utf8_bin")
+ .IsRequired(false);
+ });
+ }
+}
diff --git a/common/ASC.Core.Common/EF/Model/TelegramUser.cs b/common/ASC.Core.Common/EF/Model/TelegramUser.cs
index 6fa65fb781..c154ab84d2 100644
--- a/common/ASC.Core.Common/EF/Model/TelegramUser.cs
+++ b/common/ASC.Core.Common/EF/Model/TelegramUser.cs
@@ -55,7 +55,8 @@ public static class TelegramUsersExtension
entity.HasKey(e => new { e.TenantId, e.PortalUserId })
.HasName("PRIMARY");
- entity.ToTable("telegram_users");
+ entity.ToTable("telegram_users")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.TelegramUserId)
.HasDatabaseName("tgId");
@@ -68,7 +69,9 @@ public static class TelegramUsersExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.TelegramUserId).HasColumnName("telegram_user_id");
+ entity.Property(e => e.TelegramUserId)
+ .HasColumnName("telegram_user_id")
+ .HasColumnType("int");
});
}
public static void PgSqlAddTelegramUsers(this ModelBuilder modelBuilder)
diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbButton.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbButton.cs
index fa254e9216..ebd8e827e3 100644
--- a/common/ASC.Core.Common/EF/Model/Tenant/DbButton.cs
+++ b/common/ASC.Core.Common/EF/Model/Tenant/DbButton.cs
@@ -55,7 +55,8 @@ public static class DbButtonExtension
entity.HasKey(e => new { e.TariffId, e.PartnerId })
.HasName("PRIMARY");
- entity.ToTable("tenants_buttons");
+ entity.ToTable("tenants_buttons")
+ .HasCharSet("utf8");
entity.Property(e => e.TariffId).HasColumnName("tariff_id");
diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs
index b535e5f4f5..1c9933cf20 100644
--- a/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs
+++ b/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs
@@ -83,11 +83,16 @@ public static class DbQuotaExtension
entity.HasKey(e => e.Tenant)
.HasName("PRIMARY");
- entity.ToTable("tenants_quota");
+ entity.ToTable("tenants_quota")
+ .HasCharSet("utf8");
- entity.Property(e => e.Tenant).HasColumnName("tenant");
+ entity.Property(e => e.Tenant)
+ .HasColumnName("tenant")
+ .ValueGeneratedNever();
- entity.Property(e => e.ActiveUsers).HasColumnName("active_users");
+ entity.Property(e => e.ActiveUsers)
+ .HasColumnName("active_users")
+ .HasDefaultValueSql("'0'");
entity.Property(e => e.AvangateId)
.HasColumnName("avangate_id")
@@ -103,13 +108,15 @@ public static class DbQuotaExtension
entity.Property(e => e.Features)
.HasColumnName("features")
- .HasColumnType("text")
- .HasCharSet("utf8")
- .UseCollation("utf8_general_ci");
+ .HasColumnType("text");
- entity.Property(e => e.MaxFileSize).HasColumnName("max_file_size");
+ entity.Property(e => e.MaxFileSize)
+ .HasColumnName("max_file_size")
+ .HasDefaultValueSql("'0'");
- entity.Property(e => e.MaxTotalSize).HasColumnName("max_total_size");
+ entity.Property(e => e.MaxTotalSize)
+ .HasColumnName("max_total_size")
+ .HasDefaultValueSql("'0'");
entity.Property(e => e.Name)
.HasColumnName("name")
@@ -119,9 +126,13 @@ public static class DbQuotaExtension
entity.Property(e => e.Price)
.HasColumnName("price")
+ .HasDefaultValueSql("'0.00'")
.HasColumnType("decimal(10,2)");
- entity.Property(e => e.Visible).HasColumnName("visible");
+ entity.Property(e => e.Visible)
+ .HasColumnName("visible")
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValueSql("'0'");
});
}
public static void PgSqlAddDbQuota(this ModelBuilder modelBuilder)
diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbQuotaRow.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbQuotaRow.cs
index c5a6bbd881..8f29328189 100644
--- a/common/ASC.Core.Common/EF/Model/Tenant/DbQuotaRow.cs
+++ b/common/ASC.Core.Common/EF/Model/Tenant/DbQuotaRow.cs
@@ -58,7 +58,8 @@ public static class DbQuotaRowExtension
entity.HasKey(e => new { e.Tenant, e.Path })
.HasName("PRIMARY");
- entity.ToTable("tenants_quotarow");
+ entity.ToTable("tenants_quotarow")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.LastModified)
.HasDatabaseName("last_modified");
@@ -71,12 +72,13 @@ public static class DbQuotaRowExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.Counter).HasColumnName("counter");
+ entity.Property(e => e.Counter)
+ .HasColumnName("counter")
+ .HasDefaultValueSql("'0'");
entity.Property(e => e.LastModified)
.HasColumnName("last_modified")
- .HasColumnType("timestamp")
- .HasDefaultValueSql("CURRENT_TIMESTAMP");
+ .HasColumnType("timestamp");
entity.Property(e => e.Tag)
.HasColumnName("tag")
diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbTariff.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbTariff.cs
index 44b5904458..6dcc605a13 100644
--- a/common/ASC.Core.Common/EF/Model/Tenant/DbTariff.cs
+++ b/common/ASC.Core.Common/EF/Model/Tenant/DbTariff.cs
@@ -50,7 +50,8 @@ public static class DbTariffExtension
{
modelBuilder.Entity(entity =>
{
- entity.ToTable("tenants_tariff");
+ entity.ToTable("tenants_tariff")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.Tenant)
.HasDatabaseName("tenant");
@@ -65,13 +66,12 @@ public static class DbTariffExtension
entity.Property(e => e.CreateOn)
.HasColumnName("create_on")
- .HasColumnType("timestamp")
- .HasDefaultValueSql("CURRENT_TIMESTAMP")
- .ValueGeneratedOnAddOrUpdate();
+ .HasColumnType("timestamp");
entity.Property(e => e.Quantity)
.HasColumnName("quantity")
- .HasColumnType("int");
+ .HasColumnType("int")
+ .HasDefaultValueSql("'1'");
entity.Property(e => e.Stamp)
.HasColumnName("stamp")
diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbTenant.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbTenant.cs
index db4655870e..62d68bdcb6 100644
--- a/common/ASC.Core.Common/EF/Model/Tenant/DbTenant.cs
+++ b/common/ASC.Core.Common/EF/Model/Tenant/DbTenant.cs
@@ -53,9 +53,9 @@ public class DbTenant : IMapFrom
set { StatusChanged = value; }
}
public DateTime CreationDateTime { get; set; }
- public Guid OwnerId { get; set; }
+ public Guid? OwnerId { get; set; }
public string PaymentId { get; set; }
- public TenantIndustry? Industry { get; set; }
+ public TenantIndustry Industry { get; set; }
public DateTime LastModified { get; set; }
public bool Spam { get; set; }
public bool Calls { get; set; }
@@ -89,7 +89,8 @@ public static class DbTenantExtension
Alias = "localhost",
Name = "Web Office",
CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317),
- OwnerId = Guid.Parse("66faa6e4-f133-11ea-b126-00ffeec8b4ef")
+ OwnerId = Guid.Parse("66faa6e4-f133-11ea-b126-00ffeec8b4ef"),
+ LastModified = new DateTime(2022, 7, 8)
}
);
@@ -105,7 +106,8 @@ public static class DbTenantExtension
modelBuilder.Entity(entity =>
{
- entity.ToTable("tenants_tenants");
+ entity.ToTable("tenants_tenants")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.LastModified)
.HasDatabaseName("last_modified");
@@ -116,6 +118,10 @@ public static class DbTenantExtension
entity.HasIndex(e => e.Version)
.HasDatabaseName("version");
+ entity.HasIndex(e => e.Alias)
+ .HasDatabaseName("alias")
+ .IsUnique();
+
entity.Property(e => e.Id).HasColumnName("id");
entity.Property(e => e.Alias)
@@ -127,13 +133,17 @@ public static class DbTenantExtension
entity.Property(e => e.Calls)
.HasColumnName("calls")
- .HasDefaultValueSql("true");
+ .HasDefaultValueSql("'1'")
+ .HasColumnType("tinyint(1)");
entity.Property(e => e.CreationDateTime)
.HasColumnName("creationdatetime")
.HasColumnType("datetime");
- entity.Property(e => e.Industry).HasColumnName("industry");
+ entity.Property(e => e.Industry)
+ .HasColumnName("industry")
+ .IsRequired()
+ .HasDefaultValueSql("'0'");
entity.Property(e => e.Language)
.IsRequired()
@@ -145,8 +155,7 @@ public static class DbTenantExtension
entity.Property(e => e.LastModified)
.HasColumnName("last_modified")
- .HasColumnType("timestamp")
- .HasDefaultValueSql("CURRENT_TIMESTAMP");
+ .HasColumnType("timestamp");
entity.Property(e => e.MappedDomain)
.HasColumnName("mappeddomain")
@@ -164,6 +173,7 @@ public static class DbTenantExtension
entity.Property(e => e.OwnerId)
.HasColumnName("owner_id")
.HasColumnType("varchar(38)")
+ .IsRequired(false)
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
@@ -175,9 +185,13 @@ public static class DbTenantExtension
entity.Property(e => e.Spam)
.HasColumnName("spam")
- .HasDefaultValueSql("true");
+ .HasDefaultValueSql("'1'")
+ .HasColumnType("tinyint(1)");
- entity.Property(e => e.Status).HasColumnName("status");
+ entity.Property(e => e.Status)
+ .HasColumnName("status")
+ .IsRequired()
+ .HasDefaultValueSql("'0'");
entity.Property(e => e.StatusChanged)
.HasColumnName("statuschanged")
diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbTenantForbiden.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbTenantForbiden.cs
index 05c4ff4dc4..cfb1dee1f1 100644
--- a/common/ASC.Core.Common/EF/Model/Tenant/DbTenantForbiden.cs
+++ b/common/ASC.Core.Common/EF/Model/Tenant/DbTenantForbiden.cs
@@ -53,7 +53,8 @@ public static class DbTenantForbidenExtension
entity.HasKey(e => e.Address)
.HasName("PRIMARY");
- entity.ToTable("tenants_forbiden");
+ entity.ToTable("tenants_forbiden")
+ .HasCharSet("utf8");
entity.Property(e => e.Address)
.HasColumnName("address")
diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbTenantPartner.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbTenantPartner.cs
index a89d1632f2..894a138faf 100644
--- a/common/ASC.Core.Common/EF/Model/Tenant/DbTenantPartner.cs
+++ b/common/ASC.Core.Common/EF/Model/Tenant/DbTenantPartner.cs
@@ -54,9 +54,12 @@ public static class DbTenantPartnerExtension
entity.HasKey(e => e.TenantId)
.HasName("PRIMARY");
- entity.ToTable("tenants_partners");
+ entity.ToTable("tenants_partners")
+ .HasCharSet("utf8");
- entity.Property(e => e.TenantId).HasColumnName("tenant_id");
+ entity.Property(e => e.TenantId)
+ .HasColumnName("tenant_id")
+ .ValueGeneratedNever();
entity.Property(e => e.AffiliateId)
.HasColumnName("affiliate_id")
diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbTenantVersion.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbTenantVersion.cs
index fad2c60220..8a9c55fe17 100644
--- a/common/ASC.Core.Common/EF/Model/Tenant/DbTenantVersion.cs
+++ b/common/ASC.Core.Common/EF/Model/Tenant/DbTenantVersion.cs
@@ -50,11 +50,16 @@ public static class DbTenantVersionExtension
{
modelBuilder.Entity(entity =>
{
- entity.ToTable("tenants_version");
+ entity.ToTable("tenants_version")
+ .HasCharSet("utf8");
- entity.Property(e => e.Id).HasColumnName("id");
+ entity.Property(e => e.Id)
+ .HasColumnName("id")
+ .ValueGeneratedNever();
- entity.Property(e => e.DefaultVersion).HasColumnName("default_version");
+ entity.Property(e => e.DefaultVersion)
+ .HasColumnName("default_version")
+ .HasDefaultValueSql("'0'");
entity.Property(e => e.Url)
.IsRequired()
@@ -70,7 +75,10 @@ public static class DbTenantVersionExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.Visible).HasColumnName("visible");
+ entity.Property(e => e.Visible)
+ .HasColumnName("visible")
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValueSql("'0'");
});
}
diff --git a/common/ASC.Core.Common/EF/Model/Tenant/TenantIpRestrictions.cs b/common/ASC.Core.Common/EF/Model/Tenant/TenantIpRestrictions.cs
index 90a24a941e..1312ff0851 100644
--- a/common/ASC.Core.Common/EF/Model/Tenant/TenantIpRestrictions.cs
+++ b/common/ASC.Core.Common/EF/Model/Tenant/TenantIpRestrictions.cs
@@ -48,7 +48,8 @@ public static class TenantIpRestrictionsExtension
{
modelBuilder.Entity(entity =>
{
- entity.ToTable("tenants_iprestrictions");
+ entity.ToTable("tenants_iprestrictions")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.Tenant)
.HasDatabaseName("tenant");
diff --git a/common/ASC.Core.Common/EF/Model/User/DbGroup.cs b/common/ASC.Core.Common/EF/Model/User/DbGroup.cs
index 9b171d1e45..31e2f32eba 100644
--- a/common/ASC.Core.Common/EF/Model/User/DbGroup.cs
+++ b/common/ASC.Core.Common/EF/Model/User/DbGroup.cs
@@ -58,7 +58,8 @@ public static class DbGroupExtension
{
modelBuilder.Entity(entity =>
{
- entity.ToTable("core_group");
+ entity.ToTable("core_group")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.LastModified)
.HasDatabaseName("last_modified");
@@ -80,8 +81,7 @@ public static class DbGroupExtension
entity.Property(e => e.LastModified)
.HasColumnName("last_modified")
- .HasColumnType("timestamp")
- .HasDefaultValueSql("CURRENT_TIMESTAMP");
+ .HasColumnType("timestamp");
entity.Property(e => e.Name)
.IsRequired()
@@ -96,7 +96,10 @@ public static class DbGroupExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.Removed).HasColumnName("removed");
+ entity.Property(e => e.Removed)
+ .HasColumnName("removed")
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValueSql("'0'");
entity.Property(e => e.Sid)
.HasColumnName("sid")
diff --git a/common/ASC.Core.Common/EF/Model/User/User.cs b/common/ASC.Core.Common/EF/Model/User/User.cs
index 1992e5ffdd..4d2ec9503d 100644
--- a/common/ASC.Core.Common/EF/Model/User/User.cs
+++ b/common/ASC.Core.Common/EF/Model/User/User.cs
@@ -53,7 +53,6 @@ public class User : BaseEntity, IMapFrom
public bool Removed { get; set; }
public DateTime CreateDate { get; set; }
public DateTime LastModified { get; set; }
- public List Groups { get; set; }
public override object[] GetKeys()
{
@@ -80,7 +79,8 @@ public static class DbUserExtension
Status = (EmployeeStatus)1,
ActivationStatus = 0,
WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157),
- LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420)
+ LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420),
+ CreateDate = new DateTime(2022, 7, 8)
});
return modelBuilder;
@@ -88,10 +88,13 @@ public static class DbUserExtension
private static void MySqlAddUser(this ModelBuilder modelBuilder)
{
- modelBuilder.MySqlAddUserGroup();
modelBuilder.Entity(entity =>
{
- entity.ToTable("core_user");
+ entity.ToTable("core_user")
+ .HasCharSet("utf8");
+
+ entity.HasKey(e => e.Id)
+ .HasName("PRIMARY");
entity.HasIndex(e => e.Email)
.HasDatabaseName("email");
@@ -108,7 +111,9 @@ public static class DbUserExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.ActivationStatus).HasColumnName("activation_status");
+ entity.Property(e => e.ActivationStatus)
+ .HasColumnName("activation_status")
+ .HasDefaultValueSql("'0'");
entity.Property(e => e.BirthDate)
.HasColumnName("bithdate")
@@ -122,8 +127,7 @@ public static class DbUserExtension
entity.Property(e => e.CreateDate)
.HasColumnName("create_on")
- .HasColumnType("timestamp")
- .HasDefaultValueSql("CURRENT_TIMESTAMP");
+ .HasColumnType("timestamp");
entity.Property(e => e.CultureName)
.HasColumnName("culture")
@@ -174,11 +178,18 @@ public static class DbUserExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.MobilePhoneActivation).HasColumnName("phone_activation");
+ entity.Property(e => e.MobilePhoneActivation)
+ .HasColumnName("phone_activation")
+ .HasDefaultValueSql("'0'");
- entity.Property(e => e.Removed).HasColumnName("removed");
+ entity.Property(e => e.Removed)
+ .HasColumnName("removed")
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValueSql("'0'");
- entity.Property(e => e.Sex).HasColumnName("sex");
+ entity.Property(e => e.Sex)
+ .HasColumnName("sex")
+ .HasColumnType("tinyint(1)");
entity.Property(e => e.Sid)
.HasColumnName("sid")
diff --git a/common/ASC.Core.Common/EF/Model/User/UserGroup.cs b/common/ASC.Core.Common/EF/Model/User/UserGroup.cs
index 4f18aa6c34..8a3e1fcf4a 100644
--- a/common/ASC.Core.Common/EF/Model/User/UserGroup.cs
+++ b/common/ASC.Core.Common/EF/Model/User/UserGroup.cs
@@ -29,14 +29,14 @@ namespace ASC.Core.Common.EF;
public class UserGroup : BaseEntity, IMapFrom
{
public int Tenant { get; set; }
- public Guid UserId { get; set; }
- public Guid GroupId { get; set; }
+ public Guid Userid { get; set; }
+ public Guid UserGroupId { get; set; }
public UserGroupRefType RefType { get; set; }
public bool Removed { get; set; }
public DateTime LastModified { get; set; }
public override object[] GetKeys()
{
- return new object[] { Tenant, UserId, GroupId, RefType };
+ return new object[] { Tenant, Userid, UserGroupId, RefType };
}
}
@@ -51,9 +51,10 @@ public static class DbUserGroupExtension
new UserGroup
{
Tenant = 1,
- UserId = Guid.Parse("66faa6e4-f133-11ea-b126-00ffeec8b4ef"),
- GroupId = Guid.Parse("cd84e66b-b803-40fc-99f9-b2969a54a1de"),
- RefType = 0
+ Userid = Guid.Parse("66faa6e4-f133-11ea-b126-00ffeec8b4ef"),
+ UserGroupId = Guid.Parse("cd84e66b-b803-40fc-99f9-b2969a54a1de"),
+ RefType = 0,
+ LastModified = new DateTime(2022, 7, 8)
}
);
@@ -64,23 +65,24 @@ public static class DbUserGroupExtension
{
modelBuilder.Entity(entity =>
{
- entity.HasKey(e => new { e.Tenant, e.UserId, e.GroupId, e.RefType })
+ entity.HasKey(e => new { e.Tenant, e.Userid, e.UserGroupId, e.RefType })
.HasName("PRIMARY");
- entity.ToTable("core_usergroup");
+ entity.ToTable("core_usergroup")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.LastModified)
.HasDatabaseName("last_modified");
entity.Property(e => e.Tenant).HasColumnName("tenant");
- entity.Property(e => e.UserId)
+ entity.Property(e => e.Userid)
.HasColumnName("userid")
.HasColumnType("varchar(38)")
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.GroupId)
+ entity.Property(e => e.UserGroupId)
.HasColumnName("groupid")
.HasColumnType("varchar(38)")
.HasCharSet("utf8")
@@ -90,17 +92,19 @@ public static class DbUserGroupExtension
entity.Property(e => e.LastModified)
.HasColumnName("last_modified")
- .HasColumnType("timestamp")
- .HasDefaultValueSql("CURRENT_TIMESTAMP");
+ .HasColumnType("timestamp");
- entity.Property(e => e.Removed).HasColumnName("removed");
+ entity.Property(e => e.Removed)
+ .HasColumnName("removed")
+ .HasColumnType("tinyint(1)")
+ .HasDefaultValueSql("'0'");
});
}
public static void PgSqlAddUserGroup(this ModelBuilder modelBuilder)
{
modelBuilder.Entity(entity =>
{
- entity.HasKey(e => new { e.Tenant, e.UserId, e.GroupId, e.RefType })
+ entity.HasKey(e => new { e.Tenant, e.Userid, e.UserGroupId, e.RefType })
.HasName("core_usergroup_pkey");
entity.ToTable("core_usergroup", "onlyoffice");
@@ -110,11 +114,11 @@ public static class DbUserGroupExtension
entity.Property(e => e.Tenant).HasColumnName("tenant");
- entity.Property(e => e.UserId)
+ entity.Property(e => e.Userid)
.HasColumnName("userid")
.HasMaxLength(38);
- entity.Property(e => e.GroupId)
+ entity.Property(e => e.UserGroupId)
.HasColumnName("groupid")
.HasMaxLength(38);
diff --git a/common/ASC.Core.Common/EF/Model/User/UserPhoto.cs b/common/ASC.Core.Common/EF/Model/User/UserPhoto.cs
index 99677e476b..9f705375eb 100644
--- a/common/ASC.Core.Common/EF/Model/User/UserPhoto.cs
+++ b/common/ASC.Core.Common/EF/Model/User/UserPhoto.cs
@@ -53,7 +53,8 @@ public static class UserPhotoExtension
entity.HasKey(e => e.UserId)
.HasName("PRIMARY");
- entity.ToTable("core_userphoto");
+ entity.ToTable("core_userphoto")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.Tenant)
.HasDatabaseName("tenant");
diff --git a/common/ASC.Core.Common/EF/Model/User/UserSecurity.cs b/common/ASC.Core.Common/EF/Model/User/UserSecurity.cs
index a41fd6c190..2207ec8531 100644
--- a/common/ASC.Core.Common/EF/Model/User/UserSecurity.cs
+++ b/common/ASC.Core.Common/EF/Model/User/UserSecurity.cs
@@ -51,7 +51,7 @@ public static class UserSecurityExtension
Tenant = 1,
UserId = Guid.Parse("66faa6e4-f133-11ea-b126-00ffeec8b4ef"),
PwdHash = "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=",
- LastModified = DateTime.UtcNow
+ LastModified = new DateTime(2022, 7, 8)
});
return modelBuilder;
@@ -64,7 +64,8 @@ public static class UserSecurityExtension
entity.HasKey(e => e.UserId)
.HasName("PRIMARY");
- entity.ToTable("core_usersecurity");
+ entity.ToTable("core_usersecurity")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.PwdHash)
.HasDatabaseName("pwdhash");
@@ -80,8 +81,7 @@ public static class UserSecurityExtension
entity.Property(e => e.LastModified)
.HasColumnType("timestamp")
- .HasDefaultValueSql("CURRENT_TIMESTAMP")
- .ValueGeneratedOnAddOrUpdate();
+ .IsRequired();
entity.Property(e => e.PwdHash)
.HasColumnName("pwdhash")
diff --git a/common/ASC.Core.Common/GeolocationHelper.cs b/common/ASC.Core.Common/GeolocationHelper.cs
index 4ae071a103..de5f0c3a32 100644
--- a/common/ASC.Core.Common/GeolocationHelper.cs
+++ b/common/ASC.Core.Common/GeolocationHelper.cs
@@ -24,17 +24,15 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-using DbContext = ASC.Core.Common.EF.Context.DbContext;
-
namespace ASC.Geolocation;
public class GeolocationHelper
{
public string Dbid { get; set; }
private readonly ILogger _logger;
- private readonly DbContext _dbContext;
+ private readonly CustomDbContext _dbContext;
- public GeolocationHelper(DbContextManager dbContext, ILogger logger)
+ public GeolocationHelper(DbContextManager dbContext, ILogger logger)
{
_logger = logger;
_dbContext = dbContext.Get(Dbid);
@@ -55,7 +53,7 @@ public class GeolocationHelper
IPEnd = r.IPEnd,
IPStart = r.IPStart,
Key = r.Country,
- TimezoneOffset = r.TimezoneOffset,
+ TimezoneOffset = r.TimezoneOffset ?? 0,
TimezoneName = r.TimezoneName
})
.FirstOrDefault();
diff --git a/common/ASC.Core.Common/GlobalUsings.cs b/common/ASC.Core.Common/GlobalUsings.cs
index 2d0b36de30..dd807f9244 100644
--- a/common/ASC.Core.Common/GlobalUsings.cs
+++ b/common/ASC.Core.Common/GlobalUsings.cs
@@ -34,10 +34,9 @@ global using System.Diagnostics;
global using System.Globalization;
global using System.Linq;
global using System.Linq.Expressions;
-global using System.Net;
+global using System.Net;
global using System.Net.Http.Headers;
global using System.Reflection;
-global using System.Resources;
global using System.Runtime.Serialization;
global using System.Security;
global using System.Security.Authentication;
@@ -83,8 +82,6 @@ global using ASC.Core.Common.Configuration;
global using ASC.Core.Common.EF;
global using ASC.Core.Common.EF.Context;
global using ASC.Core.Common.EF.Model;
-global using ASC.Core.Common.EF.Model.Mail;
-global using ASC.Core.Common.EF.Model.Resource;
global using ASC.Core.Common.Hosting.Extensions;
global using ASC.Core.Common.Hosting.Interfaces;
global using ASC.Core.Common.Log;
@@ -108,10 +105,10 @@ global using ASC.Core.Users;
global using ASC.EventBus.Abstractions;
global using ASC.EventBus.Events;
global using ASC.Geolocation;
-global using ASC.MessagingSystem.Core;
-global using ASC.MessagingSystem.Data;
-global using ASC.MessagingSystem.Mapping;
-global using ASC.MessagingSystem.Models;
+global using ASC.MessagingSystem.Core;
+global using ASC.MessagingSystem.EF.Model;
+global using ASC.MessagingSystem.Mapping;
+global using ASC.MessagingSystem.EF.Context;
global using ASC.Notify;
global using ASC.Notify.Channels;
global using ASC.Notify.Cron;
@@ -137,9 +134,9 @@ global using Microsoft.EntityFrameworkCore;
global using Microsoft.EntityFrameworkCore.Infrastructure;
global using Microsoft.EntityFrameworkCore.Metadata;
global using Microsoft.EntityFrameworkCore.Migrations;
+global using Microsoft.EntityFrameworkCore.Migrations.Operations;
global using Microsoft.EntityFrameworkCore.Query;
global using Microsoft.EntityFrameworkCore.Query.SqlExpressions;
-global using Microsoft.Extensions.Caching.Memory;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Hosting;
@@ -155,6 +152,9 @@ global using Newtonsoft.Json;
global using NVelocity;
global using NVelocity.App.Events;
+global using Pomelo.EntityFrameworkCore.MySql.Infrastructure.Internal;
+global using Pomelo.EntityFrameworkCore.MySql.Migrations;
+
global using ProtoBuf;
global using Telegram.Bot;
diff --git a/common/ASC.Core.Common/Hosting/Extensions/InstanceRegistrationExtension.cs b/common/ASC.Core.Common/Hosting/Extensions/InstanceRegistrationExtension.cs
index 0e8bc35c31..f1e22fdd33 100644
--- a/common/ASC.Core.Common/Hosting/Extensions/InstanceRegistrationExtension.cs
+++ b/common/ASC.Core.Common/Hosting/Extensions/InstanceRegistrationExtension.cs
@@ -73,7 +73,39 @@ internal static class InstanceRegistrationExtension
}
public static void PgSqlAddInstanceRegistration(this ModelBuilder modelBuilder)
- {
- throw new NotImplementedException();
+ {
+ modelBuilder.Entity(entity =>
+ {
+ entity.ToTable("hosting_instance_registration");
+
+ entity.HasKey(e => e.InstanceRegistrationId)
+ .HasName("PRIMARY");
+
+ entity.HasIndex(e => e.WorkerTypeName)
+ .HasDatabaseName("worker_type_name");
+
+ entity.Property(e => e.WorkerTypeName)
+ .HasColumnName("worker_type_name")
+ .HasColumnType("varchar(255)")
+ .HasCharSet("utf8")
+ .UseCollation("utf8_general_ci")
+ .IsRequired();
+
+ entity.Property(e => e.IsActive)
+ .HasColumnName("is_active")
+ .HasColumnType("tinyint(4)")
+ .IsRequired();
+
+ entity.Property(e => e.InstanceRegistrationId)
+ .HasColumnName("instance_registration_id")
+ .HasColumnType("varchar(255)")
+ .HasCharSet("utf8")
+ .UseCollation("utf8_general_ci")
+ .IsRequired();
+
+ entity.Property(e => e.LastUpdated)
+ .HasColumnName("last_updated")
+ .HasColumnType("datetime");
+ });
}
}
\ No newline at end of file
diff --git a/common/ASC.Core.Common/Hosting/InstanceRegistrationContext.cs b/common/ASC.Core.Common/Hosting/InstanceRegistrationContext.cs
index 6e33fa2c9a..af3d561419 100644
--- a/common/ASC.Core.Common/Hosting/InstanceRegistrationContext.cs
+++ b/common/ASC.Core.Common/Hosting/InstanceRegistrationContext.cs
@@ -26,9 +26,6 @@
namespace ASC.Core.Common.Hosting;
-public class MySqlIntegrationEventLogContext : InstanceRegistrationContext { }
-public class PostgreSqlIntegrationEventLogContext : InstanceRegistrationContext { }
-
public class InstanceRegistrationContext : BaseDbContext
{
public DbSet InstanceRegistrations { get; set; }
@@ -39,16 +36,4 @@ public class InstanceRegistrationContext : BaseDbContext
.AddInstanceRegistration();
}
-
- protected override Dictionary> ProviderContext
- {
- get
- {
- return new Dictionary>()
- {
- { Provider.MySql, () => new MySqlIntegrationEventLogContext() } ,
- { Provider.PostgreSql, () => new PostgreSqlIntegrationEventLogContext() } ,
- };
- }
- }
}
diff --git a/common/ASC.Core.Common/Log/DBResourceManagerLogger.cs b/common/ASC.Core.Common/Log/DBResourceManagerLogger.cs
index affd01345b..97b90a2dc4 100644
--- a/common/ASC.Core.Common/Log/DBResourceManagerLogger.cs
+++ b/common/ASC.Core.Common/Log/DBResourceManagerLogger.cs
@@ -29,18 +29,6 @@ using TMResourceData;
namespace ASC.Core.Common.Log;
internal static partial class DBResourceManagerLogger
{
- [LoggerMessage(Level = LogLevel.Warning, Message = "Can not {getType}() from assembly {assemblyName}, try {getExportedTypes}()")]
- public static partial void CanNotGetType(this ILogger logger, string getType, string assemblyName, string getExportedTypes, Exception exception);
-
- [LoggerMessage(Level = LogLevel.Error, Message = "Can not {getExportedTypes}() from assembly {assemblyName}")]
- public static partial void CanNotGetExportedTypes(this ILogger logger, string getExportedTypes, string assemblyName, Exception exception);
-
- [LoggerMessage(Level = LogLevel.Error, Message = "Can not get resource from {fileName} for {culture}: GetString({name})")]
- public static partial void CanNotGetResource(this ILogger logger, string fileName, string culture, string name, Exception exception);
-
- [LoggerMessage(Level = LogLevel.Error, Message = "DBResourceSet")]
- public static partial void ErrorDBResourceSet(this ILogger logger, Exception exception);
-
[LoggerMessage(Level = LogLevel.Error, Message = "SetNewText")]
public static partial void ErrorSetNewText(this ILogger logger, Exception exception);
diff --git a/common/ASC.Core.Common/Messaging/AuditEvent.cs b/common/ASC.Core.Common/Messaging/AuditEvent.cs
index f53c4126e2..61dd1c46f1 100644
--- a/common/ASC.Core.Common/Messaging/AuditEvent.cs
+++ b/common/ASC.Core.Common/Messaging/AuditEvent.cs
@@ -24,7 +24,7 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-namespace ASC.MessagingSystem.Models;
+namespace ASC.MessagingSystem.EF.Model;
public class AuditEvent : MessageEvent, IMapFrom
{
@@ -54,17 +54,20 @@ public static class AuditEventExtension
{
modelBuilder.Entity(entity =>
{
- entity.ToTable("audit_events");
+ entity.ToTable("audit_events")
+ .HasCharSet("utf8");
entity.HasIndex(e => new { e.TenantId, e.Date })
.HasDatabaseName("date");
entity
- .Property(e => e.Id)
- .HasColumnName("id")
- .ValueGeneratedOnAdd();
+ .Property(e => e.Id)
+ .HasColumnName("id")
+ .ValueGeneratedOnAdd();
- entity.Property(e => e.Action).HasColumnName("action");
+ entity.Property(e => e.Action)
+ .HasColumnName("action")
+ .IsRequired(false);
entity.Property(e => e.Browser)
.HasColumnName("browser")
@@ -116,6 +119,7 @@ public static class AuditEventExtension
entity.Property(e => e.UserId)
.HasColumnName("user_id")
+ .IsRequired(false)
.HasColumnType("char(38)")
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
diff --git a/common/ASC.Core.Common/Messaging/EventMessage.cs b/common/ASC.Core.Common/Messaging/EventMessage.cs
index 5691e48f58..8e4456a0f0 100644
--- a/common/ASC.Core.Common/Messaging/EventMessage.cs
+++ b/common/ASC.Core.Common/Messaging/EventMessage.cs
@@ -24,8 +24,8 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-
-namespace ASC.MessagingSystem.Models;
+
+namespace ASC.MessagingSystem.EF.Model;
public class EventMessage
{
@@ -41,6 +41,6 @@ public class EventMessage
public MessageAction Action { get; set; }
public IList Description { get; set; }
public MessageTarget Target { get; set; }
- public string UAHeader { get; set; }
+ public string UAHeader { get; set; }
public bool Active { get; set; }
}
diff --git a/common/ASC.Core.Common/Messaging/EventTypeConverter.cs b/common/ASC.Core.Common/Messaging/EventTypeConverter.cs
index 9bd19e5899..7a117a391c 100644
--- a/common/ASC.Core.Common/Messaging/EventTypeConverter.cs
+++ b/common/ASC.Core.Common/Messaging/EventTypeConverter.cs
@@ -24,6 +24,7 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+
namespace ASC.MessagingSystem.Mapping;
[Scope]
diff --git a/common/ASC.Core.Common/Messaging/LoginEvent.cs b/common/ASC.Core.Common/Messaging/LoginEvent.cs
index f682500221..6598633a0a 100644
--- a/common/ASC.Core.Common/Messaging/LoginEvent.cs
+++ b/common/ASC.Core.Common/Messaging/LoginEvent.cs
@@ -24,13 +24,12 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-
-
-namespace ASC.MessagingSystem.Models;
+
+namespace ASC.MessagingSystem.EF.Model;
public class LoginEvent : MessageEvent, IMapFrom
{
- public string Login { get; set; }
+ public string Login { get; set; }
public bool Active { get; set; }
public void Mapping(Profile profile)
@@ -56,7 +55,8 @@ public static class LoginEventsExtension
{
modelBuilder.Entity(entity =>
{
- entity.ToTable("login_events");
+ entity.ToTable("login_events")
+ .HasCharSet("utf8");
entity.HasIndex(e => e.Date)
.HasDatabaseName("date");
@@ -66,7 +66,9 @@ public static class LoginEventsExtension
entity.Property(e => e.Id).HasColumnName("id");
- entity.Property(e => e.Action).HasColumnName("action");
+ entity.Property(e => e.Action)
+ .HasColumnName("action")
+ .IsRequired(false);
entity.Property(e => e.Browser)
.HasColumnName("browser")
@@ -108,10 +110,10 @@ public static class LoginEventsExtension
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
- entity.Property(e => e.TenantId)
- .HasColumnName("tenant_id");
+ entity.Property(e => e.TenantId)
+ .HasColumnName("tenant_id");
- entity.Property(e => e.Active)
+ entity.Property(e => e.Active)
.HasColumnName("active");
entity.Property(e => e.UserId)
@@ -170,8 +172,8 @@ public static class LoginEventsExtension
.HasMaxLength(200)
.HasDefaultValueSql("NULL");
- entity.Property(e => e.TenantId).HasColumnName("tenant_id");
-
+ entity.Property(e => e.TenantId).HasColumnName("tenant_id");
+
entity.Property(e => e.Active).HasColumnName("active");
entity.Property(e => e.UserId)
diff --git a/common/ASC.Core.Common/Messaging/MessageEvent.cs b/common/ASC.Core.Common/Messaging/MessageEvent.cs
index 92cf55bb2c..b837cb9075 100644
--- a/common/ASC.Core.Common/Messaging/MessageEvent.cs
+++ b/common/ASC.Core.Common/Messaging/MessageEvent.cs
@@ -24,7 +24,7 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-namespace ASC.MessagingSystem.Models;
+namespace ASC.MessagingSystem.EF.Model;
public class MessageEvent : IMapFrom
{
@@ -34,8 +34,8 @@ public class MessageEvent : IMapFrom
public string Platform { get; set; }
public DateTime Date { get; set; }
public int TenantId { get; set; }
- public Guid UserId { get; set; }
+ public Guid? UserId { get; set; }
public string Page { get; set; }
- public int Action { get; set; }
+ public int? Action { get; set; }
public string DescriptionRaw { get; set; }
}
diff --git a/common/ASC.Core.Common/Messaging/MessageTarget.cs b/common/ASC.Core.Common/Messaging/MessageTarget.cs
index 0f2fcbc918..21aa5a627e 100644
--- a/common/ASC.Core.Common/Messaging/MessageTarget.cs
+++ b/common/ASC.Core.Common/Messaging/MessageTarget.cs
@@ -24,7 +24,7 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-namespace ASC.MessagingSystem.Models;
+namespace ASC.MessagingSystem.EF.Model;
[Singletone]
public class MessageTarget
@@ -40,31 +40,31 @@ public class MessageTarget
}
public MessageTarget Create(T value)
- {
- var res = new List(1);
- if (value != null)
- {
- res.Add(value.ToString());
- }
-
- return new MessageTarget(_option)
- {
- _items = res
+ {
+ var res = new List(1);
+ if (value != null)
+ {
+ res.Add(value.ToString());
+ }
+
+ return new MessageTarget(_option)
+ {
+ _items = res
};
}
public MessageTarget CreateFromGroupValues(IEnumerable value)
- {
- var res = new MessageTarget(_option)
- {
- _items = new List()
- };
-
- if (value != null)
- {
- res._items = value.Select(r => r.ToString()).ToList();
- }
-
+ {
+ var res = new MessageTarget(_option)
+ {
+ _items = new List()
+ };
+
+ if (value != null)
+ {
+ res._items = value.Select(r => r.ToString()).ToList();
+ }
+
return res;
}
@@ -86,7 +86,7 @@ public class MessageTarget
{
_items = items
};
- }
+ }
public IEnumerable GetItems() { return _items.ToList(); }
public override string ToString()
{
diff --git a/common/ASC.Core.Common/Messaging/MessagesContext.cs b/common/ASC.Core.Common/Messaging/MessagesContext.cs
index c3c781b23c..81780ba57b 100644
--- a/common/ASC.Core.Common/Messaging/MessagesContext.cs
+++ b/common/ASC.Core.Common/Messaging/MessagesContext.cs
@@ -24,10 +24,8 @@
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-namespace ASC.MessagingSystem.Data;
-public class MySqlMessagesContext : MessagesContext { }
-public class PostgreSqlMessagesContext : MessagesContext { }
+namespace ASC.MessagingSystem.EF.Context;
public class MessagesContext : BaseDbContext
{
@@ -37,18 +35,6 @@ public class MessagesContext : BaseDbContext
public DbSet Tenants { get; set; }
public DbSet Users { get; set; }
- protected override Dictionary> ProviderContext
- {
- get
- {
- return new Dictionary>()
- {
- { Provider.MySql, () => new MySqlMessagesContext() } ,
- { Provider.PostgreSql, () => new PostgreSqlMessagesContext() } ,
- };
- }
- }
-
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper
diff --git a/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/20211012145324_AccountLinkContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/20211012145324_AccountLinkContextMySql.cs
deleted file mode 100644
index 64d3f8a42c..0000000000
--- a/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/20211012145324_AccountLinkContextMySql.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-// (c) Copyright Ascensio System SIA 2010-2022
-//
-// This program is a free software product.
-// You can redistribute it and/or modify it under the terms
-// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
-// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
-// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
-// any third-party rights.
-//
-// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
-// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
-// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
-//
-// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
-//
-// The interactive user interfaces in modified source and object code versions of the Program must
-// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
-//
-// Pursuant to Section 7(b) of the License you must retain the original Product logo when
-// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
-// trademark law for use of our trademarks.
-//
-// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
-// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
-// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-
-namespace ASC.Core.Common.Migrations.MySql.AccountLinkContextMySql;
-
-public partial class AccountLinkContextMySql : Migration
-{
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AlterDatabase()
- .Annotation("MySql:CharSet", "utf8mb4");
-
- migrationBuilder.CreateTable(
- name: "account_links",
- columns: table => new
- {
- id = table.Column(type: "varchar(200)", nullable: false, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- uid = table.Column(type: "varchar(200)", nullable: false, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- provider = table.Column(type: "char(60)", nullable: true, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- profile = table.Column(type: "text", nullable: false, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- linked = table.Column(type: "datetime", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PRIMARY", x => new { x.id, x.uid });
- })
- .Annotation("MySql:CharSet", "utf8mb4");
-
- migrationBuilder.CreateIndex(
- name: "uid",
- table: "account_links",
- column: "uid");
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "account_links");
- }
-}
diff --git a/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/MySqlAccountLinkContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/MySqlAccountLinkContextModelSnapshot.cs
deleted file mode 100644
index d185409615..0000000000
--- a/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/MySqlAccountLinkContextModelSnapshot.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-
-namespace ASC.Core.Common.Migrations.MySql.AccountLinkContextMySql
-{
- [DbContext(typeof(MySqlAccountLinkContext))]
- partial class MySqlAccountLinkContextModelSnapshot : ModelSnapshot
- {
- protected override void BuildModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("Relational:MaxIdentifierLength", 64)
- .HasAnnotation("ProductVersion", "5.0.8");
-
- modelBuilder.Entity("ASC.Core.Common.EF.Model.AccountLinks", b =>
- {
- b.Property("Id")
- .HasColumnType("varchar(200)")
- .HasColumnName("id")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("UId")
- .HasColumnType("varchar(200)")
- .HasColumnName("uid")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("Linked")
- .HasColumnType("datetime")
- .HasColumnName("linked");
-
- b.Property("Profile")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("profile")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("Provider")
- .HasColumnType("char(60)")
- .HasColumnName("provider")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.HasKey("Id", "UId")
- .HasName("PRIMARY");
-
- b.HasIndex("UId")
- .HasDatabaseName("uid");
-
- b.ToTable("account_links");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20211012145320_CoreDbContextMySql.Designer.cs b/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20211012145320_CoreDbContextMySql.Designer.cs
deleted file mode 100644
index e37bc4833b..0000000000
--- a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20211012145320_CoreDbContextMySql.Designer.cs
+++ /dev/null
@@ -1,194 +0,0 @@
-//
-
-namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql
-{
- [DbContext(typeof(MySqlCoreDbContext))]
- [Migration("20211012145320_CoreDbContextMySql")]
- partial class CoreDbContextMySql
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("Relational:MaxIdentifierLength", 64)
- .HasAnnotation("ProductVersion", "5.0.10");
-
- modelBuilder.Entity("ASC.Core.Common.EF.DbButton", b =>
- {
- b.Property("TariffId")
- .HasColumnType("int")
- .HasColumnName("tariff_id");
-
- b.Property("PartnerId")
- .HasColumnType("varchar(50)")
- .HasColumnName("partner_id")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("ButtonUrl")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("button_url")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.HasKey("TariffId", "PartnerId")
- .HasName("PRIMARY");
-
- b.ToTable("tenants_buttons");
- });
-
- modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b =>
- {
- b.Property("Tenant")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasColumnName("tenant");
-
- b.Property("ActiveUsers")
- .HasColumnType("int")
- .HasColumnName("active_users");
-
- b.Property("AvangateId")
- .HasColumnType("varchar(128)")
- .HasColumnName("avangate_id")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("Description")
- .HasColumnType("varchar(128)")
- .HasColumnName("description")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("Features")
- .HasColumnType("text")
- .HasColumnName("features")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("MaxFileSize")
- .HasColumnType("bigint")
- .HasColumnName("max_file_size");
-
- b.Property("MaxTotalSize")
- .HasColumnType("bigint")
- .HasColumnName("max_total_size");
-
- b.Property("Name")
- .HasColumnType("varchar(128)")
- .HasColumnName("name")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("Price")
- .HasColumnType("decimal(10,2)")
- .HasColumnName("price");
-
- b.Property("Visible")
- .HasColumnType("tinyint(1)")
- .HasColumnName("visible");
-
- b.HasKey("Tenant")
- .HasName("PRIMARY");
-
- b.ToTable("tenants_quota");
-
- b.HasData(
- new
- {
- Tenant = -1,
- ActiveUsers = 10000,
- AvangateId = "0",
- Features = "update",
- MaxFileSize = 102400L,
- MaxTotalSize = 10995116277760L,
- Name = "default",
- Price = 0.00m,
- Visible = false
- });
- });
-
- modelBuilder.Entity("ASC.Core.Common.EF.DbQuotaRow", b =>
- {
- b.Property("Tenant")
- .HasColumnType("int")
- .HasColumnName("tenant");
-
- b.Property("Path")
- .HasColumnType("varchar(255)")
- .HasColumnName("path")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("Counter")
- .HasColumnType("bigint")
- .HasColumnName("counter");
-
- b.Property("LastModified")
- .ValueGeneratedOnAdd()
- .HasColumnType("timestamp")
- .HasColumnName("last_modified")
- .HasDefaultValueSql("CURRENT_TIMESTAMP");
-
- b.Property("Tag")
- .HasColumnType("varchar(1024)")
- .HasColumnName("tag")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.HasKey("Tenant", "Path")
- .HasName("PRIMARY");
-
- b.HasIndex("LastModified")
- .HasDatabaseName("last_modified");
-
- b.ToTable("tenants_quotarow");
- });
-
- modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasColumnName("id");
-
- b.Property("Comment")
- .HasColumnType("varchar(255)")
- .HasColumnName("comment")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("CreateOn")
- .ValueGeneratedOnAddOrUpdate()
- .HasColumnType("timestamp")
- .HasColumnName("create_on")
- .HasDefaultValueSql("CURRENT_TIMESTAMP");
-
- b.Property("Quantity")
- .HasColumnType("int")
- .HasColumnName("quantity");
-
- b.Property("Stamp")
- .HasColumnType("datetime")
- .HasColumnName("stamp");
-
- b.Property("Tariff")
- .HasColumnType("int")
- .HasColumnName("tariff");
-
- b.Property("Tenant")
- .HasColumnType("int")
- .HasColumnName("tenant");
-
- b.HasKey("Id");
-
- b.HasIndex("Tenant")
- .HasDatabaseName("tenant");
-
- b.ToTable("tenants_tariff");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20211012145320_CoreDbContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20211012145320_CoreDbContextMySql.cs
deleted file mode 100644
index dba1e18829..0000000000
--- a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20211012145320_CoreDbContextMySql.cs
+++ /dev/null
@@ -1,149 +0,0 @@
-// (c) Copyright Ascensio System SIA 2010-2022
-//
-// This program is a free software product.
-// You can redistribute it and/or modify it under the terms
-// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
-// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
-// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
-// any third-party rights.
-//
-// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
-// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
-// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
-//
-// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
-//
-// The interactive user interfaces in modified source and object code versions of the Program must
-// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
-//
-// Pursuant to Section 7(b) of the License you must retain the original Product logo when
-// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
-// trademark law for use of our trademarks.
-//
-// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
-// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
-// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
-
-namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql;
-
-public partial class CoreDbContextMySql : Migration
-{
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AlterDatabase()
- .Annotation("MySql:CharSet", "utf8mb4");
-
- migrationBuilder.CreateTable(
- name: "tenants_buttons",
- columns: table => new
- {
- tariff_id = table.Column(type: "int", nullable: false),
- partner_id = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- button_url = table.Column(type: "text", nullable: false, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8")
- },
- constraints: table =>
- {
- table.PrimaryKey("PRIMARY", x => new { x.tariff_id, x.partner_id });
- })
- .Annotation("MySql:CharSet", "utf8mb4");
-
- migrationBuilder.CreateTable(
- name: "tenants_quota",
- columns: table => new
- {
- tenant = table.Column(type: "int", nullable: false)
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- name = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- description = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- max_file_size = table.Column(type: "bigint", nullable: false),
- max_total_size = table.Column(type: "bigint", nullable: false),
- active_users = table.Column(type: "int", nullable: false),
- features = table.Column(type: "text", nullable: true, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- price = table.Column(type: "decimal(10,2)", nullable: false),
- avangate_id = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- visible = table.Column(type: "tinyint(1)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PRIMARY", x => x.tenant);
- })
- .Annotation("MySql:CharSet", "utf8mb4");
-
- migrationBuilder.CreateTable(
- name: "tenants_quotarow",
- columns: table => new
- {
- tenant = table.Column(type: "int", nullable: false),
- path = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- counter = table.Column(type: "bigint", nullable: false),
- tag = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP")
- },
- constraints: table =>
- {
- table.PrimaryKey("PRIMARY", x => new { x.tenant, x.path });
- })
- .Annotation("MySql:CharSet", "utf8mb4");
-
- migrationBuilder.CreateTable(
- name: "tenants_tariff",
- columns: table => new
- {
- id = table.Column(type: "int", nullable: false)
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- tenant = table.Column(type: "int", nullable: false),
- tariff = table.Column(type: "int", nullable: false),
- stamp = table.Column(type: "datetime", nullable: false),
- quantity = table.Column(type: "int", nullable: false),
- comment = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
- .Annotation("MySql:CharSet", "utf8"),
- create_on = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_tenants_tariff", x => x.id);
- })
- .Annotation("MySql:CharSet", "utf8mb4");
-
- migrationBuilder.InsertData(
- table: "tenants_quota",
- columns: new[] { "tenant", "active_users", "avangate_id", "description", "features", "max_file_size", "max_total_size", "name", "price", "visible" },
- values: new object[] { -1, 10000, "0", null, "update", 102400L, 10995116277760L, "default", 0.00m, false });
-
- migrationBuilder.CreateIndex(
- name: "last_modified",
- table: "tenants_quotarow",
- column: "last_modified");
-
- migrationBuilder.CreateIndex(
- name: "tenant",
- table: "tenants_tariff",
- column: "tenant");
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "core_acl");
-
- migrationBuilder.DropTable(
- name: "tenants_buttons");
-
- migrationBuilder.DropTable(
- name: "tenants_quota");
-
- migrationBuilder.DropTable(
- name: "tenants_quotarow");
-
- migrationBuilder.DropTable(
- name: "tenants_tariff");
- }
-}
diff --git a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/MySqlCoreDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/MySqlCoreDbContextModelSnapshot.cs
deleted file mode 100644
index 860534d13c..0000000000
--- a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/MySqlCoreDbContextModelSnapshot.cs
+++ /dev/null
@@ -1,193 +0,0 @@
-//
-
-namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql
-{
- [DbContext(typeof(MySqlCoreDbContext))]
- partial class MySqlCoreDbContextModelSnapshot : ModelSnapshot
- {
- protected override void BuildModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("Relational:MaxIdentifierLength", 64)
- .HasAnnotation("ProductVersion", "5.0.10");
-
- modelBuilder.Entity("ASC.Core.Common.EF.DbButton", b =>
- {
- b.Property("TariffId")
- .HasColumnType("int")
- .HasColumnName("tariff_id");
-
- b.Property("PartnerId")
- .HasColumnType("varchar(50)")
- .HasColumnName("partner_id")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("ButtonUrl")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("button_url")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.HasKey("TariffId", "PartnerId")
- .HasName("PRIMARY");
-
- b.ToTable("tenants_buttons");
- });
-
- modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b =>
- {
- b.Property("Tenant")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasColumnName("tenant");
-
- b.Property("ActiveUsers")
- .HasColumnType("int")
- .HasColumnName("active_users");
-
- b.Property("AvangateId")
- .HasColumnType("varchar(128)")
- .HasColumnName("avangate_id")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("Description")
- .HasColumnType("varchar(128)")
- .HasColumnName("description")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("Features")
- .HasColumnType("text")
- .HasColumnName("features")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("MaxFileSize")
- .HasColumnType("bigint")
- .HasColumnName("max_file_size");
-
- b.Property("MaxTotalSize")
- .HasColumnType("bigint")
- .HasColumnName("max_total_size");
-
- b.Property("Name")
- .HasColumnType("varchar(128)")
- .HasColumnName("name")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("Price")
- .HasColumnType("decimal(10,2)")
- .HasColumnName("price");
-
- b.Property("Visible")
- .HasColumnType("tinyint(1)")
- .HasColumnName("visible");
-
- b.HasKey("Tenant")
- .HasName("PRIMARY");
-
- b.ToTable("tenants_quota");
-
- b.HasData(
- new
- {
- Tenant = -1,
- ActiveUsers = 10000,
- AvangateId = "0",
- Features = "update",
- MaxFileSize = 102400L,
- MaxTotalSize = 10995116277760L,
- Name = "default",
- Price = 0.00m,
- Visible = false
- });
- });
-
- modelBuilder.Entity("ASC.Core.Common.EF.DbQuotaRow", b =>
- {
- b.Property("Tenant")
- .HasColumnType("int")
- .HasColumnName("tenant");
-
- b.Property("Path")
- .HasColumnType("varchar(255)")
- .HasColumnName("path")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("Counter")
- .HasColumnType("bigint")
- .HasColumnName("counter");
-
- b.Property("LastModified")
- .ValueGeneratedOnAdd()
- .HasColumnType("timestamp")
- .HasColumnName("last_modified")
- .HasDefaultValueSql("CURRENT_TIMESTAMP");
-
- b.Property("Tag")
- .HasColumnType("varchar(1024)")
- .HasColumnName("tag")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.HasKey("Tenant", "Path")
- .HasName("PRIMARY");
-
- b.HasIndex("LastModified")
- .HasDatabaseName("last_modified");
-
- b.ToTable("tenants_quotarow");
- });
-
- modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasColumnName("id");
-
- b.Property("Comment")
- .HasColumnType("varchar(255)")
- .HasColumnName("comment")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("CreateOn")
- .ValueGeneratedOnAddOrUpdate()
- .HasColumnType("timestamp")
- .HasColumnName("create_on")
- .HasDefaultValueSql("CURRENT_TIMESTAMP");
-
- b.Property("Quantity")
- .HasColumnType("int")
- .HasColumnName("quantity");
-
- b.Property("Stamp")
- .HasColumnType("datetime")
- .HasColumnName("stamp");
-
- b.Property("Tariff")
- .HasColumnType("int")
- .HasColumnName("tariff");
-
- b.Property("Tenant")
- .HasColumnType("int")
- .HasColumnName("tenant");
-
- b.HasKey("Id");
-
- b.HasIndex("Tenant")
- .HasDatabaseName("tenant");
-
- b.ToTable("tenants_tariff");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/common/ASC.Core.Common/Migrations/MySql/DbContextMySql/20211012145326_DbContextMySql.Designer.cs b/common/ASC.Core.Common/Migrations/MySql/DbContextMySql/20211012145326_DbContextMySql.Designer.cs
deleted file mode 100644
index de04213e25..0000000000
--- a/common/ASC.Core.Common/Migrations/MySql/DbContextMySql/20211012145326_DbContextMySql.Designer.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-//
-
-namespace ASC.Core.Common.Migrations.MySql.DbContextMySql
-{
- [DbContext(typeof(MySqlDbContext))]
- [Migration("20211012145326_DbContextMySql")]
- partial class DbContextMySql
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("Relational:MaxIdentifierLength", 64)
- .HasAnnotation("ProductVersion", "5.0.10");
-
- modelBuilder.Entity("ASC.Core.Common.EF.Model.DbipLocation", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasColumnName("id");
-
- b.Property("AddrType")
- .IsRequired()
- .HasColumnType("enum('ipv4','ipv6')")
- .HasColumnName("addr_type")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("City")
- .IsRequired()
- .HasColumnType("varchar(255)")
- .HasColumnName("city")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("Country")
- .IsRequired()
- .HasColumnType("varchar(2)")
- .HasColumnName("country")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("District")
- .HasColumnType("varchar(255)")
- .HasColumnName("district")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("GeonameId")
- .HasColumnType("int")
- .HasColumnName("geoname_id");
-
- b.Property("IPEnd")
- .IsRequired()
- .HasColumnType("varchar(39)")
- .HasColumnName("ip_end")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("IPStart")
- .IsRequired()
- .HasColumnType("varchar(39)")
- .HasColumnName("ip_start")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("Latitude")
- .HasColumnType("bigint")
- .HasColumnName("latitude");
-
- b.Property("Longitude")
- .HasColumnType("bigint")
- .HasColumnName("longitude");
-
- b.Property("Processed")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasColumnName("processed")
- .HasDefaultValueSql("'1'");
-
- b.Property("StateProv")
- .IsRequired()
- .HasColumnType("varchar(255)")
- .HasColumnName("stateprov")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("TimezoneName")
- .HasColumnType("varchar(255)")
- .HasColumnName("timezone_name")
- .UseCollation("utf8_general_ci")
- .HasAnnotation("MySql:CharSet", "utf8");
-
- b.Property("TimezoneOffset")
- .HasColumnType("double")
- .HasColumnName("timezone_offset");
-
- b.Property