Merge branch 'develop' of github.com:ONLYOFFICE/AppServer into feature/login-confirm-redesign

This commit is contained in:
Viktor Fomin 2022-07-26 17:48:35 +03:00
commit c23df6273e
434 changed files with 33742 additions and 37641 deletions

91
ASC.Migrations.sln Normal file
View File

@ -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}") = "ASC.Migration.Creator", "common\Tools\ASC.Migration.Creator\ASC.Migration.Creator.csproj", "{4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migration.Core", "common\Tools\ASC.Migration.Core\ASC.Migration.Core.csproj", "{4E971C04-8D1F-4C07-8D6F-C062C114CF7F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migration.Runner", "common\Tools\ASC.Migration.Runner\ASC.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

View File

@ -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

View File

@ -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

View File

@ -1,5 +1,5 @@
@echo "MIGRATIONS"
@echo off
PUSHD %~dp0..\common\Tools\AutoMigrationCreator
dotnet run --project AutoMigrationCreator.csproj
PUSHD %~dp0..\common\Tools\Migration.Creator
dotnet run --project Migration.Creator.csproj

View File

@ -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)

View File

@ -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)

View File

@ -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}

View File

@ -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 && \

View File

@ -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}

View File

@ -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: ./

View File

@ -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;

View File

@ -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:

10
build/runMigrations.bat Normal file
View File

@ -0,0 +1,10 @@
@echo "MIGRATIONS"
@echo off
cd /D "%~dp0"
call start\stop.bat nopause
dotnet build ..\asc.web.slnf
dotnet build ..\ASC.Migrations.sln
PUSHD %~dp0..\common\Tools\ASC.Migration.Runner\bin\Debug\net6.0
dotnet ASC.Migration.Runner.dll
pause

View File

@ -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;

View File

@ -80,8 +80,4 @@
<Protobuf Include="protos\az_record_cache.proto" />
<Protobuf Include="protos\quota_cache_item.proto" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\MySql\DbContextMySql\" />
<Folder Include="Migrations\MySql\NotifyDbContextMySql\" />
</ItemGroup>
</Project>

View File

@ -603,6 +603,7 @@ public class TariffService : ITariffService
foreach (var t in tariffs)
{
t.Tenant = -2;
t.CreateOn = DateTime.UtcNow;
}
CoreDbContext.SaveChanges();

View File

@ -26,243 +26,6 @@
namespace TMResourceData;
public class DBResourceManager : ResourceManager
{
public static readonly bool WhiteLableEnabled;
private readonly ConcurrentDictionary<string, ResourceSet> _resourceSets = new ConcurrentDictionary<string, ResourceSet>();
private readonly IMemoryCache _memoryCache;
public DBResourceManager(string filename, Assembly assembly)
: base(filename, assembly)
{
}
public DBResourceManager(
IMemoryCache memoryCache,
IConfiguration configuration,
ILogger<DBResourceManager> option,
DbContextManager<ResourceDbContext> dbContext,
string filename,
Assembly assembly)
: base(filename, assembly)
{
_memoryCache = memoryCache;
_configuration = configuration;
_option = option;
_dbContext = dbContext;
}
public static void PatchAssemblies(ILogger<DBResourceManager> option)
{
AppDomain.CurrentDomain.AssemblyLoad += (_, a) => PatchAssembly(option, a.LoadedAssembly);
Array.ForEach(AppDomain.CurrentDomain.GetAssemblies(), a => PatchAssembly(option, a));
}
public static void PatchAssembly(ILogger<DBResourceManager> logger, Assembly a, bool onlyAsc = true)
{
var log = logger;
if (!onlyAsc || Accept(a))
{
var types = Array.Empty<Type>();
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<DBResourceManager> _option;
private readonly DbContextManager<ResourceDbContext> _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<DBResourceManager> _logger;
private readonly DbContextManager<ResourceDbContext> _dbContext;
public DBResourceSet(
IMemoryCache memoryCache,
IConfiguration configuration,
ILogger<DBResourceManager> logger,
DbContextManager<ResourceDbContext> 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<string, string> GetResources()
{
var key = $"{_fileName}/{_culture}";
if (_cache.Get(key) is not Dictionary<string, string> dic)
{
lock (_locker)
{
dic = _cache.Get(key) as Dictionary<string, string>;
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<string, string> 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;
}
}

View File

@ -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();

View File

@ -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<UserGroupRef>(_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));
}
}

View File

@ -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> AccountLinks { get; set; }
protected override Dictionary<Provider, Func<BaseDbContext>> ProviderContext
{
get
{
return new Dictionary<Provider, Func<BaseDbContext>>()
{
{ Provider.MySql, () => new MySqlAccountLinkContext() } ,
{ Provider.PostgreSql, () => new PostgreSqlAccountLinkContext() } ,
};
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper

View File

@ -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<Provider, Func<BaseDbContext>> 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<IMigrationsSqlGenerator, CustomMySqlMigrationsSqlGenerator>();
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;
}
}

View File

@ -26,31 +26,17 @@
namespace ASC.Core.Common.EF;
public class MySqlCoreDbContext : CoreDbContext { }
public class PostgreSqlCoreDbContext : CoreDbContext { }
public class CoreDbContext : BaseDbContext
{
public DbSet<DbTariff> Tariffs { get; set; }
public DbSet<DbButton> Buttons { get; set; }
public DbSet<DbQuota> Quotas { get; set; }
public DbSet<DbQuotaRow> QuotaRows { get; set; }
protected override Dictionary<Provider, Func<BaseDbContext>> ProviderContext
{
get
{
return new Dictionary<Provider, Func<BaseDbContext>>()
{
{ Provider.MySql, () => new MySqlCoreDbContext() } ,
{ Provider.PostgreSql, () => new PostgreSqlCoreDbContext() } ,
};
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper
.From(modelBuilder, _provider)
.AddDbButton()
.AddDbButton()
.AddDbQuotaRow()
.AddDbQuota()
.AddDbTariff();

View File

@ -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> MobileAppInstall { get; set; }
public DbSet<DbipLocation> DbipLocation { get; set; }
public DbSet<Regions> Regions { get; set; }
public DbContext() { }
public DbContext(DbContextOptions options) : base(options) { }
protected override Dictionary<Provider, Func<BaseDbContext>> ProviderContext
public CustomDbContext()
{
get
{
return new Dictionary<Provider, Func<BaseDbContext>>()
{
{ 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<DbContext>();
}
}
public CustomDbContext(DbContextOptions<CustomDbContext> options) : base(options)
{
}
public DbSet<MobileAppInstall> MobileAppInstall { get; set; }
public DbSet<DbipLocation> DbipLocation { get; set; }
public DbSet<Regions> 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<CustomDbContext>();
}
}

View File

@ -29,19 +29,14 @@ namespace ASC.Core.Common.EF;
public class BaseDbContextManager<T> : OptionsManager<T>, IDisposable where T : class, IDisposable, IAsyncDisposable, new()
{
private readonly Dictionary<string, T> _pairs;
private readonly MigrationHistory _migrationHistory;
private readonly List<T> _asyncList;
private readonly IOptionsFactory<T> _factory;
private readonly IConfiguration _configuration;
public BaseDbContextManager(IOptionsFactory<T> factory, IConfiguration configuration,
MigrationHistory migrationHistory) : base(factory)
public BaseDbContextManager(IOptionsFactory<T> factory) : base(factory)
{
_pairs = new Dictionary<string, T>();
_asyncList = new List<T>();
_factory = factory;
_configuration = configuration;
_migrationHistory = migrationHistory;
}
public override T Get(string name)
@ -50,15 +45,6 @@ public class BaseDbContextManager<T> : OptionsManager<T>, 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<T> : OptionsManager<T>, IDisposable where T :
[Scope(typeof(ConfigureDbContext<>))]
public class DbContextManager<T> : BaseDbContextManager<T> where T : BaseDbContext, new()
{
public DbContextManager(IOptionsFactory<T> factory, IConfiguration configuration,
MigrationHistory migrationHistory) : base(factory, configuration, migrationHistory)
public DbContextManager(IOptionsFactory<T> factory) : base(factory)
{
}
}
public class MultiRegionalDbContextManager<T> : BaseDbContextManager<MultiRegionalDbContext<T>> where T : BaseDbContext, new()
{
public MultiRegionalDbContextManager(IOptionsFactory<MultiRegionalDbContext<T>> factory, IConfiguration configuration,
MigrationHistory migrationHistory) : base(factory, configuration, migrationHistory)
public MultiRegionalDbContextManager(IOptionsFactory<MultiRegionalDbContext<T>> factory) : base(factory)
{
}
}

View File

@ -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> MailboxServer { get; set; }
public DbSet<ServerServer> ServerServer { get; set; }
public DbSet<MailboxProvider> MailboxProvider { get; set; }
public DbSet<Mailbox> Mailbox { get; set; }
public DbSet<ApiKeys> ApiKeys { get; set; }
public DbSet<GreyListingWhiteList> GreyListingWhiteList { get; set; }
public MailDbContext() { }
public MailDbContext(DbContextOptions options) : base(options) { }
protected override Dictionary<Provider, Func<BaseDbContext>> ProviderContext
{
get
{
return new Dictionary<Provider, Func<BaseDbContext>>()
{
{ 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<MailDbContext>();
}
}

View File

@ -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> NotifyInfo { get; set; }
public DbSet<NotifyQueue> NotifyQueue { get; set; }
protected override Dictionary<Provider, Func<BaseDbContext>> ProviderContext
{
get
{
return new Dictionary<Provider, Func<BaseDbContext>>()
{
{ Provider.MySql, () => new MySqlNotifyDbContext() } ,
{ Provider.PostgreSql, () => new PostgreSqlNotifyDbContext() } ,
};
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{

View File

@ -26,30 +26,10 @@
namespace ASC.Core.Common.EF.Context;
public class MySqlTelegramDbContext : TelegramDbContext { }
public class PostgreSqlTelegramDbContext : TelegramDbContext { }
public class TelegramDbContext : BaseDbContext
{
public DbSet<TelegramUser> Users { get; set; }
public TelegramDbContext() { }
public TelegramDbContext(DbContextOptions<TelegramDbContext> options)
: base(options)
{
}
protected override Dictionary<Provider, Func<BaseDbContext>> ProviderContext
{
get
{
return new Dictionary<Provider, Func<BaseDbContext>>()
{
{ Provider.MySql, () => new MySqlTelegramDbContext() } ,
{ Provider.PostgreSql, () => new PostgreSqlTelegramDbContext() } ,
};
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper

View File

@ -26,8 +26,6 @@
namespace ASC.Core.Common.EF.Context;
public class MySqlTenantDbContext : TenantDbContext { }
public class PostgreSqlTenantDbContext : TenantDbContext { }
public class TenantDbContext : BaseDbContext
{
public DbSet<DbTenant> Tenants { get; set; }
@ -37,24 +35,6 @@ public class TenantDbContext : BaseDbContext
public DbSet<TenantIpRestrictions> TenantIpRestrictions { get; set; }
public DbSet<DbCoreSettings> CoreSettings { get; set; }
public TenantDbContext() { }
public TenantDbContext(DbContextOptions<TenantDbContext> options)
: base(options)
{
}
protected override Dictionary<Provider, Func<BaseDbContext>> ProviderContext
{
get
{
return new Dictionary<Provider, Func<BaseDbContext>>()
{
{ Provider.MySql, () => new MySqlTenantDbContext() } ,
{ Provider.PostgreSql, () => new PostgreSqlTenantDbContext() } ,
};
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper

View File

@ -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> FilesConverts { get; set; }
protected override Dictionary<Provider, Func<BaseDbContext>> ProviderContext
{
get
{
return new Dictionary<Provider, Func<BaseDbContext>>()
{
{ 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<FilesDbContext>();
}
}
public class UrlShortenerFakeDbContext : BaseDbContext
{
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper
.From(modelBuilder, _provider)
.AddShortLinks();
}
}

View File

@ -26,9 +26,6 @@
namespace ASC.Core.Common.EF;
public class MySqlUserDbContext : UserDbContext { }
public class PostgreSqlUserDbContext : UserDbContext { }
public class UserDbContext : BaseDbContext
{
public DbSet<User> Users { get; set; }
@ -41,18 +38,6 @@ public class UserDbContext : BaseDbContext
public DbSet<DbSubscriptionMethod> SubscriptionMethods { get; set; }
public DbSet<UserDav> UsersDav { get; set; }
protected override Dictionary<Provider, Func<BaseDbContext>> ProviderContext
{
get
{
return new Dictionary<Provider, Func<BaseDbContext>>()
{
{ Provider.MySql, () => new MySqlUserDbContext() } ,
{ Provider.PostgreSql, () => new PostgreSqlUserDbContext() } ,
};
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper

View File

@ -26,8 +26,6 @@
namespace ASC.Core.Common.EF.Context;
public class MySqlWebstudioDbContext : WebstudioDbContext { }
public class PostgreSqlWebstudioDbContext : WebstudioDbContext { }
public class WebstudioDbContext : BaseDbContext
{
public DbSet<DbTenant> Tenants { get; set; }
@ -35,18 +33,6 @@ public class WebstudioDbContext : BaseDbContext
public DbSet<DbWebstudioUserVisit> WebstudioUserVisit { get; set; }
public DbSet<DbWebstudioIndex> WebstudioIndex { get; set; }
protected override Dictionary<Provider, Func<BaseDbContext>> ProviderContext
{
get
{
return new Dictionary<Provider, Func<BaseDbContext>>()
{
{ Provider.MySql, () => new MySqlWebstudioDbContext() } ,
{ Provider.PostgreSql, () => new PostgreSqlWebstudioDbContext() } ,
};
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper

View File

@ -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<MigrationCommand> Generate(IReadOnlyList<MigrationOperation> 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<MigrationOperation> 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;
}
}
}

View File

@ -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");

View File

@ -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<CrmContact>(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)

View File

@ -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");

View File

@ -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()

View File

@ -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");

View File

@ -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)

View File

@ -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)

View File

@ -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");

View File

@ -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)

View File

@ -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<DbipLocation>(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")

View File

@ -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")

View File

@ -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<Mailbox>(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<Mailbox>(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'");
});
}
}

View File

@ -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<MailboxProvider>(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<MailboxProvider>(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);
});
}
}

View File

@ -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<ServerServer>(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<ServerServer>(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");
});
}
}

View File

@ -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")

View File

@ -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)

View File

@ -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");

View File

@ -48,6 +48,7 @@ public static class RegionsExtension
{
modelBuilder.Entity<Regions>(entity =>
{
entity.HasCharSet("utf8");
entity.HasKey(e => e.Region);
});
}

View File

@ -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<ShortLinks>(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<ShortLinks>(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);
});
}
}

View File

@ -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)

View File

@ -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");

View File

@ -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)

View File

@ -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")

View File

@ -50,7 +50,8 @@ public static class DbTariffExtension
{
modelBuilder.Entity<DbTariff>(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")

View File

@ -53,9 +53,9 @@ public class DbTenant : IMapFrom<Tenant>
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<DbTenant>(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")

View File

@ -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")

View File

@ -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")

View File

@ -50,11 +50,16 @@ public static class DbTenantVersionExtension
{
modelBuilder.Entity<DbTenantVersion>(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'");
});
}

View File

@ -48,7 +48,8 @@ public static class TenantIpRestrictionsExtension
{
modelBuilder.Entity<TenantIpRestrictions>(entity =>
{
entity.ToTable("tenants_iprestrictions");
entity.ToTable("tenants_iprestrictions")
.HasCharSet("utf8");
entity.HasIndex(e => e.Tenant)
.HasDatabaseName("tenant");

View File

@ -58,7 +58,8 @@ public static class DbGroupExtension
{
modelBuilder.Entity<DbGroup>(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")

View File

@ -53,7 +53,6 @@ public class User : BaseEntity, IMapFrom<UserInfo>
public bool Removed { get; set; }
public DateTime CreateDate { get; set; }
public DateTime LastModified { get; set; }
public List<UserGroup> 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<User>(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")

View File

@ -29,14 +29,14 @@ namespace ASC.Core.Common.EF;
public class UserGroup : BaseEntity, IMapFrom<UserGroupRef>
{
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<UserGroup>(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<UserGroup>(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);

View File

@ -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");

View File

@ -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")

View File

@ -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<GeolocationHelper> _logger;
private readonly DbContext _dbContext;
private readonly CustomDbContext _dbContext;
public GeolocationHelper(DbContextManager<DbContext> dbContext, ILogger<GeolocationHelper> logger)
public GeolocationHelper(DbContextManager<CustomDbContext> dbContext, ILogger<GeolocationHelper> 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();

View File

@ -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;

View File

@ -73,7 +73,39 @@ internal static class InstanceRegistrationExtension
}
public static void PgSqlAddInstanceRegistration(this ModelBuilder modelBuilder)
{
throw new NotImplementedException();
{
modelBuilder.Entity<InstanceRegistration>(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");
});
}
}

View File

@ -26,9 +26,6 @@
namespace ASC.Core.Common.Hosting;
public class MySqlIntegrationEventLogContext : InstanceRegistrationContext { }
public class PostgreSqlIntegrationEventLogContext : InstanceRegistrationContext { }
public class InstanceRegistrationContext : BaseDbContext
{
public DbSet<InstanceRegistration> InstanceRegistrations { get; set; }
@ -39,16 +36,4 @@ public class InstanceRegistrationContext : BaseDbContext
.AddInstanceRegistration();
}
protected override Dictionary<Provider, Func<BaseDbContext>> ProviderContext
{
get
{
return new Dictionary<Provider, Func<BaseDbContext>>()
{
{ Provider.MySql, () => new MySqlIntegrationEventLogContext() } ,
{ Provider.PostgreSql, () => new PostgreSqlIntegrationEventLogContext() } ,
};
}
}
}

View File

@ -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<DBResourceManager> 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<DBResourceManager> 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<DBResourceManager> logger, string fileName, string culture, string name, Exception exception);
[LoggerMessage(Level = LogLevel.Error, Message = "DBResourceSet")]
public static partial void ErrorDBResourceSet(this ILogger<DBResourceManager> logger, Exception exception);
[LoggerMessage(Level = LogLevel.Error, Message = "SetNewText")]
public static partial void ErrorSetNewText(this ILogger logger, Exception exception);

View File

@ -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<EventMessage>
{
@ -54,17 +54,20 @@ public static class AuditEventExtension
{
modelBuilder.Entity<AuditEvent>(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");

View File

@ -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<string> Description { get; set; }
public MessageTarget Target { get; set; }
public string UAHeader { get; set; }
public string UAHeader { get; set; }
public bool Active { get; set; }
}

View File

@ -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]

View File

@ -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<EventMessage>
{
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<LoginEvent>(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)

View File

@ -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<EventMessage>
{
@ -34,8 +34,8 @@ public class MessageEvent : IMapFrom<EventMessage>
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; }
}

View File

@ -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>(T value)
{
var res = new List<string>(1);
if (value != null)
{
res.Add(value.ToString());
}
return new MessageTarget(_option)
{
_items = res
{
var res = new List<string>(1);
if (value != null)
{
res.Add(value.ToString());
}
return new MessageTarget(_option)
{
_items = res
};
}
public MessageTarget CreateFromGroupValues(IEnumerable<string> value)
{
var res = new MessageTarget(_option)
{
_items = new List<string>()
};
if (value != null)
{
res._items = value.Select(r => r.ToString()).ToList();
}
{
var res = new MessageTarget(_option)
{
_items = new List<string>()
};
if (value != null)
{
res._items = value.Select(r => r.ToString()).ToList();
}
return res;
}
@ -86,7 +86,7 @@ public class MessageTarget
{
_items = items
};
}
}
public IEnumerable<string> GetItems() { return _items.ToList(); }
public override string ToString()
{

View File

@ -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<DbTenant> Tenants { get; set; }
public DbSet<User> Users { get; set; }
protected override Dictionary<Provider, Func<BaseDbContext>> ProviderContext
{
get
{
return new Dictionary<Provider, Func<BaseDbContext>>()
{
{ Provider.MySql, () => new MySqlMessagesContext() } ,
{ Provider.PostgreSql, () => new PostgreSqlMessagesContext() } ,
};
}
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
ModelBuilderWrapper

View File

@ -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<string>(type: "varchar(200)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
uid = table.Column<string>(type: "varchar(200)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
provider = table.Column<string>(type: "char(60)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
profile = table.Column<string>(type: "text", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
linked = table.Column<DateTime>(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");
}
}

View File

@ -1,57 +0,0 @@
// <auto-generated />
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<string>("Id")
.HasColumnType("varchar(200)")
.HasColumnName("id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("UId")
.HasColumnType("varchar(200)")
.HasColumnName("uid")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("Linked")
.HasColumnType("datetime")
.HasColumnName("linked");
b.Property<string>("Profile")
.IsRequired()
.HasColumnType("text")
.HasColumnName("profile")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("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
}
}
}

View File

@ -1,194 +0,0 @@
// <auto-generated />
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<int>("TariffId")
.HasColumnType("int")
.HasColumnName("tariff_id");
b.Property<string>("PartnerId")
.HasColumnType("varchar(50)")
.HasColumnName("partner_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("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<int>("Tenant")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("tenant");
b.Property<int>("ActiveUsers")
.HasColumnType("int")
.HasColumnName("active_users");
b.Property<string>("AvangateId")
.HasColumnType("varchar(128)")
.HasColumnName("avangate_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Description")
.HasColumnType("varchar(128)")
.HasColumnName("description")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Features")
.HasColumnType("text")
.HasColumnName("features")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<long>("MaxFileSize")
.HasColumnType("bigint")
.HasColumnName("max_file_size");
b.Property<long>("MaxTotalSize")
.HasColumnType("bigint")
.HasColumnName("max_total_size");
b.Property<string>("Name")
.HasColumnType("varchar(128)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<decimal>("Price")
.HasColumnType("decimal(10,2)")
.HasColumnName("price");
b.Property<bool>("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<int>("Tenant")
.HasColumnType("int")
.HasColumnName("tenant");
b.Property<string>("Path")
.HasColumnType("varchar(255)")
.HasColumnName("path")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<long>("Counter")
.HasColumnType("bigint")
.HasColumnName("counter");
b.Property<DateTime>("LastModified")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp")
.HasColumnName("last_modified")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.Property<string>("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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("Comment")
.HasColumnType("varchar(255)")
.HasColumnName("comment")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("CreateOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("timestamp")
.HasColumnName("create_on")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.Property<int>("Quantity")
.HasColumnType("int")
.HasColumnName("quantity");
b.Property<DateTime>("Stamp")
.HasColumnType("datetime")
.HasColumnName("stamp");
b.Property<int>("Tariff")
.HasColumnType("int")
.HasColumnName("tariff");
b.Property<int>("Tenant")
.HasColumnType("int")
.HasColumnName("tenant");
b.HasKey("Id");
b.HasIndex("Tenant")
.HasDatabaseName("tenant");
b.ToTable("tenants_tariff");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -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<int>(type: "int", nullable: false),
partner_id = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
button_url = table.Column<string>(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<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
name = table.Column<string>(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
description = table.Column<string>(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
max_file_size = table.Column<long>(type: "bigint", nullable: false),
max_total_size = table.Column<long>(type: "bigint", nullable: false),
active_users = table.Column<int>(type: "int", nullable: false),
features = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
price = table.Column<decimal>(type: "decimal(10,2)", nullable: false),
avangate_id = table.Column<string>(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
visible = table.Column<bool>(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<int>(type: "int", nullable: false),
path = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
counter = table.Column<long>(type: "bigint", nullable: false),
tag = table.Column<string>(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
last_modified = table.Column<DateTime>(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<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
tenant = table.Column<int>(type: "int", nullable: false),
tariff = table.Column<int>(type: "int", nullable: false),
stamp = table.Column<DateTime>(type: "datetime", nullable: false),
quantity = table.Column<int>(type: "int", nullable: false),
comment = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
create_on = table.Column<DateTime>(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");
}
}

View File

@ -1,193 +0,0 @@
// <auto-generated />
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<int>("TariffId")
.HasColumnType("int")
.HasColumnName("tariff_id");
b.Property<string>("PartnerId")
.HasColumnType("varchar(50)")
.HasColumnName("partner_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("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<int>("Tenant")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("tenant");
b.Property<int>("ActiveUsers")
.HasColumnType("int")
.HasColumnName("active_users");
b.Property<string>("AvangateId")
.HasColumnType("varchar(128)")
.HasColumnName("avangate_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Description")
.HasColumnType("varchar(128)")
.HasColumnName("description")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Features")
.HasColumnType("text")
.HasColumnName("features")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<long>("MaxFileSize")
.HasColumnType("bigint")
.HasColumnName("max_file_size");
b.Property<long>("MaxTotalSize")
.HasColumnType("bigint")
.HasColumnName("max_total_size");
b.Property<string>("Name")
.HasColumnType("varchar(128)")
.HasColumnName("name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<decimal>("Price")
.HasColumnType("decimal(10,2)")
.HasColumnName("price");
b.Property<bool>("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<int>("Tenant")
.HasColumnType("int")
.HasColumnName("tenant");
b.Property<string>("Path")
.HasColumnType("varchar(255)")
.HasColumnName("path")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<long>("Counter")
.HasColumnType("bigint")
.HasColumnName("counter");
b.Property<DateTime>("LastModified")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp")
.HasColumnName("last_modified")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.Property<string>("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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("Comment")
.HasColumnType("varchar(255)")
.HasColumnName("comment")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("CreateOn")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("timestamp")
.HasColumnName("create_on")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.Property<int>("Quantity")
.HasColumnType("int")
.HasColumnName("quantity");
b.Property<DateTime>("Stamp")
.HasColumnType("datetime")
.HasColumnName("stamp");
b.Property<int>("Tariff")
.HasColumnType("int")
.HasColumnName("tariff");
b.Property<int>("Tenant")
.HasColumnType("int")
.HasColumnName("tenant");
b.HasKey("Id");
b.HasIndex("Tenant")
.HasDatabaseName("tenant");
b.ToTable("tenants_tariff");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,155 +0,0 @@
// <auto-generated />
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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("AddrType")
.IsRequired()
.HasColumnType("enum('ipv4','ipv6')")
.HasColumnName("addr_type")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("City")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("city")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Country")
.IsRequired()
.HasColumnType("varchar(2)")
.HasColumnName("country")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("District")
.HasColumnType("varchar(255)")
.HasColumnName("district")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("GeonameId")
.HasColumnType("int")
.HasColumnName("geoname_id");
b.Property<string>("IPEnd")
.IsRequired()
.HasColumnType("varchar(39)")
.HasColumnName("ip_end")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("IPStart")
.IsRequired()
.HasColumnType("varchar(39)")
.HasColumnName("ip_start")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<long>("Latitude")
.HasColumnType("bigint")
.HasColumnName("latitude");
b.Property<long>("Longitude")
.HasColumnType("bigint")
.HasColumnName("longitude");
b.Property<int>("Processed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("processed")
.HasDefaultValueSql("'1'");
b.Property<string>("StateProv")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("stateprov")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("TimezoneName")
.HasColumnType("varchar(255)")
.HasColumnName("timezone_name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<double>("TimezoneOffset")
.HasColumnType("double")
.HasColumnName("timezone_offset");
b.Property<string>("ZipCode")
.HasColumnType("varchar(255)")
.HasColumnName("zipcode")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("Id");
b.HasIndex("IPStart")
.HasDatabaseName("ip_start");
b.ToTable("dbip_location");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.MobileAppInstall", b =>
{
b.Property<string>("UserEmail")
.HasColumnType("varchar(255)")
.HasColumnName("user_email")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("AppType")
.HasColumnType("int")
.HasColumnName("app_type");
b.Property<DateTime>("LastSign")
.HasColumnType("datetime")
.HasColumnName("last_sign");
b.Property<DateTime>("RegisteredOn")
.HasColumnType("datetime")
.HasColumnName("registered_on");
b.HasKey("UserEmail", "AppType")
.HasName("PRIMARY");
b.ToTable("mobile_app_install");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Regions", b =>
{
b.Property<string>("ConnectionString")
.HasColumnType("longtext");
b.Property<string>("Provider")
.HasColumnType("longtext");
b.Property<string>("Region")
.HasColumnType("longtext");
b.ToTable("Regions");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,122 +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.DbContextMySql;
public partial class DbContextMySql : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "dbip_location",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
addr_type = table.Column<string>(type: "enum('ipv4','ipv6')", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
ip_start = table.Column<string>(type: "varchar(39)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
ip_end = table.Column<string>(type: "varchar(39)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
country = table.Column<string>(type: "varchar(2)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
stateprov = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
district = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
city = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
zipcode = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
latitude = table.Column<long>(type: "bigint", nullable: false),
longitude = table.Column<long>(type: "bigint", nullable: false),
geoname_id = table.Column<int>(type: "int", nullable: false),
timezone_offset = table.Column<double>(type: "double", nullable: false),
timezone_name = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
processed = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'")
},
constraints: table =>
{
table.PrimaryKey("PK_dbip_location", x => x.id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "mobile_app_install",
columns: table => new
{
user_email = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
app_type = table.Column<int>(type: "int", nullable: false),
registered_on = table.Column<DateTime>(type: "datetime", nullable: false),
last_sign = table.Column<DateTime>(type: "datetime", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.user_email, x.app_type });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Regions",
columns: table => new
{
Region = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Provider = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ConnectionString = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_Regions", x => x.Region);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "ip_start",
table: "dbip_location",
column: "ip_start");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "dbip_location");
migrationBuilder.DropTable(
name: "mobile_app_install");
migrationBuilder.DropTable(
name: "Regions");
}
}

View File

@ -1,156 +0,0 @@
// <auto-generated />
namespace ASC.Core.Common.Migrations.MySql.DbContextMySql
{
[DbContext(typeof(MySqlDbContext))]
partial class MySqlDbContextModelSnapshot : 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.Model.DbipLocation", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("AddrType")
.IsRequired()
.HasColumnType("enum('ipv4','ipv6')")
.HasColumnName("addr_type")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("City")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("city")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Country")
.IsRequired()
.HasColumnType("varchar(2)")
.HasColumnName("country")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("District")
.HasColumnType("varchar(255)")
.HasColumnName("district")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("GeonameId")
.HasColumnType("int")
.HasColumnName("geoname_id");
b.Property<string>("IPEnd")
.IsRequired()
.HasColumnType("varchar(39)")
.HasColumnName("ip_end")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("IPStart")
.IsRequired()
.HasColumnType("varchar(39)")
.HasColumnName("ip_start")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<long>("Latitude")
.HasColumnType("bigint")
.HasColumnName("latitude");
b.Property<long>("Longitude")
.HasColumnType("bigint")
.HasColumnName("longitude");
b.Property<int>("Processed")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("processed")
.HasDefaultValueSql("'1'");
b.Property<string>("StateProv")
.IsRequired()
.HasColumnType("varchar(255)")
.HasColumnName("stateprov")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("TimezoneName")
.HasColumnType("varchar(255)")
.HasColumnName("timezone_name")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<double>("TimezoneOffset")
.HasColumnType("double")
.HasColumnName("timezone_offset");
b.Property<string>("ZipCode")
.HasColumnType("varchar(255)")
.HasColumnName("zipcode")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("Id");
b.HasIndex("IPStart")
.HasDatabaseName("ip_start");
b.ToTable("dbip_location");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.MobileAppInstall", b =>
{
b.Property<string>("UserEmail")
.HasColumnType("varchar(255)")
.HasColumnName("user_email")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("AppType")
.HasColumnType("int")
.HasColumnName("app_type");
b.Property<DateTime>("LastSign")
.HasColumnType("datetime")
.HasColumnName("last_sign");
b.Property<DateTime>("RegisteredOn")
.HasColumnType("datetime")
.HasColumnName("registered_on");
b.HasKey("UserEmail", "AppType")
.HasName("PRIMARY");
b.ToTable("mobile_app_install");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Regions", b =>
{
b.Property<string>("Region")
.HasColumnType("varchar(255)");
b.Property<string>("ConnectionString")
.HasColumnType("longtext");
b.Property<string>("Provider")
.HasColumnType("longtext");
b.HasKey("Region");
b.ToTable("Regions");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,389 +0,0 @@
// <auto-generated />
namespace ASC.Core.Common.Migrations.MySql.FilesDbContextMySql
{
[DbContext(typeof(MySqlFilesDbContext))]
[Migration("20211012145330_FilesDbContextMySql")]
partial class FilesDbContextMySql
{
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.FilesConverts", b =>
{
b.Property<string>("Input")
.HasColumnType("varchar(50)")
.HasColumnName("input")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Output")
.HasColumnType("varchar(50)")
.HasColumnName("output")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("Input", "Output")
.HasName("PRIMARY");
b.ToTable("files_converts");
b.HasData(
new { Input = ".csv", Output = ".ods"},
new { Input = ".csv", Output = ".ots"},
new { Input = ".csv", Output = ".pdf"},
new { Input = ".csv", Output = ".xlsm"},
new { Input = ".csv", Output = ".xlsx"},
new { Input = ".csv", Output = ".xltm"},
new { Input = ".csv", Output = ".xltx"},
new { Input = ".doc", Output = ".docm"},
new { Input = ".doc", Output = ".docx"},
new { Input = ".doc", Output = ".dotm"},
new { Input = ".doc", Output = ".dotx"},
new { Input = ".doc", Output = ".epub"},
new { Input = ".doc", Output = ".fb2"},
new { Input = ".doc", Output = ".html"},
new { Input = ".doc", Output = ".odt"},
new { Input = ".doc", Output = ".ott"},
new { Input = ".doc", Output = ".pdf"},
new { Input = ".doc", Output = ".rtf"},
new { Input = ".doc", Output = ".txt"},
new { Input = ".docm", Output = ".docx"},
new { Input = ".docm", Output = ".dotm"},
new { Input = ".docm", Output = ".dotx"},
new { Input = ".docm", Output = ".epub"},
new { Input = ".docm", Output = ".fb2"},
new { Input = ".docm", Output = ".html"},
new { Input = ".docm", Output = ".odt"},
new { Input = ".docm", Output = ".ott"},
new { Input = ".docm", Output = ".pdf"},
new { Input = ".docm", Output = ".rtf"},
new { Input = ".docm", Output = ".txt"},
new { Input = ".doct", Output = ".docx"},
new { Input = ".docx", Output = ".docm"},
new { Input = ".docx", Output = ".docxf"},
new { Input = ".docx", Output = ".dotm"},
new { Input = ".docx", Output = ".dotx"},
new { Input = ".docx", Output = ".epub"},
new { Input = ".docx", Output = ".fb2"},
new { Input = ".docx", Output = ".html"},
new { Input = ".docx", Output = ".odt"},
new { Input = ".docx", Output = ".ott"},
new { Input = ".docx", Output = ".pdf"},
new { Input = ".docx", Output = ".rtf"},
new { Input = ".docx", Output = ".txt"},
new { Input = ".docxf", Output = ".docx"},
new { Input = ".docxf", Output = ".dotx"},
new { Input = ".docxf", Output = ".epub"},
new { Input = ".docxf", Output = ".fb2"},
new { Input = ".docxf", Output = ".html"},
new { Input = ".docxf", Output = ".odt"},
new { Input = ".docxf", Output = ".oform"},
new { Input = ".docxf", Output = ".ott"},
new { Input = ".docxf", Output = ".pdf"},
new { Input = ".docxf", Output = ".rtf"},
new { Input = ".docxf", Output = ".txt"},
new { Input = ".dot", Output = ".docm"},
new { Input = ".dot", Output = ".docx"},
new { Input = ".dot", Output = ".dotm"},
new { Input = ".dot", Output = ".dotx"},
new { Input = ".dot", Output = ".epub"},
new { Input = ".dot", Output = ".fb2"},
new { Input = ".dot", Output = ".html"},
new { Input = ".dot", Output = ".odt"},
new { Input = ".dot", Output = ".ott"},
new { Input = ".dot", Output = ".pdf"},
new { Input = ".dot", Output = ".rtf"},
new { Input = ".dot", Output = ".txt"},
new { Input = ".dotm", Output = ".docm"},
new { Input = ".dotm", Output = ".docx"},
new { Input = ".dotm", Output = ".dotx"},
new { Input = ".dotm", Output = ".epub"},
new { Input = ".dotm", Output = ".fb2"},
new { Input = ".dotm", Output = ".html"},
new { Input = ".dotm", Output = ".odt"},
new { Input = ".dotm", Output = ".ott"},
new { Input = ".dotm", Output = ".pdf"},
new { Input = ".dotm", Output = ".rtf"},
new { Input = ".dotm", Output = ".txt"},
new { Input = ".dotx", Output = ".docm"},
new { Input = ".dotx", Output = ".docx"},
new { Input = ".dotx", Output = ".dotm"},
new { Input = ".dotx", Output = ".epub"},
new { Input = ".dotx", Output = ".fb2"},
new { Input = ".dotx", Output = ".html"},
new { Input = ".dotx", Output = ".odt"},
new { Input = ".dotx", Output = ".ott"},
new { Input = ".dotx", Output = ".pdf"},
new { Input = ".dotx", Output = ".rtf"},
new { Input = ".dotx", Output = ".txt"},
new { Input = ".epub", Output = ".docm"},
new { Input = ".epub", Output = ".docx"},
new { Input = ".epub", Output = ".dotm"},
new { Input = ".epub", Output = ".dotx"},
new { Input = ".epub", Output = ".fb2"},
new { Input = ".epub", Output = ".html"},
new { Input = ".epub", Output = ".odt"},
new { Input = ".epub", Output = ".ott"},
new { Input = ".epub", Output = ".pdf"},
new { Input = ".epub", Output = ".rtf"},
new { Input = ".epub", Output = ".txt"},
new { Input = ".fb2", Output = ".docm"},
new { Input = ".fb2", Output = ".docx"},
new { Input = ".fb2", Output = ".dotm"},
new { Input = ".fb2", Output = ".dotx"},
new { Input = ".fb2", Output = ".epub"},
new { Input = ".fb2", Output = ".html"},
new { Input = ".fb2", Output = ".odt"},
new { Input = ".fb2", Output = ".ott"},
new { Input = ".fb2", Output = ".pdf"},
new { Input = ".fb2", Output = ".rtf"},
new { Input = ".fb2", Output = ".txt"},
new { Input = ".fodp", Output = ".odp"},
new { Input = ".fodp", Output = ".otp"},
new { Input = ".fodp", Output = ".pdf"},
new { Input = ".fodp", Output = ".potm"},
new { Input = ".fodp", Output = ".potx"},
new { Input = ".fodp", Output = ".pptm"},
new { Input = ".fodp", Output = ".pptx"},
new { Input = ".fods", Output = ".csv"},
new { Input = ".fods", Output = ".ods"},
new { Input = ".fods", Output = ".ots"},
new { Input = ".fods", Output = ".pdf"},
new { Input = ".fods", Output = ".xlsm"},
new { Input = ".fods", Output = ".xlsx"},
new { Input = ".fods", Output = ".xltm"},
new { Input = ".fods", Output = ".xltx"},
new { Input = ".fodt", Output = ".docm"},
new { Input = ".fodt", Output = ".docx"},
new { Input = ".fodt", Output = ".dotm"},
new { Input = ".fodt", Output = ".dotx"},
new { Input = ".fodt", Output = ".epub"},
new { Input = ".fodt", Output = ".fb2"},
new { Input = ".fodt", Output = ".html"},
new { Input = ".fodt", Output = ".odt"},
new { Input = ".fodt", Output = ".ott"},
new { Input = ".fodt", Output = ".pdf"},
new { Input = ".fodt", Output = ".rtf"},
new { Input = ".fodt", Output = ".txt"},
new { Input = ".html", Output = ".docm"},
new { Input = ".html", Output = ".docx"},
new { Input = ".html", Output = ".dotm"},
new { Input = ".html", Output = ".dotx"},
new { Input = ".html", Output = ".epub"},
new { Input = ".html", Output = ".fb2"},
new { Input = ".html", Output = ".odt"},
new { Input = ".html", Output = ".ott"},
new { Input = ".html", Output = ".pdf"},
new { Input = ".html", Output = ".rtf"},
new { Input = ".html", Output = ".txt"},
new { Input = ".mht", Output = ".docm"},
new { Input = ".mht", Output = ".docx"},
new { Input = ".mht", Output = ".dotm"},
new { Input = ".mht", Output = ".dotx"},
new { Input = ".mht", Output = ".epub"},
new { Input = ".mht", Output = ".fb2"},
new { Input = ".mht", Output = ".odt"},
new { Input = ".mht", Output = ".ott"},
new { Input = ".mht", Output = ".pdf"},
new { Input = ".mht", Output = ".rtf"},
new { Input = ".mht", Output = ".txt"},
new { Input = ".odp", Output = ".otp"},
new { Input = ".odp", Output = ".pdf"},
new { Input = ".odp", Output = ".potm"},
new { Input = ".odp", Output = ".potx"},
new { Input = ".odp", Output = ".pptm"},
new { Input = ".odp", Output = ".pptx"},
new { Input = ".otp", Output = ".odp"},
new { Input = ".otp", Output = ".pdf"},
new { Input = ".otp", Output = ".potm"},
new { Input = ".otp", Output = ".potx"},
new { Input = ".otp", Output = ".pptm"},
new { Input = ".otp", Output = ".pptx"},
new { Input = ".ods", Output = ".csv"},
new { Input = ".ods", Output = ".ots"},
new { Input = ".ods", Output = ".pdf"},
new { Input = ".ods", Output = ".xlsm"},
new { Input = ".ods", Output = ".xlsx"},
new { Input = ".ods", Output = ".xltm"},
new { Input = ".ods", Output = ".xltx"},
new { Input = ".ots", Output = ".csv"},
new { Input = ".ots", Output = ".ods"},
new { Input = ".ots", Output = ".pdf"},
new { Input = ".ots", Output = ".xlsm"},
new { Input = ".ots", Output = ".xlsx"},
new { Input = ".ots", Output = ".xltm"},
new { Input = ".ots", Output = ".xltx"},
new { Input = ".odt", Output = ".docm"},
new { Input = ".odt", Output = ".docx"},
new { Input = ".odt", Output = ".dotm"},
new { Input = ".odt", Output = ".dotx"},
new { Input = ".odt", Output = ".epub"},
new { Input = ".odt", Output = ".fb2"},
new { Input = ".odt", Output = ".html"},
new { Input = ".odt", Output = ".ott"},
new { Input = ".odt", Output = ".pdf"},
new { Input = ".odt", Output = ".rtf"},
new { Input = ".odt", Output = ".txt"},
new { Input = ".ott", Output = ".docm"},
new { Input = ".ott", Output = ".docx"},
new { Input = ".ott", Output = ".dotm"},
new { Input = ".ott", Output = ".dotx"},
new { Input = ".ott", Output = ".epub"},
new { Input = ".ott", Output = ".fb2"},
new { Input = ".ott", Output = ".html"},
new { Input = ".ott", Output = ".odt"},
new { Input = ".ott", Output = ".pdf"},
new { Input = ".ott", Output = ".rtf"},
new { Input = ".ott", Output = ".txt"},
new { Input = ".oxps", Output = ".pdf"},
new { Input = ".pot", Output = ".odp"},
new { Input = ".pot", Output = ".otp"},
new { Input = ".pot", Output = ".pdf"},
new { Input = ".pot", Output = ".pptm"},
new { Input = ".pot", Output = ".pptx"},
new { Input = ".pot", Output = ".potm"},
new { Input = ".pot", Output = ".potx"},
new { Input = ".potm", Output = ".odp"},
new { Input = ".potm", Output = ".otp"},
new { Input = ".potm", Output = ".pdf"},
new { Input = ".potm", Output = ".potx"},
new { Input = ".potm", Output = ".pptm"},
new { Input = ".potm", Output = ".pptx"},
new { Input = ".potx", Output = ".odp"},
new { Input = ".potx", Output = ".otp"},
new { Input = ".potx", Output = ".pdf"},
new { Input = ".potx", Output = ".potm"},
new { Input = ".potx", Output = ".pptm"},
new { Input = ".potx", Output = ".pptx"},
new { Input = ".pps", Output = ".odp"},
new { Input = ".pps", Output = ".otp"},
new { Input = ".pps", Output = ".pdf"},
new { Input = ".pps", Output = ".potm"},
new { Input = ".pps", Output = ".potx"},
new { Input = ".pps", Output = ".pptm"},
new { Input = ".pps", Output = ".pptx"},
new { Input = ".ppsm", Output = ".odp"},
new { Input = ".ppsm", Output = ".otp"},
new { Input = ".ppsm", Output = ".pdf"},
new { Input = ".ppsm", Output = ".potm"},
new { Input = ".ppsm", Output = ".potx"},
new { Input = ".ppsm", Output = ".pptm"},
new { Input = ".ppsm", Output = ".pptx"},
new { Input = ".ppsx", Output = ".odp"},
new { Input = ".ppsx", Output = ".otp"},
new { Input = ".ppsx", Output = ".pdf"},
new { Input = ".ppsx", Output = ".potm"},
new { Input = ".ppsx", Output = ".potx"},
new { Input = ".ppsx", Output = ".pptm"},
new { Input = ".ppsx", Output = ".pptx"},
new { Input = ".ppt", Output = ".odp"},
new { Input = ".ppt", Output = ".otp"},
new { Input = ".ppt", Output = ".pdf"},
new { Input = ".ppt", Output = ".potm"},
new { Input = ".ppt", Output = ".potx"},
new { Input = ".ppt", Output = ".pptm"},
new { Input = ".ppt", Output = ".pptx"},
new { Input = ".pptm", Output = ".odp"},
new { Input = ".pptm", Output = ".otp"},
new { Input = ".pptm", Output = ".pdf"},
new { Input = ".pptm", Output = ".potm"},
new { Input = ".pptm", Output = ".potx"},
new { Input = ".pptm", Output = ".pptx"},
new { Input = ".pptt", Output = ".pptx"},
new { Input = ".pptx", Output = ".odp"},
new { Input = ".pptx", Output = ".otp"},
new { Input = ".pptx", Output = ".pdf"},
new { Input = ".pptx", Output = ".potm"},
new { Input = ".pptx", Output = ".potx"},
new { Input = ".pptx", Output = ".pptm"},
new { Input = ".rtf", Output = ".docm"},
new { Input = ".rtf", Output = ".docx"},
new { Input = ".rtf", Output = ".dotm"},
new { Input = ".rtf", Output = ".dotx"},
new { Input = ".rtf", Output = ".epub"},
new { Input = ".rtf", Output = ".fb2"},
new { Input = ".rtf", Output = ".html"},
new { Input = ".rtf", Output = ".odt"},
new { Input = ".rtf", Output = ".ott"},
new { Input = ".rtf", Output = ".pdf"},
new { Input = ".rtf", Output = ".txt"},
new { Input = ".txt", Output = ".docm"},
new { Input = ".txt", Output = ".docx"},
new { Input = ".txt", Output = ".dotm"},
new { Input = ".txt", Output = ".dotx"},
new { Input = ".txt", Output = ".epub"},
new { Input = ".txt", Output = ".fb2"},
new { Input = ".txt", Output = ".html"},
new { Input = ".txt", Output = ".odt"},
new { Input = ".txt", Output = ".ott"},
new { Input = ".txt", Output = ".pdf"},
new { Input = ".txt", Output = ".rtf"},
new { Input = ".xls", Output = ".csv"},
new { Input = ".xls", Output = ".ods"},
new { Input = ".xls", Output = ".ots"},
new { Input = ".xls", Output = ".pdf"},
new { Input = ".xls", Output = ".xlsm"},
new { Input = ".xls", Output = ".xlsx"},
new { Input = ".xls", Output = ".xltm"},
new { Input = ".xls", Output = ".xltx"},
new { Input = ".xlsm", Output = ".csv"},
new { Input = ".xlsm", Output = ".ods"},
new { Input = ".xlsm", Output = ".ots"},
new { Input = ".xlsm", Output = ".pdf"},
new { Input = ".xlsm", Output = ".xlsx"},
new { Input = ".xlsm", Output = ".xltm"},
new { Input = ".xlsm", Output = ".xltx"},
new { Input = ".xlst", Output = ".xlsx"},
new { Input = ".xlsx", Output = ".csv"},
new { Input = ".xlsx", Output = ".ods"},
new { Input = ".xlsx", Output = ".ots"},
new { Input = ".xlsx", Output = ".pdf"},
new { Input = ".xlsx", Output = ".xlsm"},
new { Input = ".xlsx", Output = ".xltm"},
new { Input = ".xlsx", Output = ".xltx"},
new { Input = ".xlt", Output = ".csv"},
new { Input = ".xlt", Output = ".ods"},
new { Input = ".xlt", Output = ".ots"},
new { Input = ".xlt", Output = ".pdf"},
new { Input = ".xlt", Output = ".xlsm"},
new { Input = ".xlt", Output = ".xlsx"},
new { Input = ".xlt", Output = ".xltm"},
new { Input = ".xlt", Output = ".xltx"},
new { Input = ".xltm", Output = ".csv"},
new { Input = ".xltm", Output = ".ods"},
new { Input = ".xltm", Output = ".ots"},
new { Input = ".xltm", Output = ".pdf"},
new { Input = ".xltm", Output = ".xlsm"},
new { Input = ".xltm", Output = ".xlsx"},
new { Input = ".xltm", Output = ".xltx"},
new { Input = ".xltx", Output = ".csv"},
new { Input = ".xltx", Output = ".ods"},
new { Input = ".xltx", Output = ".ots"},
new { Input = ".xltx", Output = ".pdf"},
new { Input = ".xltx", Output = ".xlsm"},
new { Input = ".xltx", Output = ".xlsx"},
new { Input = ".xltx", Output = ".xltm"},
new { Input = ".xml", Output = ".docm"},
new { Input = ".xml", Output = ".docx"},
new { Input = ".xml", Output = ".dotm"},
new { Input = ".xml", Output = ".dotx"},
new { Input = ".xml", Output = ".epub"},
new { Input = ".xml", Output = ".fb2"},
new { Input = ".xml", Output = ".html"},
new { Input = ".xml", Output = ".odt"},
new { Input = ".xml", Output = ".ott"},
new { Input = ".xml", Output = ".pdf"},
new { Input = ".xml", Output = ".rtf"},
new { Input = ".xml", Output = ".txt"},
new { Input = ".xps", Output = ".pdf"}
);
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,412 +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.FilesDbContextMySql;
public partial class FilesDbContextMySql : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "files_converts",
columns: table => new
{
input = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
output = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.input, x.output });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.InsertData(
table: "files_converts",
columns: new[] { "input", "output" },
values: new object[,]
{
{".csv", ".ods"},
{".csv", ".ots"},
{".csv", ".pdf"},
{".csv", ".xlsm"},
{".csv", ".xlsx"},
{".csv", ".xltm"},
{".csv", ".xltx"},
{".doc", ".docm"},
{".doc", ".docx"},
{".doc", ".dotm"},
{".doc", ".dotx"},
{".doc", ".epub"},
{".doc", ".fb2"},
{".doc", ".html"},
{".doc", ".odt"},
{".doc", ".ott"},
{".doc", ".pdf"},
{".doc", ".rtf"},
{".doc", ".txt"},
{".docm", ".docx"},
{".docm", ".dotm"},
{".docm", ".dotx"},
{".docm", ".epub"},
{".docm", ".fb2"},
{".docm", ".html"},
{".docm", ".odt"},
{".docm", ".ott"},
{".docm", ".pdf"},
{".docm", ".rtf"},
{".docm", ".txt"},
{".doct", ".docx"},
{".docx", ".docm"},
{".docx", ".docxf"},
{".docx", ".dotm"},
{".docx", ".dotx"},
{".docx", ".epub"},
{".docx", ".fb2"},
{".docx", ".html"},
{".docx", ".odt"},
{".docx", ".ott"},
{".docx", ".pdf"},
{".docx", ".rtf"},
{".docx", ".txt"},
{".docxf", ".docx"},
{".docxf", ".dotx"},
{".docxf", ".epub"},
{".docxf", ".fb2"},
{".docxf", ".html"},
{".docxf", ".odt"},
{".docxf", ".oform"},
{".docxf", ".ott"},
{".docxf", ".pdf"},
{".docxf", ".rtf"},
{".docxf", ".txt"},
{".dot", ".docm"},
{".dot", ".docx"},
{".dot", ".dotm"},
{".dot", ".dotx"},
{".dot", ".epub"},
{".dot", ".fb2"},
{".dot", ".html"},
{".dot", ".odt"},
{".dot", ".ott"},
{".dot", ".pdf"},
{".dot", ".rtf"},
{".dot", ".txt"},
{".dotm", ".docm"},
{".dotm", ".docx"},
{".dotm", ".dotx"},
{".dotm", ".epub"},
{".dotm", ".fb2"},
{".dotm", ".html"},
{".dotm", ".odt"},
{".dotm", ".ott"},
{".dotm", ".pdf"},
{".dotm", ".rtf"},
{".dotm", ".txt"},
{".dotx", ".docm"},
{".dotx", ".docx"},
{".dotx", ".dotm"},
{".dotx", ".epub"},
{".dotx", ".fb2"},
{".dotx", ".html"},
{".dotx", ".odt"},
{".dotx", ".ott"},
{".dotx", ".pdf"},
{".dotx", ".rtf"},
{".dotx", ".txt"},
{".epub", ".docm"},
{".epub", ".docx"},
{".epub", ".dotm"},
{".epub", ".dotx"},
{".epub", ".fb2"},
{".epub", ".html"},
{".epub", ".odt"},
{".epub", ".ott"},
{".epub", ".pdf"},
{".epub", ".rtf"},
{".epub", ".txt"},
{".fb2", ".docm"},
{".fb2", ".docx"},
{".fb2", ".dotm"},
{".fb2", ".dotx"},
{".fb2", ".epub"},
{".fb2", ".html"},
{".fb2", ".odt"},
{".fb2", ".ott"},
{".fb2", ".pdf"},
{".fb2", ".rtf"},
{".fb2", ".txt"},
{".fodp", ".odp"},
{".fodp", ".otp"},
{".fodp", ".pdf"},
{".fodp", ".potm"},
{".fodp", ".potx"},
{".fodp", ".pptm"},
{".fodp", ".pptx"},
{".fods", ".csv"},
{".fods", ".ods"},
{".fods", ".ots"},
{".fods", ".pdf"},
{".fods", ".xlsm"},
{".fods", ".xlsx"},
{".fods", ".xltm"},
{".fods", ".xltx"},
{".fodt", ".docm"},
{".fodt", ".docx"},
{".fodt", ".dotm"},
{".fodt", ".dotx"},
{".fodt", ".epub"},
{".fodt", ".fb2"},
{".fodt", ".html"},
{".fodt", ".odt"},
{".fodt", ".ott"},
{".fodt", ".pdf"},
{".fodt", ".rtf"},
{".fodt", ".txt"},
{".html", ".docm"},
{".html", ".docx"},
{".html", ".dotm"},
{".html", ".dotx"},
{".html", ".epub"},
{".html", ".fb2"},
{".html", ".odt"},
{".html", ".ott"},
{".html", ".pdf"},
{".html", ".rtf"},
{".html", ".txt"},
{".mht", ".docm"},
{".mht", ".docx"},
{".mht", ".dotm"},
{".mht", ".dotx"},
{".mht", ".epub"},
{".mht", ".fb2"},
{".mht", ".odt"},
{".mht", ".ott"},
{".mht", ".pdf"},
{".mht", ".rtf"},
{".mht", ".txt"},
{".odp", ".otp"},
{".odp", ".pdf"},
{".odp", ".potm"},
{".odp", ".potx"},
{".odp", ".pptm"},
{".odp", ".pptx"},
{".otp", ".odp"},
{".otp", ".pdf"},
{".otp", ".potm"},
{".otp", ".potx"},
{".otp", ".pptm"},
{".otp", ".pptx"},
{".ods", ".csv"},
{".ods", ".ots"},
{".ods", ".pdf"},
{".ods", ".xlsm"},
{".ods", ".xlsx"},
{".ods", ".xltm"},
{".ods", ".xltx"},
{".ots", ".csv"},
{".ots", ".ods"},
{".ots", ".pdf"},
{".ots", ".xlsm"},
{".ots", ".xlsx"},
{".ots", ".xltm"},
{".ots", ".xltx"},
{".odt", ".docm"},
{".odt", ".docx"},
{".odt", ".dotm"},
{".odt", ".dotx"},
{".odt", ".epub"},
{".odt", ".fb2"},
{".odt", ".html"},
{".odt", ".ott"},
{".odt", ".pdf"},
{".odt", ".rtf"},
{".odt", ".txt"},
{".ott", ".docm"},
{".ott", ".docx"},
{".ott", ".dotm"},
{".ott", ".dotx"},
{".ott", ".epub"},
{".ott", ".fb2"},
{".ott", ".html"},
{".ott", ".odt"},
{".ott", ".pdf"},
{".ott", ".rtf"},
{".ott", ".txt"},
{".oxps", ".pdf"},
{".pot", ".odp"},
{".pot", ".otp"},
{".pot", ".pdf"},
{".pot", ".pptm"},
{".pot", ".pptx"},
{".pot", ".potm"},
{".pot", ".potx"},
{".potm", ".odp"},
{".potm", ".otp"},
{".potm", ".pdf"},
{".potm", ".potx"},
{".potm", ".pptm"},
{".potm", ".pptx"},
{".potx", ".odp"},
{".potx", ".otp"},
{".potx", ".pdf"},
{".potx", ".potm"},
{".potx", ".pptm"},
{".potx", ".pptx"},
{".pps", ".odp"},
{".pps", ".otp"},
{".pps", ".pdf"},
{".pps", ".potm"},
{".pps", ".potx"},
{".pps", ".pptm"},
{".pps", ".pptx"},
{".ppsm", ".odp"},
{".ppsm", ".otp"},
{".ppsm", ".pdf"},
{".ppsm", ".potm"},
{".ppsm", ".potx"},
{".ppsm", ".pptm"},
{".ppsm", ".pptx"},
{".ppsx", ".odp"},
{".ppsx", ".otp"},
{".ppsx", ".pdf"},
{".ppsx", ".potm"},
{".ppsx", ".potx"},
{".ppsx", ".pptm"},
{".ppsx", ".pptx"},
{".ppt", ".odp"},
{".ppt", ".otp"},
{".ppt", ".pdf"},
{".ppt", ".potm"},
{".ppt", ".potx"},
{".ppt", ".pptm"},
{".ppt", ".pptx"},
{".pptm", ".odp"},
{".pptm", ".otp"},
{".pptm", ".pdf"},
{".pptm", ".potm"},
{".pptm", ".potx"},
{".pptm", ".pptx"},
{".pptt", ".pptx"},
{".pptx", ".odp"},
{".pptx", ".otp"},
{".pptx", ".pdf"},
{".pptx", ".potm"},
{".pptx", ".potx"},
{".pptx", ".pptm"},
{".rtf", ".docm"},
{".rtf", ".docx"},
{".rtf", ".dotm"},
{".rtf", ".dotx"},
{".rtf", ".epub"},
{".rtf", ".fb2"},
{".rtf", ".html"},
{".rtf", ".odt"},
{".rtf", ".ott"},
{".rtf", ".pdf"},
{".rtf", ".txt"},
{".txt", ".docm"},
{".txt", ".docx"},
{".txt", ".dotm"},
{".txt", ".dotx"},
{".txt", ".epub"},
{".txt", ".fb2"},
{".txt", ".html"},
{".txt", ".odt"},
{".txt", ".ott"},
{".txt", ".pdf"},
{".txt", ".rtf"},
{".xls", ".csv"},
{".xls", ".ods"},
{".xls", ".ots"},
{".xls", ".pdf"},
{".xls", ".xlsm"},
{".xls", ".xlsx"},
{".xls", ".xltm"},
{".xls", ".xltx"},
{".xlsm", ".csv"},
{".xlsm", ".ods"},
{".xlsm", ".ots"},
{".xlsm", ".pdf"},
{".xlsm", ".xlsx"},
{".xlsm", ".xltm"},
{".xlsm", ".xltx"},
{".xlst", ".xlsx"},
{".xlsx", ".csv"},
{".xlsx", ".ods"},
{".xlsx", ".ots"},
{".xlsx", ".pdf"},
{".xlsx", ".xlsm"},
{".xlsx", ".xltm"},
{".xlsx", ".xltx"},
{".xlt", ".csv"},
{".xlt", ".ods"},
{".xlt", ".ots"},
{".xlt", ".pdf"},
{".xlt", ".xlsm"},
{".xlt", ".xlsx"},
{".xlt", ".xltm"},
{".xlt", ".xltx"},
{".xltm", ".csv"},
{".xltm", ".ods"},
{".xltm", ".ots"},
{".xltm", ".pdf"},
{".xltm", ".xlsm"},
{".xltm", ".xlsx"},
{".xltm", ".xltx"},
{".xltx", ".csv"},
{".xltx", ".ods"},
{".xltx", ".ots"},
{".xltx", ".pdf"},
{".xltx", ".xlsm"},
{".xltx", ".xlsx"},
{".xltx", ".xltm"},
{".xml", ".docm"},
{".xml", ".docx"},
{".xml", ".dotm"},
{".xml", ".dotx"},
{".xml", ".epub"},
{".xml", ".fb2"},
{".xml", ".html"},
{".xml", ".odt"},
{".xml", ".ott"},
{".xml", ".pdf"},
{".xml", ".rtf"},
{".xml", ".txt"},
{".xps", ".pdf"}
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "files_converts");
}
}

View File

@ -1,388 +0,0 @@
// <auto-generated />
namespace ASC.Core.Common.Migrations.MySql.FilesDbContextMySql
{
[DbContext(typeof(MySqlFilesDbContext))]
partial class MySqlFilesDbContextModelSnapshot : 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.Model.FilesConverts", b =>
{
b.Property<string>("Input")
.HasColumnType("varchar(50)")
.HasColumnName("input")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Output")
.HasColumnType("varchar(50)")
.HasColumnName("output")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("Input", "Output")
.HasName("PRIMARY");
b.ToTable("files_converts");
b.HasData(
new { Input = ".csv", Output = ".ods" },
new { Input = ".csv", Output = ".ots" },
new { Input = ".csv", Output = ".pdf" },
new { Input = ".csv", Output = ".xlsm" },
new { Input = ".csv", Output = ".xlsx" },
new { Input = ".csv", Output = ".xltm" },
new { Input = ".csv", Output = ".xltx" },
new { Input = ".doc", Output = ".docm" },
new { Input = ".doc", Output = ".docx" },
new { Input = ".doc", Output = ".dotm" },
new { Input = ".doc", Output = ".dotx" },
new { Input = ".doc", Output = ".epub" },
new { Input = ".doc", Output = ".fb2" },
new { Input = ".doc", Output = ".html" },
new { Input = ".doc", Output = ".odt" },
new { Input = ".doc", Output = ".ott" },
new { Input = ".doc", Output = ".pdf" },
new { Input = ".doc", Output = ".rtf" },
new { Input = ".doc", Output = ".txt" },
new { Input = ".docm", Output = ".docx" },
new { Input = ".docm", Output = ".dotm" },
new { Input = ".docm", Output = ".dotx" },
new { Input = ".docm", Output = ".epub" },
new { Input = ".docm", Output = ".fb2" },
new { Input = ".docm", Output = ".html" },
new { Input = ".docm", Output = ".odt" },
new { Input = ".docm", Output = ".ott" },
new { Input = ".docm", Output = ".pdf" },
new { Input = ".docm", Output = ".rtf" },
new { Input = ".docm", Output = ".txt" },
new { Input = ".doct", Output = ".docx" },
new { Input = ".docx", Output = ".docm" },
new { Input = ".docx", Output = ".docxf" },
new { Input = ".docx", Output = ".dotm" },
new { Input = ".docx", Output = ".dotx" },
new { Input = ".docx", Output = ".epub" },
new { Input = ".docx", Output = ".fb2" },
new { Input = ".docx", Output = ".html" },
new { Input = ".docx", Output = ".odt" },
new { Input = ".docx", Output = ".ott" },
new { Input = ".docx", Output = ".pdf" },
new { Input = ".docx", Output = ".rtf" },
new { Input = ".docx", Output = ".txt" },
new { Input = ".docxf", Output = ".docx" },
new { Input = ".docxf", Output = ".dotx" },
new { Input = ".docxf", Output = ".epub" },
new { Input = ".docxf", Output = ".fb2" },
new { Input = ".docxf", Output = ".html" },
new { Input = ".docxf", Output = ".odt" },
new { Input = ".docxf", Output = ".oform" },
new { Input = ".docxf", Output = ".ott" },
new { Input = ".docxf", Output = ".pdf" },
new { Input = ".docxf", Output = ".rtf" },
new { Input = ".docxf", Output = ".txt" },
new { Input = ".dot", Output = ".docm" },
new { Input = ".dot", Output = ".docx" },
new { Input = ".dot", Output = ".dotm" },
new { Input = ".dot", Output = ".dotx" },
new { Input = ".dot", Output = ".epub" },
new { Input = ".dot", Output = ".fb2" },
new { Input = ".dot", Output = ".html" },
new { Input = ".dot", Output = ".odt" },
new { Input = ".dot", Output = ".ott" },
new { Input = ".dot", Output = ".pdf" },
new { Input = ".dot", Output = ".rtf" },
new { Input = ".dot", Output = ".txt" },
new { Input = ".dotm", Output = ".docm" },
new { Input = ".dotm", Output = ".docx" },
new { Input = ".dotm", Output = ".dotx" },
new { Input = ".dotm", Output = ".epub" },
new { Input = ".dotm", Output = ".fb2" },
new { Input = ".dotm", Output = ".html" },
new { Input = ".dotm", Output = ".odt" },
new { Input = ".dotm", Output = ".ott" },
new { Input = ".dotm", Output = ".pdf" },
new { Input = ".dotm", Output = ".rtf" },
new { Input = ".dotm", Output = ".txt" },
new { Input = ".dotx", Output = ".docm" },
new { Input = ".dotx", Output = ".docx" },
new { Input = ".dotx", Output = ".dotm" },
new { Input = ".dotx", Output = ".epub" },
new { Input = ".dotx", Output = ".fb2" },
new { Input = ".dotx", Output = ".html" },
new { Input = ".dotx", Output = ".odt" },
new { Input = ".dotx", Output = ".ott" },
new { Input = ".dotx", Output = ".pdf" },
new { Input = ".dotx", Output = ".rtf" },
new { Input = ".dotx", Output = ".txt" },
new { Input = ".epub", Output = ".docm" },
new { Input = ".epub", Output = ".docx" },
new { Input = ".epub", Output = ".dotm" },
new { Input = ".epub", Output = ".dotx" },
new { Input = ".epub", Output = ".fb2" },
new { Input = ".epub", Output = ".html" },
new { Input = ".epub", Output = ".odt" },
new { Input = ".epub", Output = ".ott" },
new { Input = ".epub", Output = ".pdf" },
new { Input = ".epub", Output = ".rtf" },
new { Input = ".epub", Output = ".txt" },
new { Input = ".fb2", Output = ".docm" },
new { Input = ".fb2", Output = ".docx" },
new { Input = ".fb2", Output = ".dotm" },
new { Input = ".fb2", Output = ".dotx" },
new { Input = ".fb2", Output = ".epub" },
new { Input = ".fb2", Output = ".html" },
new { Input = ".fb2", Output = ".odt" },
new { Input = ".fb2", Output = ".ott" },
new { Input = ".fb2", Output = ".pdf" },
new { Input = ".fb2", Output = ".rtf" },
new { Input = ".fb2", Output = ".txt" },
new { Input = ".fodp", Output = ".odp" },
new { Input = ".fodp", Output = ".otp" },
new { Input = ".fodp", Output = ".pdf" },
new { Input = ".fodp", Output = ".potm" },
new { Input = ".fodp", Output = ".potx" },
new { Input = ".fodp", Output = ".pptm" },
new { Input = ".fodp", Output = ".pptx" },
new { Input = ".fods", Output = ".csv" },
new { Input = ".fods", Output = ".ods" },
new { Input = ".fods", Output = ".ots" },
new { Input = ".fods", Output = ".pdf" },
new { Input = ".fods", Output = ".xlsm" },
new { Input = ".fods", Output = ".xlsx" },
new { Input = ".fods", Output = ".xltm" },
new { Input = ".fods", Output = ".xltx" },
new { Input = ".fodt", Output = ".docm" },
new { Input = ".fodt", Output = ".docx" },
new { Input = ".fodt", Output = ".dotm" },
new { Input = ".fodt", Output = ".dotx" },
new { Input = ".fodt", Output = ".epub" },
new { Input = ".fodt", Output = ".fb2" },
new { Input = ".fodt", Output = ".html" },
new { Input = ".fodt", Output = ".odt" },
new { Input = ".fodt", Output = ".ott" },
new { Input = ".fodt", Output = ".pdf" },
new { Input = ".fodt", Output = ".rtf" },
new { Input = ".fodt", Output = ".txt" },
new { Input = ".html", Output = ".docm" },
new { Input = ".html", Output = ".docx" },
new { Input = ".html", Output = ".dotm" },
new { Input = ".html", Output = ".dotx" },
new { Input = ".html", Output = ".epub" },
new { Input = ".html", Output = ".fb2" },
new { Input = ".html", Output = ".odt" },
new { Input = ".html", Output = ".ott" },
new { Input = ".html", Output = ".pdf" },
new { Input = ".html", Output = ".rtf" },
new { Input = ".html", Output = ".txt" },
new { Input = ".mht", Output = ".docm" },
new { Input = ".mht", Output = ".docx" },
new { Input = ".mht", Output = ".dotm" },
new { Input = ".mht", Output = ".dotx" },
new { Input = ".mht", Output = ".epub" },
new { Input = ".mht", Output = ".fb2" },
new { Input = ".mht", Output = ".odt" },
new { Input = ".mht", Output = ".ott" },
new { Input = ".mht", Output = ".pdf" },
new { Input = ".mht", Output = ".rtf" },
new { Input = ".mht", Output = ".txt" },
new { Input = ".odp", Output = ".otp" },
new { Input = ".odp", Output = ".pdf" },
new { Input = ".odp", Output = ".potm" },
new { Input = ".odp", Output = ".potx" },
new { Input = ".odp", Output = ".pptm" },
new { Input = ".odp", Output = ".pptx" },
new { Input = ".otp", Output = ".odp" },
new { Input = ".otp", Output = ".pdf" },
new { Input = ".otp", Output = ".potm" },
new { Input = ".otp", Output = ".potx" },
new { Input = ".otp", Output = ".pptm" },
new { Input = ".otp", Output = ".pptx" },
new { Input = ".ods", Output = ".csv" },
new { Input = ".ods", Output = ".ots" },
new { Input = ".ods", Output = ".pdf" },
new { Input = ".ods", Output = ".xlsm" },
new { Input = ".ods", Output = ".xlsx" },
new { Input = ".ods", Output = ".xltm" },
new { Input = ".ods", Output = ".xltx" },
new { Input = ".ots", Output = ".csv" },
new { Input = ".ots", Output = ".ods" },
new { Input = ".ots", Output = ".pdf" },
new { Input = ".ots", Output = ".xlsm" },
new { Input = ".ots", Output = ".xlsx" },
new { Input = ".ots", Output = ".xltm" },
new { Input = ".ots", Output = ".xltx" },
new { Input = ".odt", Output = ".docm" },
new { Input = ".odt", Output = ".docx" },
new { Input = ".odt", Output = ".dotm" },
new { Input = ".odt", Output = ".dotx" },
new { Input = ".odt", Output = ".epub" },
new { Input = ".odt", Output = ".fb2" },
new { Input = ".odt", Output = ".html" },
new { Input = ".odt", Output = ".ott" },
new { Input = ".odt", Output = ".pdf" },
new { Input = ".odt", Output = ".rtf" },
new { Input = ".odt", Output = ".txt" },
new { Input = ".ott", Output = ".docm" },
new { Input = ".ott", Output = ".docx" },
new { Input = ".ott", Output = ".dotm" },
new { Input = ".ott", Output = ".dotx" },
new { Input = ".ott", Output = ".epub" },
new { Input = ".ott", Output = ".fb2" },
new { Input = ".ott", Output = ".html" },
new { Input = ".ott", Output = ".odt" },
new { Input = ".ott", Output = ".pdf" },
new { Input = ".ott", Output = ".rtf" },
new { Input = ".ott", Output = ".txt" },
new { Input = ".oxps", Output = ".pdf" },
new { Input = ".pot", Output = ".odp" },
new { Input = ".pot", Output = ".otp" },
new { Input = ".pot", Output = ".pdf" },
new { Input = ".pot", Output = ".pptm" },
new { Input = ".pot", Output = ".pptx" },
new { Input = ".pot", Output = ".potm" },
new { Input = ".pot", Output = ".potx" },
new { Input = ".potm", Output = ".odp" },
new { Input = ".potm", Output = ".otp" },
new { Input = ".potm", Output = ".pdf" },
new { Input = ".potm", Output = ".potx" },
new { Input = ".potm", Output = ".pptm" },
new { Input = ".potm", Output = ".pptx" },
new { Input = ".potx", Output = ".odp" },
new { Input = ".potx", Output = ".otp" },
new { Input = ".potx", Output = ".pdf" },
new { Input = ".potx", Output = ".potm" },
new { Input = ".potx", Output = ".pptm" },
new { Input = ".potx", Output = ".pptx" },
new { Input = ".pps", Output = ".odp" },
new { Input = ".pps", Output = ".otp" },
new { Input = ".pps", Output = ".pdf" },
new { Input = ".pps", Output = ".potm" },
new { Input = ".pps", Output = ".potx" },
new { Input = ".pps", Output = ".pptm" },
new { Input = ".pps", Output = ".pptx" },
new { Input = ".ppsm", Output = ".odp" },
new { Input = ".ppsm", Output = ".otp" },
new { Input = ".ppsm", Output = ".pdf" },
new { Input = ".ppsm", Output = ".potm" },
new { Input = ".ppsm", Output = ".potx" },
new { Input = ".ppsm", Output = ".pptm" },
new { Input = ".ppsm", Output = ".pptx" },
new { Input = ".ppsx", Output = ".odp" },
new { Input = ".ppsx", Output = ".otp" },
new { Input = ".ppsx", Output = ".pdf" },
new { Input = ".ppsx", Output = ".potm" },
new { Input = ".ppsx", Output = ".potx" },
new { Input = ".ppsx", Output = ".pptm" },
new { Input = ".ppsx", Output = ".pptx" },
new { Input = ".ppt", Output = ".odp" },
new { Input = ".ppt", Output = ".otp" },
new { Input = ".ppt", Output = ".pdf" },
new { Input = ".ppt", Output = ".potm" },
new { Input = ".ppt", Output = ".potx" },
new { Input = ".ppt", Output = ".pptm" },
new { Input = ".ppt", Output = ".pptx" },
new { Input = ".pptm", Output = ".odp" },
new { Input = ".pptm", Output = ".otp" },
new { Input = ".pptm", Output = ".pdf" },
new { Input = ".pptm", Output = ".potm" },
new { Input = ".pptm", Output = ".potx" },
new { Input = ".pptm", Output = ".pptx" },
new { Input = ".pptt", Output = ".pptx" },
new { Input = ".pptx", Output = ".odp" },
new { Input = ".pptx", Output = ".otp" },
new { Input = ".pptx", Output = ".pdf" },
new { Input = ".pptx", Output = ".potm" },
new { Input = ".pptx", Output = ".potx" },
new { Input = ".pptx", Output = ".pptm" },
new { Input = ".rtf", Output = ".docm" },
new { Input = ".rtf", Output = ".docx" },
new { Input = ".rtf", Output = ".dotm" },
new { Input = ".rtf", Output = ".dotx" },
new { Input = ".rtf", Output = ".epub" },
new { Input = ".rtf", Output = ".fb2" },
new { Input = ".rtf", Output = ".html" },
new { Input = ".rtf", Output = ".odt" },
new { Input = ".rtf", Output = ".ott" },
new { Input = ".rtf", Output = ".pdf" },
new { Input = ".rtf", Output = ".txt" },
new { Input = ".txt", Output = ".docm" },
new { Input = ".txt", Output = ".docx" },
new { Input = ".txt", Output = ".dotm" },
new { Input = ".txt", Output = ".dotx" },
new { Input = ".txt", Output = ".epub" },
new { Input = ".txt", Output = ".fb2" },
new { Input = ".txt", Output = ".html" },
new { Input = ".txt", Output = ".odt" },
new { Input = ".txt", Output = ".ott" },
new { Input = ".txt", Output = ".pdf" },
new { Input = ".txt", Output = ".rtf" },
new { Input = ".xls", Output = ".csv" },
new { Input = ".xls", Output = ".ods" },
new { Input = ".xls", Output = ".ots" },
new { Input = ".xls", Output = ".pdf" },
new { Input = ".xls", Output = ".xlsm" },
new { Input = ".xls", Output = ".xlsx" },
new { Input = ".xls", Output = ".xltm" },
new { Input = ".xls", Output = ".xltx" },
new { Input = ".xlsm", Output = ".csv" },
new { Input = ".xlsm", Output = ".ods" },
new { Input = ".xlsm", Output = ".ots" },
new { Input = ".xlsm", Output = ".pdf" },
new { Input = ".xlsm", Output = ".xlsx" },
new { Input = ".xlsm", Output = ".xltm" },
new { Input = ".xlsm", Output = ".xltx" },
new { Input = ".xlst", Output = ".xlsx" },
new { Input = ".xlsx", Output = ".csv" },
new { Input = ".xlsx", Output = ".ods" },
new { Input = ".xlsx", Output = ".ots" },
new { Input = ".xlsx", Output = ".pdf" },
new { Input = ".xlsx", Output = ".xlsm" },
new { Input = ".xlsx", Output = ".xltm" },
new { Input = ".xlsx", Output = ".xltx" },
new { Input = ".xlt", Output = ".csv" },
new { Input = ".xlt", Output = ".ods" },
new { Input = ".xlt", Output = ".ots" },
new { Input = ".xlt", Output = ".pdf" },
new { Input = ".xlt", Output = ".xlsm" },
new { Input = ".xlt", Output = ".xlsx" },
new { Input = ".xlt", Output = ".xltm" },
new { Input = ".xlt", Output = ".xltx" },
new { Input = ".xltm", Output = ".csv" },
new { Input = ".xltm", Output = ".ods" },
new { Input = ".xltm", Output = ".ots" },
new { Input = ".xltm", Output = ".pdf" },
new { Input = ".xltm", Output = ".xlsm" },
new { Input = ".xltm", Output = ".xlsx" },
new { Input = ".xltm", Output = ".xltx" },
new { Input = ".xltx", Output = ".csv" },
new { Input = ".xltx", Output = ".ods" },
new { Input = ".xltx", Output = ".ots" },
new { Input = ".xltx", Output = ".pdf" },
new { Input = ".xltx", Output = ".xlsm" },
new { Input = ".xltx", Output = ".xlsx" },
new { Input = ".xltx", Output = ".xltm" },
new { Input = ".xml", Output = ".docm" },
new { Input = ".xml", Output = ".docx" },
new { Input = ".xml", Output = ".dotm" },
new { Input = ".xml", Output = ".dotx" },
new { Input = ".xml", Output = ".epub" },
new { Input = ".xml", Output = ".fb2" },
new { Input = ".xml", Output = ".html" },
new { Input = ".xml", Output = ".odt" },
new { Input = ".xml", Output = ".ott" },
new { Input = ".xml", Output = ".pdf" },
new { Input = ".xml", Output = ".rtf" },
new { Input = ".xml", Output = ".txt" },
new { Input = ".xps", Output = ".pdf" }
);
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,463 +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.MailDbContextMySql;
public partial class MailDbContextMySql : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ApiKeys",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
AccessToken = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_ApiKeys", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "GreyListingWhiteList",
columns: table => new
{
Comment = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Source = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_GreyListingWhiteList", x => x.Comment);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "mail_mailbox",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
tenant = table.Column<int>(type: "int", nullable: false),
id_user = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
address = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
name = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
enabled = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
is_removed = table.Column<bool>(type: "tinyint(1)", nullable: false),
is_processed = table.Column<bool>(type: "tinyint(1)", nullable: false),
is_server_mailbox = table.Column<bool>(type: "tinyint(1)", nullable: false),
IsTeamlabMailbox = table.Column<bool>(type: "tinyint(1)", nullable: false),
imap = table.Column<bool>(type: "tinyint(1)", nullable: false),
user_online = table.Column<bool>(type: "tinyint(1)", nullable: false),
is_default = table.Column<bool>(type: "tinyint(1)", nullable: false),
msg_count_last = table.Column<int>(type: "int", nullable: false),
size_last = table.Column<int>(type: "int", nullable: false),
login_delay = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'30'"),
quota_error = table.Column<bool>(type: "tinyint(1)", nullable: false),
imap_intervals = table.Column<string>(type: "mediumtext", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
begin_date = table.Column<DateTime>(type: "timestamp", nullable: false, defaultValueSql: "'1975-01-01 00:00:00'"),
email_in_folder = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
pop3_password = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
smtp_password = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
token_type = table.Column<int>(type: "int", nullable: false),
token = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
id_smtp_server = table.Column<int>(type: "int", nullable: false),
id_in_server = table.Column<int>(type: "int", nullable: false),
date_checked = table.Column<DateTime>(type: "datetime", nullable: false),
date_user_checked = table.Column<DateTime>(type: "datetime", nullable: false),
date_login_delay_expires = table.Column<DateTime>(type: "datetime", nullable: false, defaultValueSql: "'1975-01-01 00:00:00'"),
date_auth_error = table.Column<DateTime>(type: "datetime", nullable: true),
date_created = table.Column<DateTime>(type: "datetime", nullable: false),
date_modified = table.Column<DateTime>(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP")
},
constraints: table =>
{
table.PrimaryKey("PK_mail_mailbox", x => x.id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "mail_mailbox_provider",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
display_name = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
display_short_name = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
documentation = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PK_mail_mailbox_provider", x => x.id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "mail_server_server",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
mx_record = table.Column<string>(type: "varchar(128)", nullable: false, defaultValueSql: "''", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
connection_string = table.Column<string>(type: "text", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
server_type = table.Column<int>(type: "int", nullable: false),
smtp_settings_id = table.Column<int>(type: "int", nullable: false),
imap_settings_id = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_mail_server_server", x => x.id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "MailboxServer",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
IdProvider = table.Column<int>(type: "int", nullable: false),
Type = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Hostname = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Port = table.Column<int>(type: "int", nullable: false),
SocketType = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
UserName = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
Authentication = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IsUserData = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_MailboxServer", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.InsertData(
table: "mail_mailbox_provider",
columns: new[] { "id", "display_name", "display_short_name", "documentation", "name" },
values: new object[,]
{
{ 1, "1&1", "1&1", "http://hilfe-center.1und1.de/access/search/go.php?t=e698123", "1und1.de" },
{ 141, "??????????", "INET-SHIBATA", null, "pop.shibata.ne.jp" },
{ 142, "Posteo", "Posteo", null, "posteo.de" },
{ 143, "???", "???", null, "purple.plala.or.jp" },
{ 144, "qip.ru", "qip.ru", null, "qip.ru" },
{ 145, "???", "???", null, "rainbow.plala.or.jp" },
{ 146, "Rambler Mail", "Rambler", null, "rambler.ru" },
{ 147, "???", "???", null, "red.plala.or.jp" },
{ 148, "???", "???", null, "rmail.plala.or.jp" },
{ 149, "???", "???", null, "rondo.plala.or.jp" },
{ 150, "???", "???", null, "rose.plala.or.jp" },
{ 151, "???", "???", null, "rouge.plala.or.jp" },
{ 152, "RoadRunner", "RR", "http://help.rr.com/HMSFaqs/e_emailserveraddys.aspx", "rr.com" },
{ 153, "???", "???", null, "ruby.plala.or.jp" },
{ 154, "?????????", "Saku-Net", null, "sakunet.ne.jp" },
{ 155, "???", "???", null, "sea.plala.or.jp" },
{ 156, "???", "???", null, "sepia.plala.or.jp" },
{ 157, "???", "???", null, "serenade.plala.or.jp" },
{ 158, "Seznam", "Seznam", "http://napoveda.seznam.cz/cz/jake-jsou-adresy-pop3-a-smtp-serveru.html", "seznam.cz" },
{ 159, "SFR / Neuf", "SFR", "http://assistance.sfr.fr/internet_neufbox-de-SFR/utiliser-email/parametrer-id-sfr/fc-505-50680", "sfr.fr" },
{ 160, "???", "???", null, "silk.plala.or.jp" },
{ 161, "???", "???", null, "silver.plala.or.jp" },
{ 162, "???", "???", null, "sky.plala.or.jp" },
{ 163, "skynet", "skynet", "http://support.en.belgacom.be/app/answers/detail/a_id/14337/kw/thunderbird", "skynet.be" },
{ 140, "???", "???", null, "polka.plala.or.jp" },
{ 139, "'?????????", "wind", null, "po.wind.ne.jp" },
{ 138, "DCN???????????", "DCN", null, "po.dcn.ne.jp" },
{ 137, "???", "???", null, "plum.plala.or.jp" },
{ 113, "Apple iCloud", "Apple", null, "me.com" },
{ 114, "???", "???", null, "minuet.plala.or.jp" },
{ 115, "???????????", "IWAFUNE", null, "ml.murakami.ne.jp" },
{ 116, "Mnet ??? ????", "Mnet???", null, "mnet.ne.jp" },
{ 117, "mopera U", "mopera U", null, "'mopera.net" },
{ 118, "Mozilla Corporation and Mozilla Foundation internal email addresses", "mozilla.com", null, "mozilla.com" },
{ 119, "TikiTiki???????", "TikiTiki", null, "mx1.tiki.ne.jp" },
{ 120, "???", "???", null, "navy.plala.or.jp" },
{ 121, "nctsoft", "nct", null, "nctsoft.com" },
{ 122, "@nifty", "@nifty", null, "nifty.com" },
{ 123, "BB????", "NSAT", null, "nsat.jp" },
{ 164, "???", "???", null, "smail.plala.or.jp" },
{ 124, "o2 Poczta", "o2", null, "o2.pl" },
{ 126, "Poczta Onet", "Onet", null, "onet.pl" },
{ 127, "???", "???", null, "opal.plala.or.jp" },
{ 128, "???", "???", null, "orange.plala.or.jp" },
{ 129, "???", "???", null, "orchid.plala.or.jp" },
{ 130, "OVH", "OVH", "http://guides.ovh.com/ConfigurationEmail", "ovh.net" },
{ 131, "????FTTH", "????FTTH", null, "pal.kijimadaira.jp" },
{ 132, "???", "???", null, "palette.plala.or.jp" },
{ 133, "??????", "PARABOX", null, "parabox.or.jp" },
{ 134, "Portland State University Mail", "PSU Mail", null, "pdx.edu" },
{ 135, "???", "???", null, "peach.plala.or.jp" },
{ 136, "PeoplePC", "PeoplePC", null, "peoplepc.com" },
{ 125, "???", "???", null, "olive.plala.or.jp" },
{ 112, "???", "???", null, "maroon.plala.or.jp" },
{ 165, "???", "???", null, "snow.plala.or.jp" },
{ 167, "???", "???", null, "sonata.plala.or.jp" },
{ 196, "Your WildWest domain", "WildWest", null, "wildwestdomains.com" },
{ 197, "???", "???", null, "wine.plala.or.jp" },
{ 198, "???", "???", null, "wmail.plala.or.jp" },
{ 199, "Poczta Wirtualna Polska", "Poczta WP", null, "wp.pl" },
{ 200, "???", "???", null, "xmail.plala.or.jp" },
{ 201, "?????????", "wind", null, "xp.wind.jp" },
{ 202, "???", "???", null, "xpost.plala.or.jp" },
{ 203, "XS4All", "XS4All", null, "xs4all.nl" },
{ 204, "Yahoo! Mail", "Yahoo", null, "xtra.co.nz" },
{ 205, "Yahoo! ???", "Yahoo! ??? ", null, "yahoo.co.jp" },
{ 206, "Yahoo! Mail", "Yahoo", null, "yahoo.com" },
{ 207, "Yandex Mail", "Yandex", null, "yandex.ru" },
{ 208, "Yahoo! BB", "Yahoo! BB", null, "ybb.ne.jp" },
{ 209, "???", "???", null, "yellow.plala.or.jp" },
{ 210, "???", "???", null, "ymail.plala.or.jp" },
{ 211, "???", "???", null, "ypost.plala.or.jp" },
{ 212, "Ziggo", "Ziggo", null, "ziggo.nl" },
{ 213, "???", "???", null, "zmail.plala.or.jp" },
{ 214, "???", "???", null, "zpost.plala.or.jp" },
{ 215, "avsmedia.com", "avsmedia", null, "avsmedia.com" },
{ 216, "avsmedia.net", "avsmedia", null, "avsmedia.net" },
{ 218, "ilearney.com", "ilearney.com", null, "ilearney.com" },
{ 219, "fpl-technology.com", "fpl-technology.com", "http://fpl-technology.com", "fpl -technology.com" },
{ 195, "???", "???", null, "white.plala.or.jp" },
{ 194, "WEB.DE Freemail", "Web.de", "http://hilfe.freemail.web.de/freemail/e-mail/pop3/thunderbird/", "web.de" },
{ 193, "???", "???", null, "wave.plala.or.jp" },
{ 192, "???", "???", null, "waltz.plala.or.jp" },
{ 168, "Strato", "Strato", null, "strato.de" },
{ 169, "Universita degli Studi di Verona", "UniVR", null, "studenti.univr.it" },
{ 170, "???", "???", null, "suite.plala.or.jp" },
{ 171, "Sympatico Email", "Sympatico", "http://internet.bell.ca/index.cfm?method=content.view&category_id=585&content_id=12767", "sympatico.ca" },
{ 172, "???", "???", null, "symphony.plala.or.jp" },
{ 173, "T-Online", "T-Online", null, "t-online.de" },
{ 174, "???", "???", null, "taupe.plala.or.jp" },
{ 175, "Correo Terra", "Terra", null, "terra.es" },
{ 176, "TikiTiki???????", "TikiTiki", null, "tiki.ne.jp" },
{ 177, "Tiscali", "Tiscali", null, "tiscali.cz" },
{ 178, "Tiscali Italy", "Tiscali", "http://assistenza.tiscali.it/tecnica/posta/configurazioni/", "tiscali.it" },
{ 166, "?????????", "wind", null, "so.wind.ne.jp" },
{ 179, "???", "???", null, "tmail.plala.or.jp" },
{ 181, "???", "???", null, "topaz.plala.or.jp" },
{ 182, "???", "???", null, "trio.plala.or.jp" },
{ 183, "???", "???", null, "umail.plala.or.jp" },
{ 184, "UM ITCS Email", "UM ITCS", null, "umich.edu" },
{ 185, "UPC Nederland", "UPC", null, "upcmail.nl" },
{ 186, "Verizon Online", "Verizon", null, "verizon.net" },
{ 187, "Versatel", "Versatel", "http://www.versatel.de/hilfe/index_popup.php?einrichtung_email_programm", "versatel.de" },
{ 188, "???", "???", null, "violet.plala.or.jp" },
{ 189, "aikis", "aikis", null, "vm.aikis.or.jp" },
{ 190, "???", "???", null, "vmail.plala.or.jp" },
{ 191, "TikiTiki???????", "TikiTiki", null, "vp.tiki.ne.jp" },
{ 180, "???", "???", null, "toccata.plala.or.jp" },
{ 111, "?????????", "???", null, "mail.wind.ne.jp" },
{ 110, "Telenor Danmark", "Telenor", null, "mail.telenor.dk" },
{ 109, "mail.ru", "mail.ru", null, "mail.ru" },
{ 30, "???????????", "CEK-Net", null, "cek.ne.jp" },
{ 31, "UCSF CGL email", "CGL emai", null, "cgl.ucsf.edu" },
{ 32, "Charter Commuications", "Charter", null, "charter.com" },
{ 33, "CLIO-Net??????", "CLIO-Net", null, "clio.ne.jp" },
{ 34, "???", "???", null, "cmail.plala.or.jp" },
{ 35, "?????????", "wind", null, "co1.wind.ne.jp" },
{ 36, "?????????", "wind", null, "co2.wind.ne.jp" },
{ 37, "?????????", "wind", null, "co3.wind.ne.jp" },
{ 38, "???", "???", null, "cocoa.plala.or.jp" },
{ 39, "???", "Arcor", null, "coda.plala.or.jp" },
{ 40, "???", "Comcast", null, "comcast.net" },
{ 41, "???", "???", null, "concerto.plala.or.jp" },
{ 42, "???", "???", null, "coral.plala.or.jp" },
{ 43, "???", "???", null, "courante.plala.or.jp" },
{ 44, "???", "???", null, "cpost.plala.or.jp" },
{ 45, "???", "???", null, "cream.plala.or.jp" },
{ 46, "???", "wind", null, "dan.wind.ne.jp" },
{ 47, "???", "???", null, "dance.plala.or.jp" },
{ 48, "IIJ4U", "???", null, "dd.iij4u.or.jp" },
{ 49, "domainFACTORY", "domainFACTORY", "http://www.df.eu/de/service/df-faq/e-mail/mail-programme/", "df.eu" },
{ 50, "???", "???", null, "dmail.plala.or.jp" },
{ 51, "EarthLink", "EarthLink", "http://support.earthlink.net/email/email-server-settings.php", "earthlink.net" },
{ 52, "???", "???", null, "ebony.plala.or.jp" },
{ 29, "CC9???????????", "CC9", null, "cc9.ne.jp" },
{ 28, "???", "???", null, "cameo.plala.or.jp" },
{ 27, "???", "???", null, "camel.plala.or.jp" },
{ 26, "???", "???", null, "brown.plala.or.jp" },
{ 2, "???", "???", null, "abc.plala.or.jp" },
{ 3, "???", "???", null, "agate.plala.or.jp" },
{ 4, "Alice Italy", "Alice", "http://aiuto.alice.it/informazioni/clientemail/thunderbird.html", "alice.it" },
{ 5, "???", "???", null, "amail.plala.or.jp" },
{ 6, "???", "???", null, "amber.plala.or.jp" },
{ 7, "AOL Mail", "AOL", null, "aol.com" },
{ 8, "???", "???", null, "apost.plala.or.jp" },
{ 9, "???", "???", null, "aqua.plala.or.jp" },
{ 10, "Arcor", "Arcor", null, "arcor.de" },
{ 11, "Aruba PEC", "Aruba", "http://pec.aruba.it/guide_filmate.asp", "arubapec.it" },
{ 12, "AT&T", "AT&T", "http://www.att.com/esupport/article.jsp?sid=KB401570&ct=9000152", "att.net" },
{ 53, "email.it", "email.it", "http://www.email.it/ita/config/thunder.php", "email.it" },
{ 13, "???", "???", null, "ballade.plala.or.jp" },
{ 15, "BB????", "BB-NIIGATA", null, "bb-niigata.jp" },
{ 16, "???", "???", null, "beige.plala.or.jp" },
{ 17, "Biglobe", "Biglobe", null, "biglobe.ne.jp" },
{ 18, "Telstra Bigpond", "Bigpond", null, "bigpond.com" },
{ 19, "???", "???", null, "blue.plala.or.jp" },
{ 20, "bluewin.ch", "bluewin.ch", "http://smtphelp.bluewin.ch/swisscomdtg/setup/?", "bluemail.ch" },
{ 21, "bluewin.ch", "bluewin.ch", "http://smtphelp.bluewin.ch/swisscomdtg/setup/", "bluewin.ch" },
{ 22, "???", "???", null, "bmail.plala.or.jp" },
{ 23, "???", "???", null, "bolero.plala.or.jp" },
{ 24, "???", "???", null, "bpost.plala.or.jp" },
{ 25, "???", "???", null, "broba.cc" },
{ 14, "?????????", "wind", null, "bay.wind.ne.jp" },
{ 54, "???", "???", null, "email.plala.or.jp" },
{ 55, "EWE Tel", "EWE Tel", null, "ewetel.de" },
{ 56, "???", "???", null, "fantasy.plala.or.jp" },
{ 85, "IPAX Internet Services", "IPAX", null, "ipax.at" },
{ 86, "???", "???", null, "ivory.plala.or.jp" },
{ 87, "???????????", "IWAFUNE", null, "iwafune.ne.jp" },
{ 88, "???", "???", null, "jade.plala.or.jp" },
{ 89, "Janis", "Janis", null, "janis.or.jp" },
{ 90, "JETINTERNET", "JET", null, "jet.ne.jp" },
{ 91, "JETINTERNET", "JET", null, "ji.jet.ne.jp" },
{ 92, "???", "???", null, "jmail.plala.or.jp" },
{ 93, "Kabel Deutschland", "Kabel D", null, "kabelmail.de" },
{ 94, "KELCOM Internet", "KELCOM", null, "kelcom.net" },
{ 95, "???", "???", null, "khaki.plala.or.jp" },
{ 84, "Internode", "Internode", "http://www.internode.on.net/support/guides/email/secure_email/", "internode.on.net" },
{ 96, "?????????", "wind", null, "kl.wind.ne.jp" },
{ 98, "????????????", "?????", null, "kokuyou.ne.jp" },
{ 99, "???", "???", null, "lapis.plala.or.jp" },
{ 100, "LaPoste", "LaPoste", "http://www.geckozone.org/forum/viewtopic.php?f=4&t=93118", "laposte.net" },
{ 101, "???", "???", null, "lemon.plala.or.jp" },
{ 102, "Libero Mail", "Libero", "http://aiuto.libero.it/mail/istruzioni/configura-mozilla-thunderbird-per-windows-a11.phtml", "libero.it" },
{ 103, "???", "???", null, "lilac.plala.or.jp" },
{ 104, "???", "???", null, "lime.plala.or.jp" },
{ 105, "???????????", "????", null, "mahoroba.ne.jp" },
{ 106, "mail.com", "mail.com", null, "mail.com" },
{ 107, "TDC (DK)", "TDC", null, "mail.dk" },
{ 108, "???????????", "IWAFUNE", null, "mail.iwafune.ne.jp" },
{ 97, "???", "???", null, "kmail.plala.or.jp" },
{ 220, "Apple iCloud", "Apple", null, "icloud.com" },
{ 83, "??????????", "INET-SHIBATA", null, "inet-shibata.or.jp" },
{ 81, "Inbox.lv", "Inbox.lv", null, "inbox.lv" },
{ 57, "???", "???", null, "flamenco.plala.or.jp" },
{ 58, "???", "???", null, "fmail.plala.or.jp" },
{ 59, "France Telecom / Orange", "Orange", null, "francetelecom.fr" },
{ 60, "Free Telecom", "free.fr", "http://www.free.fr/assistance/599-thunderbird.html", "free.fr" },
{ 61, "Freenet Mail", "Freenet", null, "freenet.de" },
{ 62, "???", "???", null, "fuga.plala.or.jp" },
{ 63, "Gandi Mail", "Gandi", null, "gandi.net" },
{ 64, "???", "???", null, "gmail.plala.or.jp" },
{ 65, "GMX Freemail", "GMX", null, "gmx.com" },
{ 66, "GMX Freemail", "GMX", null, "gmx.net" },
{ 67, "????????????????????", "TVM-Net", null, "go.tvm.ne.jp" },
{ 82, "???", "???", null, "indigo.plala.or.jp" },
{ 68, "goo ????????", "goo", null, "goo.jp" },
{ 70, "???", "???", null, "grape.plala.or.jp" },
{ 71, "???", "???", null, "gray.plala.or.jp" },
{ 72, "?????????", "HAL", null, "hal.ne.jp" },
{ 73, "????????", "????", null, "hana.or.jp" },
{ 74, "Microsoft Live Hotmail", "Hotmail", null, "hotmail.com" },
{ 75, "SoftBank", "SoftBank", null, "i.softbank.jp" },
{ 76, "IC-NET", "IC-NET", null, "ic-net.or.jp" },
{ 77, "IIJmio ????????", "IIJmio", null, "iijmio-mail.jp" },
{ 78, "???????i?????", "i?????", null, "iiyama-catv.ne.jp" },
{ 79, "???", "???", null, "imail.plala.or.jp" },
{ 80, "Inbox.lt", "Inbox.lt", null, "inbox.lt" },
{ 69, "Google Mail", "GMail", null, "googlemail.com" },
{ 221, "Microsoft Office 365", "Office365", "https://products.office.com", "office365.com" }
});
migrationBuilder.CreateIndex(
name: "address_index",
table: "mail_mailbox",
column: "address");
migrationBuilder.CreateIndex(
name: "date_login_delay_expires",
table: "mail_mailbox",
columns: new[] { "date_checked", "date_login_delay_expires" });
migrationBuilder.CreateIndex(
name: "main_mailbox_id_in_server_mail_mailbox_server_id",
table: "mail_mailbox",
column: "id_in_server");
migrationBuilder.CreateIndex(
name: "main_mailbox_id_smtp_server_mail_mailbox_server_id",
table: "mail_mailbox",
column: "id_smtp_server");
migrationBuilder.CreateIndex(
name: "user_id_index",
table: "mail_mailbox",
columns: new[] { "tenant", "id_user" });
migrationBuilder.CreateIndex(
name: "mail_server_server_type_server_type_fk_id",
table: "mail_server_server",
column: "server_type");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ApiKeys");
migrationBuilder.DropTable(
name: "GreyListingWhiteList");
migrationBuilder.DropTable(
name: "mail_mailbox");
migrationBuilder.DropTable(
name: "mail_mailbox_provider");
migrationBuilder.DropTable(
name: "mail_server_server");
migrationBuilder.DropTable(
name: "MailboxServer");
}
}

View File

@ -1,216 +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.MessagingSystem.Migrations.MySql.MessagesContextMySql;
public partial class MessagesContextMySql : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "audit_events",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
initiator = table.Column<string>(type: "varchar(200)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
target = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
ip = table.Column<string>(type: "varchar(50)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
browser = table.Column<string>(type: "varchar(200)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
platform = table.Column<string>(type: "varchar(200)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
date = table.Column<DateTime>(type: "datetime", nullable: false),
tenant_id = table.Column<int>(type: "int", nullable: false),
user_id = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
page = table.Column<string>(type: "varchar(300)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
action = table.Column<int>(type: "int", nullable: false),
description = table.Column<string>(type: "varchar(20000)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PK_audit_events", x => x.id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "login_events",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
login = table.Column<string>(type: "varchar(200)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
ip = table.Column<string>(type: "varchar(50)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
browser = table.Column<string>(type: "varchar(200)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
platform = table.Column<string>(type: "varchar(200)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
date = table.Column<DateTime>(type: "datetime", nullable: false),
tenant_id = table.Column<int>(type: "int", nullable: false),
active = table.Column<int>(type: "int", nullable: false),
user_id = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
page = table.Column<string>(type: "varchar(300)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
action = table.Column<int>(type: "int", nullable: false),
description = table.Column<string>(type: "varchar(500)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PK_login_events", x => x.id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "tenants_tenants",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
alias = table.Column<string>(type: "varchar(100)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
mappeddomain = table.Column<string>(type: "varchar(100)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
version = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'2'"),
version_changed = table.Column<DateTime>(type: "datetime", nullable: true),
language = table.Column<string>(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
timezone = table.Column<string>(type: "varchar(50)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomains = table.Column<string>(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomainsenabled = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
status = table.Column<int>(type: "int", nullable: false),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: true),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "true"),
calls = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "true")
},
constraints: table =>
{
table.PrimaryKey("PK_tenants_tenants", x => x.id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "webstudio_settings",
columns: table => new
{
TenantID = table.Column<int>(type: "int", nullable: false),
ID = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
UserID = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
Data = table.Column<string>(type: "mediumtext", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.TenantID, x.ID, x.UserID });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.InsertData(
table: "tenants_tenants",
columns: new[] { "id", "alias", "creationdatetime", "industry", "mappeddomain", "name", "owner_id", "payment_id", "status", "statuschanged", "timezone", "trusteddomains", "version_changed" },
values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), null, null, "Web Office", "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, 0, null, null, null, null });
migrationBuilder.InsertData(
table: "webstudio_settings",
columns: new[] { "ID", "TenantID", "UserID", "Data" },
values: new object[] { "9a925891-1f92-4ed7-b277-d6f649739f06", 1, "00000000-0000-0000-0000-000000000000", "{'Completed':false}" });
migrationBuilder.CreateIndex(
name: "date",
table: "audit_events",
columns: new[] { "tenant_id", "date" });
migrationBuilder.CreateIndex(
name: "date",
table: "login_events",
column: "date");
migrationBuilder.CreateIndex(
name: "tenant_id",
table: "login_events",
columns: new[] { "tenant_id", "user_id" });
migrationBuilder.CreateIndex(
name: "last_modified",
table: "tenants_tenants",
column: "last_modified");
migrationBuilder.CreateIndex(
name: "mappeddomain",
table: "tenants_tenants",
column: "mappeddomain");
migrationBuilder.CreateIndex(
name: "version",
table: "tenants_tenants",
column: "version");
migrationBuilder.CreateIndex(
name: "ID",
table: "webstudio_settings",
column: "ID");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "audit_events");
migrationBuilder.DropTable(
name: "login_events");
migrationBuilder.DropTable(
name: "tenants_tenants");
migrationBuilder.DropTable(
name: "webstudio_settings");
}
}

View File

@ -1,94 +0,0 @@
// <auto-generated />
namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql
{
[DbContext(typeof(MySqlMessagesContext))]
partial class MySqlMessagesContextModelSnapshot : 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.Model.LoginEvents", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<int>("Action")
.HasColumnType("int")
.HasColumnName("action");
b.Property<string>("Browser")
.HasColumnType("varchar(200)")
.HasColumnName("browser")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("Date")
.HasColumnType("datetime")
.HasColumnName("date");
b.Property<string>("Description")
.HasColumnType("varchar(500)")
.HasColumnName("description")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Ip")
.HasColumnType("varchar(50)")
.HasColumnName("ip")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Login")
.HasColumnType("varchar(200)")
.HasColumnName("login")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Page")
.HasColumnType("varchar(300)")
.HasColumnName("page")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Platform")
.HasColumnType("varchar(200)")
.HasColumnName("platform")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
b.Property<int>("Active")
.HasColumnType("int")
.HasColumnName("active");
b.Property<string>("UserId")
.IsRequired()
.HasColumnType("char(38)")
.HasColumnName("user_id")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("Id");
b.HasIndex("Date")
.HasDatabaseName("date");
b.HasIndex("TenantId", "UserId")
.HasDatabaseName("tenant_id");
b.ToTable("login_events");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,125 +0,0 @@
// <auto-generated />
namespace ASC.Core.Common.Migrations.MySql.NotifyDbContextMySql
{
[DbContext(typeof(MySqlNotifyDbContext))]
[Migration("20211012145336_NotifyDbContextMySql")]
partial class NotifyDbContextMySql
{
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.NotifyInfo", b =>
{
b.Property<int>("NotifyId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("notify_id");
b.Property<int>("Attempts")
.HasColumnType("int")
.HasColumnName("attempts");
b.Property<DateTime>("ModifyDate")
.HasColumnType("datetime")
.HasColumnName("modify_date");
b.Property<int>("Priority")
.HasColumnType("int")
.HasColumnName("priority");
b.Property<int>("State")
.HasColumnType("int")
.HasColumnName("state");
b.HasKey("NotifyId")
.HasName("PRIMARY");
b.HasIndex("State")
.HasDatabaseName("state");
b.ToTable("notify_info");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.NotifyQueue", b =>
{
b.Property<int>("NotifyId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("notify_id");
b.Property<string>("Attachments")
.HasColumnType("text")
.HasColumnName("attachments")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("AutoSubmitted")
.HasColumnType("varchar(64)")
.HasColumnName("auto_submitted")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Content")
.HasColumnType("text")
.HasColumnName("content")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("ContentType")
.HasColumnType("varchar(64)")
.HasColumnName("content_type")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("CreationDate")
.HasColumnType("datetime")
.HasColumnName("creation_date");
b.Property<string>("Reciever")
.HasColumnType("varchar(255)")
.HasColumnName("reciever")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("ReplyTo")
.HasColumnType("varchar(1024)")
.HasColumnName("reply_to")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Sender")
.HasColumnType("varchar(255)")
.HasColumnName("sender")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("SenderType")
.HasColumnType("varchar(64)")
.HasColumnName("sender_type")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Subject")
.HasColumnType("varchar(1024)")
.HasColumnName("subject")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
b.HasKey("NotifyId")
.HasName("PRIMARY");
b.ToTable("notify_queue");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,100 +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.NotifyDbContextMySql;
public partial class NotifyDbContextMySql : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "notify_info",
columns: table => new
{
notify_id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
state = table.Column<int>(type: "int", nullable: false),
attempts = table.Column<int>(type: "int", nullable: false),
modify_date = table.Column<DateTime>(type: "datetime", nullable: false),
priority = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.notify_id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "notify_queue",
columns: table => new
{
notify_id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
tenant_id = table.Column<int>(type: "int", nullable: false),
sender = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
reciever = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
subject = table.Column<string>(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
content_type = table.Column<string>(type: "varchar(64)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
content = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
sender_type = table.Column<string>(type: "varchar(64)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
reply_to = table.Column<string>(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
creation_date = table.Column<DateTime>(type: "datetime", nullable: false),
attachments = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
auto_submitted = table.Column<string>(type: "varchar(64)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.notify_id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "state",
table: "notify_info",
column: "state");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "notify_info");
migrationBuilder.DropTable(
name: "notify_queue");
}
}

View File

@ -1,124 +0,0 @@
// <auto-generated />
namespace ASC.Core.Common.Migrations.MySql.NotifyDbContextMySql
{
[DbContext(typeof(MySqlNotifyDbContext))]
partial class MySqlNotifyDbContextModelSnapshot : 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.Model.NotifyInfo", b =>
{
b.Property<int>("NotifyId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("notify_id");
b.Property<int>("Attempts")
.HasColumnType("int")
.HasColumnName("attempts");
b.Property<DateTime>("ModifyDate")
.HasColumnType("datetime")
.HasColumnName("modify_date");
b.Property<int>("Priority")
.HasColumnType("int")
.HasColumnName("priority");
b.Property<int>("State")
.HasColumnType("int")
.HasColumnName("state");
b.HasKey("NotifyId")
.HasName("PRIMARY");
b.HasIndex("State")
.HasDatabaseName("state");
b.ToTable("notify_info");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.NotifyQueue", b =>
{
b.Property<int>("NotifyId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("notify_id");
b.Property<string>("Attachments")
.HasColumnType("text")
.HasColumnName("attachments")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("AutoSubmitted")
.HasColumnType("varchar(64)")
.HasColumnName("auto_submitted")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Content")
.HasColumnType("text")
.HasColumnName("content")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("ContentType")
.HasColumnType("varchar(64)")
.HasColumnName("content_type")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("CreationDate")
.HasColumnType("datetime")
.HasColumnName("creation_date");
b.Property<string>("Reciever")
.HasColumnType("varchar(255)")
.HasColumnName("reciever")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("ReplyTo")
.HasColumnType("varchar(1024)")
.HasColumnName("reply_to")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Sender")
.HasColumnType("varchar(255)")
.HasColumnName("sender")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("SenderType")
.HasColumnType("varchar(64)")
.HasColumnName("sender_type")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Subject")
.HasColumnType("varchar(1024)")
.HasColumnName("subject")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("TenantId")
.HasColumnType("int")
.HasColumnName("tenant_id");
b.HasKey("NotifyId")
.HasName("PRIMARY");
b.ToTable("notify_queue");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,311 +0,0 @@
// <auto-generated />
namespace ASC.Core.Common.Migrations.MySql.ResourceDbContextMySql
{
[DbContext(typeof(MySqlResourceDbContext))]
[Migration("20211012145338_ResourceDbContextMySql")]
partial class ResourceDbContextMySql
{
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.Resource.ResAuthors", b =>
{
b.Property<string>("Login")
.HasColumnType("varchar(150)")
.HasColumnName("login")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("IsAdmin")
.HasColumnType("tinyint(1)")
.HasColumnName("isAdmin");
b.Property<DateTime>("LastVisit")
.HasColumnType("datetime")
.HasColumnName("lastVisit");
b.Property<bool>("Online")
.HasColumnType("tinyint(1)")
.HasColumnName("online");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("varchar(50)")
.HasColumnName("password")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("Login")
.HasName("PRIMARY");
b.ToTable("res_authors");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Resource.ResAuthorsFile", b =>
{
b.Property<string>("AuthorLogin")
.HasColumnType("varchar(50)")
.HasColumnName("authorLogin")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("FileId")
.HasColumnType("int")
.HasColumnName("fileid");
b.Property<bool>("WriteAccess")
.HasColumnType("tinyint(1)")
.HasColumnName("writeAccess");
b.HasKey("AuthorLogin", "FileId")
.HasName("PRIMARY");
b.HasIndex("FileId")
.HasDatabaseName("res_authorsfile_FK2");
b.ToTable("res_authorsfile");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Resource.ResAuthorsLang", b =>
{
b.Property<string>("AuthorLogin")
.HasColumnType("varchar(50)")
.HasColumnName("authorLogin")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("CultureTitle")
.HasColumnType("varchar(20)")
.HasColumnName("cultureTitle")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("AuthorLogin", "CultureTitle")
.HasName("PRIMARY");
b.HasIndex("CultureTitle")
.HasDatabaseName("res_authorslang_FK2");
b.ToTable("res_authorslang");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Resource.ResCultures", b =>
{
b.Property<string>("Title")
.HasColumnType("varchar(120)")
.HasColumnName("title")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Available")
.HasColumnType("tinyint(1)")
.HasColumnName("available");
b.Property<DateTime>("CreationDate")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp")
.HasColumnName("creationDate")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("varchar(120)")
.HasColumnName("value")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("Title")
.HasName("PRIMARY");
b.ToTable("res_cultures");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Resource.ResData", b =>
{
b.Property<int>("FileId")
.HasColumnType("int")
.HasColumnName("fileid");
b.Property<string>("CultureTitle")
.HasColumnType("varchar(20)")
.HasColumnName("cultureTitle")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Title")
.HasColumnType("varchar(120)")
.HasColumnName("title")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("AuthorLogin")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("varchar(50)")
.HasColumnName("authorLogin")
.HasDefaultValueSql("'Console'")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Description")
.HasColumnType("text")
.HasColumnName("description")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Flag")
.HasColumnType("int")
.HasColumnName("flag");
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("Link")
.HasColumnType("varchar(120)")
.HasColumnName("link")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("ResourceType")
.HasColumnType("varchar(20)")
.HasColumnName("resourceType")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("TextValue")
.HasColumnType("text")
.HasColumnName("textValue")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("TimeChanges")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("timestamp")
.HasColumnName("timeChanges")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.HasKey("FileId", "CultureTitle", "Title")
.HasName("PRIMARY");
b.HasIndex("CultureTitle")
.HasDatabaseName("resources_FK2");
b.HasIndex("Id")
.IsUnique()
.HasDatabaseName("id");
b.HasIndex("TimeChanges")
.HasDatabaseName("dateIndex");
b.ToTable("res_data");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Resource.ResFiles", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<DateTime>("CreationDate")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp")
.HasColumnName("creationDate")
.HasDefaultValueSql("'0000-00-00 00:00:00'");
b.Property<bool>("IsLock")
.HasColumnType("tinyint(1)")
.HasColumnName("isLock");
b.Property<DateTime>("LastUpdate")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("timestamp")
.HasColumnName("lastUpdate")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.Property<string>("ModuleName")
.IsRequired()
.HasColumnType("varchar(50)")
.HasColumnName("moduleName")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("ProjectName")
.IsRequired()
.HasColumnType("varchar(50)")
.HasColumnName("projectName")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("ResName")
.IsRequired()
.HasColumnType("varchar(50)")
.HasColumnName("resName")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("Id");
b.HasIndex("ResName")
.IsUnique()
.HasDatabaseName("resname");
b.ToTable("res_files");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Resource.ResReserve", b =>
{
b.Property<int>("FileId")
.HasColumnType("int")
.HasColumnName("fileid");
b.Property<string>("Title")
.HasColumnType("varchar(120)")
.HasColumnName("title")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("CultureTitle")
.HasColumnType("varchar(20)")
.HasColumnName("cultureTitle")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Flag")
.HasColumnType("int")
.HasColumnName("flag");
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("TextValue")
.HasColumnType("text")
.HasColumnName("textValue")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("FileId", "Title", "CultureTitle")
.HasName("PRIMARY");
b.HasIndex("CultureTitle")
.HasDatabaseName("resources_FK2");
b.HasIndex("Id")
.IsUnique()
.HasDatabaseName("id");
b.ToTable("res_reserve");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -1,241 +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.ResourceDbContextMySql;
public partial class ResourceDbContextMySql : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "res_authors",
columns: table => new
{
login = table.Column<string>(type: "varchar(150)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
password = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
isAdmin = table.Column<bool>(type: "tinyint(1)", nullable: false),
online = table.Column<bool>(type: "tinyint(1)", nullable: false),
lastVisit = table.Column<DateTime>(type: "datetime", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.login);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "res_authorsfile",
columns: table => new
{
authorLogin = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
fileid = table.Column<int>(type: "int", nullable: false),
writeAccess = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.authorLogin, x.fileid });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "res_authorslang",
columns: table => new
{
authorLogin = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
cultureTitle = table.Column<string>(type: "varchar(20)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.authorLogin, x.cultureTitle });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "res_cultures",
columns: table => new
{
title = table.Column<string>(type: "varchar(120)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
value = table.Column<string>(type: "varchar(120)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
available = table.Column<bool>(type: "tinyint(1)", nullable: false),
creationDate = table.Column<DateTime>(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.title);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "res_data",
columns: table => new
{
fileid = table.Column<int>(type: "int", nullable: false),
title = table.Column<string>(type: "varchar(120)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
cultureTitle = table.Column<string>(type: "varchar(20)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
textValue = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
description = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
timeChanges = table.Column<DateTime>(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
resourceType = table.Column<string>(type: "varchar(20)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
flag = table.Column<int>(type: "int", nullable: false),
link = table.Column<string>(type: "varchar(120)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
authorLogin = table.Column<string>(type: "varchar(50)", nullable: false, defaultValueSql: "'Console'", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.fileid, x.cultureTitle, x.title });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "res_files",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
projectName = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
moduleName = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
resName = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
isLock = table.Column<bool>(type: "tinyint(1)", nullable: false),
lastUpdate = table.Column<DateTime>(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
creationDate = table.Column<DateTime>(type: "timestamp", nullable: false, defaultValueSql: "'0000-00-00 00:00:00'")
},
constraints: table =>
{
table.PrimaryKey("PK_res_files", x => x.id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "res_reserve",
columns: table => new
{
fileid = table.Column<int>(type: "int", nullable: false),
title = table.Column<string>(type: "varchar(120)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
cultureTitle = table.Column<string>(type: "varchar(20)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
textValue = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
flag = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.fileid, x.title, x.cultureTitle });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "res_authorsfile_FK2",
table: "res_authorsfile",
column: "fileid");
migrationBuilder.CreateIndex(
name: "res_authorslang_FK2",
table: "res_authorslang",
column: "cultureTitle");
migrationBuilder.CreateIndex(
name: "dateIndex",
table: "res_data",
column: "timeChanges");
migrationBuilder.CreateIndex(
name: "id",
table: "res_data",
column: "id",
unique: true);
migrationBuilder.CreateIndex(
name: "resources_FK2",
table: "res_data",
column: "cultureTitle");
migrationBuilder.CreateIndex(
name: "resname",
table: "res_files",
column: "resName",
unique: true);
migrationBuilder.CreateIndex(
name: "id",
table: "res_reserve",
column: "id",
unique: true);
migrationBuilder.CreateIndex(
name: "resources_FK2",
table: "res_reserve",
column: "cultureTitle");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "res_authors");
migrationBuilder.DropTable(
name: "res_authorsfile");
migrationBuilder.DropTable(
name: "res_authorslang");
migrationBuilder.DropTable(
name: "res_cultures");
migrationBuilder.DropTable(
name: "res_data");
migrationBuilder.DropTable(
name: "res_files");
migrationBuilder.DropTable(
name: "res_reserve");
}
}

View File

@ -1,310 +0,0 @@
// <auto-generated />
namespace ASC.Core.Common.Migrations.MySql.ResourceDbContextMySql
{
[DbContext(typeof(MySqlResourceDbContext))]
partial class MySqlResourceDbContextModelSnapshot : 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.Model.Resource.ResAuthors", b =>
{
b.Property<string>("Login")
.HasColumnType("varchar(150)")
.HasColumnName("login")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("IsAdmin")
.HasColumnType("tinyint(1)")
.HasColumnName("isAdmin");
b.Property<DateTime>("LastVisit")
.HasColumnType("datetime")
.HasColumnName("lastVisit");
b.Property<bool>("Online")
.HasColumnType("tinyint(1)")
.HasColumnName("online");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("varchar(50)")
.HasColumnName("password")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("Login")
.HasName("PRIMARY");
b.ToTable("res_authors");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Resource.ResAuthorsFile", b =>
{
b.Property<string>("AuthorLogin")
.HasColumnType("varchar(50)")
.HasColumnName("authorLogin")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("FileId")
.HasColumnType("int")
.HasColumnName("fileid");
b.Property<bool>("WriteAccess")
.HasColumnType("tinyint(1)")
.HasColumnName("writeAccess");
b.HasKey("AuthorLogin", "FileId")
.HasName("PRIMARY");
b.HasIndex("FileId")
.HasDatabaseName("res_authorsfile_FK2");
b.ToTable("res_authorsfile");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Resource.ResAuthorsLang", b =>
{
b.Property<string>("AuthorLogin")
.HasColumnType("varchar(50)")
.HasColumnName("authorLogin")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("CultureTitle")
.HasColumnType("varchar(20)")
.HasColumnName("cultureTitle")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("AuthorLogin", "CultureTitle")
.HasName("PRIMARY");
b.HasIndex("CultureTitle")
.HasDatabaseName("res_authorslang_FK2");
b.ToTable("res_authorslang");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Resource.ResCultures", b =>
{
b.Property<string>("Title")
.HasColumnType("varchar(120)")
.HasColumnName("title")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Available")
.HasColumnType("tinyint(1)")
.HasColumnName("available");
b.Property<DateTime>("CreationDate")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp")
.HasColumnName("creationDate")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("varchar(120)")
.HasColumnName("value")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("Title")
.HasName("PRIMARY");
b.ToTable("res_cultures");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Resource.ResData", b =>
{
b.Property<int>("FileId")
.HasColumnType("int")
.HasColumnName("fileid");
b.Property<string>("CultureTitle")
.HasColumnType("varchar(20)")
.HasColumnName("cultureTitle")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Title")
.HasColumnType("varchar(120)")
.HasColumnName("title")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("AuthorLogin")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("varchar(50)")
.HasColumnName("authorLogin")
.HasDefaultValueSql("'Console'")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("Description")
.HasColumnType("text")
.HasColumnName("description")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Flag")
.HasColumnType("int")
.HasColumnName("flag");
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("Link")
.HasColumnType("varchar(120)")
.HasColumnName("link")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("ResourceType")
.HasColumnType("varchar(20)")
.HasColumnName("resourceType")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("TextValue")
.HasColumnType("text")
.HasColumnName("textValue")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<DateTime>("TimeChanges")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("timestamp")
.HasColumnName("timeChanges")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.HasKey("FileId", "CultureTitle", "Title")
.HasName("PRIMARY");
b.HasIndex("CultureTitle")
.HasDatabaseName("resources_FK2");
b.HasIndex("Id")
.IsUnique()
.HasDatabaseName("id");
b.HasIndex("TimeChanges")
.HasDatabaseName("dateIndex");
b.ToTable("res_data");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Resource.ResFiles", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<DateTime>("CreationDate")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp")
.HasColumnName("creationDate")
.HasDefaultValueSql("'0000-00-00 00:00:00'");
b.Property<bool>("IsLock")
.HasColumnType("tinyint(1)")
.HasColumnName("isLock");
b.Property<DateTime>("LastUpdate")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("timestamp")
.HasColumnName("lastUpdate")
.HasDefaultValueSql("CURRENT_TIMESTAMP");
b.Property<string>("ModuleName")
.IsRequired()
.HasColumnType("varchar(50)")
.HasColumnName("moduleName")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("ProjectName")
.IsRequired()
.HasColumnType("varchar(50)")
.HasColumnName("projectName")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("ResName")
.IsRequired()
.HasColumnType("varchar(50)")
.HasColumnName("resName")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("Id");
b.HasIndex("ResName")
.IsUnique()
.HasDatabaseName("resname");
b.ToTable("res_files");
});
modelBuilder.Entity("ASC.Core.Common.EF.Model.Resource.ResReserve", b =>
{
b.Property<int>("FileId")
.HasColumnType("int")
.HasColumnName("fileid");
b.Property<string>("Title")
.HasColumnType("varchar(120)")
.HasColumnName("title")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<string>("CultureTitle")
.HasColumnType("varchar(20)")
.HasColumnName("cultureTitle")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Flag")
.HasColumnType("int")
.HasColumnName("flag");
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("id");
b.Property<string>("TextValue")
.HasColumnType("text")
.HasColumnName("textValue")
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.HasKey("FileId", "Title", "CultureTitle")
.HasName("PRIMARY");
b.HasIndex("CultureTitle")
.HasDatabaseName("resources_FK2");
b.HasIndex("Id")
.IsUnique()
.HasDatabaseName("id");
b.ToTable("res_reserve");
});
#pragma warning restore 612, 618
}
}
}

Some files were not shown because too many files have changed in this diff Show More