diff --git a/ASC.Migrations.sln b/ASC.Migrations.sln new file mode 100644 index 0000000000..e0bb82c87d --- /dev/null +++ b/ASC.Migrations.sln @@ -0,0 +1,91 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32616.157 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.MySql", "migrations\mysql\ASC.Migrations.MySql.csproj", "{78FD997A-8A30-4B8B-B81E-46E6EE05390D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Backup.Core", "common\ASC.Data.Backup.Core\ASC.Data.Backup.Core.csproj", "{93D91A49-A397-40FC-90DE-85D8ED774803}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Storage", "common\ASC.Data.Storage\ASC.Data.Storage.csproj", "{582AF3E8-ACA4-49B8-809D-36A586C4307E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files.Core", "products\ASC.Files\Core\ASC.Files.Core.csproj", "{03B5483D-2EEF-4A42-83E7-487592434D3B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.EventBus.Extensions.Logger", "common\ASC.EventBus.Extensions.Logger\ASC.EventBus.Extensions.Logger.csproj", "{1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Webhooks.Core", "common\ASC.Webhooks.Core\ASC.Webhooks.Core.csproj", "{FD61091C-F0C1-47B3-B442-9B69CEA603DF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Feed", "common\ASC.Feed\ASC.Feed.csproj", "{71A964E2-0075-46A3-AE58-9F2A78F6A5BB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.PostgreSql", "migrations\postgre\ASC.Migrations.PostgreSql.csproj", "{B06C5E36-BB67-4B4B-9E23-0326245BFCBB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Core.Common", "common\ASC.Core.Common\ASC.Core.Common.csproj", "{A51D0454-4AFA-46DE-89D4-B03D37E1816C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Migration.Creator", "common\Tools\Migration.Creator\Migration.Creator.csproj", "{4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Migration.Core", "common\Tools\Migration.Core\Migration.Core.csproj", "{4E971C04-8D1F-4C07-8D6F-C062C114CF7F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Migration.Runner", "common\Tools\Migration.Runner\Migration.Runner.csproj", "{249DC522-AC3B-475C-B77E-52CE0322E686}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {78FD997A-8A30-4B8B-B81E-46E6EE05390D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78FD997A-8A30-4B8B-B81E-46E6EE05390D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78FD997A-8A30-4B8B-B81E-46E6EE05390D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78FD997A-8A30-4B8B-B81E-46E6EE05390D}.Release|Any CPU.Build.0 = Release|Any CPU + {93D91A49-A397-40FC-90DE-85D8ED774803}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {93D91A49-A397-40FC-90DE-85D8ED774803}.Debug|Any CPU.Build.0 = Debug|Any CPU + {93D91A49-A397-40FC-90DE-85D8ED774803}.Release|Any CPU.ActiveCfg = Release|Any CPU + {93D91A49-A397-40FC-90DE-85D8ED774803}.Release|Any CPU.Build.0 = Release|Any CPU + {582AF3E8-ACA4-49B8-809D-36A586C4307E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {582AF3E8-ACA4-49B8-809D-36A586C4307E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {582AF3E8-ACA4-49B8-809D-36A586C4307E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {582AF3E8-ACA4-49B8-809D-36A586C4307E}.Release|Any CPU.Build.0 = Release|Any CPU + {03B5483D-2EEF-4A42-83E7-487592434D3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03B5483D-2EEF-4A42-83E7-487592434D3B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {03B5483D-2EEF-4A42-83E7-487592434D3B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {03B5483D-2EEF-4A42-83E7-487592434D3B}.Release|Any CPU.Build.0 = Release|Any CPU + {1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E3DF216-A0E6-4078-84A8-4A74A88A6FEF}.Release|Any CPU.Build.0 = Release|Any CPU + {FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD61091C-F0C1-47B3-B442-9B69CEA603DF}.Release|Any CPU.Build.0 = Release|Any CPU + {71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {71A964E2-0075-46A3-AE58-9F2A78F6A5BB}.Release|Any CPU.Build.0 = Release|Any CPU + {B06C5E36-BB67-4B4B-9E23-0326245BFCBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B06C5E36-BB67-4B4B-9E23-0326245BFCBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B06C5E36-BB67-4B4B-9E23-0326245BFCBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B06C5E36-BB67-4B4B-9E23-0326245BFCBB}.Release|Any CPU.Build.0 = Release|Any CPU + {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.Build.0 = Release|Any CPU + {4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BECDA03-E5E7-4273-B2D5-65AD3B1D0AF6}.Release|Any CPU.Build.0 = Release|Any CPU + {4E971C04-8D1F-4C07-8D6F-C062C114CF7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E971C04-8D1F-4C07-8D6F-C062C114CF7F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E971C04-8D1F-4C07-8D6F-C062C114CF7F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E971C04-8D1F-4C07-8D6F-C062C114CF7F}.Release|Any CPU.Build.0 = Release|Any CPU + {249DC522-AC3B-475C-B77E-52CE0322E686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {249DC522-AC3B-475C-B77E-52CE0322E686}.Debug|Any CPU.Build.0 = Debug|Any CPU + {249DC522-AC3B-475C-B77E-52CE0322E686}.Release|Any CPU.ActiveCfg = Release|Any CPU + {249DC522-AC3B-475C-B77E-52CE0322E686}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {933E5EEB-E9B0-4389-B318-11E283E7FCF7} + EndGlobalSection +EndGlobal diff --git a/ASC.Tests.sln b/ASC.Tests.sln index 95b4f1eba6..8524d8db98 100644 --- a/ASC.Tests.sln +++ b/ASC.Tests.sln @@ -76,6 +76,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig EndProjectSection EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Migrations.MySql", "migrations\mysql\ASC.Migrations.MySql.csproj", "{E81DC433-3555-4151-BDBC-16368A0FE14E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -217,6 +219,10 @@ Global {B53587B7-58F6-48A9-B122-69BEA3E2572A}.Debug|Any CPU.Build.0 = Debug|Any CPU {B53587B7-58F6-48A9-B122-69BEA3E2572A}.Release|Any CPU.ActiveCfg = Release|Any CPU {B53587B7-58F6-48A9-B122-69BEA3E2572A}.Release|Any CPU.Build.0 = Release|Any CPU + {E81DC433-3555-4151-BDBC-16368A0FE14E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E81DC433-3555-4151-BDBC-16368A0FE14E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E81DC433-3555-4151-BDBC-16368A0FE14E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E81DC433-3555-4151-BDBC-16368A0FE14E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ASC.Tools.sln b/ASC.Tools.sln deleted file mode 100644 index e0f5d32031..0000000000 --- a/ASC.Tools.sln +++ /dev/null @@ -1,37 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31815.197 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Core.Common", "common\ASC.Core.Common\ASC.Core.Common.csproj", "{A51D0454-4AFA-46DE-89D4-B03D37E1816C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoMigrationCreator", "common\Tools\AutoMigrationCreator\AutoMigrationCreator.csproj", "{D779E2D7-1060-43D3-B8F2-F76A73CCFEBC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files.Core", "products\ASC.Files\Core\ASC.Files.Core.csproj", "{B3D98EF4-B9A3-4082-AE78-7CF4C5CF5211}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A51D0454-4AFA-46DE-89D4-B03D37E1816C}.Release|Any CPU.Build.0 = Release|Any CPU - {D779E2D7-1060-43D3-B8F2-F76A73CCFEBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D779E2D7-1060-43D3-B8F2-F76A73CCFEBC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D779E2D7-1060-43D3-B8F2-F76A73CCFEBC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D779E2D7-1060-43D3-B8F2-F76A73CCFEBC}.Release|Any CPU.Build.0 = Release|Any CPU - {B3D98EF4-B9A3-4082-AE78-7CF4C5CF5211}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B3D98EF4-B9A3-4082-AE78-7CF4C5CF5211}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B3D98EF4-B9A3-4082-AE78-7CF4C5CF5211}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B3D98EF4-B9A3-4082-AE78-7CF4C5CF5211}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {3A1E5FB1-22F6-4394-BFF3-8733F4A23003} - EndGlobalSection -EndGlobal diff --git a/build/createMigrations.bat b/build/createMigrations.bat index db2b0d2bf8..e5726af891 100644 --- a/build/createMigrations.bat +++ b/build/createMigrations.bat @@ -1,5 +1,5 @@ @echo "MIGRATIONS" @echo off -PUSHD %~dp0..\common\Tools\AutoMigrationCreator -dotnet run --project AutoMigrationCreator.csproj \ No newline at end of file +PUSHD %~dp0..\common\Tools\Migration.Creator +dotnet run --project Migration.Creator.csproj \ No newline at end of file diff --git a/build/install/common/build-backend.sh b/build/install/common/build-backend.sh index 627a422a47..2a50a728d1 100644 --- a/build/install/common/build-backend.sh +++ b/build/install/common/build-backend.sh @@ -47,7 +47,6 @@ dotnet build ASC.Web.slnf ${ARGS} # Array of names backend services in directory common (Nodejs) services_name_backend_nodejs=() -services_name_backend_nodejs+=(ASC.Thumbnails) services_name_backend_nodejs+=(ASC.UrlShortener) services_name_backend_nodejs+=(ASC.Socket.IO) services_name_backend_nodejs+=(ASC.SsoAuth) diff --git a/build/install/common/publish-backend.sh b/build/install/common/publish-backend.sh index d79cf64726..4db72e6e87 100644 --- a/build/install/common/publish-backend.sh +++ b/build/install/common/publish-backend.sh @@ -78,9 +78,9 @@ services_name_backend+=(ASC.TelegramService) services_name_backend+=(ASC.UrlShortener.Svc) services_name_backend+=(ASC.Web.Api) services_name_backend+=(ASC.Web.Studio) -#services_name_backend+=(ASC.Thumbnails.Svc) services_name_backend+=(ASC.Data.Backup.BackgroundTasks) services_name_backend+=(ASC.ClearEvents) +services_name_backend+=(ASC.Migration) services_name_backend+=(ASC.Webhooks.Service) # Publish backend services @@ -93,7 +93,6 @@ done # Array of names backend services in directory common (Nodejs) services_name_backend_nodejs=() -#services_name_backend_nodejs+=(ASC.Thumbnails) services_name_backend_nodejs+=(ASC.UrlShortener) services_name_backend_nodejs+=(ASC.Socket.IO) services_name_backend_nodejs+=(ASC.SsoAuth) diff --git a/build/install/docker/.env b/build/install/docker/.env index 7414cd93b6..30ad9b3a18 100644 --- a/build/install/docker/.env +++ b/build/install/docker/.env @@ -49,6 +49,10 @@ # service host # API_SYSTEM_HOST=${CONTAINER_PREFIX}api-system BACKUP_HOST=${CONTAINER_PREFIX}backup + BACKUP_BACKGRUOND_TASKS_HOST=${CONTAINER_PREFIX}backup-background-tasks + CLEAR_EVENTS_HOST=${CONTAINER_PREFIX}clear-events + MIGRATION_HOST=${CONTAINER_PREFIX}migration + WEBHOOKS_SERVICE_HOST=${CONTAINER_PREFIX}webhooks-service STORAGE_ENCRYPTION_HOST=${CONTAINER_PREFIX}storage-encryption FILES_HOST=${CONTAINER_PREFIX}files FILES_SERVICES_HOST=${CONTAINER_PREFIX}files-services @@ -58,7 +62,6 @@ SOCKET_HOST=${CONTAINER_PREFIX}socket STUDIO_NOTIFY_HOST=${CONTAINER_PREFIX}studio-notify TELEGRAM_SERVICE_HOST=${CONTAINER_PREFIX}telegram-service - THUMBNAILS_HOST=${CONTAINER_PREFIX}thumbnails URLSHORTENER_HOST=${CONTAINER_PREFIX}urlshortener API_HOST=${CONTAINER_PREFIX}api STUDIO_HOST=${CONTAINER_PREFIX}studio @@ -68,6 +71,10 @@ # proxy upstream environment # SERVICE_API_SYSTEM=${API_SYSTEM_HOST}:${SERVICE_PORT} SERVICE_BACKUP=${BACKUP_HOST}:${SERVICE_PORT} + SERVICE_BACKUP_BACKGRUOND_TASKS=${BACKUP_BACKGRUOND_TASKS_HOST}:${SERVICE_PORT} + SERVICE_CLEAR_EVENTS=${CLEAR_EVENTS_HOST}:${SERVICE_PORT} + SERVICE_MIGRATION=${MIGRATION_HOST}:${SERVICE_PORT} + SERVICE_WEBHOOKS_SERVICE=${WEBHOOKS_SERVICE_HOST}:${SERVICE_PORT} SERVICE_STORAGE_ENCRYPTION=${STORAGE_ENCRYPTION_HOST}:${SERVICE_PORT} SERVICE_FILES=${FILES_HOST}:${SERVICE_PORT} SERVICE_FILES_SERVICES=${FILES_SERVICES_HOST}:${SERVICE_PORT} @@ -77,7 +84,6 @@ SERVICE_SOCKET=${SOCKET_HOST}:${SERVICE_PORT} SERVICE_STUDIO_NOTIFY=${STUDIO_NOTIFY_HOST}:${SERVICE_PORT} SERVICE_TELEGRAM_SERVICE=${TELEGRAM_SERVICE_HOST}:${SERVICE_PORT} - SERVICE_THUMBNAILS=${THUMBNAILS_HOST}:${SERVICE_PORT} SERVICE_URLSHORTENER=${URLSHORTENER_HOST}:${SERVICE_PORT} SERVICE_API=${API_HOST}:${SERVICE_PORT} SERVICE_STUDIO=${STUDIO_HOST}:${SERVICE_PORT} diff --git a/build/install/docker/Dockerfile.app b/build/install/docker/Dockerfile.app index 375f550ecb..43ff3fac9a 100644 --- a/build/install/docker/Dockerfile.app +++ b/build/install/docker/Dockerfile.app @@ -161,35 +161,36 @@ RUN chown nginx:nginx /etc/nginx/* -R && \ sed -i 's/localhost:9834/$service_sso/' /etc/nginx/conf.d/onlyoffice.conf && \ sed -i 's/localhost:5022/$service_mail/' /etc/nginx/conf.d/onlyoffice.conf && \ sed -i 's/localhost:9999/$service_urlshortener/' /etc/nginx/conf.d/onlyoffice.conf && \ + sed -i 's/localhost:5034/$service_migration/' /etc/nginx/conf.d/onlyoffice.conf && \ sed -i 's/172.*/$document_server;/' /etc/nginx/conf.d/onlyoffice.conf -## ASC.Webhooks.Service ## -FROM builder AS webhooks-wervice -WORKDIR ${BUILD_PATH}/services/ASC.Webhooks.Service/ - -COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py -COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Webhooks.Service/ . - -CMD ["ASC.Webhooks.Service.dll", "ASC.Webhooks.Service"] - -## ASC.ClearEvents ## -FROM builder AS clear-events -WORKDIR ${BUILD_PATH}/services/ASC.ClearEvents/ - -COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py -COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.ClearEvents/ . - -CMD ["ASC.ClearEvents.dll", "ASC.ClearEvents"] - ## ASC.Data.Backup.BackgroundTasks ## FROM builder AS backup_background WORKDIR ${BUILD_PATH}/services/ASC.Data.Backup.BackgroundTasks/ COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py -COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Data.Backup.BackgroundTasks/ . +COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Data.Backup.BackgroundTasks/service/ . CMD ["ASC.Data.Backup.BackgroundTasks.dll", "ASC.Data.Backup.BackgroundTasks"] +## ASC.ClearEvents ## +FROM builder AS clear-events +WORKDIR ${BUILD_PATH}/services/ASC.ClearEvents/ + +COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py +COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.ClearEvents/service/ . + +CMD ["ASC.ClearEvents.dll", "ASC.ClearEvents"] + +## ASC.Migration ## +FROM builder AS migration +WORKDIR ${BUILD_PATH}/services/ASC.Migration/ + +COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py +COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Migration/service/ . + +CMD ["ASC.Migration.dll", "ASC.Migration"] + ## ASC.Data.Backup ## FROM builder AS backup WORKDIR ${BUILD_PATH}/services/ASC.Data.Backup/ @@ -244,6 +245,15 @@ COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Socket CMD ["server.js", "ASC.Socket.IO"] +## ASC.SsoAuth ## +FROM nodeBuild AS ssoauth +WORKDIR ${BUILD_PATH}/services/ASC.SsoAuth/ + +COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py +COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.SsoAuth/service/ . + +CMD ["app.js", "ASC.SsoAuth"] + ## ASC.Studio.Notify ## FROM builder AS studio_notify WORKDIR ${BUILD_PATH}/services/ASC.Studio.Notify/service/ @@ -280,6 +290,15 @@ COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Web.Ap CMD ["ASC.Web.Api.dll", "ASC.Web.Api"] +## ASC.Webhooks.Service ## +FROM builder AS webhooks-service +WORKDIR ${BUILD_PATH}/services/ASC.Webhooks.Service/ + +COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py +COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Webhooks.Service/service/ . + +CMD ["ASC.Webhooks.Service.dll", "ASC.Webhooks.Service"] + ## ASC.Web.Studio ## FROM builder AS studio WORKDIR ${BUILD_PATH}/studio/ASC.Web.Studio/ @@ -289,15 +308,6 @@ COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Web.St CMD ["ASC.Web.Studio.dll", "ASC.Web.Studio"] -## ASC.SsoAuth ## -FROM nodeBuild AS ssoauth -WORKDIR ${BUILD_PATH}/services/ASC.SsoAuth/ - -COPY --chown=onlyoffice:onlyoffice docker-entrypoint.py ./docker-entrypoint.py -COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.SsoAuth/service/ . - -CMD ["app.js", "ASC.SsoAuth"] - ## image for k8s bin-share ## FROM busybox:latest AS bin_share RUN mkdir -p /app/appserver/ASC.Files/server && \ diff --git a/build/install/docker/appserver.yml b/build/install/docker/appserver.yml index b3f31a5c2e..3df3437b87 100644 --- a/build/install/docker/appserver.yml +++ b/build/install/docker/appserver.yml @@ -49,12 +49,26 @@ services: expose: - "9200" - "9300" - + onlyoffice-backup-background-tasks: + <<: *x-service-base + image: "${REPO}/${STATUS}appserver-backup-background:${DOCKER_TAG}" + container_name: ${BACKUP_BACKGRUOND_TASKS_HOST} + onlyoffice-backup: <<: *x-service-base image: "${REPO}/${STATUS}appserver-backup:${DOCKER_TAG}" container_name: ${BACKUP_HOST} + onlyoffice-clear-events: + <<: *x-service-base + image: "${REPO}/${STATUS}appserver-clear-events:${DOCKER_TAG}" + container_name: ${CLEAR_EVENTS_HOST} + + onlyoffice-migration: + <<: *x-service-base + image: "${REPO}/${STATUS}appserver-migration:${DOCKER_TAG}" + container_name: ${MIGRATION_HOST} + onlyoffice-files: <<: *x-service-base image: "${REPO}/${STATUS}appserver-files:${DOCKER_TAG}" @@ -76,7 +90,6 @@ services: container_name: ${SOCKET_HOST} expose: - ${SERVICE_PORT} - - "9899" onlyoffice-studio-notify: <<: *x-service-base @@ -88,14 +101,6 @@ services: image: "${REPO}/${STATUS}appserver-telegram-service:${DOCKER_TAG}" container_name: ${TELEGRAM_SERVICE_HOST} - # onlyoffice-thumbnails: - # <<: *x-service-base - # image: "${REPO}/${STATUS}appserver-thumbnails:${DOCKER_TAG}" - # container_name: ${THUMBNAILS_HOST} - # expose: - # - ${SERVICE_PORT} - # - "9800" - onlyoffice-urlshortener: <<: *x-service-base image: "${REPO}/${STATUS}appserver-urlshortener:${DOCKER_TAG}" @@ -122,6 +127,11 @@ services: - ${SERVICE_PORT} - "9834" + onlyoffice-webhooks-service: + <<: *x-service-base + image: "${REPO}/${STATUS}appserver-webhooks-service:${DOCKER_TAG}" + container_name: ${WEBHOOKS_SERVICE_HOST} + onlyoffice-proxy: image: "${REPO}/${STATUS}appserver-proxy:${DOCKER_TAG}" container_name: ${PROXY_HOST} @@ -133,14 +143,17 @@ services: ports: - 8092:8092 depends_on: + - onlyoffice-backup-background-tasks - onlyoffice-backup + - onlyoffice-clear-events + - onlyoffice-migration + - onlyoffice-webhooks-service - onlyoffice-files - onlyoffice-files-services - onlyoffice-people-server - onlyoffice-socket - onlyoffice-studio-notify - onlyoffice-telegram-service - # - onlyoffice-thumbnails - onlyoffice-urlshortener - onlyoffice-api - onlyoffice-studio @@ -149,12 +162,14 @@ services: - SERVICE_BACKUP=${SERVICE_BACKUP} - SERVICE_FILES=${SERVICE_FILES} - SERVICE_FILES_SERVICES=${SERVICE_FILES_SERVICES} + - SERVICE_CLEAR_EVENTS=${SERVICE_CLEAR_EVENTS} + - SERVICE_MIGRATION=${SERVICE_MIGRATION} + - SERVICE_WEBHOOKS_SERVICE=${SERVICE_WEBHOOKS_SERVICE} - SERVICE_NOTIFY=${SERVICE_NOTIFY} - SERVICE_PEOPLE_SERVER=${SERVICE_PEOPLE_SERVER} - SERVICE_SOCKET=${SERVICE_SOCKET} - SERVICE_STUDIO_NOTIFY=${SERVICE_STUDIO_NOTIFY} - SERVICE_TELEGRAM_SERVICE=${SERVICE_TELEGRAM_SERVICE} - - SERVICE_THUMBNAILS=${SERVICE_THUMBNAILS} - SERVICE_URLSHORTENER=${SERVICE_URLSHORTENER} - SERVICE_API=${SERVICE_API} - SERVICE_STUDIO=${SERVICE_STUDIO} diff --git a/build/install/docker/build.yml b/build/install/docker/build.yml index 04d6afae1f..c9cc6f5a15 100644 --- a/build/install/docker/build.yml +++ b/build/install/docker/build.yml @@ -14,13 +14,13 @@ services: dockerfile: "${DOCKERFILE}" target: clear-events image: "${REPO}/${STATUS}appserver-clear-events:${DOCKER_TAG}" - - onlyoffice-webhooks-wervice: + + onlyoffice-migration: build: context: ./ dockerfile: "${DOCKERFILE}" - target: webhooks-wervice - image: "${REPO}/${STATUS}appserver-webhooks-wervice:${DOCKER_TAG}" + target: migration + image: "${REPO}/${STATUS}appserver-migration:${DOCKER_TAG}" onlyoffice-backup: build: @@ -106,6 +106,13 @@ services: target: ssoauth image: "${REPO}/${STATUS}appserver-ssoauth:${DOCKER_TAG}" + onlyoffice-webhooks-service: + build: + context: ./ + dockerfile: "${DOCKERFILE}" + target: webhooks-service + image: "${REPO}/${STATUS}appserver-webhooks-service:${DOCKER_TAG}" + onlyoffice-bin-share: build: context: ./ diff --git a/build/install/docker/config/nginx/templates/upstream.conf.template b/build/install/docker/config/nginx/templates/upstream.conf.template index d364ff08fe..54153917c8 100644 --- a/build/install/docker/config/nginx/templates/upstream.conf.template +++ b/build/install/docker/config/nginx/templates/upstream.conf.template @@ -1,5 +1,10 @@ resolver $DNS_NAMESERVER valid=30s; +map $SERVICE_MIGRATION $service_migration { + volatile; + $SERVICE_MIGRATION $SERVICE_MIGRATION; +} + map $SERVICE_API_SYSTEM $service_api_system { volatile; $SERVICE_API_SYSTEM $SERVICE_API_SYSTEM; diff --git a/build/install/docker/notify.yml b/build/install/docker/notify.yml index e0d1f828bf..cea935e06f 100644 --- a/build/install/docker/notify.yml +++ b/build/install/docker/notify.yml @@ -11,6 +11,7 @@ x-service: MYSQL_DATABASE: ${MYSQL_DATABASE} MYSQL_USER: ${MYSQL_USER} MYSQL_PASSWORD: ${MYSQL_PASSWORD} + DATABASE_MIGRATION: ${DATABASE_MIGRATION} APP_DOTNET_ENV: ${APP_DOTNET_ENV} APP_CORE_BASE_DOMAIN: ${APP_CORE_BASE_DOMAIN} APP_CORE_MACHINEKEY: ${APP_CORE_MACHINEKEY} @@ -26,10 +27,6 @@ x-service: - app_data:/app/onlyoffice/data - files_data:/var/www/products/ASC.Files/server/ - people_data:/var/www/products/ASC.People/server/ - - crm_data:/var/www/products/ASC.CRM/server/ - - project_data:/var/www/products/ASC.Projects/server/ - - calendar_data:/var/www/products/ASC.Calendar/server/ - - mail_data:/var/www/products/ASC.Mail/server/ services: onlyoffice-notify: diff --git a/build/run/Editors.xml b/build/run/Editors.xml new file mode 100644 index 0000000000..d9d94457ef --- /dev/null +++ b/build/run/Editors.xml @@ -0,0 +1,10 @@ + + OnlyofficeEditors + ONLYOFFICE Editors SSR + manual + node + ../../build/deploy/products/ASC.Files/editor/server.js + + true + + \ No newline at end of file diff --git a/build/runMigrations.bat b/build/runMigrations.bat new file mode 100644 index 0000000000..75ff86edb0 --- /dev/null +++ b/build/runMigrations.bat @@ -0,0 +1,6 @@ +@echo "MIGRATIONS" +@echo off + +PUSHD %~dp0..\common\Tools\Migration.Runner +dotnet run --project Migration.Runner.csproj +dotnet run --project Migration.Runner.csproj --options:Path=C:\Git\portals_core\common\ASC.Data.Backup.Core\bin\Debug\net6.0 \ No newline at end of file diff --git a/common/ASC.Api.Core/GlobalUsings.cs b/common/ASC.Api.Core/GlobalUsings.cs index 7d1e52f0ea..3eeb366b38 100644 --- a/common/ASC.Api.Core/GlobalUsings.cs +++ b/common/ASC.Api.Core/GlobalUsings.cs @@ -71,8 +71,8 @@ global using ASC.EventBus.Abstractions; global using ASC.EventBus.RabbitMQ; global using ASC.IPSecurity; global using ASC.MessagingSystem.Core; -global using ASC.MessagingSystem.Data; -global using ASC.MessagingSystem.Models; +global using ASC.MessagingSystem.EF.Context; +global using ASC.MessagingSystem.EF.Model; global using ASC.Security.Cryptography; global using ASC.Web.Api.Routing; global using ASC.Web.Core; diff --git a/common/ASC.Common/Log/CommonLogger.cs b/common/ASC.Common/Log/CommonLogger.cs index b0cca15d02..b49dd2a5b7 100644 --- a/common/ASC.Common/Log/CommonLogger.cs +++ b/common/ASC.Common/Log/CommonLogger.cs @@ -30,7 +30,7 @@ public static partial class CommonLogger [LoggerMessage(Level = LogLevel.Error)] public static partial void ErrorWithException(this ILogger logger, Exception exception); - [LoggerMessage(Level = LogLevel.Error, Message = "{message}")] + [LoggerMessage(Level = LogLevel.Error)] public static partial void ErrorWithException(this ILogger logger, string message, Exception exception); [LoggerMessage(Level = LogLevel.Error, Message = "{message}")] @@ -48,6 +48,6 @@ public static partial class CommonLogger [LoggerMessage(Level = LogLevel.Warning)] public static partial void WarningWithException(this ILogger logger, Exception exception); - [LoggerMessage(Level = LogLevel.Warning, Message = "{message}")] + [LoggerMessage(Level = LogLevel.Warning)] public static partial void WarningWithException(this ILogger logger, string message, Exception exception); } diff --git a/common/ASC.Common/Mapping/MappingProfile.cs b/common/ASC.Common/Mapping/MappingProfile.cs index 0cf07ce3f2..6693002386 100644 --- a/common/ASC.Common/Mapping/MappingProfile.cs +++ b/common/ASC.Common/Mapping/MappingProfile.cs @@ -41,7 +41,7 @@ public class MappingProfile : Profile return; } - var types = assembly.GetExportedTypes().Where(t => t.IsClosedTypeOf(typeof(IMapFrom<>))); + var types = assembly.GetExportedTypes().Where(t => t.IsClosedTypeOf(typeof(IMapFrom<>)) || (t.IsGenericType && t.GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IMapFrom<>)))); foreach (var type in types) { diff --git a/common/ASC.Core.Common/ASC.Core.Common.csproj b/common/ASC.Core.Common/ASC.Core.Common.csproj index c76bbb1194..4b88667795 100644 --- a/common/ASC.Core.Common/ASC.Core.Common.csproj +++ b/common/ASC.Core.Common/ASC.Core.Common.csproj @@ -80,8 +80,4 @@ - - - - \ No newline at end of file diff --git a/common/ASC.Core.Common/Billing/TariffService.cs b/common/ASC.Core.Common/Billing/TariffService.cs index 6b1c705759..a0bebfd0cb 100644 --- a/common/ASC.Core.Common/Billing/TariffService.cs +++ b/common/ASC.Core.Common/Billing/TariffService.cs @@ -603,6 +603,7 @@ public class TariffService : ITariffService foreach (var t in tariffs) { t.Tenant = -2; + t.CreateOn = DateTime.UtcNow; } CoreDbContext.SaveChanges(); diff --git a/common/ASC.Core.Common/Core/DBResourceManager.cs b/common/ASC.Core.Common/Core/DBResourceManager.cs index 3620d4aa91..2633da7e03 100644 --- a/common/ASC.Core.Common/Core/DBResourceManager.cs +++ b/common/ASC.Core.Common/Core/DBResourceManager.cs @@ -26,243 +26,6 @@ namespace TMResourceData; -public class DBResourceManager : ResourceManager -{ - public static readonly bool WhiteLableEnabled; - private readonly ConcurrentDictionary _resourceSets = new ConcurrentDictionary(); - private readonly IMemoryCache _memoryCache; - - public DBResourceManager(string filename, Assembly assembly) - : base(filename, assembly) - { - } - - public DBResourceManager( - IMemoryCache memoryCache, - IConfiguration configuration, - ILogger option, - DbContextManager dbContext, - string filename, - Assembly assembly) - : base(filename, assembly) - { - _memoryCache = memoryCache; - _configuration = configuration; - _option = option; - _dbContext = dbContext; - } - - public static void PatchAssemblies(ILogger option) - { - AppDomain.CurrentDomain.AssemblyLoad += (_, a) => PatchAssembly(option, a.LoadedAssembly); - Array.ForEach(AppDomain.CurrentDomain.GetAssemblies(), a => PatchAssembly(option, a)); - } - - public static void PatchAssembly(ILogger logger, Assembly a, bool onlyAsc = true) - { - var log = logger; - - if (!onlyAsc || Accept(a)) - { - var types = Array.Empty(); - try - { - types = a.GetTypes(); - } - catch (ReflectionTypeLoadException rtle) - { - log.CanNotGetType(nameof(a.GetType), a.FullName, nameof(a.GetExportedTypes), rtle); - foreach (var e in rtle.LoaderExceptions) - { - log.Information(e.Message); - } - - try - { - types = a.GetExportedTypes(); - } - catch (Exception err) - { - log.CanNotGetExportedTypes(a.FullName, nameof(a.GetExportedTypes), err); - } - } - foreach (var type in types) - { - var prop = type.GetProperty("ResourceManager", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); - if (prop != null) - { - var rm = (ResourceManager)prop.GetValue(type); - if (rm is not DBResourceManager) - { - var dbrm = new DBResourceManager(rm.BaseName, a); - type.InvokeMember("resourceMan", BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.SetField, null, type, new object[] { dbrm }); - } - } - } - } - } - - private static bool Accept(Assembly a) - { - var n = a.GetName().Name; - - return (n.StartsWith("ASC.") || n.StartsWith("App_GlobalResources")) && a.GetManifestResourceNames().Length > 0; - } - - public override Type ResourceSetType => typeof(DBResourceSet); - - private readonly IConfiguration _configuration; - private readonly ILogger _option; - private readonly DbContextManager _dbContext; - - protected override ResourceSet InternalGetResourceSet(CultureInfo culture, bool createIfNotExists, bool tryParents) - { - _resourceSets.TryGetValue(culture.Name, out var set); - if (set == null) - { - var invariant = culture == CultureInfo.InvariantCulture ? base.InternalGetResourceSet(CultureInfo.InvariantCulture, true, true) : null; - set = new DBResourceSet(_memoryCache, _configuration, _option, _dbContext, invariant, culture, BaseName); - _resourceSets.AddOrUpdate(culture.Name, set, (k, v) => set); - } - - return set; - } - - class DBResourceSet : ResourceSet - { - private const string NeutralCulture = "Neutral"; - - private readonly TimeSpan _cacheTimeout = TimeSpan.FromMinutes(120); // for performance - private readonly object _locker = new object(); - private readonly IMemoryCache _cache; - private readonly ResourceSet _invariant; - private readonly string _culture; - private readonly string _fileName; - private readonly ILogger _logger; - private readonly DbContextManager _dbContext; - - public DBResourceSet( - IMemoryCache memoryCache, - IConfiguration configuration, - ILogger logger, - DbContextManager dbContext, - ResourceSet invariant, - CultureInfo culture, - string filename) - { - ArgumentNullException.ThrowIfNull(culture); - ArgumentNullOrEmptyException.ThrowIfNullOrEmpty(filename); - - _dbContext = dbContext; - _logger = logger; - - try - { - var defaultValue = ((int)_cacheTimeout.TotalMinutes).ToString(); - _cacheTimeout = TimeSpan.FromMinutes(Convert.ToInt32(configuration["resources:cache-timeout"] ?? defaultValue)); - } - catch (Exception err) - { - _logger.ErrorDBResourceSet(err); - } - - _invariant = invariant; - _culture = invariant != null ? NeutralCulture : culture.Name; - _fileName = filename.Split('.').Last() + ".resx"; - _cache = memoryCache; - } - - public override string GetString(string name, bool ignoreCase) - { - var result = (string)null; - try - { - var dic = GetResources(); - dic.TryGetValue(name, out result); - } - catch (Exception err) - { - _logger.CanNotGetResource(_fileName, _culture, name, err); - } - - if (_invariant != null && result == null) - { - result = _invariant.GetString(name, ignoreCase); - } - - return result; - } - - public override IDictionaryEnumerator GetEnumerator() - { - var result = new Hashtable(); - if (_invariant != null) - { - foreach (DictionaryEntry e in _invariant) - { - result[e.Key] = e.Value; - } - } - try - { - var dic = GetResources(); - foreach (var e in dic) - { - result[e.Key] = e.Value; - } - } - catch (Exception err) - { - _logger.ErrorDBResourceSet(err); - } - - return result.GetEnumerator(); - } - - private Dictionary GetResources() - { - var key = $"{_fileName}/{_culture}"; - if (_cache.Get(key) is not Dictionary dic) - { - lock (_locker) - { - dic = _cache.Get(key) as Dictionary; - - if (dic == null) - { - - dic = LoadResourceSet(_fileName, _culture); - - if (_cacheTimeout == TimeSpan.Zero) - { - _cache.Set(key, dic); - } - else - { - _cache.Set(key, dic, DateTimeOffset.Now.Add(_cacheTimeout)); - } - - } - } - } - - return dic; - } - - private Dictionary LoadResourceSet(string filename, string culture) - { - using var context = _dbContext.Get("tmresource"); - var q = context.ResData - .Where(r => r.CultureTitle == culture) - .Join(context.ResFiles, r => r.FileId, a => a.Id, (d, f) => new { data = d, files = f }) - .Where(r => r.files.ResName == filename); - - return q - .ToDictionary(r => r.data.Title, r => r.data.TextValue, StringComparer.InvariantCultureIgnoreCase); - } - } -} - [Singletone] public class WhiteLabelHelper { @@ -303,55 +66,4 @@ public class WhiteLabelHelper _logger.ErrorRestoreOldText(e); } } - - internal string ReplaceLogo(TenantManager tenantManager, IHttpContextAccessor httpContextAccessor, string resourceName, string resourceValue) - { - if (string.IsNullOrEmpty(resourceValue)) - { - return resourceValue; - } - if (!DBResourceManager.WhiteLableEnabled) - { - return resourceValue; - } - - if (httpContextAccessor.HttpContext != null) //if in Notify Service or other process without HttpContext - { - try - { - var tenant = tenantManager.GetCurrentTenant(false); - if (tenant == null) - { - return resourceValue; - } - - if (_whiteLabelDictionary.TryGetValue(tenant.Id, out var newText)) - { - var newTextReplacement = newText; - - if (resourceValue.IndexOf('<') >= 0 && resourceValue.IndexOf('>') >= 0 || resourceName.StartsWith("pattern_")) - { - newTextReplacement = HttpUtility.HtmlEncode(newTextReplacement); - } - if (resourceValue.Contains("{0")) - { - //Hack for string which used in string.Format - newTextReplacement = newTextReplacement.Replace("{", "{{").Replace("}", "}}"); - } - - var replPattern = _configuration["resources:whitelabel-text.replacement.pattern"] ?? "(?<=[^@/\\\\]|^)({0})(?!\\.com)"; - var pattern = string.Format(replPattern, DefaultLogoText); - //Hack for resource strings with mails looked like ...@onlyoffice... or with website http://www.onlyoffice.com link or with the https://www.facebook.com/pages/OnlyOffice/833032526736775 - - return Regex.Replace(resourceValue, pattern, newTextReplacement, RegexOptions.IgnoreCase).Replace("™", ""); - } - } - catch (Exception e) - { - _logger.ErrorReplaceLogo(e); - } - } - - return resourceValue; - } } diff --git a/common/ASC.Core.Common/Data/DbLoginEventsManager.cs b/common/ASC.Core.Common/Data/DbLoginEventsManager.cs index 531a60d6a2..0cba2e1eae 100644 --- a/common/ASC.Core.Common/Data/DbLoginEventsManager.cs +++ b/common/ASC.Core.Common/Data/DbLoginEventsManager.cs @@ -68,7 +68,7 @@ public class DbLoginEventsManager { var date = DateTime.UtcNow.AddYears(-1); var resultList = await LoginEventContext.LoginEvents - .Where(r => r.TenantId == tenantId && r.UserId == userId && _loginActions.Contains(r.Action) && r.Date >= date && r.Active) + .Where(r => r.TenantId == tenantId && r.UserId == userId && _loginActions.Contains(r.Action ?? 0) && r.Date >= date && r.Active) .Select(r => r.Id) .ToListAsync(); @@ -79,7 +79,7 @@ public class DbLoginEventsManager { var date = DateTime.UtcNow.AddYears(-1); var loginInfo = await LoginEventContext.LoginEvents - .Where(r => r.TenantId == tenantId && r.UserId == userId && _loginActions.Contains(r.Action) && r.Date >= date && r.Active) + .Where(r => r.TenantId == tenantId && r.UserId == userId && _loginActions.Contains(r.Action ?? 0) && r.Date >= date && r.Active) .OrderByDescending(r => r.Id) .ToListAsync(); diff --git a/common/ASC.Core.Common/Data/DbUserService.cs b/common/ASC.Core.Common/Data/DbUserService.cs index 9d07f5b2de..346059c0c7 100644 --- a/common/ASC.Core.Common/Data/DbUserService.cs +++ b/common/ASC.Core.Common/Data/DbUserService.cs @@ -181,7 +181,7 @@ public class EFUserService : IUserService q = q.Where(r => r.Tenant == tenant); } - return q.Where(r => r.GroupId == groupId && r.RefType == refType && !r.Removed) + return q.Where(r => r.UserGroupId == groupId && r.RefType == refType && !r.Removed) .ProjectTo(_mapper.ConfigurationProvider).SingleOrDefault(); } @@ -287,7 +287,7 @@ public class EFUserService : IUserService UserDbContext.Subscriptions.RemoveRange(UserDbContext.Subscriptions.Where(r => r.Tenant == tenant && stringIds.Any(i => i == r.Recipient))); UserDbContext.SubscriptionMethods.RemoveRange(UserDbContext.SubscriptionMethods.Where(r => r.Tenant == tenant && stringIds.Any(i => i == r.Recipient))); - var userGroups = UserDbContext.UserGroups.Where(r => r.Tenant == tenant && ids.Any(i => i == r.GroupId)); + var userGroups = UserDbContext.UserGroups.Where(r => r.Tenant == tenant && ids.Any(i => i == r.UserGroupId)); var groups = UserDbContext.Groups.Where(r => r.Tenant == tenant && ids.Any(i => i == r.Id)); if (immediate) @@ -332,7 +332,7 @@ public class EFUserService : IUserService UserDbContext.SubscriptionMethods.RemoveRange(UserDbContext.SubscriptionMethods.Where(r => r.Tenant == tenant && r.Recipient == id.ToString())); UserDbContext.Photos.RemoveRange(UserDbContext.Photos.Where(r => r.Tenant == tenant && r.UserId == id)); - var userGroups = UserDbContext.UserGroups.Where(r => r.Tenant == tenant && r.UserId == id); + var userGroups = UserDbContext.UserGroups.Where(r => r.Tenant == tenant && r.Userid == id); var users = UserDbContext.Users.Where(r => r.Tenant == tenant && r.Id == id); var userSecurity = UserDbContext.UserSecurity.Where(r => r.Tenant == tenant && r.UserId == id); @@ -378,7 +378,7 @@ public class EFUserService : IUserService { using var tr = UserDbContext.Database.BeginTransaction(); - var userGroups = UserDbContext.UserGroups.Where(r => r.Tenant == tenant && r.UserId == userId && r.GroupId == groupId && r.RefType == refType); + var userGroups = UserDbContext.UserGroups.Where(r => r.Tenant == tenant && r.Userid == userId && r.UserGroupId == groupId && r.RefType == refType); if (immediate) { UserDbContext.UserGroups.RemoveRange(userGroups); @@ -605,7 +605,7 @@ public class EFUserService : IUserService { foreach (var ig in includeGroups) { - q = q.Where(r => r.Groups.Any(a => !a.Removed && a.Tenant == r.Tenant && a.UserId == r.Id && ig.Any(r => r == a.GroupId))); + q = q.Where(r => UserDbContext.UserGroups.Any(a => !a.Removed && a.Tenant == r.Tenant && a.Userid == r.Id && ig.Any(r => r == a.UserGroupId))); } } @@ -613,7 +613,7 @@ public class EFUserService : IUserService { foreach (var eg in excludeGroups) { - q = q.Where(r => !r.Groups.Any(a => !a.Removed && a.Tenant == r.Tenant && a.UserId == r.Id && a.GroupId == eg)); + q = q.Where(r => !UserDbContext.UserGroups.Any(a => !a.Removed && a.Tenant == r.Tenant && a.Userid == r.Id && a.UserGroupId == eg)); } } diff --git a/common/ASC.Core.Common/EF/Context/AccountLinkContext.cs b/common/ASC.Core.Common/EF/Context/AccountLinkContext.cs index 625f5d3a10..afe2f9a50a 100644 --- a/common/ASC.Core.Common/EF/Context/AccountLinkContext.cs +++ b/common/ASC.Core.Common/EF/Context/AccountLinkContext.cs @@ -26,24 +26,10 @@ namespace ASC.Core.Common.EF.Context; -public class MySqlAccountLinkContext : AccountLinkContext { } -public class PostgreSqlAccountLinkContext : AccountLinkContext { } public class AccountLinkContext : BaseDbContext { public DbSet AccountLinks { get; set; } - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlAccountLinkContext() } , - { Provider.PostgreSql, () => new PostgreSqlAccountLinkContext() } , - }; - } - } - protected override void OnModelCreating(ModelBuilder modelBuilder) { ModelBuilderWrapper diff --git a/common/ASC.Core.Common/EF/Context/BaseDbContext.cs b/common/ASC.Core.Common/EF/Context/BaseDbContext.cs index fa992684b3..796eb4c9b6 100644 --- a/common/ASC.Core.Common/EF/Context/BaseDbContext.cs +++ b/common/ASC.Core.Common/EF/Context/BaseDbContext.cs @@ -37,35 +37,14 @@ public enum Provider public class BaseDbContext : DbContext { public ConnectionStringSettings ConnectionStringSettings { get; set; } - internal string MigrateAssembly { get; set; } + public string MigrateAssembly { get; set; } internal ILoggerFactory LoggerFactory { get; set; } public static readonly ServerVersion ServerVersion = ServerVersion.Parse("8.0.25"); - - protected virtual Dictionary> ProviderContext => null; protected Provider _provider; public BaseDbContext() { } public BaseDbContext(DbContextOptions options) : base(options) { } - public void Migrate() - { - if (ProviderContext != null) - { - var provider = GetProviderByConnectionString(); - - using var sqlProvider = ProviderContext[provider](); - sqlProvider.ConnectionStringSettings = ConnectionStringSettings; - sqlProvider.LoggerFactory = LoggerFactory; - sqlProvider.MigrateAssembly = MigrateAssembly; - - sqlProvider.Database.Migrate(); - } - else - { - Database.Migrate(); - } - } - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { optionsBuilder.UseLoggerFactory(LoggerFactory); @@ -74,6 +53,7 @@ public class BaseDbContext : DbContext switch (_provider) { case Provider.MySql: + optionsBuilder.ReplaceService(); optionsBuilder.UseMySql(ConnectionStringSettings.ConnectionString, ServerVersion, providerOptions => { if (!string.IsNullOrEmpty(MigrateAssembly)) @@ -86,7 +66,13 @@ public class BaseDbContext : DbContext }); break; case Provider.PostgreSql: - optionsBuilder.UseNpgsql(ConnectionStringSettings.ConnectionString); + optionsBuilder.UseNpgsql(ConnectionStringSettings.ConnectionString, providerOptions => + { + if (!string.IsNullOrEmpty(MigrateAssembly)) + { + providerOptions.MigrationsAssembly(MigrateAssembly); + } + }); break; } } diff --git a/common/ASC.Core.Common/EF/Context/CoreDbContext.cs b/common/ASC.Core.Common/EF/Context/CoreDbContext.cs index 7b2dad9457..c83a71f4f3 100644 --- a/common/ASC.Core.Common/EF/Context/CoreDbContext.cs +++ b/common/ASC.Core.Common/EF/Context/CoreDbContext.cs @@ -26,31 +26,17 @@ namespace ASC.Core.Common.EF; -public class MySqlCoreDbContext : CoreDbContext { } -public class PostgreSqlCoreDbContext : CoreDbContext { } public class CoreDbContext : BaseDbContext { public DbSet Tariffs { get; set; } public DbSet Buttons { get; set; } public DbSet Quotas { get; set; } public DbSet QuotaRows { get; set; } - - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlCoreDbContext() } , - { Provider.PostgreSql, () => new PostgreSqlCoreDbContext() } , - }; - } - } protected override void OnModelCreating(ModelBuilder modelBuilder) { ModelBuilderWrapper .From(modelBuilder, _provider) - .AddDbButton() + .AddDbButton() .AddDbQuotaRow() .AddDbQuota() .AddDbTariff(); diff --git a/common/ASC.Core.Common/EF/Context/DbContext.cs b/common/ASC.Core.Common/EF/Context/CustomDbContext.cs similarity index 73% rename from common/ASC.Core.Common/EF/Context/DbContext.cs rename to common/ASC.Core.Common/EF/Context/CustomDbContext.cs index 69748588c2..c278ce7eeb 100644 --- a/common/ASC.Core.Common/EF/Context/DbContext.cs +++ b/common/ASC.Core.Common/EF/Context/CustomDbContext.cs @@ -1,68 +1,61 @@ -// (c) Copyright Ascensio System SIA 2010-2022 -// -// This program is a free software product. -// You can redistribute it and/or modify it under the terms -// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software -// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended -// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of -// any third-party rights. -// -// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see -// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html -// -// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. -// -// The interactive user interfaces in modified source and object code versions of the Program must -// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. -// -// Pursuant to Section 7(b) of the License you must retain the original Product logo when -// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under -// trademark law for use of our trademarks. -// -// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing -// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 -// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - -namespace ASC.Core.Common.EF.Context; - -public class MySqlDbContext : DbContext { } -public class PostgreSqlDbContext : DbContext { } -public class DbContext : BaseDbContext +// (c) Copyright Ascensio System SIA 2010-2022 +// +// This program is a free software product. +// You can redistribute it and/or modify it under the terms +// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software +// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended +// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of +// any third-party rights. +// +// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see +// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html +// +// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. +// +// The interactive user interfaces in modified source and object code versions of the Program must +// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. +// +// Pursuant to Section 7(b) of the License you must retain the original Product logo when +// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under +// trademark law for use of our trademarks. +// +// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing +// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 +// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + +namespace ASC.Core.Common.EF.Context; + +public class CustomDbContext : BaseDbContext { - public DbSet MobileAppInstall { get; set; } - public DbSet DbipLocation { get; set; } - public DbSet Regions { get; set; } - - public DbContext() { } - - public DbContext(DbContextOptions options) : base(options) { } - - protected override Dictionary> ProviderContext + public CustomDbContext() { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlDbContext() } , - { Provider.PostgreSql, () => new PostgreSqlDbContext() } , - }; - } - } - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - ModelBuilderWrapper - .From(modelBuilder, _provider) - .AddMobileAppInstall() - .AddDbipLocation() - .AddRegions(); - } -} -public static class DbContextExtension -{ - public static DIHelper AddDbContextService(this DIHelper services) - { - return services.AddDbContextManagerService(); } -} + + public CustomDbContext(DbContextOptions options) : base(options) + { + + } + + public DbSet MobileAppInstall { get; set; } + public DbSet DbipLocation { get; set; } + public DbSet Regions { get; set; } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + ModelBuilderWrapper + .From(modelBuilder, _provider) + .AddMobileAppInstall() + .AddDbipLocation() + .AddRegions(); + } +} + +public static class CustomDbContextExtension +{ + public static DIHelper AddDbContextService(this DIHelper services) + { + return services.AddDbContextManagerService(); + } +} diff --git a/common/ASC.Core.Common/EF/Context/DbContextManager.cs b/common/ASC.Core.Common/EF/Context/DbContextManager.cs index 4fb191cf55..e317bfe919 100644 --- a/common/ASC.Core.Common/EF/Context/DbContextManager.cs +++ b/common/ASC.Core.Common/EF/Context/DbContextManager.cs @@ -29,19 +29,14 @@ namespace ASC.Core.Common.EF; public class BaseDbContextManager : OptionsManager, IDisposable where T : class, IDisposable, IAsyncDisposable, new() { private readonly Dictionary _pairs; - private readonly MigrationHistory _migrationHistory; private readonly List _asyncList; private readonly IOptionsFactory _factory; - private readonly IConfiguration _configuration; - public BaseDbContextManager(IOptionsFactory factory, IConfiguration configuration, - MigrationHistory migrationHistory) : base(factory) + public BaseDbContextManager(IOptionsFactory factory) : base(factory) { _pairs = new Dictionary(); _asyncList = new List(); _factory = factory; - _configuration = configuration; - _migrationHistory = migrationHistory; } public override T Get(string name) @@ -50,15 +45,6 @@ public class BaseDbContextManager : OptionsManager, IDisposable where T : { var t = base.Get(name); _pairs.Add(name, t); - - if (t is BaseDbContext dbContext) - { - if (_configuration["migration:enabled"] == "true" - && _migrationHistory.TryAddMigratedContext(t.GetType())) - { - dbContext.Migrate(); - } - } } return _pairs[name]; @@ -90,16 +76,14 @@ public class BaseDbContextManager : OptionsManager, IDisposable where T : [Scope(typeof(ConfigureDbContext<>))] public class DbContextManager : BaseDbContextManager where T : BaseDbContext, new() { - public DbContextManager(IOptionsFactory factory, IConfiguration configuration, - MigrationHistory migrationHistory) : base(factory, configuration, migrationHistory) + public DbContextManager(IOptionsFactory factory) : base(factory) { } } public class MultiRegionalDbContextManager : BaseDbContextManager> where T : BaseDbContext, new() { - public MultiRegionalDbContextManager(IOptionsFactory> factory, IConfiguration configuration, - MigrationHistory migrationHistory) : base(factory, configuration, migrationHistory) + public MultiRegionalDbContextManager(IOptionsFactory> factory) : base(factory) { } } diff --git a/common/ASC.Core.Common/EF/Context/MailDbContext.cs b/common/ASC.Core.Common/EF/Context/MailDbContext.cs deleted file mode 100644 index 287bd17cd3..0000000000 --- a/common/ASC.Core.Common/EF/Context/MailDbContext.cs +++ /dev/null @@ -1,70 +0,0 @@ -// (c) Copyright Ascensio System SIA 2010-2022 -// -// This program is a free software product. -// You can redistribute it and/or modify it under the terms -// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software -// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended -// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of -// any third-party rights. -// -// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see -// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html -// -// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. -// -// The interactive user interfaces in modified source and object code versions of the Program must -// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. -// -// Pursuant to Section 7(b) of the License you must retain the original Product logo when -// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under -// trademark law for use of our trademarks. -// -// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing -// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 -// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - -namespace ASC.Core.Common.EF.Context; - -public class MySqlMailDbContext : MailDbContext { } -public class PostgreSqlMailDbContext : MailDbContext { } -public class MailDbContext : BaseDbContext -{ - public DbSet MailboxServer { get; set; } - public DbSet ServerServer { get; set; } - public DbSet MailboxProvider { get; set; } - public DbSet Mailbox { get; set; } - public DbSet ApiKeys { get; set; } - public DbSet GreyListingWhiteList { get; set; } - - public MailDbContext() { } - public MailDbContext(DbContextOptions options) : base(options) { } - - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlMailDbContext() } , - { Provider.PostgreSql, () => new PostgreSqlMailDbContext() } , - }; - } - } - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - ModelBuilderWrapper - .From(modelBuilder, _provider) - .AddMailbox() - .AddMailboxProvider() - .AddServerServer() - .AddGreyListingWhiteList(); - } -} -public static class MailDbExtension -{ - public static DIHelper AddMailDbContextService(this DIHelper services) - { - return services.AddDbContextManagerService(); - } -} diff --git a/common/ASC.Core.Common/EF/Context/NotifyDbContext.cs b/common/ASC.Core.Common/EF/Context/NotifyDbContext.cs index 0984a63b03..9e420778c0 100644 --- a/common/ASC.Core.Common/EF/Context/NotifyDbContext.cs +++ b/common/ASC.Core.Common/EF/Context/NotifyDbContext.cs @@ -26,23 +26,10 @@ namespace ASC.Core.Common.EF.Context; -public class MySqlNotifyDbContext : NotifyDbContext { } -public class PostgreSqlNotifyDbContext : NotifyDbContext { } public class NotifyDbContext : BaseDbContext { public DbSet NotifyInfo { get; set; } public DbSet NotifyQueue { get; set; } - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlNotifyDbContext() } , - { Provider.PostgreSql, () => new PostgreSqlNotifyDbContext() } , - }; - } - } protected override void OnModelCreating(ModelBuilder modelBuilder) { diff --git a/common/ASC.Core.Common/EF/Context/TelegramDbContext.cs b/common/ASC.Core.Common/EF/Context/TelegramDbContext.cs index 39f3ff2087..653c917442 100644 --- a/common/ASC.Core.Common/EF/Context/TelegramDbContext.cs +++ b/common/ASC.Core.Common/EF/Context/TelegramDbContext.cs @@ -26,30 +26,10 @@ namespace ASC.Core.Common.EF.Context; -public class MySqlTelegramDbContext : TelegramDbContext { } -public class PostgreSqlTelegramDbContext : TelegramDbContext { } public class TelegramDbContext : BaseDbContext { public DbSet Users { get; set; } - public TelegramDbContext() { } - public TelegramDbContext(DbContextOptions options) - : base(options) - { - } - - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlTelegramDbContext() } , - { Provider.PostgreSql, () => new PostgreSqlTelegramDbContext() } , - }; - } - } - protected override void OnModelCreating(ModelBuilder modelBuilder) { ModelBuilderWrapper diff --git a/common/ASC.Core.Common/EF/Context/TenantDbContext.cs b/common/ASC.Core.Common/EF/Context/TenantDbContext.cs index e26cb32c4f..26775e8079 100644 --- a/common/ASC.Core.Common/EF/Context/TenantDbContext.cs +++ b/common/ASC.Core.Common/EF/Context/TenantDbContext.cs @@ -26,8 +26,6 @@ namespace ASC.Core.Common.EF.Context; -public class MySqlTenantDbContext : TenantDbContext { } -public class PostgreSqlTenantDbContext : TenantDbContext { } public class TenantDbContext : BaseDbContext { public DbSet Tenants { get; set; } @@ -37,24 +35,6 @@ public class TenantDbContext : BaseDbContext public DbSet TenantIpRestrictions { get; set; } public DbSet CoreSettings { get; set; } - public TenantDbContext() { } - public TenantDbContext(DbContextOptions options) - : base(options) - { - } - - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlTenantDbContext() } , - { Provider.PostgreSql, () => new PostgreSqlTenantDbContext() } , - }; - } - } - protected override void OnModelCreating(ModelBuilder modelBuilder) { ModelBuilderWrapper diff --git a/common/ASC.Core.Common/EF/Context/FilesDbContext.cs b/common/ASC.Core.Common/EF/Context/UrlShortenerFakeDbContext.cs similarity index 66% rename from common/ASC.Core.Common/EF/Context/FilesDbContext.cs rename to common/ASC.Core.Common/EF/Context/UrlShortenerFakeDbContext.cs index e7f24417e3..af2de3cec7 100644 --- a/common/ASC.Core.Common/EF/Context/FilesDbContext.cs +++ b/common/ASC.Core.Common/EF/Context/UrlShortenerFakeDbContext.cs @@ -1,60 +1,37 @@ -// (c) Copyright Ascensio System SIA 2010-2022 -// -// This program is a free software product. -// You can redistribute it and/or modify it under the terms -// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software -// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended -// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of -// any third-party rights. -// -// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see -// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html -// -// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. -// -// The interactive user interfaces in modified source and object code versions of the Program must -// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. -// -// Pursuant to Section 7(b) of the License you must retain the original Product logo when -// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under -// trademark law for use of our trademarks. -// -// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing -// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 -// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - +// (c) Copyright Ascensio System SIA 2010-2022 +// +// This program is a free software product. +// You can redistribute it and/or modify it under the terms +// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software +// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended +// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of +// any third-party rights. +// +// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see +// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html +// +// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. +// +// The interactive user interfaces in modified source and object code versions of the Program must +// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. +// +// Pursuant to Section 7(b) of the License you must retain the original Product logo when +// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under +// trademark law for use of our trademarks. +// +// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing +// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 +// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + namespace ASC.Core.Common.EF.Context; - -public class MySqlFilesDbContext : FilesDbContext { } -public class PostgreSqlFilesDbContext : FilesDbContext { } -public class FilesDbContext : BaseDbContext -{ - public DbSet FilesConverts { get; set; } - - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlFilesDbContext() } , - { Provider.PostgreSql, () => new PostgreSqlFilesDbContext() } , - }; - } - } - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - ModelBuilderWrapper - .From(modelBuilder, _provider) - .AddFilesConverts(); - } -} - -public static class FilesDbExtension -{ - public static DIHelper AddFilesDbContextService(this DIHelper services) - { - return services.AddDbContextManagerService(); - } -} + +public class UrlShortenerFakeDbContext : BaseDbContext +{ + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + ModelBuilderWrapper + .From(modelBuilder, _provider) + .AddShortLinks(); + } +} diff --git a/common/ASC.Core.Common/EF/Context/UserDbContext.cs b/common/ASC.Core.Common/EF/Context/UserDbContext.cs index 40e7363a6b..c674d8c106 100644 --- a/common/ASC.Core.Common/EF/Context/UserDbContext.cs +++ b/common/ASC.Core.Common/EF/Context/UserDbContext.cs @@ -26,9 +26,6 @@ namespace ASC.Core.Common.EF; -public class MySqlUserDbContext : UserDbContext { } -public class PostgreSqlUserDbContext : UserDbContext { } - public class UserDbContext : BaseDbContext { public DbSet Users { get; set; } @@ -41,18 +38,6 @@ public class UserDbContext : BaseDbContext public DbSet SubscriptionMethods { get; set; } public DbSet UsersDav { get; set; } - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlUserDbContext() } , - { Provider.PostgreSql, () => new PostgreSqlUserDbContext() } , - }; - } - } - protected override void OnModelCreating(ModelBuilder modelBuilder) { ModelBuilderWrapper diff --git a/common/ASC.Core.Common/EF/Context/WebstudioDbContext.cs b/common/ASC.Core.Common/EF/Context/WebstudioDbContext.cs index 309f608954..94da3fed16 100644 --- a/common/ASC.Core.Common/EF/Context/WebstudioDbContext.cs +++ b/common/ASC.Core.Common/EF/Context/WebstudioDbContext.cs @@ -26,8 +26,6 @@ namespace ASC.Core.Common.EF.Context; -public class MySqlWebstudioDbContext : WebstudioDbContext { } -public class PostgreSqlWebstudioDbContext : WebstudioDbContext { } public class WebstudioDbContext : BaseDbContext { public DbSet Tenants { get; set; } @@ -35,18 +33,6 @@ public class WebstudioDbContext : BaseDbContext public DbSet WebstudioUserVisit { get; set; } public DbSet WebstudioIndex { get; set; } - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlWebstudioDbContext() } , - { Provider.PostgreSql, () => new PostgreSqlWebstudioDbContext() } , - }; - } - } - protected override void OnModelCreating(ModelBuilder modelBuilder) { ModelBuilderWrapper diff --git a/common/ASC.Core.Common/EF/CustomSqlGenerator.cs b/common/ASC.Core.Common/EF/CustomSqlGenerator.cs new file mode 100644 index 0000000000..5b1485411e --- /dev/null +++ b/common/ASC.Core.Common/EF/CustomSqlGenerator.cs @@ -0,0 +1,158 @@ +// (c) Copyright Ascensio System SIA 2010-2022 +// +// This program is a free software product. +// You can redistribute it and/or modify it under the terms +// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software +// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended +// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of +// any third-party rights. +// +// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see +// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html +// +// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. +// +// The interactive user interfaces in modified source and object code versions of the Program must +// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. +// +// Pursuant to Section 7(b) of the License you must retain the original Product logo when +// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under +// trademark law for use of our trademarks. +// +// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing +// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 +// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + + +namespace ASC.Core.Common.EF; +public class CustomMySqlMigrationsSqlGenerator : MySqlMigrationsSqlGenerator +{ + public CustomMySqlMigrationsSqlGenerator( + MigrationsSqlGeneratorDependencies dependencies, + IRelationalAnnotationProvider migrationsAnnotations, + IMySqlOptions mySqlOptions) + : base(dependencies, migrationsAnnotations, mySqlOptions) + { + } + + public override IReadOnlyList Generate(IReadOnlyList operations, IModel model = null, MigrationsSqlGenerationOptions options = MigrationsSqlGenerationOptions.Default) + { + NotNull(operations, "operations"); + + Options = options; + var migrationCommandListBuilder = new CustomMigrationCommandListBuilder(Dependencies); + try + { + foreach (var operation in operations) + { + Generate(operation, model, migrationCommandListBuilder); + } + } + finally + { + Options = MigrationsSqlGenerationOptions.Default; + } + + var test = migrationCommandListBuilder.GetCommandList(); + + return migrationCommandListBuilder.GetCommandList(); + } + + private void NotNull(IReadOnlyList value, string parameterName) + { + if (value is null) + { + throw new ArgumentNullException(parameterName); + } + } +} + +public class CustomMigrationCommandListBuilder : MigrationCommandListBuilder +{ + private string _operationContainer; + private bool _isIndexOperation; + + public CustomMigrationCommandListBuilder(MigrationsSqlGeneratorDependencies dependencies) + : base(dependencies) { } + + public override MigrationCommandListBuilder Append(string o) + { + if (o.StartsWith("INSERT INTO ")) + { + o = o.Replace("INSERT INTO ", "INSERT IGNORE INTO "); + } + else if (o.StartsWith("CREATE TABLE ")) + { + o = o.Replace("CREATE TABLE ", "CREATE TABLE IF NOT EXISTS "); + } + else if (o == "CREATE ") + { + _isIndexOperation = true; + } + + if (_isIndexOperation == true) + { + _operationContainer += o; + } + else + { + base.Append(o); + } + + return this; + } + + public override MigrationCommandListBuilder AppendLine(string value) + { + if (_isIndexOperation == true) + { + AppendIndexOpeartion(_operationContainer); + + _operationContainer = ""; + _isIndexOperation = false; + } + + return base.AppendLine(value); + } + + private void AppendIndexOpeartion(string indexOperation) + { + const string startOpearation = "CREATE "; + const string startUnique = "UNIQUE "; + const string startIndexName = "INDEX `"; + const string startTableName = "` ON `"; + const string StartColumnsName = "` (`"; + const string endColumnsName = "`)"; + + var separatingStrings = new[] { startOpearation, startUnique, startIndexName, startTableName, StartColumnsName, endColumnsName }; + var separatedOpearion = indexOperation.Split(separatingStrings, StringSplitOptions.RemoveEmptyEntries); + + var indexName = separatedOpearion[0]; + var tableName = separatedOpearion[1]; + + var createIndexForMySQL = + $"set @x := (select count(*) from information_schema.statistics where table_name = '{tableName}' and index_name = '{indexName}' and table_schema = database()); " + + $"set @sql := if (@x > 0, 'select ''Index exists.''', '{indexOperation};'); " + + $"PREPARE stmt FROM @sql; " + + $"EXECUTE stmt"; + + switch (Dependencies.CurrentContext.Context.Database.ProviderName) + { + case "Npgsql.EntityFrameworkCore.PostgreSQL": + base.Append(createIndexForMySQL); + break; + + case "Microsoft.EntityFrameworkCore.SqlServer": + base.Append(createIndexForMySQL); + break; + + case "Microsoft.EntityFrameworkCore.MySql": + base.Append(createIndexForMySQL); + break; + default: + base.Append(createIndexForMySQL); + break; + } + } +} diff --git a/common/ASC.Core.Common/EF/Model/AccountLinks.cs b/common/ASC.Core.Common/EF/Model/AccountLinks.cs index 9521d21c5d..32ed16ddf9 100644 --- a/common/ASC.Core.Common/EF/Model/AccountLinks.cs +++ b/common/ASC.Core.Common/EF/Model/AccountLinks.cs @@ -58,7 +58,8 @@ public static class AccountLinksExtension entity.HasKey(e => new { e.Id, e.UId }) .HasName("PRIMARY"); - entity.ToTable("account_links"); + entity.ToTable("account_links") + .HasCharSet("utf8"); entity.HasIndex(e => e.UId) .HasDatabaseName("uid"); diff --git a/common/ASC.Core.Common/EF/Model/CRM/CrmContact.cs b/common/ASC.Core.Common/EF/Model/CRM/CrmContact.cs index dfd5a563f6..7c7532f316 100644 --- a/common/ASC.Core.Common/EF/Model/CRM/CrmContact.cs +++ b/common/ASC.Core.Common/EF/Model/CRM/CrmContact.cs @@ -42,10 +42,10 @@ public class CrmContact public int ContactTypeId { get; set; } public Guid CreateBy { get; set; } public DateTime CreateOn { get; set; } - public Guid LastModifedBy { get; set; } - public DateTime LastModifedOn { get; set; } + public Guid? LastModifedBy { get; set; } + public DateTime? LastModifedOn { get; set; } public string DisplayName { get; set; } - public bool IsShared { get; set; } + public bool? IsShared { get; set; } public string Currency { get; set; } } public static class CrmContactExtension @@ -62,7 +62,8 @@ public static class CrmContactExtension { modelBuilder.Entity(entity => { - entity.ToTable("crm_contact"); + entity.ToTable("crm_contact") + .HasCharSet("utf8"); entity.HasIndex(e => e.CreateOn) .HasDatabaseName("create_on"); @@ -78,7 +79,8 @@ public static class CrmContactExtension entity.Property(e => e.Id).HasColumnName("id"); - entity.Property(e => e.CompanyId).HasColumnName("company_id"); + entity.Property(e => e.CompanyId) + .HasColumnName("company_id"); entity.Property(e => e.CompanyName) .HasColumnName("company_name") @@ -86,7 +88,9 @@ public static class CrmContactExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.ContactTypeId).HasColumnName("contact_type_id"); + entity.Property(e => e.ContactTypeId) + .HasColumnName("contact_type_id") + .HasDefaultValueSql("'0'"); entity.Property(e => e.CreateBy) .IsRequired() @@ -123,19 +127,26 @@ public static class CrmContactExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.IsCompany).HasColumnName("is_company"); + entity.Property(e => e.IsCompany) + .HasColumnType("tinyint(1)") + .HasColumnName("is_company"); - entity.Property(e => e.IsShared).HasColumnName("is_shared"); + entity.Property(e => e.IsShared) + .HasColumnName("is_shared") + .HasColumnType("tinyint(1)") + .IsRequired(false); entity.Property(e => e.LastModifedBy) .HasColumnName("last_modifed_by") .HasColumnType("char(38)") .HasCharSet("utf8") + .IsRequired(false) .UseCollation("utf8_general_ci"); entity.Property(e => e.LastModifedOn) .HasColumnName("last_modifed_on") - .HasColumnType("datetime"); + .HasColumnType("datetime") + .IsRequired(false); entity.Property(e => e.LastName) .HasColumnName("last_name") @@ -149,9 +160,12 @@ public static class CrmContactExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.StatusId).HasColumnName("status_id"); + entity.Property(e => e.StatusId) + .HasColumnName("status_id") + .HasDefaultValueSql("'0'"); - entity.Property(e => e.TenantId).HasColumnName("tenant_id"); + entity.Property(e => e.TenantId) + .HasColumnName("tenant_id"); entity.Property(e => e.Title) .HasColumnName("title") @@ -224,6 +238,7 @@ public static class CrmContactExtension entity.Property(e => e.LastModifedBy) .HasColumnName("last_modifed_by") .HasMaxLength(38) + .IsRequired(false) .HasDefaultValueSql("NULL"); entity.Property(e => e.LastModifedOn) diff --git a/common/ASC.Core.Common/EF/Model/Core/Acl.cs b/common/ASC.Core.Common/EF/Model/Core/Acl.cs index 1b0f4020e3..1c1aeac99d 100644 --- a/common/ASC.Core.Common/EF/Model/Core/Acl.cs +++ b/common/ASC.Core.Common/EF/Model/Core/Acl.cs @@ -103,19 +103,18 @@ public static class AclExtension new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960", AceType = 0 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d", AceType = 0 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4", AceType = 0 }, - new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", AceType = AceType.Deny }, + new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", AceType = (AceType)1 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086", AceType = 0 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e", AceType = 0 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f", AceType = 0 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|f4d98afdd336433287783c6945c81ea0", AceType = 0 }, - new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", AceType = AceType.Deny }, - new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", AceType = AceType.Deny }, - new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", AceType = AceType.Deny }, - new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", AceType = AceType.Deny }, - new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", AceType = AceType.Deny }, + new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", AceType = (AceType)1 }, + new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", AceType = (AceType)1 }, + new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", AceType = (AceType)1 }, + new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", AceType = (AceType)1 }, + new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", AceType = (AceType)1 }, new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", AceType = 0 }, - new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", AceType = 0 } - ); + new Acl { Tenant = -1, Subject = Guid.Parse("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), Action = Guid.Parse("77777777-32ae-425f-99b5-83176061d1ae"), Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", AceType = 0 }); return modelBuilder; } @@ -127,7 +126,8 @@ public static class AclExtension entity.HasKey(e => new { e.Tenant, e.Subject, e.Action, e.Object }) .HasName("PRIMARY"); - entity.ToTable("core_acl"); + entity.ToTable("core_acl") + .HasCharSet("utf8"); entity.Property(e => e.Tenant).HasColumnName("tenant"); diff --git a/common/ASC.Core.Common/EF/Model/Core/DbCoreSettings.cs b/common/ASC.Core.Common/EF/Model/Core/DbCoreSettings.cs index 61be5ccbad..d6b6740ca7 100644 --- a/common/ASC.Core.Common/EF/Model/Core/DbCoreSettings.cs +++ b/common/ASC.Core.Common/EF/Model/Core/DbCoreSettings.cs @@ -47,9 +47,9 @@ public static class CoreSettingsExtension .Add(MySqlAddCoreSettings, Provider.MySql) .Add(PgSqlAddCoreSettings, Provider.PostgreSql) .HasData( - new DbCoreSettings { Tenant = -1, Id = "CompanyWhiteLabelSettings", Value = new byte[] { 245, 71, 4, 138, 72, 101, 23, 21, 135, 217, 206, 188, 138, 73, 108, 96, 29, 150, 3, 31, 44, 28, 62, 145, 96, 53, 57, 66, 238, 118, 93, 172, 211, 22, 244, 181, 244, 40, 146, 67, 111, 196, 162, 27, 154, 109, 248, 255, 211, 188, 64, 54, 180, 126, 58, 90, 27, 76, 136, 27, 38, 96, 152, 105, 254, 187, 104, 72, 189, 136, 192, 46, 234, 198, 164, 204, 179, 232, 244, 4, 41, 8, 18, 240, 230, 225, 36, 165, 82, 190, 129, 165, 140, 100, 187, 139, 211, 201, 168, 192, 237, 225, 249, 66, 18, 129, 222, 12, 122, 248, 39, 51, 164, 188, 229, 21, 232, 86, 148, 196, 221, 167, 142, 34, 101, 43, 162, 137, 31, 206, 149, 120, 249, 114, 133, 168, 30, 18, 254, 223, 93, 101, 88, 97, 30, 58, 163, 224, 62, 173, 220, 170, 152, 40, 124, 100, 165, 81, 7, 87, 168, 129, 176, 12, 51, 69, 230, 252, 30, 34, 182, 7, 202, 45, 117, 60, 99, 241, 237, 148, 201, 35, 102, 219, 160, 228, 194, 230, 219, 22, 244, 74, 138, 176, 145, 0, 122, 167, 80, 93, 23, 228, 21, 48, 100, 60, 31, 250, 232, 34, 248, 249, 159, 210, 227, 12, 13, 239, 130, 223, 101, 196, 51, 36, 80, 127, 62, 92, 104, 228, 197, 226, 43, 232, 164, 12, 36, 66, 52, 133 }, LastModified = DateTime.UtcNow }, - new DbCoreSettings { Tenant = -1, Id = "FullTextSearchSettings", Value = new byte[] { 8, 120, 207, 5, 153, 181, 23, 202, 162, 211, 218, 237, 157, 6, 76, 62, 220, 238, 175, 67, 31, 53, 166, 246, 66, 220, 173, 160, 72, 23, 227, 81, 50, 39, 187, 177, 222, 110, 43, 171, 235, 158, 16, 119, 178, 207, 49, 140, 72, 152, 20, 84, 94, 135, 117, 1, 246, 51, 251, 190, 148, 2, 44, 252, 221, 2, 91, 83, 149, 151, 58, 245, 16, 148, 52, 8, 187, 86, 150, 46, 227, 93, 163, 95, 47, 131, 116, 207, 95, 209, 38, 149, 53, 148, 73, 215, 206, 251, 194, 199, 189, 17, 42, 229, 135, 82, 23, 154, 162, 165, 158, 94, 23, 128, 30, 88, 12, 204, 96, 250, 236, 142, 189, 211, 214, 18, 196, 136, 102, 102, 217, 109, 108, 240, 96, 96, 94, 100, 201, 10, 31, 170, 128, 192 }, LastModified = DateTime.UtcNow }, - new DbCoreSettings { Tenant = -1, Id = "SmtpSettings", Value = new byte[] { 240, 82, 224, 144, 161, 163, 117, 13, 173, 205, 78, 153, 97, 218, 4, 170, 81, 239, 1, 151, 226, 192, 98, 60, 241, 44, 88, 56, 191, 164, 10, 155, 72, 186, 239, 203, 227, 113, 88, 119, 49, 215, 227, 220, 158, 124, 96, 9, 116, 47, 158, 65, 93, 86, 219, 15, 10, 224, 142, 50, 248, 144, 75, 44, 68, 28, 198, 87, 198, 69, 67, 234, 238, 38, 32, 68, 162, 139, 67, 53, 220, 176, 240, 196, 233, 64, 29, 137, 31, 160, 99, 105, 249, 132, 202, 45, 71, 92, 134, 194, 55, 145, 121, 97, 197, 130, 119, 105, 131, 21, 133, 35, 10, 102, 172, 119, 135, 230, 251, 86, 253, 62, 55, 56, 146, 103, 164, 106 }, LastModified = DateTime.UtcNow } + new DbCoreSettings { Tenant = -1, Id = "CompanyWhiteLabelSettings", Value = new byte[] { 245, 71, 4, 138, 72, 101, 23, 21, 135, 217, 206, 188, 138, 73, 108, 96, 29, 150, 3, 31, 44, 28, 62, 145, 96, 53, 57, 66, 238, 118, 93, 172, 211, 22, 244, 181, 244, 40, 146, 67, 111, 196, 162, 27, 154, 109, 248, 255, 181, 17, 253, 127, 42, 65, 19, 90, 26, 206, 203, 145, 159, 159, 243, 105, 24, 71, 188, 165, 53, 85, 57, 37, 186, 251, 57, 96, 18, 162, 218, 80, 0, 101, 250, 100, 66, 97, 24, 51, 240, 215, 216, 169, 105, 100, 15, 253, 29, 83, 182, 236, 203, 53, 68, 251, 2, 150, 149, 148, 58, 136, 84, 37, 151, 82, 92, 227, 30, 52, 111, 40, 154, 155, 7, 126, 149, 100, 169, 87, 10, 129, 228, 138, 177, 101, 77, 67, 177, 216, 189, 201, 1, 213, 136, 216, 107, 198, 253, 221, 106, 255, 198, 17, 68, 14, 110, 90, 174, 182, 68, 222, 188, 77, 157, 19, 26, 68, 86, 97, 15, 81, 24, 171, 214, 114, 191, 175, 56, 56, 48, 52, 125, 82, 253, 113, 71, 41, 201, 5, 8, 118, 162, 191, 99, 196, 48, 198, 223, 79, 204, 174, 31, 97, 236, 20, 213, 218, 85, 34, 16, 74, 196, 209, 235, 14, 71, 209, 32, 131, 195, 84, 11, 66, 74, 19, 115, 255, 99, 69, 235, 210, 204, 15, 13, 4, 143, 127, 152, 125, 212, 91 }, LastModified = new DateTime(2022, 7, 8) }, + new DbCoreSettings { Tenant = -1, Id = "FullTextSearchSettings", Value = new byte[] { 8, 120, 207, 5, 153, 181, 23, 202, 162, 211, 218, 237, 157, 6, 76, 62, 220, 238, 175, 67, 31, 53, 166, 246, 66, 220, 173, 160, 72, 23, 227, 81, 50, 39, 187, 177, 222, 110, 43, 171, 235, 158, 16, 119, 178, 207, 49, 140, 72, 152, 20, 84, 94, 135, 117, 1, 246, 51, 251, 190, 148, 2, 44, 252, 221, 2, 91, 83, 149, 151, 58, 245, 16, 148, 52, 8, 187, 86, 150, 46, 227, 93, 163, 95, 47, 131, 116, 207, 95, 209, 38, 149, 53, 148, 73, 215, 206, 251, 194, 199, 189, 17, 42, 229, 135, 82, 23, 154, 162, 165, 158, 94, 23, 128, 30, 88, 12, 204, 96, 250, 236, 142, 189, 211, 214, 18, 196, 136, 102, 102, 217, 109, 108, 240, 96, 96, 94, 100, 201, 10, 31, 170, 128, 192 }, LastModified = new DateTime(2022, 7, 8) }, + new DbCoreSettings { Tenant = -1, Id = "SmtpSettings", Value = new byte[] { 240, 82, 224, 144, 161, 163, 117, 13, 173, 205, 78, 153, 97, 218, 4, 170, 81, 239, 1, 151, 226, 192, 98, 60, 241, 44, 88, 56, 191, 164, 10, 155, 72, 186, 239, 203, 227, 113, 88, 119, 49, 215, 227, 220, 158, 124, 96, 9, 116, 47, 158, 65, 93, 86, 219, 15, 10, 224, 142, 50, 248, 144, 75, 44, 68, 28, 198, 87, 198, 69, 67, 234, 238, 38, 32, 68, 162, 139, 67, 53, 220, 176, 240, 196, 233, 64, 29, 137, 31, 160, 99, 105, 249, 132, 202, 45, 71, 92, 134, 194, 55, 145, 121, 97, 197, 130, 119, 105, 131, 21, 133, 35, 10, 102, 172, 119, 135, 230, 251, 86, 253, 62, 55, 56, 146, 103, 164, 106 }, LastModified = new DateTime(2022, 7, 8) } ); return modelBuilder; @@ -62,7 +62,8 @@ public static class CoreSettingsExtension entity.HasKey(e => new { e.Tenant, e.Id }) .HasName("PRIMARY"); - entity.ToTable("core_settings"); + entity.ToTable("core_settings") + .HasCharSet("utf8"); entity.Property(e => e.Tenant).HasColumnName("tenant"); @@ -74,9 +75,7 @@ public static class CoreSettingsExtension entity.Property(e => e.LastModified) .HasColumnName("last_modified") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP") - .ValueGeneratedOnAddOrUpdate(); + .HasColumnType("timestamp"); entity.Property(e => e.Value) .IsRequired() diff --git a/common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs b/common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs index 893f7f39e2..cbcc48dc3c 100644 --- a/common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs +++ b/common/ASC.Core.Common/EF/Model/Core/DbSubscriptionMethod.cs @@ -77,7 +77,7 @@ public static class SubscriptionMethodExtension new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "ResponsibleForTask", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 }, new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "AddRelationshipEvent", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 }, new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "ExportCompleted", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 }, - new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "CreateNewContact", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender", Tenant = -1 }, + new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "CreateNewContact", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 }, new DbSubscriptionMethod { Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "ResponsibleForOpportunity", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Sender = "email.sender|messanger.sender", Tenant = -1 }, new DbSubscriptionMethod { Source = "asc.web.studio", Action = "periodic_notify", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Sender = "email.sender", Tenant = -1 } ); @@ -92,7 +92,8 @@ public static class SubscriptionMethodExtension entity.HasKey(e => new { e.Tenant, e.Source, e.Action, e.Recipient }) .HasName("PRIMARY"); - entity.ToTable("core_subscriptionmethod"); + entity.ToTable("core_subscriptionmethod") + .HasCharSet("utf8"); entity.Property(e => e.Tenant).HasColumnName("tenant"); diff --git a/common/ASC.Core.Common/EF/Model/Core/Subscription.cs b/common/ASC.Core.Common/EF/Model/Core/Subscription.cs index 35f77ec877..9d9f615293 100644 --- a/common/ASC.Core.Common/EF/Model/Core/Subscription.cs +++ b/common/ASC.Core.Common/EF/Model/Core/Subscription.cs @@ -53,10 +53,10 @@ public static class SubscriptionExtension new Subscription { Source = "6504977c-75af-4691-9099-084d3ddeea04", Action = "new feed", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 }, new Subscription { Source = "6a598c74-91ae-437d-a5f4-ad339bd11bb2", Action = "new post", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 }, new Subscription { Source = "853b6eb9-73ee-438d-9b09-8ffeedf36234", Action = "new topic in forum", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 }, - new Subscription { Source = "9d51954f-db9b-4aed-94e3-ed70b914e10", Action = "new photo uploaded", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 }, + new Subscription { Source = "9d51954f-db9b-4aed-94e3-ed70b914e101", Action = "new photo uploaded", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 }, new Subscription { Source = "28b10049-dd20-4f54-b986-873bc14ccfc7", Action = "new bookmark created", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 }, new Subscription { Source = "742cf945-cbbc-4a57-82d6-1600a12cf8ca", Action = "new wiki page", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 }, - new Subscription { Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", Action = "BirthdayReminderd", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Object = "", Tenant = -1 }, + new Subscription { Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", Action = "BirthdayReminder", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Object = "", Tenant = -1 }, new Subscription { Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", Action = "sharedocument", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 }, new Subscription { Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", Action = "sharefolder", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 }, new Subscription { Source = "40650da3-f7c1-424c-8c89-b9c115472e08", Action = "calendar_sharing", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", Tenant = -1 }, @@ -81,7 +81,8 @@ public static class SubscriptionExtension entity.HasKey(e => new { e.Tenant, e.Source, e.Action, e.Recipient, e.Object }) .HasName("PRIMARY"); - entity.ToTable("core_subscription"); + entity.ToTable("core_subscription") + .HasCharSet("utf8"); entity.Property(e => e.Tenant).HasColumnName("tenant"); @@ -109,7 +110,11 @@ public static class SubscriptionExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.Unsubscribed).HasColumnName("unsubscribed"); + entity.Property(e => e.Unsubscribed) + .HasColumnName("unsubscribed") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + }); } public static void PgSqlAddSubscription(this ModelBuilder modelBuilder) diff --git a/common/ASC.Core.Common/EF/Model/DbWebstudioIndex.cs b/common/ASC.Core.Common/EF/Model/DbWebstudioIndex.cs index 507be84520..7118ef5e26 100644 --- a/common/ASC.Core.Common/EF/Model/DbWebstudioIndex.cs +++ b/common/ASC.Core.Common/EF/Model/DbWebstudioIndex.cs @@ -54,7 +54,8 @@ public static class DbWebstudioIndexExtension entity.HasKey(e => e.IndexName) .HasName("PRIMARY"); - entity.ToTable("webstudio_index"); + entity.ToTable("webstudio_index") + .HasCharSet("utf8"); entity.Property(e => e.IndexName) .HasColumnName("index_name") @@ -64,9 +65,7 @@ public static class DbWebstudioIndexExtension entity.Property(e => e.LastModified) .HasColumnName("last_modified") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP") - .ValueGeneratedOnAddOrUpdate(); + .HasColumnType("timestamp"); }); } public static void PgSqlAddDbWebstudioIndex(this ModelBuilder modelBuilder) diff --git a/common/ASC.Core.Common/EF/Model/DbWebstudioSettings.cs b/common/ASC.Core.Common/EF/Model/DbWebstudioSettings.cs index 5b410e55a7..f78215372b 100644 --- a/common/ASC.Core.Common/EF/Model/DbWebstudioSettings.cs +++ b/common/ASC.Core.Common/EF/Model/DbWebstudioSettings.cs @@ -64,7 +64,8 @@ public static class WebstudioSettingsExtension entity.HasKey(e => new { e.TenantId, e.Id, e.UserId }) .HasName("PRIMARY"); - entity.ToTable("webstudio_settings"); + entity.ToTable("webstudio_settings") + .HasCharSet("utf8"); entity.HasIndex(e => e.Id) .HasDatabaseName("ID"); diff --git a/common/ASC.Core.Common/EF/Model/DbWebstudioUservisit.cs b/common/ASC.Core.Common/EF/Model/DbWebstudioUservisit.cs index 875d8d79af..330db0b51c 100644 --- a/common/ASC.Core.Common/EF/Model/DbWebstudioUservisit.cs +++ b/common/ASC.Core.Common/EF/Model/DbWebstudioUservisit.cs @@ -33,8 +33,8 @@ public class DbWebstudioUserVisit public Guid ProductId { get; set; } public Guid UserId { get; set; } public int VisitCount { get; set; } - public DateTime FirstVisitTime { get; set; } - public DateTime LastVisitTime { get; set; } + public DateTime? FirstVisitTime { get; set; } + public DateTime? LastVisitTime { get; set; } } public static class WebstudioUserVisitExtension @@ -87,7 +87,8 @@ public static class WebstudioUserVisitExtension entity.HasKey(e => new { e.TenantId, e.VisitDate, e.ProductId, e.UserId }) .HasName("PRIMARY"); - entity.ToTable("webstudio_uservisit"); + entity.ToTable("webstudio_uservisit") + .HasCharSet("utf8"); entity.HasIndex(e => e.VisitDate) .HasDatabaseName("visitdate"); @@ -112,13 +113,19 @@ public static class WebstudioUserVisitExtension entity.Property(e => e.FirstVisitTime) .HasColumnName("firstvisittime") - .HasColumnType("datetime"); + .HasColumnType("datetime") + .IsRequired(false) + .HasDefaultValueSql("NULL"); entity.Property(e => e.LastVisitTime) .HasColumnName("lastvisittime") - .HasColumnType("datetime"); + .HasColumnType("datetime") + .IsRequired(false) + .HasDefaultValueSql("NULL"); - entity.Property(e => e.VisitCount).HasColumnName("visitcount"); + entity.Property(e => e.VisitCount) + .HasColumnName("visitcount") + .HasDefaultValueSql("'0'"); }); } public static void PgSqlAddWebstudioUserVisit(this ModelBuilder modelBuilder) diff --git a/common/ASC.Core.Common/EF/Model/DbipLocation.cs b/common/ASC.Core.Common/EF/Model/DbipLocation.cs index 40fdb0e6f3..02f9e138e0 100644 --- a/common/ASC.Core.Common/EF/Model/DbipLocation.cs +++ b/common/ASC.Core.Common/EF/Model/DbipLocation.cs @@ -37,10 +37,10 @@ public class DbipLocation public string District { get; set; } public string City { get; set; } public string ZipCode { get; set; } - public long Latitude { get; set; } - public long Longitude { get; set; } - public int GeonameId { get; set; } - public double TimezoneOffset { get; set; } + public long? Latitude { get; set; } + public long? Longitude { get; set; } + public int? GeonameId { get; set; } + public double? TimezoneOffset { get; set; } public string TimezoneName { get; set; } public int Processed { get; set; } } @@ -60,7 +60,8 @@ public static class DbipLocationExtension { modelBuilder.Entity(entity => { - entity.ToTable("dbip_location"); + entity.ToTable("dbip_location") + .HasCharSet("utf8"); entity.HasIndex(e => e.IPStart) .HasDatabaseName("ip_start"); @@ -94,7 +95,10 @@ public static class DbipLocationExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.GeonameId).HasColumnName("geoname_id"); + entity.Property(e => e.GeonameId) + .HasColumnName("geoname_id") + .IsRequired(false) + .HasDefaultValueSql("NULL"); entity.Property(e => e.IPEnd) .IsRequired() @@ -110,9 +114,17 @@ public static class DbipLocationExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.Latitude).HasColumnName("latitude"); + entity.Property(e => e.Latitude) + .HasColumnName("latitude") + .HasColumnType("float") + .IsRequired(false) + .HasDefaultValueSql("NULL"); - entity.Property(e => e.Longitude).HasColumnName("longitude"); + entity.Property(e => e.Longitude) + .HasColumnName("longitude") + .HasColumnType("float") + .IsRequired(false) + .HasDefaultValueSql("NULL"); entity.Property(e => e.Processed) .HasColumnName("processed") @@ -131,7 +143,11 @@ public static class DbipLocationExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.TimezoneOffset).HasColumnName("timezone_offset"); + entity.Property(e => e.TimezoneOffset) + .HasColumnType("int") + .HasColumnName("timezone_offset") + .IsRequired(false) + .HasDefaultValueSql("NULL"); entity.Property(e => e.ZipCode) .HasColumnName("zipcode") diff --git a/common/ASC.Core.Common/EF/Model/FilesConverts.cs b/common/ASC.Core.Common/EF/Model/FilesConverts.cs index f8e2fc9609..191ac8023a 100644 --- a/common/ASC.Core.Common/EF/Model/FilesConverts.cs +++ b/common/ASC.Core.Common/EF/Model/FilesConverts.cs @@ -39,16 +39,33 @@ public static class FilesConvertsExtension modelBuilder .Add(MySqlAddFilesConverts, Provider.MySql) .Add(PgSqlAddFilesConverts, Provider.PostgreSql) - .HasData( + .HasData( new FilesConverts { Input = ".csv", Output = ".ods" }, new FilesConverts { Input = ".csv", Output = ".pdf" }, + new FilesConverts { Input = ".csv", Output = ".ots" }, new FilesConverts { Input = ".csv", Output = ".xlsx" }, + new FilesConverts { Input = ".csv", Output = ".xlsm" }, + new FilesConverts { Input = ".csv", Output = ".xltm" }, + new FilesConverts { Input = ".csv", Output = ".xltx" }, new FilesConverts { Input = ".doc", Output = ".docx" }, + new FilesConverts { Input = ".doc", Output = ".docm" }, + new FilesConverts { Input = ".doc", Output = ".dotm" }, + new FilesConverts { Input = ".doc", Output = ".dotx" }, + new FilesConverts { Input = ".doc", Output = ".epub" }, + new FilesConverts { Input = ".doc", Output = ".fb2" }, + new FilesConverts { Input = ".doc", Output = ".html" }, + new FilesConverts { Input = ".doc", Output = ".ott" }, new FilesConverts { Input = ".doc", Output = ".odt" }, new FilesConverts { Input = ".doc", Output = ".pdf" }, new FilesConverts { Input = ".doc", Output = ".rtf" }, new FilesConverts { Input = ".doc", Output = ".txt" }, new FilesConverts { Input = ".docm", Output = ".docx" }, + new FilesConverts { Input = ".docm", Output = ".dotm" }, + new FilesConverts { Input = ".docm", Output = ".html" }, + new FilesConverts { Input = ".docm", Output = ".dotx" }, + new FilesConverts { Input = ".docm", Output = ".epub" }, + new FilesConverts { Input = ".docm", Output = ".fb2" }, + new FilesConverts { Input = ".docm", Output = ".ott" }, new FilesConverts { Input = ".docm", Output = ".odt" }, new FilesConverts { Input = ".docm", Output = ".pdf" }, new FilesConverts { Input = ".docm", Output = ".rtf" }, @@ -58,150 +75,321 @@ public static class FilesConvertsExtension new FilesConverts { Input = ".docx", Output = ".pdf" }, new FilesConverts { Input = ".docx", Output = ".rtf" }, new FilesConverts { Input = ".docx", Output = ".txt" }, + new FilesConverts { Input = ".docx", Output = ".html" }, + new FilesConverts { Input = ".docx", Output = ".dotm" }, + new FilesConverts { Input = ".docx", Output = ".dotx" }, + new FilesConverts { Input = ".docx", Output = ".epub" }, + new FilesConverts { Input = ".docx", Output = ".fb2" }, + new FilesConverts { Input = ".docx", Output = ".ott" }, + new FilesConverts { Input = ".docx", Output = ".docm" }, new FilesConverts { Input = ".docx", Output = ".docxf" }, new FilesConverts { Input = ".docxf", Output = ".docx" }, + new FilesConverts { Input = ".docxf", Output = ".odt" }, + new FilesConverts { Input = ".docxf", Output = ".oform" }, + new FilesConverts { Input = ".docxf", Output = ".pdf" }, + new FilesConverts { Input = ".docxf", Output = ".rtf" }, + new FilesConverts { Input = ".docxf", Output = ".txt" }, new FilesConverts { Input = ".docxf", Output = ".dotx" }, new FilesConverts { Input = ".docxf", Output = ".epub" }, new FilesConverts { Input = ".docxf", Output = ".fb2" }, new FilesConverts { Input = ".docxf", Output = ".html" }, - new FilesConverts { Input = ".docxf", Output = ".odt" }, - new FilesConverts { Input = ".docxf", Output = ".oform" }, new FilesConverts { Input = ".docxf", Output = ".ott" }, - new FilesConverts { Input = ".docxf", Output = ".pdf" }, - new FilesConverts { Input = ".docxf", Output = ".rtf" }, - new FilesConverts { Input = ".docxf", Output = ".txt" }, new FilesConverts { Input = ".dot", Output = ".docx" }, new FilesConverts { Input = ".dot", Output = ".odt" }, new FilesConverts { Input = ".dot", Output = ".pdf" }, new FilesConverts { Input = ".dot", Output = ".rtf" }, new FilesConverts { Input = ".dot", Output = ".txt" }, + new FilesConverts { Input = ".dot", Output = ".docm" }, + new FilesConverts { Input = ".dot", Output = ".dotm" }, + new FilesConverts { Input = ".dot", Output = ".dotx" }, + new FilesConverts { Input = ".dot", Output = ".epub" }, + new FilesConverts { Input = ".dot", Output = ".fb2" }, + new FilesConverts { Input = ".dot", Output = ".html" }, + new FilesConverts { Input = ".dot", Output = ".ott" }, new FilesConverts { Input = ".dotm", Output = ".docx" }, new FilesConverts { Input = ".dotm", Output = ".odt" }, new FilesConverts { Input = ".dotm", Output = ".pdf" }, new FilesConverts { Input = ".dotm", Output = ".rtf" }, new FilesConverts { Input = ".dotm", Output = ".txt" }, + new FilesConverts { Input = ".dotm", Output = ".docm" }, + new FilesConverts { Input = ".dotm", Output = ".dotx" }, + new FilesConverts { Input = ".dotm", Output = ".epub" }, + new FilesConverts { Input = ".dotm", Output = ".fb2" }, + new FilesConverts { Input = ".dotm", Output = ".html" }, + new FilesConverts { Input = ".dotm", Output = ".ott" }, new FilesConverts { Input = ".dotx", Output = ".docx" }, new FilesConverts { Input = ".dotx", Output = ".odt" }, new FilesConverts { Input = ".dotx", Output = ".pdf" }, new FilesConverts { Input = ".dotx", Output = ".rtf" }, new FilesConverts { Input = ".dotx", Output = ".txt" }, + new FilesConverts { Input = ".dotx", Output = ".docm" }, + new FilesConverts { Input = ".dotx", Output = ".dotm" }, + new FilesConverts { Input = ".dotx", Output = ".epub" }, + new FilesConverts { Input = ".dotx", Output = ".fb2" }, + new FilesConverts { Input = ".dotx", Output = ".html" }, + new FilesConverts { Input = ".dotx", Output = ".ott" }, new FilesConverts { Input = ".epub", Output = ".docx" }, new FilesConverts { Input = ".epub", Output = ".odt" }, new FilesConverts { Input = ".epub", Output = ".pdf" }, new FilesConverts { Input = ".epub", Output = ".rtf" }, new FilesConverts { Input = ".epub", Output = ".txt" }, + new FilesConverts { Input = ".epub", Output = ".docm" }, + new FilesConverts { Input = ".epub", Output = ".dotm" }, + new FilesConverts { Input = ".epub", Output = ".dotx" }, + new FilesConverts { Input = ".epub", Output = ".fb2" }, + new FilesConverts { Input = ".epub", Output = ".html" }, + new FilesConverts { Input = ".epub", Output = ".ott" }, new FilesConverts { Input = ".fb2", Output = ".docx" }, new FilesConverts { Input = ".fb2", Output = ".odt" }, new FilesConverts { Input = ".fb2", Output = ".pdf" }, new FilesConverts { Input = ".fb2", Output = ".rtf" }, new FilesConverts { Input = ".fb2", Output = ".txt" }, + new FilesConverts { Input = ".fb2", Output = ".docm" }, + new FilesConverts { Input = ".fb2", Output = ".dotm" }, + new FilesConverts { Input = ".fb2", Output = ".dotx" }, + new FilesConverts { Input = ".fb2", Output = ".epub" }, + new FilesConverts { Input = ".fb2", Output = ".html" }, + new FilesConverts { Input = ".fb2", Output = ".ott" }, new FilesConverts { Input = ".fodp", Output = ".odp" }, new FilesConverts { Input = ".fodp", Output = ".pdf" }, new FilesConverts { Input = ".fodp", Output = ".pptx" }, + new FilesConverts { Input = ".fodp", Output = ".otp" }, + new FilesConverts { Input = ".fodp", Output = ".potm" }, + new FilesConverts { Input = ".fodp", Output = ".potx" }, + new FilesConverts { Input = ".fodp", Output = ".pptm" }, new FilesConverts { Input = ".fods", Output = ".csv" }, new FilesConverts { Input = ".fods", Output = ".ods" }, new FilesConverts { Input = ".fods", Output = ".pdf" }, new FilesConverts { Input = ".fods", Output = ".xlsx" }, + new FilesConverts { Input = ".fods", Output = ".xlsm" }, + new FilesConverts { Input = ".fods", Output = ".xltm" }, + new FilesConverts { Input = ".fods", Output = ".xltx" }, + new FilesConverts { Input = ".fods", Output = ".ots" }, new FilesConverts { Input = ".fodt", Output = ".docx" }, new FilesConverts { Input = ".fodt", Output = ".odt" }, + new FilesConverts { Input = ".fodt", Output = ".docm" }, new FilesConverts { Input = ".fodt", Output = ".pdf" }, new FilesConverts { Input = ".fodt", Output = ".rtf" }, new FilesConverts { Input = ".fodt", Output = ".txt" }, + new FilesConverts { Input = ".fodt", Output = ".dotm" }, + new FilesConverts { Input = ".fodt", Output = ".dotx" }, + new FilesConverts { Input = ".fodt", Output = ".epub" }, + new FilesConverts { Input = ".fodt", Output = ".fb2" }, + new FilesConverts { Input = ".fodt", Output = ".html" }, + new FilesConverts { Input = ".fodt", Output = ".ott" }, new FilesConverts { Input = ".html", Output = ".docx" }, new FilesConverts { Input = ".html", Output = ".odt" }, new FilesConverts { Input = ".html", Output = ".pdf" }, new FilesConverts { Input = ".html", Output = ".rtf" }, new FilesConverts { Input = ".html", Output = ".txt" }, + new FilesConverts { Input = ".html", Output = ".docm" }, + new FilesConverts { Input = ".html", Output = ".dotm" }, + new FilesConverts { Input = ".html", Output = ".dotx" }, + new FilesConverts { Input = ".html", Output = ".epub" }, + new FilesConverts { Input = ".html", Output = ".fb2" }, + new FilesConverts { Input = ".html", Output = ".ott" }, new FilesConverts { Input = ".mht", Output = ".docx" }, new FilesConverts { Input = ".mht", Output = ".odt" }, new FilesConverts { Input = ".mht", Output = ".pdf" }, new FilesConverts { Input = ".mht", Output = ".rtf" }, new FilesConverts { Input = ".mht", Output = ".txt" }, + new FilesConverts { Input = ".mht", Output = ".docm" }, + new FilesConverts { Input = ".mht", Output = ".dotm" }, + new FilesConverts { Input = ".mht", Output = ".dotx" }, + new FilesConverts { Input = ".mht", Output = ".epub" }, + new FilesConverts { Input = ".mht", Output = ".fb2" }, + new FilesConverts { Input = ".mht", Output = ".ott" }, new FilesConverts { Input = ".odp", Output = ".pdf" }, new FilesConverts { Input = ".odp", Output = ".pptx" }, + new FilesConverts { Input = ".odp", Output = ".otp" }, + new FilesConverts { Input = ".odp", Output = ".potm" }, + new FilesConverts { Input = ".odp", Output = ".potx" }, + new FilesConverts { Input = ".odp", Output = ".pptm" }, new FilesConverts { Input = ".otp", Output = ".odp" }, new FilesConverts { Input = ".otp", Output = ".pdf" }, + new FilesConverts { Input = ".otp", Output = ".potm" }, + new FilesConverts { Input = ".otp", Output = ".potx" }, + new FilesConverts { Input = ".otp", Output = ".pptm" }, new FilesConverts { Input = ".otp", Output = ".pptx" }, new FilesConverts { Input = ".ods", Output = ".csv" }, new FilesConverts { Input = ".ods", Output = ".pdf" }, new FilesConverts { Input = ".ods", Output = ".xlsx" }, + new FilesConverts { Input = ".ods", Output = ".ots" }, + new FilesConverts { Input = ".ods", Output = ".xlsm" }, + new FilesConverts { Input = ".ods", Output = ".xltm" }, + new FilesConverts { Input = ".ods", Output = ".xltx" }, new FilesConverts { Input = ".ots", Output = ".csv" }, new FilesConverts { Input = ".ots", Output = ".ods" }, new FilesConverts { Input = ".ots", Output = ".pdf" }, + new FilesConverts { Input = ".ots", Output = ".xlsm" }, + new FilesConverts { Input = ".ots", Output = ".xltm" }, + new FilesConverts { Input = ".ots", Output = ".xltx" }, new FilesConverts { Input = ".ots", Output = ".xlsx" }, + new FilesConverts { Input = ".oxps", Output = ".pdf" }, new FilesConverts { Input = ".odt", Output = ".docx" }, new FilesConverts { Input = ".odt", Output = ".pdf" }, new FilesConverts { Input = ".odt", Output = ".rtf" }, new FilesConverts { Input = ".odt", Output = ".txt" }, + new FilesConverts { Input = ".odt", Output = ".docm" }, + new FilesConverts { Input = ".odt", Output = ".dotm" }, + new FilesConverts { Input = ".odt", Output = ".dotx" }, + new FilesConverts { Input = ".odt", Output = ".epub" }, + new FilesConverts { Input = ".odt", Output = ".fb2" }, + new FilesConverts { Input = ".odt", Output = ".html" }, + new FilesConverts { Input = ".odt", Output = ".ott" }, new FilesConverts { Input = ".ott", Output = ".docx" }, new FilesConverts { Input = ".ott", Output = ".odt" }, new FilesConverts { Input = ".ott", Output = ".pdf" }, new FilesConverts { Input = ".ott", Output = ".rtf" }, new FilesConverts { Input = ".ott", Output = ".txt" }, + new FilesConverts { Input = ".ott", Output = ".docm" }, + new FilesConverts { Input = ".ott", Output = ".dotm" }, + new FilesConverts { Input = ".ott", Output = ".dotx" }, + new FilesConverts { Input = ".ott", Output = ".epub" }, + new FilesConverts { Input = ".ott", Output = ".fb2" }, + new FilesConverts { Input = ".ott", Output = ".html" }, new FilesConverts { Input = ".pot", Output = ".odp" }, new FilesConverts { Input = ".pot", Output = ".pdf" }, new FilesConverts { Input = ".pot", Output = ".pptx" }, + new FilesConverts { Input = ".pot", Output = ".otp" }, + new FilesConverts { Input = ".pot", Output = ".potm" }, + new FilesConverts { Input = ".pot", Output = ".potx" }, + new FilesConverts { Input = ".pot", Output = ".pptm" }, new FilesConverts { Input = ".potm", Output = ".odp" }, new FilesConverts { Input = ".potm", Output = ".pdf" }, new FilesConverts { Input = ".potm", Output = ".pptx" }, + new FilesConverts { Input = ".potm", Output = ".otp" }, + new FilesConverts { Input = ".potm", Output = ".potx" }, + new FilesConverts { Input = ".potm", Output = ".pptm" }, new FilesConverts { Input = ".potx", Output = ".odp" }, new FilesConverts { Input = ".potx", Output = ".pdf" }, new FilesConverts { Input = ".potx", Output = ".pptx" }, + new FilesConverts { Input = ".potx", Output = ".otp" }, + new FilesConverts { Input = ".potx", Output = ".potm" }, + new FilesConverts { Input = ".potx", Output = ".pptm" }, new FilesConverts { Input = ".pps", Output = ".odp" }, new FilesConverts { Input = ".pps", Output = ".pdf" }, new FilesConverts { Input = ".pps", Output = ".pptx" }, + new FilesConverts { Input = ".pps", Output = ".otp" }, + new FilesConverts { Input = ".pps", Output = ".potm" }, + new FilesConverts { Input = ".pps", Output = ".potx" }, + new FilesConverts { Input = ".pps", Output = ".pptm" }, new FilesConverts { Input = ".ppsm", Output = ".odp" }, new FilesConverts { Input = ".ppsm", Output = ".pdf" }, new FilesConverts { Input = ".ppsm", Output = ".pptx" }, + new FilesConverts { Input = ".ppsm", Output = ".otp" }, + new FilesConverts { Input = ".ppsm", Output = ".potm" }, + new FilesConverts { Input = ".ppsm", Output = ".potx" }, + new FilesConverts { Input = ".ppsm", Output = ".pptm" }, new FilesConverts { Input = ".ppsx", Output = ".odp" }, new FilesConverts { Input = ".ppsx", Output = ".pdf" }, new FilesConverts { Input = ".ppsx", Output = ".pptx" }, + new FilesConverts { Input = ".ppsx", Output = ".otp" }, + new FilesConverts { Input = ".ppsx", Output = ".potm" }, + new FilesConverts { Input = ".ppsx", Output = ".potx" }, + new FilesConverts { Input = ".ppsx", Output = ".pptm" }, new FilesConverts { Input = ".ppt", Output = ".odp" }, new FilesConverts { Input = ".ppt", Output = ".pdf" }, new FilesConverts { Input = ".ppt", Output = ".pptx" }, + new FilesConverts { Input = ".ppt", Output = ".otp" }, + new FilesConverts { Input = ".ppt", Output = ".potm" }, + new FilesConverts { Input = ".ppt", Output = ".potx" }, + new FilesConverts { Input = ".ppt", Output = ".pptm" }, new FilesConverts { Input = ".pptm", Output = ".odp" }, new FilesConverts { Input = ".pptm", Output = ".pdf" }, new FilesConverts { Input = ".pptm", Output = ".pptx" }, - new FilesConverts { Input = ".pptt", Output = ".odp" }, - new FilesConverts { Input = ".pptt", Output = ".pdf" }, + new FilesConverts { Input = ".pptm", Output = ".otp" }, + new FilesConverts { Input = ".pptm", Output = ".potm" }, + new FilesConverts { Input = ".pptm", Output = ".potx" }, new FilesConverts { Input = ".pptt", Output = ".pptx" }, new FilesConverts { Input = ".pptx", Output = ".odp" }, new FilesConverts { Input = ".pptx", Output = ".pdf" }, - new FilesConverts { Input = ".rtf", Output = ".odp" }, + new FilesConverts { Input = ".pptx", Output = ".otp" }, + new FilesConverts { Input = ".pptx", Output = ".potm" }, + new FilesConverts { Input = ".pptx", Output = ".potx" }, + new FilesConverts { Input = ".pptx", Output = ".pptm" }, + new FilesConverts { Input = ".rtf", Output = ".odt" }, new FilesConverts { Input = ".rtf", Output = ".pdf" }, new FilesConverts { Input = ".rtf", Output = ".docx" }, new FilesConverts { Input = ".rtf", Output = ".txt" }, + new FilesConverts { Input = ".rtf", Output = ".docm" }, + new FilesConverts { Input = ".rtf", Output = ".dotm" }, + new FilesConverts { Input = ".rtf", Output = ".dotx" }, + new FilesConverts { Input = ".rtf", Output = ".epub" }, + new FilesConverts { Input = ".rtf", Output = ".fb2" }, + new FilesConverts { Input = ".rtf", Output = ".html" }, + new FilesConverts { Input = ".rtf", Output = ".ott" }, new FilesConverts { Input = ".txt", Output = ".pdf" }, new FilesConverts { Input = ".txt", Output = ".docx" }, - new FilesConverts { Input = ".txt", Output = ".odp" }, - new FilesConverts { Input = ".txt", Output = ".rtx" }, + new FilesConverts { Input = ".txt", Output = ".odt" }, + new FilesConverts { Input = ".txt", Output = ".rtf" }, + new FilesConverts { Input = ".txt", Output = ".docm" }, + new FilesConverts { Input = ".txt", Output = ".dotm" }, + new FilesConverts { Input = ".txt", Output = ".dotx" }, + new FilesConverts { Input = ".txt", Output = ".epub" }, + new FilesConverts { Input = ".txt", Output = ".fb2" }, + new FilesConverts { Input = ".txt", Output = ".html" }, + new FilesConverts { Input = ".txt", Output = ".ott" }, new FilesConverts { Input = ".xls", Output = ".csv" }, new FilesConverts { Input = ".xls", Output = ".ods" }, new FilesConverts { Input = ".xls", Output = ".pdf" }, new FilesConverts { Input = ".xls", Output = ".xlsx" }, + new FilesConverts { Input = ".xls", Output = ".ots" }, + new FilesConverts { Input = ".xls", Output = ".xlsm" }, + new FilesConverts { Input = ".xls", Output = ".xltm" }, + new FilesConverts { Input = ".xls", Output = ".xltx" }, new FilesConverts { Input = ".xlsm", Output = ".csv" }, + new FilesConverts { Input = ".xlsm", Output = ".xltm" }, + new FilesConverts { Input = ".xlsm", Output = ".xltx" }, + new FilesConverts { Input = ".xlsm", Output = ".ots" }, new FilesConverts { Input = ".xlsm", Output = ".pdf" }, new FilesConverts { Input = ".xlsm", Output = ".ods" }, new FilesConverts { Input = ".xlsm", Output = ".xlsx" }, - new FilesConverts { Input = ".xlst", Output = ".pdf" }, + new FilesConverts { Input = ".xlsx", Output = ".csv" }, + new FilesConverts { Input = ".xlsx", Output = ".ods" }, + new FilesConverts { Input = ".xlsx", Output = ".ots" }, + new FilesConverts { Input = ".xlsx", Output = ".pdf" }, + new FilesConverts { Input = ".xlsx", Output = ".xlsm" }, + new FilesConverts { Input = ".xlsx", Output = ".xltm" }, + new FilesConverts { Input = ".xlsx", Output = ".xltx" }, new FilesConverts { Input = ".xlst", Output = ".xlsx" }, - new FilesConverts { Input = ".xlst", Output = ".csv" }, - new FilesConverts { Input = ".xlst", Output = ".ods" }, new FilesConverts { Input = ".xlt", Output = ".csv" }, new FilesConverts { Input = ".xlt", Output = ".ods" }, new FilesConverts { Input = ".xlt", Output = ".pdf" }, new FilesConverts { Input = ".xlt", Output = ".xlsx" }, + new FilesConverts { Input = ".xlt", Output = ".ots" }, + new FilesConverts { Input = ".xlt", Output = ".xlsm" }, + new FilesConverts { Input = ".xlt", Output = ".xltm" }, + new FilesConverts { Input = ".xlt", Output = ".xltx" }, new FilesConverts { Input = ".xltm", Output = ".csv" }, new FilesConverts { Input = ".xltm", Output = ".ods" }, new FilesConverts { Input = ".xltm", Output = ".pdf" }, + new FilesConverts { Input = ".xltm", Output = ".ots" }, + new FilesConverts { Input = ".xltm", Output = ".xlsm" }, + new FilesConverts { Input = ".xltm", Output = ".xltx" }, new FilesConverts { Input = ".xltm", Output = ".xlsx" }, new FilesConverts { Input = ".xltx", Output = ".pdf" }, new FilesConverts { Input = ".xltx", Output = ".csv" }, new FilesConverts { Input = ".xltx", Output = ".ods" }, + new FilesConverts { Input = ".xltx", Output = ".ots" }, + new FilesConverts { Input = ".xltx", Output = ".xlsm" }, + new FilesConverts { Input = ".xltx", Output = ".xltm" }, new FilesConverts { Input = ".xltx", Output = ".xlsx" }, - new FilesConverts { Input = ".xps", Output = ".pdf" } + new FilesConverts { Input = ".xps", Output = ".pdf" }, + new FilesConverts { Input = ".xml", Output = ".docm" }, + new FilesConverts { Input = ".xml", Output = ".docx" }, + new FilesConverts { Input = ".xml", Output = ".dotm" }, + new FilesConverts { Input = ".xml", Output = ".dotx" }, + new FilesConverts { Input = ".xml", Output = ".epub" }, + new FilesConverts { Input = ".xml", Output = ".fb2" }, + new FilesConverts { Input = ".xml", Output = ".html" }, + new FilesConverts { Input = ".xml", Output = ".odt" }, + new FilesConverts { Input = ".xml", Output = ".ott" }, + new FilesConverts { Input = ".xml", Output = ".pdf" }, + new FilesConverts { Input = ".xml", Output = ".rtf" }, + new FilesConverts { Input = ".xml", Output = ".txt" } ); return modelBuilder; @@ -214,7 +402,8 @@ public static class FilesConvertsExtension entity.HasKey(e => new { e.Input, e.Output }) .HasName("PRIMARY"); - entity.ToTable("files_converts"); + entity.ToTable("files_converts") + .HasCharSet("utf8"); entity.Property(e => e.Input) .HasColumnName("input") diff --git a/common/ASC.Core.Common/EF/Model/Mail/Mailbox.cs b/common/ASC.Core.Common/EF/Model/Mail/Mailbox.cs deleted file mode 100644 index 09febfa9e2..0000000000 --- a/common/ASC.Core.Common/EF/Model/Mail/Mailbox.cs +++ /dev/null @@ -1,341 +0,0 @@ -// (c) Copyright Ascensio System SIA 2010-2022 -// -// This program is a free software product. -// You can redistribute it and/or modify it under the terms -// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software -// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended -// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of -// any third-party rights. -// -// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see -// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html -// -// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. -// -// The interactive user interfaces in modified source and object code versions of the Program must -// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. -// -// Pursuant to Section 7(b) of the License you must retain the original Product logo when -// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under -// trademark law for use of our trademarks. -// -// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing -// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 -// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - -namespace ASC.Core.Common.EF.Model.Mail; - -public class Mailbox -{ - public int Id { get; set; } - public int Tenant { get; set; } - public string IdUser { get; set; } - public string Address { get; set; } - public string Name { get; set; } - public bool Enabled { get; set; } - public bool IsRemoved { get; set; } - public bool IsProcessed { get; set; } - public bool IsServerMailbox { get; set; } - public bool IsTeamlabMailbox { get; set; } - public bool Imap { get; set; } - public bool UserOnline { get; set; } - public bool IsDefault { get; set; } - public int MsgCountLast { get; set; } - public int SizeLast { get; set; } - public int LoginDelay { get; set; } - public bool QuotaError { get; set; } - public string ImapIntervals { get; set; } - public DateTime BeginDate { get; set; } - public string EmailInFolder { get; set; } - public string Pop3Password { get; set; } - public string SmtpPassword { get; set; } - public int TokenType { get; set; } - public string Token { get; set; } - public int IdSmtpServer { get; set; } - public int IdInServer { get; set; } - public DateTime DateChecked { get; set; } - public DateTime DateUserChecked { get; set; } - public DateTime DateLoginDelayExpires { get; set; } - public DateTime? DateAuthError { get; set; } - public DateTime DateCreated { get; set; } - public DateTime DateModified { get; set; } -} - -public static class MailboxExtension -{ - public static ModelBuilderWrapper AddMailbox(this ModelBuilderWrapper modelBuilder) - { - modelBuilder - .Add(MySqlAddMailbox, Provider.MySql) - .Add(PgSqlAddMailbox, Provider.PostgreSql); - - return modelBuilder; - } - public static void MySqlAddMailbox(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.ToTable("mail_mailbox"); - - entity.HasIndex(e => e.Address) - .HasDatabaseName("address_index"); - - entity.HasIndex(e => e.IdInServer) - .HasDatabaseName("main_mailbox_id_in_server_mail_mailbox_server_id"); - - entity.HasIndex(e => e.IdSmtpServer) - .HasDatabaseName("main_mailbox_id_smtp_server_mail_mailbox_server_id"); - - entity.HasIndex(e => new { e.DateChecked, e.DateLoginDelayExpires }) - .HasDatabaseName("date_login_delay_expires"); - - entity.HasIndex(e => new { e.Tenant, e.IdUser }) - .HasDatabaseName("user_id_index"); - - entity.Property(e => e.Id).HasColumnName("id"); - - entity.Property(e => e.Address) - .IsRequired() - .HasColumnName("address") - .HasColumnType("varchar(255)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.BeginDate) - .HasColumnName("begin_date") - .HasColumnType("timestamp") - .HasDefaultValueSql("'1975-01-01 00:00:00'"); - - entity.Property(e => e.DateAuthError) - .HasColumnName("date_auth_error") - .HasColumnType("datetime"); - - entity.Property(e => e.DateChecked) - .HasColumnName("date_checked") - .HasColumnType("datetime"); - - entity.Property(e => e.DateCreated) - .HasColumnName("date_created") - .HasColumnType("datetime"); - - entity.Property(e => e.DateLoginDelayExpires) - .HasColumnName("date_login_delay_expires") - .HasColumnType("datetime") - .HasDefaultValueSql("'1975-01-01 00:00:00'"); - - entity.Property(e => e.DateModified) - .HasColumnName("date_modified") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP") - .ValueGeneratedOnAddOrUpdate(); - - entity.Property(e => e.DateUserChecked) - .HasColumnName("date_user_checked") - .HasColumnType("datetime"); - - entity.Property(e => e.EmailInFolder) - .HasColumnName("email_in_folder") - .HasColumnType("text") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.Enabled) - .HasColumnName("enabled") - .HasDefaultValueSql("'1'"); - - entity.Property(e => e.IdInServer).HasColumnName("id_in_server"); - - entity.Property(e => e.IdSmtpServer).HasColumnName("id_smtp_server"); - - entity.Property(e => e.IdUser) - .IsRequired() - .HasColumnName("id_user") - .HasColumnType("varchar(38)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.Imap).HasColumnName("imap"); - - entity.Property(e => e.ImapIntervals) - .HasColumnName("imap_intervals") - .HasColumnType("mediumtext") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.IsDefault).HasColumnName("is_default"); - - entity.Property(e => e.IsProcessed).HasColumnName("is_processed"); - - entity.Property(e => e.IsRemoved).HasColumnName("is_removed"); - - entity.Property(e => e.IsServerMailbox).HasColumnName("is_server_mailbox"); - - entity.Property(e => e.LoginDelay) - .HasColumnName("login_delay") - .HasDefaultValueSql("'30'"); - - entity.Property(e => e.MsgCountLast).HasColumnName("msg_count_last"); - - entity.Property(e => e.Name) - .HasColumnName("name") - .HasColumnType("varchar(255)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.Pop3Password) - .HasColumnName("pop3_password") - .HasColumnType("varchar(255)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.QuotaError).HasColumnName("quota_error"); - - entity.Property(e => e.SizeLast).HasColumnName("size_last"); - - entity.Property(e => e.SmtpPassword) - .HasColumnName("smtp_password") - .HasColumnType("varchar(255)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.Tenant).HasColumnName("tenant"); - - entity.Property(e => e.Token) - .HasColumnName("token") - .HasColumnType("text") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.TokenType).HasColumnName("token_type"); - - entity.Property(e => e.UserOnline).HasColumnName("user_online"); - }); - } - - public static void PgSqlAddMailbox(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.ToTable("mail_mailbox", "onlyoffice"); - - entity.HasIndex(e => e.Address) - .HasDatabaseName("address_index"); - - entity.HasIndex(e => e.IdInServer) - .HasDatabaseName("main_mailbox_id_in_server_mail_mailbox_server_id"); - - entity.HasIndex(e => e.IdSmtpServer) - .HasDatabaseName("main_mailbox_id_smtp_server_mail_mailbox_server_id"); - - entity.HasIndex(e => new { e.DateChecked, e.DateLoginDelayExpires }) - .HasDatabaseName("date_login_delay_expires"); - - entity.HasIndex(e => new { e.Tenant, e.IdUser }) - .HasDatabaseName("user_id_index"); - - entity.Property(e => e.Id).HasColumnName("id"); - - entity.Property(e => e.Address) - .IsRequired() - .HasColumnName("address") - .HasMaxLength(255); - - entity.Property(e => e.BeginDate) - .HasColumnName("begin_date") - .HasDefaultValueSql("'1975-01-01 00:00:00'"); - - entity.Property(e => e.DateAuthError).HasColumnName("date_auth_error"); - - entity.Property(e => e.DateChecked).HasColumnName("date_checked"); - - entity.Property(e => e.DateCreated).HasColumnName("date_created"); - - entity.Property(e => e.DateLoginDelayExpires) - .HasColumnName("date_login_delay_expires") - .HasDefaultValueSql("'1975-01-01 00:00:00'"); - - entity.Property(e => e.DateModified) - .HasColumnName("date_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - entity.Property(e => e.DateUserChecked).HasColumnName("date_user_checked"); - - entity.Property(e => e.EmailInFolder).HasColumnName("email_in_folder"); - - entity.Property(e => e.Enabled) - .HasColumnName("enabled") - .HasDefaultValueSql("'1'::smallint"); - - entity.Property(e => e.IdInServer).HasColumnName("id_in_server"); - - entity.Property(e => e.IdSmtpServer).HasColumnName("id_smtp_server"); - - entity.Property(e => e.IdUser) - .IsRequired() - .HasColumnName("id_user") - .HasMaxLength(38); - - entity.Property(e => e.Imap) - .HasColumnName("imap") - .HasDefaultValueSql("'0'"); - - entity.Property(e => e.ImapIntervals).HasColumnName("imap_intervals"); - - entity.Property(e => e.IsDefault) - .HasColumnName("is_default") - .HasDefaultValueSql("'0'"); - - entity.Property(e => e.IsProcessed) - .HasColumnName("is_processed") - .HasDefaultValueSql("'0'"); - - entity.Property(e => e.IsRemoved) - .HasColumnName("is_removed") - .HasDefaultValueSql("'0'"); - - entity.Property(e => e.IsServerMailbox) - .HasColumnName("is_server_mailbox") - .HasDefaultValueSql("'0'"); - - entity.Property(e => e.LoginDelay) - .HasColumnName("login_delay") - .HasDefaultValueSql("'30'"); - - entity.Property(e => e.MsgCountLast).HasColumnName("msg_count_last"); - - entity.Property(e => e.Name) - .HasColumnName("name") - .HasMaxLength(255) - .HasDefaultValueSql("NULL"); - - entity.Property(e => e.Pop3Password) - .HasColumnName("pop3_password") - .HasMaxLength(255) - .HasDefaultValueSql("NULL"); - - entity.Property(e => e.QuotaError) - .HasColumnName("quota_error") - .HasDefaultValueSql("'0'"); - - entity.Property(e => e.SizeLast).HasColumnName("size_last"); - - entity.Property(e => e.SmtpPassword) - .HasColumnName("smtp_password") - .HasMaxLength(255) - .HasDefaultValueSql("NULL"); - - entity.Property(e => e.Tenant).HasColumnName("tenant"); - - entity.Property(e => e.Token).HasColumnName("token"); - - entity.Property(e => e.TokenType) - .HasColumnName("token_type") - .HasDefaultValueSql("'0'"); - - entity.Property(e => e.UserOnline) - .HasColumnName("user_online") - .HasDefaultValueSql("'0'"); - }); - } -} diff --git a/common/ASC.Core.Common/EF/Model/Mail/MailboxProvider.cs b/common/ASC.Core.Common/EF/Model/Mail/MailboxProvider.cs deleted file mode 100644 index 73311dbe32..0000000000 --- a/common/ASC.Core.Common/EF/Model/Mail/MailboxProvider.cs +++ /dev/null @@ -1,332 +0,0 @@ -// (c) Copyright Ascensio System SIA 2010-2022 -// -// This program is a free software product. -// You can redistribute it and/or modify it under the terms -// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software -// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended -// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of -// any third-party rights. -// -// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see -// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html -// -// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. -// -// The interactive user interfaces in modified source and object code versions of the Program must -// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. -// -// Pursuant to Section 7(b) of the License you must retain the original Product logo when -// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under -// trademark law for use of our trademarks. -// -// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing -// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 -// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - -namespace ASC.Core.Common.EF.Model.Mail; - -public class MailboxProvider -{ - public int Id { get; set; } - public string Name { get; set; } - public string DisplayName { get; set; } - public string DisplayShortName { get; set; } - public string Documentation { get; set; } -} -public static class MailboxProviderExtension -{ - public static ModelBuilderWrapper AddMailboxProvider(this ModelBuilderWrapper modelBuilder) - { - modelBuilder - .Add(MySqlAddMailboxProvider, Provider.MySql) - .Add(PgSqlAddMailboxProvider, Provider.PostgreSql) - .HasData( - new MailboxProvider { Id = 1, Name = "1und1.de", DisplayName = "1&1", DisplayShortName = "1&1", Documentation = "http://hilfe-center.1und1.de/access/search/go.php?t=e698123" }, - new MailboxProvider { Id = 2, Name = "abc.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 3, Name = "agate.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 4, Name = "alice.it", DisplayName = "Alice Italy", DisplayShortName = "Alice", Documentation = "http://aiuto.alice.it/informazioni/clientemail/thunderbird.html" }, - new MailboxProvider { Id = 5, Name = "amail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 6, Name = "amber.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 7, Name = "aol.com", DisplayName = "AOL Mail", DisplayShortName = "AOL", Documentation = null }, - new MailboxProvider { Id = 8, Name = "apost.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 9, Name = "aqua.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 10, Name = "arcor.de", DisplayName = "Arcor", DisplayShortName = "Arcor", Documentation = null }, - new MailboxProvider { Id = 11, Name = "arubapec.it", DisplayName = "Aruba PEC", DisplayShortName = "Aruba", Documentation = "http://pec.aruba.it/guide_filmate.asp" }, - new MailboxProvider { Id = 12, Name = "att.net", DisplayName = "AT&T", DisplayShortName = "AT&T", Documentation = "http://www.att.com/esupport/article.jsp?sid=KB401570&ct=9000152" }, - new MailboxProvider { Id = 13, Name = "ballade.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 14, Name = "bay.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null }, - new MailboxProvider { Id = 15, Name = "bb-niigata.jp", DisplayName = "BB????", DisplayShortName = "BB-NIIGATA", Documentation = null }, - new MailboxProvider { Id = 16, Name = "beige.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 17, Name = "biglobe.ne.jp", DisplayName = "Biglobe", DisplayShortName = "Biglobe", Documentation = null }, - new MailboxProvider { Id = 18, Name = "bigpond.com", DisplayName = "Telstra Bigpond", DisplayShortName = "Bigpond", Documentation = null }, - new MailboxProvider { Id = 19, Name = "blue.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 20, Name = "bluemail.ch", DisplayName = "bluewin.ch", DisplayShortName = "bluewin.ch", Documentation = "http://smtphelp.bluewin.ch/swisscomdtg/setup/?" }, - new MailboxProvider { Id = 21, Name = "bluewin.ch", DisplayName = "bluewin.ch", DisplayShortName = "bluewin.ch", Documentation = "http://smtphelp.bluewin.ch/swisscomdtg/setup/" }, - new MailboxProvider { Id = 22, Name = "bmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 23, Name = "bolero.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 24, Name = "bpost.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 25, Name = "broba.cc", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 26, Name = "brown.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 27, Name = "camel.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 28, Name = "cameo.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 29, Name = "cc9.ne.jp", DisplayName = "CC9???????????", DisplayShortName = "CC9", Documentation = null }, - new MailboxProvider { Id = 30, Name = "cek.ne.jp", DisplayName = "???????????", DisplayShortName = "CEK-Net", Documentation = null }, - new MailboxProvider { Id = 31, Name = "cgl.ucsf.edu", DisplayName = "UCSF CGL email", DisplayShortName = "CGL emai", Documentation = null }, - new MailboxProvider { Id = 32, Name = "charter.com", DisplayName = "Charter Commuications", DisplayShortName = "Charter", Documentation = null }, - new MailboxProvider { Id = 33, Name = "clio.ne.jp", DisplayName = "CLIO-Net??????", DisplayShortName = "CLIO-Net", Documentation = null }, - new MailboxProvider { Id = 34, Name = "cmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 35, Name = "co1.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null }, - new MailboxProvider { Id = 36, Name = "co2.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null }, - new MailboxProvider { Id = 37, Name = "co3.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null }, - new MailboxProvider { Id = 38, Name = "cocoa.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 39, Name = "coda.plala.or.jp", DisplayName = "???", DisplayShortName = "Arcor", Documentation = null }, - new MailboxProvider { Id = 40, Name = "comcast.net", DisplayName = "???", DisplayShortName = "Comcast", Documentation = null }, - new MailboxProvider { Id = 41, Name = "concerto.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 42, Name = "coral.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 43, Name = "courante.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 44, Name = "cpost.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 45, Name = "cream.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 46, Name = "dan.wind.ne.jp", DisplayName = "???", DisplayShortName = "wind", Documentation = null }, - new MailboxProvider { Id = 47, Name = "dance.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 48, Name = "dd.iij4u.or.jp", DisplayName = "IIJ4U", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 49, Name = "df.eu", DisplayName = "domainFACTORY", DisplayShortName = "domainFACTORY", Documentation = "http://www.df.eu/de/service/df-faq/e-mail/mail-programme/" }, - new MailboxProvider { Id = 50, Name = "dmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 51, Name = "earthlink.net", DisplayName = "EarthLink", DisplayShortName = "EarthLink", Documentation = "http://support.earthlink.net/email/email-server-settings.php" }, - new MailboxProvider { Id = 52, Name = "ebony.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 53, Name = "email.it", DisplayName = "email.it", DisplayShortName = "email.it", Documentation = "http://www.email.it/ita/config/thunder.php" }, - new MailboxProvider { Id = 54, Name = "email.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 55, Name = "ewetel.de", DisplayName = "EWE Tel", DisplayShortName = "EWE Tel", Documentation = null }, - new MailboxProvider { Id = 56, Name = "fantasy.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 57, Name = "flamenco.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 58, Name = "fmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 59, Name = "francetelecom.fr", DisplayName = "France Telecom / Orange", DisplayShortName = "Orange", Documentation = null }, - new MailboxProvider { Id = 60, Name = "free.fr", DisplayName = "Free Telecom", DisplayShortName = "free.fr", Documentation = "http://www.free.fr/assistance/599-thunderbird.html" }, - new MailboxProvider { Id = 61, Name = "freenet.de", DisplayName = "Freenet Mail", DisplayShortName = "Freenet", Documentation = null }, - new MailboxProvider { Id = 62, Name = "fuga.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 63, Name = "gandi.net", DisplayName = "Gandi Mail", DisplayShortName = "Gandi", Documentation = null }, - new MailboxProvider { Id = 64, Name = "gmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 65, Name = "gmx.com", DisplayName = "GMX Freemail", DisplayShortName = "GMX", Documentation = null }, - new MailboxProvider { Id = 66, Name = "gmx.net", DisplayName = "GMX Freemail", DisplayShortName = "GMX", Documentation = null }, - new MailboxProvider { Id = 67, Name = "go.tvm.ne.jp", DisplayName = "????????????????????", DisplayShortName = "TVM-Net", Documentation = null }, - new MailboxProvider { Id = 68, Name = "goo.jp", DisplayName = "goo ????????", DisplayShortName = "goo", Documentation = null }, - new MailboxProvider { Id = 69, Name = "googlemail.com", DisplayName = "Google Mail", DisplayShortName = "GMail", Documentation = null }, - new MailboxProvider { Id = 70, Name = "grape.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 71, Name = "gray.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 72, Name = "hal.ne.jp", DisplayName = "?????????", DisplayShortName = "HAL", Documentation = null }, - new MailboxProvider { Id = 73, Name = "hana.or.jp", DisplayName = "????????", DisplayShortName = "????", Documentation = null }, - new MailboxProvider { Id = 74, Name = "hotmail.com", DisplayName = "Microsoft Live Hotmail", DisplayShortName = "Hotmail", Documentation = null }, - new MailboxProvider { Id = 75, Name = "i.softbank.jp", DisplayName = "SoftBank", DisplayShortName = "SoftBank", Documentation = null }, - new MailboxProvider { Id = 76, Name = "ic-net.or.jp", DisplayName = "IC-NET", DisplayShortName = "IC-NET", Documentation = null }, - new MailboxProvider { Id = 77, Name = "iijmio-mail.jp", DisplayName = "IIJmio ????????", DisplayShortName = "IIJmio", Documentation = null }, - new MailboxProvider { Id = 78, Name = "iiyama-catv.ne.jp", DisplayName = "???????i?????", DisplayShortName = "i?????", Documentation = null }, - new MailboxProvider { Id = 79, Name = "imail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 80, Name = "inbox.lt", DisplayName = "Inbox.lt", DisplayShortName = "Inbox.lt", Documentation = null }, - new MailboxProvider { Id = 81, Name = "inbox.lv", DisplayName = "Inbox.lv", DisplayShortName = "Inbox.lv", Documentation = null }, - new MailboxProvider { Id = 82, Name = "indigo.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 83, Name = "inet-shibata.or.jp", DisplayName = "??????????", DisplayShortName = "INET-SHIBATA", Documentation = null }, - new MailboxProvider { Id = 84, Name = "internode.on.net", DisplayName = "Internode", DisplayShortName = "Internode", Documentation = "http://www.internode.on.net/support/guides/email/secure_email/" }, - new MailboxProvider { Id = 85, Name = "ipax.at", DisplayName = "IPAX Internet Services", DisplayShortName = "IPAX", Documentation = null }, - new MailboxProvider { Id = 86, Name = "ivory.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 87, Name = "iwafune.ne.jp", DisplayName = "???????????", DisplayShortName = "IWAFUNE", Documentation = null }, - new MailboxProvider { Id = 88, Name = "jade.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 89, Name = "janis.or.jp", DisplayName = "Janis", DisplayShortName = "Janis", Documentation = null }, - new MailboxProvider { Id = 90, Name = "jet.ne.jp", DisplayName = "JETINTERNET", DisplayShortName = "JET", Documentation = null }, - new MailboxProvider { Id = 91, Name = "ji.jet.ne.jp", DisplayName = "JETINTERNET", DisplayShortName = "JET", Documentation = null }, - new MailboxProvider { Id = 92, Name = "jmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 93, Name = "kabelmail.de", DisplayName = "Kabel Deutschland", DisplayShortName = "Kabel D", Documentation = null }, - new MailboxProvider { Id = 94, Name = "kelcom.net", DisplayName = "KELCOM Internet", DisplayShortName = "KELCOM", Documentation = null }, - new MailboxProvider { Id = 95, Name = "khaki.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 96, Name = "kl.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null }, - new MailboxProvider { Id = 97, Name = "kmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 98, Name = "kokuyou.ne.jp", DisplayName = "????????????", DisplayShortName = "?????", Documentation = null }, - new MailboxProvider { Id = 99, Name = "lapis.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 100, Name = "laposte.net", DisplayName = "LaPoste", DisplayShortName = "LaPoste", Documentation = "http://www.geckozone.org/forum/viewtopic.php?f=4&t=93118" }, - new MailboxProvider { Id = 101, Name = "lemon.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 102, Name = "libero.it", DisplayName = "Libero Mail", DisplayShortName = "Libero", Documentation = "http://aiuto.libero.it/mail/istruzioni/configura-mozilla-thunderbird-per-windows-a11.phtml" }, - new MailboxProvider { Id = 103, Name = "lilac.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 104, Name = "lime.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 105, Name = "mahoroba.ne.jp", DisplayName = "???????????", DisplayShortName = "????", Documentation = null }, - new MailboxProvider { Id = 106, Name = "mail.com", DisplayName = "mail.com", DisplayShortName = "mail.com", Documentation = null }, - new MailboxProvider { Id = 107, Name = "mail.dk", DisplayName = "TDC (DK)", DisplayShortName = "TDC", Documentation = null }, - new MailboxProvider { Id = 108, Name = "mail.iwafune.ne.jp", DisplayName = "???????????", DisplayShortName = "IWAFUNE", Documentation = null }, - new MailboxProvider { Id = 109, Name = "mail.ru", DisplayName = "mail.ru", DisplayShortName = "mail.ru", Documentation = null }, - new MailboxProvider { Id = 110, Name = "mail.telenor.dk", DisplayName = "Telenor Danmark", DisplayShortName = "Telenor", Documentation = null }, - new MailboxProvider { Id = 111, Name = "mail.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 112, Name = "maroon.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 113, Name = "me.com", DisplayName = "Apple iCloud", DisplayShortName = "Apple", Documentation = null }, - new MailboxProvider { Id = 114, Name = "minuet.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 115, Name = "ml.murakami.ne.jp", DisplayName = "???????????", DisplayShortName = "IWAFUNE", Documentation = null }, - new MailboxProvider { Id = 116, Name = "mnet.ne.jp", DisplayName = "Mnet ??? ????", DisplayShortName = "Mnet???", Documentation = null }, - new MailboxProvider { Id = 117, Name = "'mopera.net", DisplayName = "mopera U", DisplayShortName = "mopera U", Documentation = null }, - new MailboxProvider { Id = 118, Name = "mozilla.com", DisplayName = "Mozilla Corporation and Mozilla Foundation internal email addresses", DisplayShortName = "mozilla.com", Documentation = null }, - new MailboxProvider { Id = 119, Name = "mx1.tiki.ne.jp", DisplayName = "TikiTiki???????", DisplayShortName = "TikiTiki", Documentation = null }, - new MailboxProvider { Id = 120, Name = "navy.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 121, Name = "nctsoft.com", DisplayName = "nctsoft", DisplayShortName = "nct", Documentation = null }, - new MailboxProvider { Id = 122, Name = "nifty.com", DisplayName = "@nifty", DisplayShortName = "@nifty", Documentation = null }, - new MailboxProvider { Id = 123, Name = "nsat.jp", DisplayName = "BB????", DisplayShortName = "NSAT", Documentation = null }, - new MailboxProvider { Id = 124, Name = "o2.pl", DisplayName = "o2 Poczta", DisplayShortName = "o2", Documentation = null }, - new MailboxProvider { Id = 125, Name = "olive.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 126, Name = "onet.pl", DisplayName = "Poczta Onet", DisplayShortName = "Onet", Documentation = null }, - new MailboxProvider { Id = 127, Name = "opal.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 128, Name = "orange.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 129, Name = "orchid.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 130, Name = "ovh.net", DisplayName = "OVH", DisplayShortName = "OVH", Documentation = "http://guides.ovh.com/ConfigurationEmail" }, - new MailboxProvider { Id = 131, Name = "pal.kijimadaira.jp", DisplayName = "????FTTH", DisplayShortName = "????FTTH", Documentation = null }, - new MailboxProvider { Id = 132, Name = "palette.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 133, Name = "parabox.or.jp", DisplayName = "??????", DisplayShortName = "PARABOX", Documentation = null }, - new MailboxProvider { Id = 134, Name = "pdx.edu", DisplayName = "Portland State University Mail", DisplayShortName = "PSU Mail", Documentation = null }, - new MailboxProvider { Id = 135, Name = "peach.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 136, Name = "peoplepc.com", DisplayName = "PeoplePC", DisplayShortName = "PeoplePC", Documentation = null }, - new MailboxProvider { Id = 137, Name = "plum.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 138, Name = "po.dcn.ne.jp", DisplayName = "DCN???????????", DisplayShortName = "DCN", Documentation = null }, - new MailboxProvider { Id = 139, Name = "po.wind.ne.jp", DisplayName = "'?????????", DisplayShortName = "wind", Documentation = null }, - new MailboxProvider { Id = 140, Name = "polka.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 141, Name = "pop.shibata.ne.jp", DisplayName = "??????????", DisplayShortName = "INET-SHIBATA", Documentation = null }, - new MailboxProvider { Id = 142, Name = "posteo.de", DisplayName = "Posteo", DisplayShortName = "Posteo", Documentation = null }, - new MailboxProvider { Id = 143, Name = "purple.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 144, Name = "qip.ru", DisplayName = "qip.ru", DisplayShortName = "qip.ru", Documentation = null }, - new MailboxProvider { Id = 145, Name = "rainbow.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 146, Name = "rambler.ru", DisplayName = "Rambler Mail", DisplayShortName = "Rambler", Documentation = null }, - new MailboxProvider { Id = 147, Name = "red.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 148, Name = "rmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 149, Name = "rondo.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 150, Name = "rose.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 151, Name = "rouge.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 152, Name = "rr.com", DisplayName = "RoadRunner", DisplayShortName = "RR", Documentation = "http://help.rr.com/HMSFaqs/e_emailserveraddys.aspx" }, - new MailboxProvider { Id = 153, Name = "ruby.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 154, Name = "sakunet.ne.jp", DisplayName = "?????????", DisplayShortName = "Saku-Net", Documentation = null }, - new MailboxProvider { Id = 155, Name = "sea.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 156, Name = "sepia.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 157, Name = "serenade.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 158, Name = "seznam.cz", DisplayName = "Seznam", DisplayShortName = "Seznam", Documentation = "http://napoveda.seznam.cz/cz/jake-jsou-adresy-pop3-a-smtp-serveru.html" }, - new MailboxProvider { Id = 159, Name = "sfr.fr", DisplayName = "SFR / Neuf", DisplayShortName = "SFR", Documentation = "http://assistance.sfr.fr/internet_neufbox-de-SFR/utiliser-email/parametrer-id-sfr/fc-505-50680" }, - new MailboxProvider { Id = 160, Name = "silk.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 161, Name = "silver.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 162, Name = "sky.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 163, Name = "skynet.be", DisplayName = "skynet", DisplayShortName = "skynet", Documentation = "http://support.en.belgacom.be/app/answers/detail/a_id/14337/kw/thunderbird" }, - new MailboxProvider { Id = 164, Name = "smail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 165, Name = "snow.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 166, Name = "so.wind.ne.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null }, - new MailboxProvider { Id = 167, Name = "sonata.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 168, Name = "strato.de", DisplayName = "Strato", DisplayShortName = "Strato", Documentation = null }, - new MailboxProvider { Id = 169, Name = "studenti.univr.it", DisplayName = "Universita degli Studi di Verona", DisplayShortName = "UniVR", Documentation = null }, - new MailboxProvider { Id = 170, Name = "suite.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 171, Name = "sympatico.ca", DisplayName = "Sympatico Email", DisplayShortName = "Sympatico", Documentation = "http://internet.bell.ca/index.cfm?method=content.view&category_id=585&content_id=12767" }, - new MailboxProvider { Id = 172, Name = "symphony.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 173, Name = "t-online.de", DisplayName = "T-Online", DisplayShortName = "T-Online", Documentation = null }, - new MailboxProvider { Id = 174, Name = "taupe.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 175, Name = "terra.es", DisplayName = "Correo Terra", DisplayShortName = "Terra", Documentation = null }, - new MailboxProvider { Id = 176, Name = "tiki.ne.jp", DisplayName = "TikiTiki???????", DisplayShortName = "TikiTiki", Documentation = null }, - new MailboxProvider { Id = 177, Name = "tiscali.cz", DisplayName = "Tiscali", DisplayShortName = "Tiscali", Documentation = null }, - new MailboxProvider { Id = 178, Name = "tiscali.it", DisplayName = "Tiscali Italy", DisplayShortName = "Tiscali", Documentation = "http://assistenza.tiscali.it/tecnica/posta/configurazioni/" }, - new MailboxProvider { Id = 179, Name = "tmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 180, Name = "toccata.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 181, Name = "topaz.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 182, Name = "trio.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 183, Name = "umail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 184, Name = "umich.edu", DisplayName = "UM ITCS Email", DisplayShortName = "UM ITCS", Documentation = null }, - new MailboxProvider { Id = 185, Name = "upcmail.nl", DisplayName = "UPC Nederland", DisplayShortName = "UPC", Documentation = null }, - new MailboxProvider { Id = 186, Name = "verizon.net", DisplayName = "Verizon Online", DisplayShortName = "Verizon", Documentation = null }, - new MailboxProvider { Id = 187, Name = "versatel.de", DisplayName = "Versatel", DisplayShortName = "Versatel", Documentation = "http://www.versatel.de/hilfe/index_popup.php?einrichtung_email_programm" }, - new MailboxProvider { Id = 188, Name = "violet.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 189, Name = "vm.aikis.or.jp", DisplayName = "aikis", DisplayShortName = "aikis", Documentation = null }, - new MailboxProvider { Id = 190, Name = "vmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 191, Name = "vp.tiki.ne.jp", DisplayName = "TikiTiki???????", DisplayShortName = "TikiTiki", Documentation = null }, - new MailboxProvider { Id = 192, Name = "waltz.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 193, Name = "wave.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 194, Name = "web.de", DisplayName = "WEB.DE Freemail", DisplayShortName = "Web.de", Documentation = "http://hilfe.freemail.web.de/freemail/e-mail/pop3/thunderbird/" }, - new MailboxProvider { Id = 195, Name = "white.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 196, Name = "wildwestdomains.com", DisplayName = "Your WildWest domain", DisplayShortName = "WildWest", Documentation = null }, - new MailboxProvider { Id = 197, Name = "wine.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 198, Name = "wmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 199, Name = "wp.pl", DisplayName = "Poczta Wirtualna Polska", DisplayShortName = "Poczta WP", Documentation = null }, - new MailboxProvider { Id = 200, Name = "xmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 201, Name = "xp.wind.jp", DisplayName = "?????????", DisplayShortName = "wind", Documentation = null }, - new MailboxProvider { Id = 202, Name = "xpost.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 203, Name = "xs4all.nl", DisplayName = "XS4All", DisplayShortName = "XS4All", Documentation = null }, - new MailboxProvider { Id = 204, Name = "xtra.co.nz", DisplayName = "Yahoo! Mail", DisplayShortName = "Yahoo", Documentation = null }, - new MailboxProvider { Id = 205, Name = "yahoo.co.jp", DisplayName = "Yahoo! ???", DisplayShortName = "Yahoo! ??? ", Documentation = null }, - new MailboxProvider { Id = 206, Name = "yahoo.com", DisplayName = "Yahoo! Mail", DisplayShortName = "Yahoo", Documentation = null }, - new MailboxProvider { Id = 207, Name = "yandex.ru", DisplayName = "Yandex Mail", DisplayShortName = "Yandex", Documentation = null }, - new MailboxProvider { Id = 208, Name = "ybb.ne.jp", DisplayName = "Yahoo! BB", DisplayShortName = "Yahoo! BB", Documentation = null }, - new MailboxProvider { Id = 209, Name = "yellow.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 210, Name = "ymail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 211, Name = "ypost.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 212, Name = "ziggo.nl", DisplayName = "Ziggo", DisplayShortName = "Ziggo", Documentation = null }, - new MailboxProvider { Id = 213, Name = "zmail.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 214, Name = "zpost.plala.or.jp", DisplayName = "???", DisplayShortName = "???", Documentation = null }, - new MailboxProvider { Id = 215, Name = "avsmedia.com", DisplayName = "avsmedia.com", DisplayShortName = "avsmedia", Documentation = null }, - new MailboxProvider { Id = 216, Name = "avsmedia.net", DisplayName = "avsmedia.net", DisplayShortName = "avsmedia", Documentation = null }, - new MailboxProvider { Id = 218, Name = "ilearney.com", DisplayName = "ilearney.com", DisplayShortName = "ilearney.com", Documentation = null }, - new MailboxProvider { Id = 219, Name = "fpl -technology.com", DisplayName = "fpl-technology.com", DisplayShortName = "fpl-technology.com", Documentation = "http://fpl-technology.com" }, - new MailboxProvider { Id = 220, Name = "icloud.com", DisplayName = "Apple iCloud", DisplayShortName = "Apple", Documentation = null }, - new MailboxProvider { Id = 221, Name = "office365.com", DisplayName = "Microsoft Office 365", DisplayShortName = "Office365", Documentation = "https://products.office.com" }); - - return modelBuilder; - } - - public static void MySqlAddMailboxProvider(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.ToTable("mail_mailbox_provider"); - - entity.Property(e => e.Id).HasColumnName("id"); - - entity.Property(e => e.DisplayName) - .HasColumnName("display_name") - .HasColumnType("varchar(255)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.DisplayShortName) - .HasColumnName("display_short_name") - .HasColumnType("varchar(255)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.Documentation) - .HasColumnName("documentation") - .HasColumnType("varchar(255)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.Name) - .IsRequired() - .HasColumnName("name") - .HasColumnType("varchar(255)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - }); - } - public static void PgSqlAddMailboxProvider(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.ToTable("mail_mailbox_provider", "onlyoffice"); - - entity.Property(e => e.Id).HasColumnName("id"); - - entity.Property(e => e.DisplayName) - .HasColumnName("display_name") - .HasMaxLength(255) - .HasDefaultValueSql("NULL::character varying"); - - entity.Property(e => e.DisplayShortName) - .HasColumnName("display_short_name") - .HasMaxLength(255) - .HasDefaultValueSql("NULL"); - - entity.Property(e => e.Documentation) - .HasColumnName("documentation") - .HasMaxLength(255) - .HasDefaultValueSql("NULL"); - - entity.Property(e => e.Name) - .IsRequired() - .HasColumnName("name") - .HasMaxLength(255); - }); - } -} diff --git a/common/ASC.Core.Common/EF/Model/Mail/ServerServer.cs b/common/ASC.Core.Common/EF/Model/Mail/ServerServer.cs deleted file mode 100644 index 5f6e8e697e..0000000000 --- a/common/ASC.Core.Common/EF/Model/Mail/ServerServer.cs +++ /dev/null @@ -1,110 +0,0 @@ -// (c) Copyright Ascensio System SIA 2010-2022 -// -// This program is a free software product. -// You can redistribute it and/or modify it under the terms -// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software -// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended -// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of -// any third-party rights. -// -// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see -// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html -// -// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. -// -// The interactive user interfaces in modified source and object code versions of the Program must -// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. -// -// Pursuant to Section 7(b) of the License you must retain the original Product logo when -// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under -// trademark law for use of our trademarks. -// -// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing -// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 -// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - -namespace ASC.Core.Common.EF.Model.Mail; - -public class ServerServer -{ - public int Id { get; set; } - public string MxRecord { get; set; } - public string ConnectionString { get; set; } - public int ServerType { get; set; } - public int SmtpSettingsId { get; set; } - public int ImapSettingsId { get; set; } -} - -public static class ServerServerExtension -{ - public static ModelBuilderWrapper AddServerServer(this ModelBuilderWrapper modelBuilder) - { - modelBuilder - .Add(MySqlAddServerServer, Provider.MySql) - .Add(PgSqlAddServerServer, Provider.PostgreSql); - - return modelBuilder; - } - public static void MySqlAddServerServer(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.ToTable("mail_server_server"); - - entity.HasIndex(e => e.ServerType) - .HasDatabaseName("mail_server_server_type_server_type_fk_id"); - - entity.Property(e => e.Id).HasColumnName("id"); - - entity.Property(e => e.ConnectionString) - .IsRequired() - .HasColumnName("connection_string") - .HasColumnType("text") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.ImapSettingsId).HasColumnName("imap_settings_id"); - - entity.Property(e => e.MxRecord) - .IsRequired() - .HasColumnName("mx_record") - .HasColumnType("varchar(128)") - .HasDefaultValueSql("''") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.ServerType).HasColumnName("server_type"); - - entity.Property(e => e.SmtpSettingsId).HasColumnName("smtp_settings_id"); - }); - } - public static void PgSqlAddServerServer(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.ToTable("mail_server_server", "onlyoffice"); - - entity.HasIndex(e => e.ServerType) - .HasDatabaseName("mail_server_server_type_server_type_fk_id"); - - entity.Property(e => e.Id).HasColumnName("id"); - - entity.Property(e => e.ConnectionString) - .IsRequired() - .HasColumnName("connection_string"); - - entity.Property(e => e.ImapSettingsId).HasColumnName("imap_settings_id"); - - entity.Property(e => e.MxRecord) - .IsRequired() - .HasColumnName("mx_record") - .HasMaxLength(128) - .HasDefaultValueSql("' '"); - - entity.Property(e => e.ServerType).HasColumnName("server_type"); - - entity.Property(e => e.SmtpSettingsId).HasColumnName("smtp_settings_id"); - }); - } -} diff --git a/common/ASC.Core.Common/EF/Model/MobileAppInstall.cs b/common/ASC.Core.Common/EF/Model/MobileAppInstall.cs index 25152d780b..a5a985468b 100644 --- a/common/ASC.Core.Common/EF/Model/MobileAppInstall.cs +++ b/common/ASC.Core.Common/EF/Model/MobileAppInstall.cs @@ -31,7 +31,7 @@ public class MobileAppInstall public string UserEmail { get; set; } public int AppType { get; set; } public DateTime RegisteredOn { get; set; } - public DateTime LastSign { get; set; } + public DateTime? LastSign { get; set; } } public static class MobileAppInstallExtension @@ -52,7 +52,8 @@ public static class MobileAppInstallExtension entity.HasKey(e => new { e.UserEmail, e.AppType }) .HasName("PRIMARY"); - entity.ToTable("mobile_app_install"); + entity.ToTable("mobile_app_install") + .HasCharSet("utf8"); entity.Property(e => e.UserEmail) .HasColumnName("user_email") @@ -60,11 +61,14 @@ public static class MobileAppInstallExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.AppType).HasColumnName("app_type"); + entity.Property(e => e.AppType) + .HasColumnName("app_type"); entity.Property(e => e.LastSign) .HasColumnName("last_sign") - .HasColumnType("datetime"); + .IsRequired(false) + .HasColumnType("datetime") + .HasDefaultValueSql("NULL"); entity.Property(e => e.RegisteredOn) .HasColumnName("registered_on") diff --git a/common/ASC.Core.Common/EF/Model/Notify/NotifyInfo.cs b/common/ASC.Core.Common/EF/Model/Notify/NotifyInfo.cs index 17e459bdbe..9b1040803d 100644 --- a/common/ASC.Core.Common/EF/Model/Notify/NotifyInfo.cs +++ b/common/ASC.Core.Common/EF/Model/Notify/NotifyInfo.cs @@ -51,22 +51,31 @@ public static class NotifyInfoExtension entity.HasKey(e => e.NotifyId) .HasName("PRIMARY"); - entity.ToTable("notify_info"); + entity.ToTable("notify_info") + .HasCharSet("utf8"); entity.HasIndex(e => e.State) .HasDatabaseName("state"); - entity.Property(e => e.NotifyId).HasColumnName("notify_id"); + entity.Property(e => e.NotifyId) + .HasColumnName("notify_id") + .ValueGeneratedNever(); - entity.Property(e => e.Attempts).HasColumnName("attempts"); + entity.Property(e => e.Attempts) + .HasColumnName("attempts") + .HasDefaultValueSql("'0'"); entity.Property(e => e.ModifyDate) .HasColumnName("modify_date") .HasColumnType("datetime"); - entity.Property(e => e.Priority).HasColumnName("priority"); + entity.Property(e => e.Priority) + .HasColumnName("priority") + .HasDefaultValueSql("'0'"); - entity.Property(e => e.State).HasColumnName("state"); + entity.Property(e => e.State) + .HasColumnName("state") + .HasDefaultValueSql("'0'"); }); } public static void PgSqlAddNotifyInfo(this ModelBuilder modelBuilder) diff --git a/common/ASC.Core.Common/EF/Model/Notify/NotifyQueue.cs b/common/ASC.Core.Common/EF/Model/Notify/NotifyQueue.cs index 20a1f2846f..73b22beeff 100644 --- a/common/ASC.Core.Common/EF/Model/Notify/NotifyQueue.cs +++ b/common/ASC.Core.Common/EF/Model/Notify/NotifyQueue.cs @@ -58,7 +58,8 @@ public static class NotifyQueueExtension entity.HasKey(e => e.NotifyId) .HasName("PRIMARY"); - entity.ToTable("notify_queue"); + entity.ToTable("notify_queue") + .HasCharSet("utf8"); entity.Property(e => e.NotifyId).HasColumnName("notify_id"); diff --git a/common/ASC.Core.Common/EF/Model/Regions.cs b/common/ASC.Core.Common/EF/Model/Regions.cs index 6ed9820a99..6c4df9a884 100644 --- a/common/ASC.Core.Common/EF/Model/Regions.cs +++ b/common/ASC.Core.Common/EF/Model/Regions.cs @@ -48,6 +48,7 @@ public static class RegionsExtension { modelBuilder.Entity(entity => { + entity.HasCharSet("utf8"); entity.HasKey(e => e.Region); }); } diff --git a/common/ASC.Core.Common/EF/Model/ShortLinks.cs b/common/ASC.Core.Common/EF/Model/ShortLinks.cs new file mode 100644 index 0000000000..bad0cb6c29 --- /dev/null +++ b/common/ASC.Core.Common/EF/Model/ShortLinks.cs @@ -0,0 +1,114 @@ +// (c) Copyright Ascensio System SIA 2010-2022 +// +// This program is a free software product. +// You can redistribute it and/or modify it under the terms +// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software +// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended +// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of +// any third-party rights. +// +// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see +// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html +// +// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. +// +// The interactive user interfaces in modified source and object code versions of the Program must +// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. +// +// Pursuant to Section 7(b) of the License you must retain the original Product logo when +// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under +// trademark law for use of our trademarks. +// +// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing +// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 +// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + + +namespace ASC.Core.Common.EF.Model; +public class ShortLinks +{ + public int Id { get; set; } + public string Short { get; set; } + public string Link { get; set; } +} + +public static class ShortLinksExtension +{ + public static ModelBuilderWrapper AddShortLinks(this ModelBuilderWrapper modelBuilder) + { + modelBuilder + .Add(MySqlAddShortLinks, Provider.MySql) + .Add(PgSqlAddShortLinks, Provider.PostgreSql); + + return modelBuilder; + } + + public static void MySqlAddShortLinks(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.ToTable("short_links") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.HasIndex(e => e.Short) + .IsUnique(); + + entity.HasKey(e => e.Id) + .HasName("PRIMARY"); + + entity.Property(e => e.Id) + .HasColumnName("id") + .ValueGeneratedOnAdd() + .HasColumnType("int(10)"); + + entity.Property(e => e.Short) + .HasColumnName("short") + .HasColumnType("varchar(12)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci") + .IsRequired(false); + + entity.Property(e => e.Link) + .HasColumnName("link") + .HasColumnType("text") + .UseCollation("utf8_bin") + .IsRequired(false); + }); + } + + public static void PgSqlAddShortLinks(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.ToTable("short_links") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.HasIndex(e => e.Short) + .IsUnique(); + + entity.HasKey(e => e.Id) + .HasName("PRIMARY"); + + entity.Property(e => e.Id) + .HasColumnName("id") + .ValueGeneratedOnAdd() + .HasColumnType("int(10)"); + + entity.Property(e => e.Short) + .HasColumnName("short") + .HasColumnType("varchar(12)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci") + .IsRequired(false); + + entity.Property(e => e.Link) + .HasColumnName("link") + .HasColumnType("text") + .UseCollation("utf8_bin") + .IsRequired(false); + }); + } +} diff --git a/common/ASC.Core.Common/EF/Model/TelegramUser.cs b/common/ASC.Core.Common/EF/Model/TelegramUser.cs index 6fa65fb781..c154ab84d2 100644 --- a/common/ASC.Core.Common/EF/Model/TelegramUser.cs +++ b/common/ASC.Core.Common/EF/Model/TelegramUser.cs @@ -55,7 +55,8 @@ public static class TelegramUsersExtension entity.HasKey(e => new { e.TenantId, e.PortalUserId }) .HasName("PRIMARY"); - entity.ToTable("telegram_users"); + entity.ToTable("telegram_users") + .HasCharSet("utf8"); entity.HasIndex(e => e.TelegramUserId) .HasDatabaseName("tgId"); @@ -68,7 +69,9 @@ public static class TelegramUsersExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.TelegramUserId).HasColumnName("telegram_user_id"); + entity.Property(e => e.TelegramUserId) + .HasColumnName("telegram_user_id") + .HasColumnType("int"); }); } public static void PgSqlAddTelegramUsers(this ModelBuilder modelBuilder) diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbButton.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbButton.cs index fa254e9216..ebd8e827e3 100644 --- a/common/ASC.Core.Common/EF/Model/Tenant/DbButton.cs +++ b/common/ASC.Core.Common/EF/Model/Tenant/DbButton.cs @@ -55,7 +55,8 @@ public static class DbButtonExtension entity.HasKey(e => new { e.TariffId, e.PartnerId }) .HasName("PRIMARY"); - entity.ToTable("tenants_buttons"); + entity.ToTable("tenants_buttons") + .HasCharSet("utf8"); entity.Property(e => e.TariffId).HasColumnName("tariff_id"); diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs index b535e5f4f5..1c9933cf20 100644 --- a/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs +++ b/common/ASC.Core.Common/EF/Model/Tenant/DbQuota.cs @@ -83,11 +83,16 @@ public static class DbQuotaExtension entity.HasKey(e => e.Tenant) .HasName("PRIMARY"); - entity.ToTable("tenants_quota"); + entity.ToTable("tenants_quota") + .HasCharSet("utf8"); - entity.Property(e => e.Tenant).HasColumnName("tenant"); + entity.Property(e => e.Tenant) + .HasColumnName("tenant") + .ValueGeneratedNever(); - entity.Property(e => e.ActiveUsers).HasColumnName("active_users"); + entity.Property(e => e.ActiveUsers) + .HasColumnName("active_users") + .HasDefaultValueSql("'0'"); entity.Property(e => e.AvangateId) .HasColumnName("avangate_id") @@ -103,13 +108,15 @@ public static class DbQuotaExtension entity.Property(e => e.Features) .HasColumnName("features") - .HasColumnType("text") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); + .HasColumnType("text"); - entity.Property(e => e.MaxFileSize).HasColumnName("max_file_size"); + entity.Property(e => e.MaxFileSize) + .HasColumnName("max_file_size") + .HasDefaultValueSql("'0'"); - entity.Property(e => e.MaxTotalSize).HasColumnName("max_total_size"); + entity.Property(e => e.MaxTotalSize) + .HasColumnName("max_total_size") + .HasDefaultValueSql("'0'"); entity.Property(e => e.Name) .HasColumnName("name") @@ -119,9 +126,13 @@ public static class DbQuotaExtension entity.Property(e => e.Price) .HasColumnName("price") + .HasDefaultValueSql("'0.00'") .HasColumnType("decimal(10,2)"); - entity.Property(e => e.Visible).HasColumnName("visible"); + entity.Property(e => e.Visible) + .HasColumnName("visible") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); }); } public static void PgSqlAddDbQuota(this ModelBuilder modelBuilder) diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbQuotaRow.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbQuotaRow.cs index c5a6bbd881..8f29328189 100644 --- a/common/ASC.Core.Common/EF/Model/Tenant/DbQuotaRow.cs +++ b/common/ASC.Core.Common/EF/Model/Tenant/DbQuotaRow.cs @@ -58,7 +58,8 @@ public static class DbQuotaRowExtension entity.HasKey(e => new { e.Tenant, e.Path }) .HasName("PRIMARY"); - entity.ToTable("tenants_quotarow"); + entity.ToTable("tenants_quotarow") + .HasCharSet("utf8"); entity.HasIndex(e => e.LastModified) .HasDatabaseName("last_modified"); @@ -71,12 +72,13 @@ public static class DbQuotaRowExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.Counter).HasColumnName("counter"); + entity.Property(e => e.Counter) + .HasColumnName("counter") + .HasDefaultValueSql("'0'"); entity.Property(e => e.LastModified) .HasColumnName("last_modified") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnType("timestamp"); entity.Property(e => e.Tag) .HasColumnName("tag") diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbTariff.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbTariff.cs index 44b5904458..6dcc605a13 100644 --- a/common/ASC.Core.Common/EF/Model/Tenant/DbTariff.cs +++ b/common/ASC.Core.Common/EF/Model/Tenant/DbTariff.cs @@ -50,7 +50,8 @@ public static class DbTariffExtension { modelBuilder.Entity(entity => { - entity.ToTable("tenants_tariff"); + entity.ToTable("tenants_tariff") + .HasCharSet("utf8"); entity.HasIndex(e => e.Tenant) .HasDatabaseName("tenant"); @@ -65,13 +66,12 @@ public static class DbTariffExtension entity.Property(e => e.CreateOn) .HasColumnName("create_on") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP") - .ValueGeneratedOnAddOrUpdate(); + .HasColumnType("timestamp"); entity.Property(e => e.Quantity) .HasColumnName("quantity") - .HasColumnType("int"); + .HasColumnType("int") + .HasDefaultValueSql("'1'"); entity.Property(e => e.Stamp) .HasColumnName("stamp") diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbTenant.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbTenant.cs index db4655870e..62d68bdcb6 100644 --- a/common/ASC.Core.Common/EF/Model/Tenant/DbTenant.cs +++ b/common/ASC.Core.Common/EF/Model/Tenant/DbTenant.cs @@ -53,9 +53,9 @@ public class DbTenant : IMapFrom set { StatusChanged = value; } } public DateTime CreationDateTime { get; set; } - public Guid OwnerId { get; set; } + public Guid? OwnerId { get; set; } public string PaymentId { get; set; } - public TenantIndustry? Industry { get; set; } + public TenantIndustry Industry { get; set; } public DateTime LastModified { get; set; } public bool Spam { get; set; } public bool Calls { get; set; } @@ -89,7 +89,8 @@ public static class DbTenantExtension Alias = "localhost", Name = "Web Office", CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), - OwnerId = Guid.Parse("66faa6e4-f133-11ea-b126-00ffeec8b4ef") + OwnerId = Guid.Parse("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + LastModified = new DateTime(2022, 7, 8) } ); @@ -105,7 +106,8 @@ public static class DbTenantExtension modelBuilder.Entity(entity => { - entity.ToTable("tenants_tenants"); + entity.ToTable("tenants_tenants") + .HasCharSet("utf8"); entity.HasIndex(e => e.LastModified) .HasDatabaseName("last_modified"); @@ -116,6 +118,10 @@ public static class DbTenantExtension entity.HasIndex(e => e.Version) .HasDatabaseName("version"); + entity.HasIndex(e => e.Alias) + .HasDatabaseName("alias") + .IsUnique(); + entity.Property(e => e.Id).HasColumnName("id"); entity.Property(e => e.Alias) @@ -127,13 +133,17 @@ public static class DbTenantExtension entity.Property(e => e.Calls) .HasColumnName("calls") - .HasDefaultValueSql("true"); + .HasDefaultValueSql("'1'") + .HasColumnType("tinyint(1)"); entity.Property(e => e.CreationDateTime) .HasColumnName("creationdatetime") .HasColumnType("datetime"); - entity.Property(e => e.Industry).HasColumnName("industry"); + entity.Property(e => e.Industry) + .HasColumnName("industry") + .IsRequired() + .HasDefaultValueSql("'0'"); entity.Property(e => e.Language) .IsRequired() @@ -145,8 +155,7 @@ public static class DbTenantExtension entity.Property(e => e.LastModified) .HasColumnName("last_modified") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnType("timestamp"); entity.Property(e => e.MappedDomain) .HasColumnName("mappeddomain") @@ -164,6 +173,7 @@ public static class DbTenantExtension entity.Property(e => e.OwnerId) .HasColumnName("owner_id") .HasColumnType("varchar(38)") + .IsRequired(false) .HasCharSet("utf8") .UseCollation("utf8_general_ci"); @@ -175,9 +185,13 @@ public static class DbTenantExtension entity.Property(e => e.Spam) .HasColumnName("spam") - .HasDefaultValueSql("true"); + .HasDefaultValueSql("'1'") + .HasColumnType("tinyint(1)"); - entity.Property(e => e.Status).HasColumnName("status"); + entity.Property(e => e.Status) + .HasColumnName("status") + .IsRequired() + .HasDefaultValueSql("'0'"); entity.Property(e => e.StatusChanged) .HasColumnName("statuschanged") diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbTenantForbiden.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbTenantForbiden.cs index 05c4ff4dc4..cfb1dee1f1 100644 --- a/common/ASC.Core.Common/EF/Model/Tenant/DbTenantForbiden.cs +++ b/common/ASC.Core.Common/EF/Model/Tenant/DbTenantForbiden.cs @@ -53,7 +53,8 @@ public static class DbTenantForbidenExtension entity.HasKey(e => e.Address) .HasName("PRIMARY"); - entity.ToTable("tenants_forbiden"); + entity.ToTable("tenants_forbiden") + .HasCharSet("utf8"); entity.Property(e => e.Address) .HasColumnName("address") diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbTenantPartner.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbTenantPartner.cs index a89d1632f2..894a138faf 100644 --- a/common/ASC.Core.Common/EF/Model/Tenant/DbTenantPartner.cs +++ b/common/ASC.Core.Common/EF/Model/Tenant/DbTenantPartner.cs @@ -54,9 +54,12 @@ public static class DbTenantPartnerExtension entity.HasKey(e => e.TenantId) .HasName("PRIMARY"); - entity.ToTable("tenants_partners"); + entity.ToTable("tenants_partners") + .HasCharSet("utf8"); - entity.Property(e => e.TenantId).HasColumnName("tenant_id"); + entity.Property(e => e.TenantId) + .HasColumnName("tenant_id") + .ValueGeneratedNever(); entity.Property(e => e.AffiliateId) .HasColumnName("affiliate_id") diff --git a/common/ASC.Core.Common/EF/Model/Tenant/DbTenantVersion.cs b/common/ASC.Core.Common/EF/Model/Tenant/DbTenantVersion.cs index fad2c60220..8a9c55fe17 100644 --- a/common/ASC.Core.Common/EF/Model/Tenant/DbTenantVersion.cs +++ b/common/ASC.Core.Common/EF/Model/Tenant/DbTenantVersion.cs @@ -50,11 +50,16 @@ public static class DbTenantVersionExtension { modelBuilder.Entity(entity => { - entity.ToTable("tenants_version"); + entity.ToTable("tenants_version") + .HasCharSet("utf8"); - entity.Property(e => e.Id).HasColumnName("id"); + entity.Property(e => e.Id) + .HasColumnName("id") + .ValueGeneratedNever(); - entity.Property(e => e.DefaultVersion).HasColumnName("default_version"); + entity.Property(e => e.DefaultVersion) + .HasColumnName("default_version") + .HasDefaultValueSql("'0'"); entity.Property(e => e.Url) .IsRequired() @@ -70,7 +75,10 @@ public static class DbTenantVersionExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.Visible).HasColumnName("visible"); + entity.Property(e => e.Visible) + .HasColumnName("visible") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); }); } diff --git a/common/ASC.Core.Common/EF/Model/Tenant/TenantIpRestrictions.cs b/common/ASC.Core.Common/EF/Model/Tenant/TenantIpRestrictions.cs index 90a24a941e..1312ff0851 100644 --- a/common/ASC.Core.Common/EF/Model/Tenant/TenantIpRestrictions.cs +++ b/common/ASC.Core.Common/EF/Model/Tenant/TenantIpRestrictions.cs @@ -48,7 +48,8 @@ public static class TenantIpRestrictionsExtension { modelBuilder.Entity(entity => { - entity.ToTable("tenants_iprestrictions"); + entity.ToTable("tenants_iprestrictions") + .HasCharSet("utf8"); entity.HasIndex(e => e.Tenant) .HasDatabaseName("tenant"); diff --git a/common/ASC.Core.Common/EF/Model/User/DbGroup.cs b/common/ASC.Core.Common/EF/Model/User/DbGroup.cs index 9b171d1e45..31e2f32eba 100644 --- a/common/ASC.Core.Common/EF/Model/User/DbGroup.cs +++ b/common/ASC.Core.Common/EF/Model/User/DbGroup.cs @@ -58,7 +58,8 @@ public static class DbGroupExtension { modelBuilder.Entity(entity => { - entity.ToTable("core_group"); + entity.ToTable("core_group") + .HasCharSet("utf8"); entity.HasIndex(e => e.LastModified) .HasDatabaseName("last_modified"); @@ -80,8 +81,7 @@ public static class DbGroupExtension entity.Property(e => e.LastModified) .HasColumnName("last_modified") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnType("timestamp"); entity.Property(e => e.Name) .IsRequired() @@ -96,7 +96,10 @@ public static class DbGroupExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.Removed).HasColumnName("removed"); + entity.Property(e => e.Removed) + .HasColumnName("removed") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); entity.Property(e => e.Sid) .HasColumnName("sid") diff --git a/common/ASC.Core.Common/EF/Model/User/User.cs b/common/ASC.Core.Common/EF/Model/User/User.cs index 1992e5ffdd..4d2ec9503d 100644 --- a/common/ASC.Core.Common/EF/Model/User/User.cs +++ b/common/ASC.Core.Common/EF/Model/User/User.cs @@ -53,7 +53,6 @@ public class User : BaseEntity, IMapFrom public bool Removed { get; set; } public DateTime CreateDate { get; set; } public DateTime LastModified { get; set; } - public List Groups { get; set; } public override object[] GetKeys() { @@ -80,7 +79,8 @@ public static class DbUserExtension Status = (EmployeeStatus)1, ActivationStatus = 0, WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157), - LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420) + LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), + CreateDate = new DateTime(2022, 7, 8) }); return modelBuilder; @@ -88,10 +88,13 @@ public static class DbUserExtension private static void MySqlAddUser(this ModelBuilder modelBuilder) { - modelBuilder.MySqlAddUserGroup(); modelBuilder.Entity(entity => { - entity.ToTable("core_user"); + entity.ToTable("core_user") + .HasCharSet("utf8"); + + entity.HasKey(e => e.Id) + .HasName("PRIMARY"); entity.HasIndex(e => e.Email) .HasDatabaseName("email"); @@ -108,7 +111,9 @@ public static class DbUserExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.ActivationStatus).HasColumnName("activation_status"); + entity.Property(e => e.ActivationStatus) + .HasColumnName("activation_status") + .HasDefaultValueSql("'0'"); entity.Property(e => e.BirthDate) .HasColumnName("bithdate") @@ -122,8 +127,7 @@ public static class DbUserExtension entity.Property(e => e.CreateDate) .HasColumnName("create_on") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnType("timestamp"); entity.Property(e => e.CultureName) .HasColumnName("culture") @@ -174,11 +178,18 @@ public static class DbUserExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.MobilePhoneActivation).HasColumnName("phone_activation"); + entity.Property(e => e.MobilePhoneActivation) + .HasColumnName("phone_activation") + .HasDefaultValueSql("'0'"); - entity.Property(e => e.Removed).HasColumnName("removed"); + entity.Property(e => e.Removed) + .HasColumnName("removed") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); - entity.Property(e => e.Sex).HasColumnName("sex"); + entity.Property(e => e.Sex) + .HasColumnName("sex") + .HasColumnType("tinyint(1)"); entity.Property(e => e.Sid) .HasColumnName("sid") diff --git a/common/ASC.Core.Common/EF/Model/User/UserGroup.cs b/common/ASC.Core.Common/EF/Model/User/UserGroup.cs index 4f18aa6c34..8a3e1fcf4a 100644 --- a/common/ASC.Core.Common/EF/Model/User/UserGroup.cs +++ b/common/ASC.Core.Common/EF/Model/User/UserGroup.cs @@ -29,14 +29,14 @@ namespace ASC.Core.Common.EF; public class UserGroup : BaseEntity, IMapFrom { public int Tenant { get; set; } - public Guid UserId { get; set; } - public Guid GroupId { get; set; } + public Guid Userid { get; set; } + public Guid UserGroupId { get; set; } public UserGroupRefType RefType { get; set; } public bool Removed { get; set; } public DateTime LastModified { get; set; } public override object[] GetKeys() { - return new object[] { Tenant, UserId, GroupId, RefType }; + return new object[] { Tenant, Userid, UserGroupId, RefType }; } } @@ -51,9 +51,10 @@ public static class DbUserGroupExtension new UserGroup { Tenant = 1, - UserId = Guid.Parse("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), - GroupId = Guid.Parse("cd84e66b-b803-40fc-99f9-b2969a54a1de"), - RefType = 0 + Userid = Guid.Parse("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + UserGroupId = Guid.Parse("cd84e66b-b803-40fc-99f9-b2969a54a1de"), + RefType = 0, + LastModified = new DateTime(2022, 7, 8) } ); @@ -64,23 +65,24 @@ public static class DbUserGroupExtension { modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.Tenant, e.UserId, e.GroupId, e.RefType }) + entity.HasKey(e => new { e.Tenant, e.Userid, e.UserGroupId, e.RefType }) .HasName("PRIMARY"); - entity.ToTable("core_usergroup"); + entity.ToTable("core_usergroup") + .HasCharSet("utf8"); entity.HasIndex(e => e.LastModified) .HasDatabaseName("last_modified"); entity.Property(e => e.Tenant).HasColumnName("tenant"); - entity.Property(e => e.UserId) + entity.Property(e => e.Userid) .HasColumnName("userid") .HasColumnType("varchar(38)") .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.GroupId) + entity.Property(e => e.UserGroupId) .HasColumnName("groupid") .HasColumnType("varchar(38)") .HasCharSet("utf8") @@ -90,17 +92,19 @@ public static class DbUserGroupExtension entity.Property(e => e.LastModified) .HasColumnName("last_modified") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnType("timestamp"); - entity.Property(e => e.Removed).HasColumnName("removed"); + entity.Property(e => e.Removed) + .HasColumnName("removed") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); }); } public static void PgSqlAddUserGroup(this ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.Tenant, e.UserId, e.GroupId, e.RefType }) + entity.HasKey(e => new { e.Tenant, e.Userid, e.UserGroupId, e.RefType }) .HasName("core_usergroup_pkey"); entity.ToTable("core_usergroup", "onlyoffice"); @@ -110,11 +114,11 @@ public static class DbUserGroupExtension entity.Property(e => e.Tenant).HasColumnName("tenant"); - entity.Property(e => e.UserId) + entity.Property(e => e.Userid) .HasColumnName("userid") .HasMaxLength(38); - entity.Property(e => e.GroupId) + entity.Property(e => e.UserGroupId) .HasColumnName("groupid") .HasMaxLength(38); diff --git a/common/ASC.Core.Common/EF/Model/User/UserPhoto.cs b/common/ASC.Core.Common/EF/Model/User/UserPhoto.cs index 99677e476b..9f705375eb 100644 --- a/common/ASC.Core.Common/EF/Model/User/UserPhoto.cs +++ b/common/ASC.Core.Common/EF/Model/User/UserPhoto.cs @@ -53,7 +53,8 @@ public static class UserPhotoExtension entity.HasKey(e => e.UserId) .HasName("PRIMARY"); - entity.ToTable("core_userphoto"); + entity.ToTable("core_userphoto") + .HasCharSet("utf8"); entity.HasIndex(e => e.Tenant) .HasDatabaseName("tenant"); diff --git a/common/ASC.Core.Common/EF/Model/User/UserSecurity.cs b/common/ASC.Core.Common/EF/Model/User/UserSecurity.cs index a41fd6c190..2207ec8531 100644 --- a/common/ASC.Core.Common/EF/Model/User/UserSecurity.cs +++ b/common/ASC.Core.Common/EF/Model/User/UserSecurity.cs @@ -51,7 +51,7 @@ public static class UserSecurityExtension Tenant = 1, UserId = Guid.Parse("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), PwdHash = "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=", - LastModified = DateTime.UtcNow + LastModified = new DateTime(2022, 7, 8) }); return modelBuilder; @@ -64,7 +64,8 @@ public static class UserSecurityExtension entity.HasKey(e => e.UserId) .HasName("PRIMARY"); - entity.ToTable("core_usersecurity"); + entity.ToTable("core_usersecurity") + .HasCharSet("utf8"); entity.HasIndex(e => e.PwdHash) .HasDatabaseName("pwdhash"); @@ -80,8 +81,7 @@ public static class UserSecurityExtension entity.Property(e => e.LastModified) .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP") - .ValueGeneratedOnAddOrUpdate(); + .IsRequired(); entity.Property(e => e.PwdHash) .HasColumnName("pwdhash") diff --git a/common/ASC.Core.Common/GeolocationHelper.cs b/common/ASC.Core.Common/GeolocationHelper.cs index 4ae071a103..de5f0c3a32 100644 --- a/common/ASC.Core.Common/GeolocationHelper.cs +++ b/common/ASC.Core.Common/GeolocationHelper.cs @@ -24,17 +24,15 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -using DbContext = ASC.Core.Common.EF.Context.DbContext; - namespace ASC.Geolocation; public class GeolocationHelper { public string Dbid { get; set; } private readonly ILogger _logger; - private readonly DbContext _dbContext; + private readonly CustomDbContext _dbContext; - public GeolocationHelper(DbContextManager dbContext, ILogger logger) + public GeolocationHelper(DbContextManager dbContext, ILogger logger) { _logger = logger; _dbContext = dbContext.Get(Dbid); @@ -55,7 +53,7 @@ public class GeolocationHelper IPEnd = r.IPEnd, IPStart = r.IPStart, Key = r.Country, - TimezoneOffset = r.TimezoneOffset, + TimezoneOffset = r.TimezoneOffset ?? 0, TimezoneName = r.TimezoneName }) .FirstOrDefault(); diff --git a/common/ASC.Core.Common/GlobalUsings.cs b/common/ASC.Core.Common/GlobalUsings.cs index 2d0b36de30..dd807f9244 100644 --- a/common/ASC.Core.Common/GlobalUsings.cs +++ b/common/ASC.Core.Common/GlobalUsings.cs @@ -34,10 +34,9 @@ global using System.Diagnostics; global using System.Globalization; global using System.Linq; global using System.Linq.Expressions; -global using System.Net; +global using System.Net; global using System.Net.Http.Headers; global using System.Reflection; -global using System.Resources; global using System.Runtime.Serialization; global using System.Security; global using System.Security.Authentication; @@ -83,8 +82,6 @@ global using ASC.Core.Common.Configuration; global using ASC.Core.Common.EF; global using ASC.Core.Common.EF.Context; global using ASC.Core.Common.EF.Model; -global using ASC.Core.Common.EF.Model.Mail; -global using ASC.Core.Common.EF.Model.Resource; global using ASC.Core.Common.Hosting.Extensions; global using ASC.Core.Common.Hosting.Interfaces; global using ASC.Core.Common.Log; @@ -108,10 +105,10 @@ global using ASC.Core.Users; global using ASC.EventBus.Abstractions; global using ASC.EventBus.Events; global using ASC.Geolocation; -global using ASC.MessagingSystem.Core; -global using ASC.MessagingSystem.Data; -global using ASC.MessagingSystem.Mapping; -global using ASC.MessagingSystem.Models; +global using ASC.MessagingSystem.Core; +global using ASC.MessagingSystem.EF.Model; +global using ASC.MessagingSystem.Mapping; +global using ASC.MessagingSystem.EF.Context; global using ASC.Notify; global using ASC.Notify.Channels; global using ASC.Notify.Cron; @@ -137,9 +134,9 @@ global using Microsoft.EntityFrameworkCore; global using Microsoft.EntityFrameworkCore.Infrastructure; global using Microsoft.EntityFrameworkCore.Metadata; global using Microsoft.EntityFrameworkCore.Migrations; +global using Microsoft.EntityFrameworkCore.Migrations.Operations; global using Microsoft.EntityFrameworkCore.Query; global using Microsoft.EntityFrameworkCore.Query.SqlExpressions; -global using Microsoft.Extensions.Caching.Memory; global using Microsoft.Extensions.Configuration; global using Microsoft.Extensions.DependencyInjection; global using Microsoft.Extensions.Hosting; @@ -155,6 +152,9 @@ global using Newtonsoft.Json; global using NVelocity; global using NVelocity.App.Events; +global using Pomelo.EntityFrameworkCore.MySql.Infrastructure.Internal; +global using Pomelo.EntityFrameworkCore.MySql.Migrations; + global using ProtoBuf; global using Telegram.Bot; diff --git a/common/ASC.Core.Common/Hosting/Extensions/InstanceRegistrationExtension.cs b/common/ASC.Core.Common/Hosting/Extensions/InstanceRegistrationExtension.cs index 0e8bc35c31..f1e22fdd33 100644 --- a/common/ASC.Core.Common/Hosting/Extensions/InstanceRegistrationExtension.cs +++ b/common/ASC.Core.Common/Hosting/Extensions/InstanceRegistrationExtension.cs @@ -73,7 +73,39 @@ internal static class InstanceRegistrationExtension } public static void PgSqlAddInstanceRegistration(this ModelBuilder modelBuilder) - { - throw new NotImplementedException(); + { + modelBuilder.Entity(entity => + { + entity.ToTable("hosting_instance_registration"); + + entity.HasKey(e => e.InstanceRegistrationId) + .HasName("PRIMARY"); + + entity.HasIndex(e => e.WorkerTypeName) + .HasDatabaseName("worker_type_name"); + + entity.Property(e => e.WorkerTypeName) + .HasColumnName("worker_type_name") + .HasColumnType("varchar(255)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci") + .IsRequired(); + + entity.Property(e => e.IsActive) + .HasColumnName("is_active") + .HasColumnType("tinyint(4)") + .IsRequired(); + + entity.Property(e => e.InstanceRegistrationId) + .HasColumnName("instance_registration_id") + .HasColumnType("varchar(255)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci") + .IsRequired(); + + entity.Property(e => e.LastUpdated) + .HasColumnName("last_updated") + .HasColumnType("datetime"); + }); } } \ No newline at end of file diff --git a/common/ASC.Core.Common/Hosting/InstanceRegistrationContext.cs b/common/ASC.Core.Common/Hosting/InstanceRegistrationContext.cs index 6e33fa2c9a..af3d561419 100644 --- a/common/ASC.Core.Common/Hosting/InstanceRegistrationContext.cs +++ b/common/ASC.Core.Common/Hosting/InstanceRegistrationContext.cs @@ -26,9 +26,6 @@ namespace ASC.Core.Common.Hosting; -public class MySqlIntegrationEventLogContext : InstanceRegistrationContext { } -public class PostgreSqlIntegrationEventLogContext : InstanceRegistrationContext { } - public class InstanceRegistrationContext : BaseDbContext { public DbSet InstanceRegistrations { get; set; } @@ -39,16 +36,4 @@ public class InstanceRegistrationContext : BaseDbContext .AddInstanceRegistration(); } - - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlIntegrationEventLogContext() } , - { Provider.PostgreSql, () => new PostgreSqlIntegrationEventLogContext() } , - }; - } - } } diff --git a/common/ASC.Core.Common/Log/DBResourceManagerLogger.cs b/common/ASC.Core.Common/Log/DBResourceManagerLogger.cs index affd01345b..97b90a2dc4 100644 --- a/common/ASC.Core.Common/Log/DBResourceManagerLogger.cs +++ b/common/ASC.Core.Common/Log/DBResourceManagerLogger.cs @@ -29,18 +29,6 @@ using TMResourceData; namespace ASC.Core.Common.Log; internal static partial class DBResourceManagerLogger { - [LoggerMessage(Level = LogLevel.Warning, Message = "Can not {getType}() from assembly {assemblyName}, try {getExportedTypes}()")] - public static partial void CanNotGetType(this ILogger logger, string getType, string assemblyName, string getExportedTypes, Exception exception); - - [LoggerMessage(Level = LogLevel.Error, Message = "Can not {getExportedTypes}() from assembly {assemblyName}")] - public static partial void CanNotGetExportedTypes(this ILogger logger, string getExportedTypes, string assemblyName, Exception exception); - - [LoggerMessage(Level = LogLevel.Error, Message = "Can not get resource from {fileName} for {culture}: GetString({name})")] - public static partial void CanNotGetResource(this ILogger logger, string fileName, string culture, string name, Exception exception); - - [LoggerMessage(Level = LogLevel.Error, Message = "DBResourceSet")] - public static partial void ErrorDBResourceSet(this ILogger logger, Exception exception); - [LoggerMessage(Level = LogLevel.Error, Message = "SetNewText")] public static partial void ErrorSetNewText(this ILogger logger, Exception exception); diff --git a/common/ASC.Core.Common/Messaging/AuditEvent.cs b/common/ASC.Core.Common/Messaging/AuditEvent.cs index f53c4126e2..61dd1c46f1 100644 --- a/common/ASC.Core.Common/Messaging/AuditEvent.cs +++ b/common/ASC.Core.Common/Messaging/AuditEvent.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.MessagingSystem.Models; +namespace ASC.MessagingSystem.EF.Model; public class AuditEvent : MessageEvent, IMapFrom { @@ -54,17 +54,20 @@ public static class AuditEventExtension { modelBuilder.Entity(entity => { - entity.ToTable("audit_events"); + entity.ToTable("audit_events") + .HasCharSet("utf8"); entity.HasIndex(e => new { e.TenantId, e.Date }) .HasDatabaseName("date"); entity - .Property(e => e.Id) - .HasColumnName("id") - .ValueGeneratedOnAdd(); + .Property(e => e.Id) + .HasColumnName("id") + .ValueGeneratedOnAdd(); - entity.Property(e => e.Action).HasColumnName("action"); + entity.Property(e => e.Action) + .HasColumnName("action") + .IsRequired(false); entity.Property(e => e.Browser) .HasColumnName("browser") @@ -116,6 +119,7 @@ public static class AuditEventExtension entity.Property(e => e.UserId) .HasColumnName("user_id") + .IsRequired(false) .HasColumnType("char(38)") .HasCharSet("utf8") .UseCollation("utf8_general_ci"); diff --git a/common/ASC.Core.Common/Messaging/EventMessage.cs b/common/ASC.Core.Common/Messaging/EventMessage.cs index 5691e48f58..8e4456a0f0 100644 --- a/common/ASC.Core.Common/Messaging/EventMessage.cs +++ b/common/ASC.Core.Common/Messaging/EventMessage.cs @@ -24,8 +24,8 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - -namespace ASC.MessagingSystem.Models; + +namespace ASC.MessagingSystem.EF.Model; public class EventMessage { @@ -41,6 +41,6 @@ public class EventMessage public MessageAction Action { get; set; } public IList Description { get; set; } public MessageTarget Target { get; set; } - public string UAHeader { get; set; } + public string UAHeader { get; set; } public bool Active { get; set; } } diff --git a/common/ASC.Core.Common/Messaging/EventTypeConverter.cs b/common/ASC.Core.Common/Messaging/EventTypeConverter.cs index 9bd19e5899..7a117a391c 100644 --- a/common/ASC.Core.Common/Messaging/EventTypeConverter.cs +++ b/common/ASC.Core.Common/Messaging/EventTypeConverter.cs @@ -24,6 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + namespace ASC.MessagingSystem.Mapping; [Scope] diff --git a/common/ASC.Core.Common/Messaging/LoginEvent.cs b/common/ASC.Core.Common/Messaging/LoginEvent.cs index f682500221..6598633a0a 100644 --- a/common/ASC.Core.Common/Messaging/LoginEvent.cs +++ b/common/ASC.Core.Common/Messaging/LoginEvent.cs @@ -24,13 +24,12 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - - -namespace ASC.MessagingSystem.Models; + +namespace ASC.MessagingSystem.EF.Model; public class LoginEvent : MessageEvent, IMapFrom { - public string Login { get; set; } + public string Login { get; set; } public bool Active { get; set; } public void Mapping(Profile profile) @@ -56,7 +55,8 @@ public static class LoginEventsExtension { modelBuilder.Entity(entity => { - entity.ToTable("login_events"); + entity.ToTable("login_events") + .HasCharSet("utf8"); entity.HasIndex(e => e.Date) .HasDatabaseName("date"); @@ -66,7 +66,9 @@ public static class LoginEventsExtension entity.Property(e => e.Id).HasColumnName("id"); - entity.Property(e => e.Action).HasColumnName("action"); + entity.Property(e => e.Action) + .HasColumnName("action") + .IsRequired(false); entity.Property(e => e.Browser) .HasColumnName("browser") @@ -108,10 +110,10 @@ public static class LoginEventsExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.TenantId) - .HasColumnName("tenant_id"); + entity.Property(e => e.TenantId) + .HasColumnName("tenant_id"); - entity.Property(e => e.Active) + entity.Property(e => e.Active) .HasColumnName("active"); entity.Property(e => e.UserId) @@ -170,8 +172,8 @@ public static class LoginEventsExtension .HasMaxLength(200) .HasDefaultValueSql("NULL"); - entity.Property(e => e.TenantId).HasColumnName("tenant_id"); - + entity.Property(e => e.TenantId).HasColumnName("tenant_id"); + entity.Property(e => e.Active).HasColumnName("active"); entity.Property(e => e.UserId) diff --git a/common/ASC.Core.Common/Messaging/MessageEvent.cs b/common/ASC.Core.Common/Messaging/MessageEvent.cs index 92cf55bb2c..b837cb9075 100644 --- a/common/ASC.Core.Common/Messaging/MessageEvent.cs +++ b/common/ASC.Core.Common/Messaging/MessageEvent.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.MessagingSystem.Models; +namespace ASC.MessagingSystem.EF.Model; public class MessageEvent : IMapFrom { @@ -34,8 +34,8 @@ public class MessageEvent : IMapFrom public string Platform { get; set; } public DateTime Date { get; set; } public int TenantId { get; set; } - public Guid UserId { get; set; } + public Guid? UserId { get; set; } public string Page { get; set; } - public int Action { get; set; } + public int? Action { get; set; } public string DescriptionRaw { get; set; } } diff --git a/common/ASC.Core.Common/Messaging/MessageTarget.cs b/common/ASC.Core.Common/Messaging/MessageTarget.cs index 0f2fcbc918..21aa5a627e 100644 --- a/common/ASC.Core.Common/Messaging/MessageTarget.cs +++ b/common/ASC.Core.Common/Messaging/MessageTarget.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.MessagingSystem.Models; +namespace ASC.MessagingSystem.EF.Model; [Singletone] public class MessageTarget @@ -40,31 +40,31 @@ public class MessageTarget } public MessageTarget Create(T value) - { - var res = new List(1); - if (value != null) - { - res.Add(value.ToString()); - } - - return new MessageTarget(_option) - { - _items = res + { + var res = new List(1); + if (value != null) + { + res.Add(value.ToString()); + } + + return new MessageTarget(_option) + { + _items = res }; } public MessageTarget CreateFromGroupValues(IEnumerable value) - { - var res = new MessageTarget(_option) - { - _items = new List() - }; - - if (value != null) - { - res._items = value.Select(r => r.ToString()).ToList(); - } - + { + var res = new MessageTarget(_option) + { + _items = new List() + }; + + if (value != null) + { + res._items = value.Select(r => r.ToString()).ToList(); + } + return res; } @@ -86,7 +86,7 @@ public class MessageTarget { _items = items }; - } + } public IEnumerable GetItems() { return _items.ToList(); } public override string ToString() { diff --git a/common/ASC.Core.Common/Messaging/MessagesContext.cs b/common/ASC.Core.Common/Messaging/MessagesContext.cs index c3c781b23c..81780ba57b 100644 --- a/common/ASC.Core.Common/Messaging/MessagesContext.cs +++ b/common/ASC.Core.Common/Messaging/MessagesContext.cs @@ -24,10 +24,8 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.MessagingSystem.Data; -public class MySqlMessagesContext : MessagesContext { } -public class PostgreSqlMessagesContext : MessagesContext { } +namespace ASC.MessagingSystem.EF.Context; public class MessagesContext : BaseDbContext { @@ -37,18 +35,6 @@ public class MessagesContext : BaseDbContext public DbSet Tenants { get; set; } public DbSet Users { get; set; } - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlMessagesContext() } , - { Provider.PostgreSql, () => new PostgreSqlMessagesContext() } , - }; - } - } - protected override void OnModelCreating(ModelBuilder modelBuilder) { ModelBuilderWrapper diff --git a/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/20211012145324_AccountLinkContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/20211012145324_AccountLinkContextMySql.cs deleted file mode 100644 index 64d3f8a42c..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/20211012145324_AccountLinkContextMySql.cs +++ /dev/null @@ -1,67 +0,0 @@ -// (c) Copyright Ascensio System SIA 2010-2022 -// -// This program is a free software product. -// You can redistribute it and/or modify it under the terms -// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software -// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended -// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of -// any third-party rights. -// -// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see -// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html -// -// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. -// -// The interactive user interfaces in modified source and object code versions of the Program must -// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. -// -// Pursuant to Section 7(b) of the License you must retain the original Product logo when -// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under -// trademark law for use of our trademarks. -// -// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing -// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 -// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - -namespace ASC.Core.Common.Migrations.MySql.AccountLinkContextMySql; - -public partial class AccountLinkContextMySql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "account_links", - columns: table => new - { - id = table.Column(type: "varchar(200)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - uid = table.Column(type: "varchar(200)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - provider = table.Column(type: "char(60)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - profile = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - linked = table.Column(type: "datetime", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.id, x.uid }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "uid", - table: "account_links", - column: "uid"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "account_links"); - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/MySqlAccountLinkContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/MySqlAccountLinkContextModelSnapshot.cs deleted file mode 100644 index d185409615..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/MySqlAccountLinkContextModelSnapshot.cs +++ /dev/null @@ -1,57 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.AccountLinkContextMySql -{ - [DbContext(typeof(MySqlAccountLinkContext))] - partial class MySqlAccountLinkContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.8"); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.AccountLinks", b => - { - b.Property("Id") - .HasColumnType("varchar(200)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UId") - .HasColumnType("varchar(200)") - .HasColumnName("uid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Linked") - .HasColumnType("datetime") - .HasColumnName("linked"); - - b.Property("Profile") - .IsRequired() - .HasColumnType("text") - .HasColumnName("profile") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Provider") - .HasColumnType("char(60)") - .HasColumnName("provider") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id", "UId") - .HasName("PRIMARY"); - - b.HasIndex("UId") - .HasDatabaseName("uid"); - - b.ToTable("account_links"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20211012145320_CoreDbContextMySql.Designer.cs b/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20211012145320_CoreDbContextMySql.Designer.cs deleted file mode 100644 index e37bc4833b..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20211012145320_CoreDbContextMySql.Designer.cs +++ /dev/null @@ -1,194 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql -{ - [DbContext(typeof(MySqlCoreDbContext))] - [Migration("20211012145320_CoreDbContextMySql")] - partial class CoreDbContextMySql - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.10"); - - modelBuilder.Entity("ASC.Core.Common.EF.DbButton", b => - { - b.Property("TariffId") - .HasColumnType("int") - .HasColumnName("tariff_id"); - - b.Property("PartnerId") - .HasColumnType("varchar(50)") - .HasColumnName("partner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ButtonUrl") - .IsRequired() - .HasColumnType("text") - .HasColumnName("button_url") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TariffId", "PartnerId") - .HasName("PRIMARY"); - - b.ToTable("tenants_buttons"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => - { - b.Property("Tenant") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("ActiveUsers") - .HasColumnType("int") - .HasColumnName("active_users"); - - b.Property("AvangateId") - .HasColumnType("varchar(128)") - .HasColumnName("avangate_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Description") - .HasColumnType("varchar(128)") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Features") - .HasColumnType("text") - .HasColumnName("features") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("MaxFileSize") - .HasColumnType("bigint") - .HasColumnName("max_file_size"); - - b.Property("MaxTotalSize") - .HasColumnType("bigint") - .HasColumnName("max_total_size"); - - b.Property("Name") - .HasColumnType("varchar(128)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Price") - .HasColumnType("decimal(10,2)") - .HasColumnName("price"); - - b.Property("Visible") - .HasColumnType("tinyint(1)") - .HasColumnName("visible"); - - b.HasKey("Tenant") - .HasName("PRIMARY"); - - b.ToTable("tenants_quota"); - - b.HasData( - new - { - Tenant = -1, - ActiveUsers = 10000, - AvangateId = "0", - Features = "update", - MaxFileSize = 102400L, - MaxTotalSize = 10995116277760L, - Name = "default", - Price = 0.00m, - Visible = false - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbQuotaRow", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Path") - .HasColumnType("varchar(255)") - .HasColumnName("path") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Counter") - .HasColumnType("bigint") - .HasColumnName("counter"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Tag") - .HasColumnType("varchar(1024)") - .HasColumnName("tag") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Tenant", "Path") - .HasName("PRIMARY"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.ToTable("tenants_quotarow"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Comment") - .HasColumnType("varchar(255)") - .HasColumnName("comment") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("create_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Quantity") - .HasColumnType("int") - .HasColumnName("quantity"); - - b.Property("Stamp") - .HasColumnType("datetime") - .HasColumnName("stamp"); - - b.Property("Tariff") - .HasColumnType("int") - .HasColumnName("tariff"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("Tenant") - .HasDatabaseName("tenant"); - - b.ToTable("tenants_tariff"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20211012145320_CoreDbContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20211012145320_CoreDbContextMySql.cs deleted file mode 100644 index dba1e18829..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/20211012145320_CoreDbContextMySql.cs +++ /dev/null @@ -1,149 +0,0 @@ -// (c) Copyright Ascensio System SIA 2010-2022 -// -// This program is a free software product. -// You can redistribute it and/or modify it under the terms -// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software -// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended -// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of -// any third-party rights. -// -// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see -// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html -// -// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. -// -// The interactive user interfaces in modified source and object code versions of the Program must -// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. -// -// Pursuant to Section 7(b) of the License you must retain the original Product logo when -// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under -// trademark law for use of our trademarks. -// -// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing -// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 -// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - -namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql; - -public partial class CoreDbContextMySql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_buttons", - columns: table => new - { - tariff_id = table.Column(type: "int", nullable: false), - partner_id = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - button_url = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tariff_id, x.partner_id }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_quota", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - name = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - description = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - max_file_size = table.Column(type: "bigint", nullable: false), - max_total_size = table.Column(type: "bigint", nullable: false), - active_users = table.Column(type: "int", nullable: false), - features = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - price = table.Column(type: "decimal(10,2)", nullable: false), - avangate_id = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - visible = table.Column(type: "tinyint(1)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.tenant); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_quotarow", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - path = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - counter = table.Column(type: "bigint", nullable: false), - tag = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.path }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_tariff", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - tenant = table.Column(type: "int", nullable: false), - tariff = table.Column(type: "int", nullable: false), - stamp = table.Column(type: "datetime", nullable: false), - quantity = table.Column(type: "int", nullable: false), - comment = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - create_on = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PK_tenants_tariff", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.InsertData( - table: "tenants_quota", - columns: new[] { "tenant", "active_users", "avangate_id", "description", "features", "max_file_size", "max_total_size", "name", "price", "visible" }, - values: new object[] { -1, 10000, "0", null, "update", 102400L, 10995116277760L, "default", 0.00m, false }); - - migrationBuilder.CreateIndex( - name: "last_modified", - table: "tenants_quotarow", - column: "last_modified"); - - migrationBuilder.CreateIndex( - name: "tenant", - table: "tenants_tariff", - column: "tenant"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "core_acl"); - - migrationBuilder.DropTable( - name: "tenants_buttons"); - - migrationBuilder.DropTable( - name: "tenants_quota"); - - migrationBuilder.DropTable( - name: "tenants_quotarow"); - - migrationBuilder.DropTable( - name: "tenants_tariff"); - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/MySqlCoreDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/MySqlCoreDbContextModelSnapshot.cs deleted file mode 100644 index 860534d13c..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/CoreDbContextMySql/MySqlCoreDbContextModelSnapshot.cs +++ /dev/null @@ -1,193 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.CoreDbContextMySql -{ - [DbContext(typeof(MySqlCoreDbContext))] - partial class MySqlCoreDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.10"); - - modelBuilder.Entity("ASC.Core.Common.EF.DbButton", b => - { - b.Property("TariffId") - .HasColumnType("int") - .HasColumnName("tariff_id"); - - b.Property("PartnerId") - .HasColumnType("varchar(50)") - .HasColumnName("partner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ButtonUrl") - .IsRequired() - .HasColumnType("text") - .HasColumnName("button_url") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TariffId", "PartnerId") - .HasName("PRIMARY"); - - b.ToTable("tenants_buttons"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => - { - b.Property("Tenant") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("ActiveUsers") - .HasColumnType("int") - .HasColumnName("active_users"); - - b.Property("AvangateId") - .HasColumnType("varchar(128)") - .HasColumnName("avangate_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Description") - .HasColumnType("varchar(128)") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Features") - .HasColumnType("text") - .HasColumnName("features") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("MaxFileSize") - .HasColumnType("bigint") - .HasColumnName("max_file_size"); - - b.Property("MaxTotalSize") - .HasColumnType("bigint") - .HasColumnName("max_total_size"); - - b.Property("Name") - .HasColumnType("varchar(128)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Price") - .HasColumnType("decimal(10,2)") - .HasColumnName("price"); - - b.Property("Visible") - .HasColumnType("tinyint(1)") - .HasColumnName("visible"); - - b.HasKey("Tenant") - .HasName("PRIMARY"); - - b.ToTable("tenants_quota"); - - b.HasData( - new - { - Tenant = -1, - ActiveUsers = 10000, - AvangateId = "0", - Features = "update", - MaxFileSize = 102400L, - MaxTotalSize = 10995116277760L, - Name = "default", - Price = 0.00m, - Visible = false - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbQuotaRow", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Path") - .HasColumnType("varchar(255)") - .HasColumnName("path") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Counter") - .HasColumnType("bigint") - .HasColumnName("counter"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Tag") - .HasColumnType("varchar(1024)") - .HasColumnName("tag") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Tenant", "Path") - .HasName("PRIMARY"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.ToTable("tenants_quotarow"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Comment") - .HasColumnType("varchar(255)") - .HasColumnName("comment") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("create_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Quantity") - .HasColumnType("int") - .HasColumnName("quantity"); - - b.Property("Stamp") - .HasColumnType("datetime") - .HasColumnName("stamp"); - - b.Property("Tariff") - .HasColumnType("int") - .HasColumnName("tariff"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("Tenant") - .HasDatabaseName("tenant"); - - b.ToTable("tenants_tariff"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/DbContextMySql/20211012145326_DbContextMySql.Designer.cs b/common/ASC.Core.Common/Migrations/MySql/DbContextMySql/20211012145326_DbContextMySql.Designer.cs deleted file mode 100644 index de04213e25..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/DbContextMySql/20211012145326_DbContextMySql.Designer.cs +++ /dev/null @@ -1,155 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.DbContextMySql -{ - [DbContext(typeof(MySqlDbContext))] - [Migration("20211012145326_DbContextMySql")] - partial class DbContextMySql - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.10"); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbipLocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddrType") - .IsRequired() - .HasColumnType("enum('ipv4','ipv6')") - .HasColumnName("addr_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("City") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("city") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Country") - .IsRequired() - .HasColumnType("varchar(2)") - .HasColumnName("country") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("District") - .HasColumnType("varchar(255)") - .HasColumnName("district") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("GeonameId") - .HasColumnType("int") - .HasColumnName("geoname_id"); - - b.Property("IPEnd") - .IsRequired() - .HasColumnType("varchar(39)") - .HasColumnName("ip_end") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("IPStart") - .IsRequired() - .HasColumnType("varchar(39)") - .HasColumnName("ip_start") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Latitude") - .HasColumnType("bigint") - .HasColumnName("latitude"); - - b.Property("Longitude") - .HasColumnType("bigint") - .HasColumnName("longitude"); - - b.Property("Processed") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("processed") - .HasDefaultValueSql("'1'"); - - b.Property("StateProv") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("stateprov") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TimezoneName") - .HasColumnType("varchar(255)") - .HasColumnName("timezone_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TimezoneOffset") - .HasColumnType("double") - .HasColumnName("timezone_offset"); - - b.Property("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("UserEmail") - .HasColumnType("varchar(255)") - .HasColumnName("user_email") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AppType") - .HasColumnType("int") - .HasColumnName("app_type"); - - b.Property("LastSign") - .HasColumnType("datetime") - .HasColumnName("last_sign"); - - b.Property("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("ConnectionString") - .HasColumnType("longtext"); - - b.Property("Provider") - .HasColumnType("longtext"); - - b.Property("Region") - .HasColumnType("longtext"); - - b.ToTable("Regions"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/DbContextMySql/20211012145326_DbContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/DbContextMySql/20211012145326_DbContextMySql.cs deleted file mode 100644 index 28ac96a820..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/DbContextMySql/20211012145326_DbContextMySql.cs +++ /dev/null @@ -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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - addr_type = table.Column(type: "enum('ipv4','ipv6')", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - ip_start = table.Column(type: "varchar(39)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - ip_end = table.Column(type: "varchar(39)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - country = table.Column(type: "varchar(2)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - stateprov = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - district = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - city = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - zipcode = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - latitude = table.Column(type: "bigint", nullable: false), - longitude = table.Column(type: "bigint", nullable: false), - geoname_id = table.Column(type: "int", nullable: false), - timezone_offset = table.Column(type: "double", nullable: false), - timezone_name = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - processed = table.Column(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(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - app_type = table.Column(type: "int", nullable: false), - registered_on = table.Column(type: "datetime", nullable: false), - last_sign = table.Column(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(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Provider = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConnectionString = table.Column(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"); - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/DbContextMySql/MySqlDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/DbContextMySql/MySqlDbContextModelSnapshot.cs deleted file mode 100644 index cfdafc8c19..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/DbContextMySql/MySqlDbContextModelSnapshot.cs +++ /dev/null @@ -1,156 +0,0 @@ -// - -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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddrType") - .IsRequired() - .HasColumnType("enum('ipv4','ipv6')") - .HasColumnName("addr_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("City") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("city") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Country") - .IsRequired() - .HasColumnType("varchar(2)") - .HasColumnName("country") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("District") - .HasColumnType("varchar(255)") - .HasColumnName("district") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("GeonameId") - .HasColumnType("int") - .HasColumnName("geoname_id"); - - b.Property("IPEnd") - .IsRequired() - .HasColumnType("varchar(39)") - .HasColumnName("ip_end") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("IPStart") - .IsRequired() - .HasColumnType("varchar(39)") - .HasColumnName("ip_start") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Latitude") - .HasColumnType("bigint") - .HasColumnName("latitude"); - - b.Property("Longitude") - .HasColumnType("bigint") - .HasColumnName("longitude"); - - b.Property("Processed") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("processed") - .HasDefaultValueSql("'1'"); - - b.Property("StateProv") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("stateprov") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TimezoneName") - .HasColumnType("varchar(255)") - .HasColumnName("timezone_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TimezoneOffset") - .HasColumnType("double") - .HasColumnName("timezone_offset"); - - b.Property("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("UserEmail") - .HasColumnType("varchar(255)") - .HasColumnName("user_email") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AppType") - .HasColumnType("int") - .HasColumnName("app_type"); - - b.Property("LastSign") - .HasColumnType("datetime") - .HasColumnName("last_sign"); - - b.Property("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("Region") - .HasColumnType("varchar(255)"); - - b.Property("ConnectionString") - .HasColumnType("longtext"); - - b.Property("Provider") - .HasColumnType("longtext"); - - b.HasKey("Region"); - - b.ToTable("Regions"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/FilesDbContextMySql/20211012145330_FilesDbContextMySql.Designer.cs b/common/ASC.Core.Common/Migrations/MySql/FilesDbContextMySql/20211012145330_FilesDbContextMySql.Designer.cs deleted file mode 100644 index f8cb679217..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/FilesDbContextMySql/20211012145330_FilesDbContextMySql.Designer.cs +++ /dev/null @@ -1,389 +0,0 @@ -// - -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("Input") - .HasColumnType("varchar(50)") - .HasColumnName("input") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/FilesDbContextMySql/20211012145330_FilesDbContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/FilesDbContextMySql/20211012145330_FilesDbContextMySql.cs deleted file mode 100644 index a5248c9922..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/FilesDbContextMySql/20211012145330_FilesDbContextMySql.cs +++ /dev/null @@ -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(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - output = table.Column(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"); - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/FilesDbContextMySql/MySqlFilesDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/FilesDbContextMySql/MySqlFilesDbContextModelSnapshot.cs deleted file mode 100644 index 6dceff5e48..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/FilesDbContextMySql/MySqlFilesDbContextModelSnapshot.cs +++ /dev/null @@ -1,388 +0,0 @@ -// - -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("Input") - .HasColumnType("varchar(50)") - .HasColumnName("input") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/MailDbContextMySql/20211012145332_MailDbContextMySql.Designer.cs b/common/ASC.Core.Common/Migrations/MySql/MailDbContextMySql/20211012145332_MailDbContextMySql.Designer.cs deleted file mode 100644 index f7777e02a8..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/MailDbContextMySql/20211012145332_MailDbContextMySql.Designer.cs +++ /dev/null @@ -1,1902 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.MailDbContextMySql -{ - [DbContext(typeof(MySqlMailDbContext))] - [Migration("20211012145332_MailDbContextMySql")] - partial class MailDbContextMySql - { - 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.Mail.ApiKeys", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("AccessToken") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.ToTable("ApiKeys"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.GreyListingWhiteList", b => - { - b.Property("Comment") - .HasColumnType("varchar(255)"); - - b.Property("Source") - .HasColumnType("longtext"); - b.HasKey("Comment"); - b.ToTable("GreyListingWhiteList"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.Mailbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Address") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("address") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("BeginDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("begin_date") - .HasDefaultValueSql("'1975-01-01 00:00:00'"); - - b.Property("DateAuthError") - .HasColumnType("datetime") - .HasColumnName("date_auth_error"); - - b.Property("DateChecked") - .HasColumnType("datetime") - .HasColumnName("date_checked"); - - b.Property("DateCreated") - .HasColumnType("datetime") - .HasColumnName("date_created"); - - b.Property("DateLoginDelayExpires") - .ValueGeneratedOnAdd() - .HasColumnType("datetime") - .HasColumnName("date_login_delay_expires") - .HasDefaultValueSql("'1975-01-01 00:00:00'"); - - b.Property("DateModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("date_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DateUserChecked") - .HasColumnType("datetime") - .HasColumnName("date_user_checked"); - - b.Property("EmailInFolder") - .HasColumnType("text") - .HasColumnName("email_in_folder") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Enabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("enabled") - .HasDefaultValueSql("'1'"); - - b.Property("IdInServer") - .HasColumnType("int") - .HasColumnName("id_in_server"); - - b.Property("IdSmtpServer") - .HasColumnType("int") - .HasColumnName("id_smtp_server"); - - b.Property("IdUser") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("id_user") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Imap") - .HasColumnType("tinyint(1)") - .HasColumnName("imap"); - - b.Property("ImapIntervals") - .HasColumnType("mediumtext") - .HasColumnName("imap_intervals") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("is_default"); - - b.Property("IsProcessed") - .HasColumnType("tinyint(1)") - .HasColumnName("is_processed"); - - b.Property("IsRemoved") - .HasColumnType("tinyint(1)") - .HasColumnName("is_removed"); - - b.Property("IsServerMailbox") - .HasColumnType("tinyint(1)") - .HasColumnName("is_server_mailbox"); - - b.Property("IsTeamlabMailbox") - .HasColumnType("tinyint(1)"); - - b.Property("LoginDelay") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("login_delay") - .HasDefaultValueSql("'30'"); - - b.Property("MsgCountLast") - .HasColumnType("int") - .HasColumnName("msg_count_last"); - - b.Property("Name") - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Pop3Password") - .HasColumnType("varchar(255)") - .HasColumnName("pop3_password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("QuotaError") - .HasColumnType("tinyint(1)") - .HasColumnName("quota_error"); - - b.Property("SizeLast") - .HasColumnType("int") - .HasColumnName("size_last"); - - b.Property("SmtpPassword") - .HasColumnType("varchar(255)") - .HasColumnName("smtp_password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TokenType") - .HasColumnType("int") - .HasColumnName("token_type"); - - b.Property("UserOnline") - .HasColumnType("tinyint(1)") - .HasColumnName("user_online"); - - b.HasKey("Id"); - - b.HasIndex("Address") - .HasDatabaseName("address_index"); - - b.HasIndex("IdInServer") - .HasDatabaseName("main_mailbox_id_in_server_mail_mailbox_server_id"); - - b.HasIndex("IdSmtpServer") - .HasDatabaseName("main_mailbox_id_smtp_server_mail_mailbox_server_id"); - - b.HasIndex("DateChecked", "DateLoginDelayExpires") - .HasDatabaseName("date_login_delay_expires"); - - b.HasIndex("Tenant", "IdUser") - .HasDatabaseName("user_id_index"); - - b.ToTable("mail_mailbox"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.MailboxProvider", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DisplayName") - .HasColumnType("varchar(255)") - .HasColumnName("display_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("DisplayShortName") - .HasColumnType("varchar(255)") - .HasColumnName("display_short_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Documentation") - .HasColumnType("varchar(255)") - .HasColumnName("documentation") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.ToTable("mail_mailbox_provider"); - - b.HasData( - new - { - Id = 1, - DisplayName = "1&1", - DisplayShortName = "1&1", - Documentation = "http://hilfe-center.1und1.de/access/search/go.php?t=e698123", - Name = "1und1.de" - }, - new - { - Id = 2, - DisplayName = "???", - DisplayShortName = "???", - Name = "abc.plala.or.jp" - }, - new - { - Id = 3, - DisplayName = "???", - DisplayShortName = "???", - Name = "agate.plala.or.jp" - }, - new - { - Id = 4, - DisplayName = "Alice Italy", - DisplayShortName = "Alice", - Documentation = "http://aiuto.alice.it/informazioni/clientemail/thunderbird.html", - Name = "alice.it" - }, - new - { - Id = 5, - DisplayName = "???", - DisplayShortName = "???", - Name = "amail.plala.or.jp" - }, - new - { - Id = 6, - DisplayName = "???", - DisplayShortName = "???", - Name = "amber.plala.or.jp" - }, - new - { - Id = 7, - DisplayName = "AOL Mail", - DisplayShortName = "AOL", - Name = "aol.com" - }, - new - { - Id = 8, - DisplayName = "???", - DisplayShortName = "???", - Name = "apost.plala.or.jp" - }, - new - { - Id = 9, - DisplayName = "???", - DisplayShortName = "???", - Name = "aqua.plala.or.jp" - }, - new - { - Id = 10, - DisplayName = "Arcor", - DisplayShortName = "Arcor", - Name = "arcor.de" - }, - new - { - Id = 11, - DisplayName = "Aruba PEC", - DisplayShortName = "Aruba", - Documentation = "http://pec.aruba.it/guide_filmate.asp", - Name = "arubapec.it" - }, - new - { - Id = 12, - DisplayName = "AT&T", - DisplayShortName = "AT&T", - Documentation = "http://www.att.com/esupport/article.jsp?sid=KB401570&ct=9000152", - Name = "att.net" - }, - new - { - Id = 13, - DisplayName = "???", - DisplayShortName = "???", - Name = "ballade.plala.or.jp" - }, - new - { - Id = 14, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "bay.wind.ne.jp" - }, - new - { - Id = 15, - DisplayName = "BB????", - DisplayShortName = "BB-NIIGATA", - Name = "bb-niigata.jp" - }, - new - { - Id = 16, - DisplayName = "???", - DisplayShortName = "???", - Name = "beige.plala.or.jp" - }, - new - { - Id = 17, - DisplayName = "Biglobe", - DisplayShortName = "Biglobe", - Name = "biglobe.ne.jp" - }, - new - { - Id = 18, - DisplayName = "Telstra Bigpond", - DisplayShortName = "Bigpond", - Name = "bigpond.com" - }, - new - { - Id = 19, - DisplayName = "???", - DisplayShortName = "???", - Name = "blue.plala.or.jp" - }, - new - { - Id = 20, - DisplayName = "bluewin.ch", - DisplayShortName = "bluewin.ch", - Documentation = "http://smtphelp.bluewin.ch/swisscomdtg/setup/?", - Name = "bluemail.ch" - }, - new - { - Id = 21, - DisplayName = "bluewin.ch", - DisplayShortName = "bluewin.ch", - Documentation = "http://smtphelp.bluewin.ch/swisscomdtg/setup/", - Name = "bluewin.ch" - }, - new - { - Id = 22, - DisplayName = "???", - DisplayShortName = "???", - Name = "bmail.plala.or.jp" - }, - new - { - Id = 23, - DisplayName = "???", - DisplayShortName = "???", - Name = "bolero.plala.or.jp" - }, - new - { - Id = 24, - DisplayName = "???", - DisplayShortName = "???", - Name = "bpost.plala.or.jp" - }, - new - { - Id = 25, - DisplayName = "???", - DisplayShortName = "???", - Name = "broba.cc" - }, - new - { - Id = 26, - DisplayName = "???", - DisplayShortName = "???", - Name = "brown.plala.or.jp" - }, - new - { - Id = 27, - DisplayName = "???", - DisplayShortName = "???", - Name = "camel.plala.or.jp" - }, - new - { - Id = 28, - DisplayName = "???", - DisplayShortName = "???", - Name = "cameo.plala.or.jp" - }, - new - { - Id = 29, - DisplayName = "CC9???????????", - DisplayShortName = "CC9", - Name = "cc9.ne.jp" - }, - new - { - Id = 30, - DisplayName = "???????????", - DisplayShortName = "CEK-Net", - Name = "cek.ne.jp" - }, - new - { - Id = 31, - DisplayName = "UCSF CGL email", - DisplayShortName = "CGL emai", - Name = "cgl.ucsf.edu" - }, - new - { - Id = 32, - DisplayName = "Charter Commuications", - DisplayShortName = "Charter", - Name = "charter.com" - }, - new - { - Id = 33, - DisplayName = "CLIO-Net??????", - DisplayShortName = "CLIO-Net", - Name = "clio.ne.jp" - }, - new - { - Id = 34, - DisplayName = "???", - DisplayShortName = "???", - Name = "cmail.plala.or.jp" - }, - new - { - Id = 35, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "co1.wind.ne.jp" - }, - new - { - Id = 36, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "co2.wind.ne.jp" - }, - new - { - Id = 37, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "co3.wind.ne.jp" - }, - new - { - Id = 38, - DisplayName = "???", - DisplayShortName = "???", - Name = "cocoa.plala.or.jp" - }, - new - { - Id = 39, - DisplayName = "???", - DisplayShortName = "Arcor", - Name = "coda.plala.or.jp" - }, - new - { - Id = 40, - DisplayName = "???", - DisplayShortName = "Comcast", - Name = "comcast.net" - }, - new - { - Id = 41, - DisplayName = "???", - DisplayShortName = "???", - Name = "concerto.plala.or.jp" - }, - new - { - Id = 42, - DisplayName = "???", - DisplayShortName = "???", - Name = "coral.plala.or.jp" - }, - new - { - Id = 43, - DisplayName = "???", - DisplayShortName = "???", - Name = "courante.plala.or.jp" - }, - new - { - Id = 44, - DisplayName = "???", - DisplayShortName = "???", - Name = "cpost.plala.or.jp" - }, - new - { - Id = 45, - DisplayName = "???", - DisplayShortName = "???", - Name = "cream.plala.or.jp" - }, - new - { - Id = 46, - DisplayName = "???", - DisplayShortName = "wind", - Name = "dan.wind.ne.jp" - }, - new - { - Id = 47, - DisplayName = "???", - DisplayShortName = "???", - Name = "dance.plala.or.jp" - }, - new - { - Id = 48, - DisplayName = "IIJ4U", - DisplayShortName = "???", - Name = "dd.iij4u.or.jp" - }, - new - { - Id = 49, - DisplayName = "domainFACTORY", - DisplayShortName = "domainFACTORY", - Documentation = "http://www.df.eu/de/service/df-faq/e-mail/mail-programme/", - Name = "df.eu" - }, - new - { - Id = 50, - DisplayName = "???", - DisplayShortName = "???", - Name = "dmail.plala.or.jp" - }, - new - { - Id = 51, - DisplayName = "EarthLink", - DisplayShortName = "EarthLink", - Documentation = "http://support.earthlink.net/email/email-server-settings.php", - Name = "earthlink.net" - }, - new - { - Id = 52, - DisplayName = "???", - DisplayShortName = "???", - Name = "ebony.plala.or.jp" - }, - new - { - Id = 53, - DisplayName = "email.it", - DisplayShortName = "email.it", - Documentation = "http://www.email.it/ita/config/thunder.php", - Name = "email.it" - }, - new - { - Id = 54, - DisplayName = "???", - DisplayShortName = "???", - Name = "email.plala.or.jp" - }, - new - { - Id = 55, - DisplayName = "EWE Tel", - DisplayShortName = "EWE Tel", - Name = "ewetel.de" - }, - new - { - Id = 56, - DisplayName = "???", - DisplayShortName = "???", - Name = "fantasy.plala.or.jp" - }, - new - { - Id = 57, - DisplayName = "???", - DisplayShortName = "???", - Name = "flamenco.plala.or.jp" - }, - new - { - Id = 58, - DisplayName = "???", - DisplayShortName = "???", - Name = "fmail.plala.or.jp" - }, - new - { - Id = 59, - DisplayName = "France Telecom / Orange", - DisplayShortName = "Orange", - Name = "francetelecom.fr" - }, - new - { - Id = 60, - DisplayName = "Free Telecom", - DisplayShortName = "free.fr", - Documentation = "http://www.free.fr/assistance/599-thunderbird.html", - Name = "free.fr" - }, - new - { - Id = 61, - DisplayName = "Freenet Mail", - DisplayShortName = "Freenet", - Name = "freenet.de" - }, - new - { - Id = 62, - DisplayName = "???", - DisplayShortName = "???", - Name = "fuga.plala.or.jp" - }, - new - { - Id = 63, - DisplayName = "Gandi Mail", - DisplayShortName = "Gandi", - Name = "gandi.net" - }, - new - { - Id = 64, - DisplayName = "???", - DisplayShortName = "???", - Name = "gmail.plala.or.jp" - }, - new - { - Id = 65, - DisplayName = "GMX Freemail", - DisplayShortName = "GMX", - Name = "gmx.com" - }, - new - { - Id = 66, - DisplayName = "GMX Freemail", - DisplayShortName = "GMX", - Name = "gmx.net" - }, - new - { - Id = 67, - DisplayName = "????????????????????", - DisplayShortName = "TVM-Net", - Name = "go.tvm.ne.jp" - }, - new - { - Id = 68, - DisplayName = "goo ????????", - DisplayShortName = "goo", - Name = "goo.jp" - }, - new - { - Id = 69, - DisplayName = "Google Mail", - DisplayShortName = "GMail", - Name = "googlemail.com" - }, - new - { - Id = 70, - DisplayName = "???", - DisplayShortName = "???", - Name = "grape.plala.or.jp" - }, - new - { - Id = 71, - DisplayName = "???", - DisplayShortName = "???", - Name = "gray.plala.or.jp" - }, - new - { - Id = 72, - DisplayName = "?????????", - DisplayShortName = "HAL", - Name = "hal.ne.jp" - }, - new - { - Id = 73, - DisplayName = "????????", - DisplayShortName = "????", - Name = "hana.or.jp" - }, - new - { - Id = 74, - DisplayName = "Microsoft Live Hotmail", - DisplayShortName = "Hotmail", - Name = "hotmail.com" - }, - new - { - Id = 75, - DisplayName = "SoftBank", - DisplayShortName = "SoftBank", - Name = "i.softbank.jp" - }, - new - { - Id = 76, - DisplayName = "IC-NET", - DisplayShortName = "IC-NET", - Name = "ic-net.or.jp" - }, - new - { - Id = 77, - DisplayName = "IIJmio ????????", - DisplayShortName = "IIJmio", - Name = "iijmio-mail.jp" - }, - new - { - Id = 78, - DisplayName = "???????i?????", - DisplayShortName = "i?????", - Name = "iiyama-catv.ne.jp" - }, - new - { - Id = 79, - DisplayName = "???", - DisplayShortName = "???", - Name = "imail.plala.or.jp" - }, - new - { - Id = 80, - DisplayName = "Inbox.lt", - DisplayShortName = "Inbox.lt", - Name = "inbox.lt" - }, - new - { - Id = 81, - DisplayName = "Inbox.lv", - DisplayShortName = "Inbox.lv", - Name = "inbox.lv" - }, - new - { - Id = 82, - DisplayName = "???", - DisplayShortName = "???", - Name = "indigo.plala.or.jp" - }, - new - { - Id = 83, - DisplayName = "??????????", - DisplayShortName = "INET-SHIBATA", - Name = "inet-shibata.or.jp" - }, - new - { - Id = 84, - DisplayName = "Internode", - DisplayShortName = "Internode", - Documentation = "http://www.internode.on.net/support/guides/email/secure_email/", - Name = "internode.on.net" - }, - new - { - Id = 85, - DisplayName = "IPAX Internet Services", - DisplayShortName = "IPAX", - Name = "ipax.at" - }, - new - { - Id = 86, - DisplayName = "???", - DisplayShortName = "???", - Name = "ivory.plala.or.jp" - }, - new - { - Id = 87, - DisplayName = "???????????", - DisplayShortName = "IWAFUNE", - Name = "iwafune.ne.jp" - }, - new - { - Id = 88, - DisplayName = "???", - DisplayShortName = "???", - Name = "jade.plala.or.jp" - }, - new - { - Id = 89, - DisplayName = "Janis", - DisplayShortName = "Janis", - Name = "janis.or.jp" - }, - new - { - Id = 90, - DisplayName = "JETINTERNET", - DisplayShortName = "JET", - Name = "jet.ne.jp" - }, - new - { - Id = 91, - DisplayName = "JETINTERNET", - DisplayShortName = "JET", - Name = "ji.jet.ne.jp" - }, - new - { - Id = 92, - DisplayName = "???", - DisplayShortName = "???", - Name = "jmail.plala.or.jp" - }, - new - { - Id = 93, - DisplayName = "Kabel Deutschland", - DisplayShortName = "Kabel D", - Name = "kabelmail.de" - }, - new - { - Id = 94, - DisplayName = "KELCOM Internet", - DisplayShortName = "KELCOM", - Name = "kelcom.net" - }, - new - { - Id = 95, - DisplayName = "???", - DisplayShortName = "???", - Name = "khaki.plala.or.jp" - }, - new - { - Id = 96, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "kl.wind.ne.jp" - }, - new - { - Id = 97, - DisplayName = "???", - DisplayShortName = "???", - Name = "kmail.plala.or.jp" - }, - new - { - Id = 98, - DisplayName = "????????????", - DisplayShortName = "?????", - Name = "kokuyou.ne.jp" - }, - new - { - Id = 99, - DisplayName = "???", - DisplayShortName = "???", - Name = "lapis.plala.or.jp" - }, - new - { - Id = 100, - DisplayName = "LaPoste", - DisplayShortName = "LaPoste", - Documentation = "http://www.geckozone.org/forum/viewtopic.php?f=4&t=93118", - Name = "laposte.net" - }, - new - { - Id = 101, - DisplayName = "???", - DisplayShortName = "???", - Name = "lemon.plala.or.jp" - }, - new - { - Id = 102, - DisplayName = "Libero Mail", - DisplayShortName = "Libero", - Documentation = "http://aiuto.libero.it/mail/istruzioni/configura-mozilla-thunderbird-per-windows-a11.phtml", - Name = "libero.it" - }, - new - { - Id = 103, - DisplayName = "???", - DisplayShortName = "???", - Name = "lilac.plala.or.jp" - }, - new - { - Id = 104, - DisplayName = "???", - DisplayShortName = "???", - Name = "lime.plala.or.jp" - }, - new - { - Id = 105, - DisplayName = "???????????", - DisplayShortName = "????", - Name = "mahoroba.ne.jp" - }, - new - { - Id = 106, - DisplayName = "mail.com", - DisplayShortName = "mail.com", - Name = "mail.com" - }, - new - { - Id = 107, - DisplayName = "TDC (DK)", - DisplayShortName = "TDC", - Name = "mail.dk" - }, - new - { - Id = 108, - DisplayName = "???????????", - DisplayShortName = "IWAFUNE", - Name = "mail.iwafune.ne.jp" - }, - new - { - Id = 109, - DisplayName = "mail.ru", - DisplayShortName = "mail.ru", - Name = "mail.ru" - }, - new - { - Id = 110, - DisplayName = "Telenor Danmark", - DisplayShortName = "Telenor", - Name = "mail.telenor.dk" - }, - new - { - Id = 111, - DisplayName = "?????????", - DisplayShortName = "???", - Name = "mail.wind.ne.jp" - }, - new - { - Id = 112, - DisplayName = "???", - DisplayShortName = "???", - Name = "maroon.plala.or.jp" - }, - new - { - Id = 113, - DisplayName = "Apple iCloud", - DisplayShortName = "Apple", - Name = "me.com" - }, - new - { - Id = 114, - DisplayName = "???", - DisplayShortName = "???", - Name = "minuet.plala.or.jp" - }, - new - { - Id = 115, - DisplayName = "???????????", - DisplayShortName = "IWAFUNE", - Name = "ml.murakami.ne.jp" - }, - new - { - Id = 116, - DisplayName = "Mnet ??? ????", - DisplayShortName = "Mnet???", - Name = "mnet.ne.jp" - }, - new - { - Id = 117, - DisplayName = "mopera U", - DisplayShortName = "mopera U", - Name = "'mopera.net" - }, - new - { - Id = 118, - DisplayName = "Mozilla Corporation and Mozilla Foundation internal email addresses", - DisplayShortName = "mozilla.com", - Name = "mozilla.com" - }, - new - { - Id = 119, - DisplayName = "TikiTiki???????", - DisplayShortName = "TikiTiki", - Name = "mx1.tiki.ne.jp" - }, - new - { - Id = 120, - DisplayName = "???", - DisplayShortName = "???", - Name = "navy.plala.or.jp" - }, - new - { - Id = 121, - DisplayName = "nctsoft", - DisplayShortName = "nct", - Name = "nctsoft.com" - }, - new - { - Id = 122, - DisplayName = "@nifty", - DisplayShortName = "@nifty", - Name = "nifty.com" - }, - new - { - Id = 123, - DisplayName = "BB????", - DisplayShortName = "NSAT", - Name = "nsat.jp" - }, - new - { - Id = 124, - DisplayName = "o2 Poczta", - DisplayShortName = "o2", - Name = "o2.pl" - }, - new - { - Id = 125, - DisplayName = "???", - DisplayShortName = "???", - Name = "olive.plala.or.jp" - }, - new - { - Id = 126, - DisplayName = "Poczta Onet", - DisplayShortName = "Onet", - Name = "onet.pl" - }, - new - { - Id = 127, - DisplayName = "???", - DisplayShortName = "???", - Name = "opal.plala.or.jp" - }, - new - { - Id = 128, - DisplayName = "???", - DisplayShortName = "???", - Name = "orange.plala.or.jp" - }, - new - { - Id = 129, - DisplayName = "???", - DisplayShortName = "???", - Name = "orchid.plala.or.jp" - }, - new - { - Id = 130, - DisplayName = "OVH", - DisplayShortName = "OVH", - Documentation = "http://guides.ovh.com/ConfigurationEmail", - Name = "ovh.net" - }, - new - { - Id = 131, - DisplayName = "????FTTH", - DisplayShortName = "????FTTH", - Name = "pal.kijimadaira.jp" - }, - new - { - Id = 132, - DisplayName = "???", - DisplayShortName = "???", - Name = "palette.plala.or.jp" - }, - new - { - Id = 133, - DisplayName = "??????", - DisplayShortName = "PARABOX", - Name = "parabox.or.jp" - }, - new - { - Id = 134, - DisplayName = "Portland State University Mail", - DisplayShortName = "PSU Mail", - Name = "pdx.edu" - }, - new - { - Id = 135, - DisplayName = "???", - DisplayShortName = "???", - Name = "peach.plala.or.jp" - }, - new - { - Id = 136, - DisplayName = "PeoplePC", - DisplayShortName = "PeoplePC", - Name = "peoplepc.com" - }, - new - { - Id = 137, - DisplayName = "???", - DisplayShortName = "???", - Name = "plum.plala.or.jp" - }, - new - { - Id = 138, - DisplayName = "DCN???????????", - DisplayShortName = "DCN", - Name = "po.dcn.ne.jp" - }, - new - { - Id = 139, - DisplayName = "'?????????", - DisplayShortName = "wind", - Name = "po.wind.ne.jp" - }, - new - { - Id = 140, - DisplayName = "???", - DisplayShortName = "???", - Name = "polka.plala.or.jp" - }, - new - { - Id = 141, - DisplayName = "??????????", - DisplayShortName = "INET-SHIBATA", - Name = "pop.shibata.ne.jp" - }, - new - { - Id = 142, - DisplayName = "Posteo", - DisplayShortName = "Posteo", - Name = "posteo.de" - }, - new - { - Id = 143, - DisplayName = "???", - DisplayShortName = "???", - Name = "purple.plala.or.jp" - }, - new - { - Id = 144, - DisplayName = "qip.ru", - DisplayShortName = "qip.ru", - Name = "qip.ru" - }, - new - { - Id = 145, - DisplayName = "???", - DisplayShortName = "???", - Name = "rainbow.plala.or.jp" - }, - new - { - Id = 146, - DisplayName = "Rambler Mail", - DisplayShortName = "Rambler", - Name = "rambler.ru" - }, - new - { - Id = 147, - DisplayName = "???", - DisplayShortName = "???", - Name = "red.plala.or.jp" - }, - new - { - Id = 148, - DisplayName = "???", - DisplayShortName = "???", - Name = "rmail.plala.or.jp" - }, - new - { - Id = 149, - DisplayName = "???", - DisplayShortName = "???", - Name = "rondo.plala.or.jp" - }, - new - { - Id = 150, - DisplayName = "???", - DisplayShortName = "???", - Name = "rose.plala.or.jp" - }, - new - { - Id = 151, - DisplayName = "???", - DisplayShortName = "???", - Name = "rouge.plala.or.jp" - }, - new - { - Id = 152, - DisplayName = "RoadRunner", - DisplayShortName = "RR", - Documentation = "http://help.rr.com/HMSFaqs/e_emailserveraddys.aspx", - Name = "rr.com" - }, - new - { - Id = 153, - DisplayName = "???", - DisplayShortName = "???", - Name = "ruby.plala.or.jp" - }, - new - { - Id = 154, - DisplayName = "?????????", - DisplayShortName = "Saku-Net", - Name = "sakunet.ne.jp" - }, - new - { - Id = 155, - DisplayName = "???", - DisplayShortName = "???", - Name = "sea.plala.or.jp" - }, - new - { - Id = 156, - DisplayName = "???", - DisplayShortName = "???", - Name = "sepia.plala.or.jp" - }, - new - { - Id = 157, - DisplayName = "???", - DisplayShortName = "???", - Name = "serenade.plala.or.jp" - }, - new - { - Id = 158, - DisplayName = "Seznam", - DisplayShortName = "Seznam", - Documentation = "http://napoveda.seznam.cz/cz/jake-jsou-adresy-pop3-a-smtp-serveru.html", - Name = "seznam.cz" - }, - new - { - Id = 159, - DisplayName = "SFR / Neuf", - DisplayShortName = "SFR", - Documentation = "http://assistance.sfr.fr/internet_neufbox-de-SFR/utiliser-email/parametrer-id-sfr/fc-505-50680", - Name = "sfr.fr" - }, - new - { - Id = 160, - DisplayName = "???", - DisplayShortName = "???", - Name = "silk.plala.or.jp" - }, - new - { - Id = 161, - DisplayName = "???", - DisplayShortName = "???", - Name = "silver.plala.or.jp" - }, - new - { - Id = 162, - DisplayName = "???", - DisplayShortName = "???", - Name = "sky.plala.or.jp" - }, - new - { - Id = 163, - DisplayName = "skynet", - DisplayShortName = "skynet", - Documentation = "http://support.en.belgacom.be/app/answers/detail/a_id/14337/kw/thunderbird", - Name = "skynet.be" - }, - new - { - Id = 164, - DisplayName = "???", - DisplayShortName = "???", - Name = "smail.plala.or.jp" - }, - new - { - Id = 165, - DisplayName = "???", - DisplayShortName = "???", - Name = "snow.plala.or.jp" - }, - new - { - Id = 166, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "so.wind.ne.jp" - }, - new - { - Id = 167, - DisplayName = "???", - DisplayShortName = "???", - Name = "sonata.plala.or.jp" - }, - new - { - Id = 168, - DisplayName = "Strato", - DisplayShortName = "Strato", - Name = "strato.de" - }, - new - { - Id = 169, - DisplayName = "Universita degli Studi di Verona", - DisplayShortName = "UniVR", - Name = "studenti.univr.it" - }, - new - { - Id = 170, - DisplayName = "???", - DisplayShortName = "???", - Name = "suite.plala.or.jp" - }, - new - { - Id = 171, - DisplayName = "Sympatico Email", - DisplayShortName = "Sympatico", - Documentation = "http://internet.bell.ca/index.cfm?method=content.view&category_id=585&content_id=12767", - Name = "sympatico.ca" - }, - new - { - Id = 172, - DisplayName = "???", - DisplayShortName = "???", - Name = "symphony.plala.or.jp" - }, - new - { - Id = 173, - DisplayName = "T-Online", - DisplayShortName = "T-Online", - Name = "t-online.de" - }, - new - { - Id = 174, - DisplayName = "???", - DisplayShortName = "???", - Name = "taupe.plala.or.jp" - }, - new - { - Id = 175, - DisplayName = "Correo Terra", - DisplayShortName = "Terra", - Name = "terra.es" - }, - new - { - Id = 176, - DisplayName = "TikiTiki???????", - DisplayShortName = "TikiTiki", - Name = "tiki.ne.jp" - }, - new - { - Id = 177, - DisplayName = "Tiscali", - DisplayShortName = "Tiscali", - Name = "tiscali.cz" - }, - new - { - Id = 178, - DisplayName = "Tiscali Italy", - DisplayShortName = "Tiscali", - Documentation = "http://assistenza.tiscali.it/tecnica/posta/configurazioni/", - Name = "tiscali.it" - }, - new - { - Id = 179, - DisplayName = "???", - DisplayShortName = "???", - Name = "tmail.plala.or.jp" - }, - new - { - Id = 180, - DisplayName = "???", - DisplayShortName = "???", - Name = "toccata.plala.or.jp" - }, - new - { - Id = 181, - DisplayName = "???", - DisplayShortName = "???", - Name = "topaz.plala.or.jp" - }, - new - { - Id = 182, - DisplayName = "???", - DisplayShortName = "???", - Name = "trio.plala.or.jp" - }, - new - { - Id = 183, - DisplayName = "???", - DisplayShortName = "???", - Name = "umail.plala.or.jp" - }, - new - { - Id = 184, - DisplayName = "UM ITCS Email", - DisplayShortName = "UM ITCS", - Name = "umich.edu" - }, - new - { - Id = 185, - DisplayName = "UPC Nederland", - DisplayShortName = "UPC", - Name = "upcmail.nl" - }, - new - { - Id = 186, - DisplayName = "Verizon Online", - DisplayShortName = "Verizon", - Name = "verizon.net" - }, - new - { - Id = 187, - DisplayName = "Versatel", - DisplayShortName = "Versatel", - Documentation = "http://www.versatel.de/hilfe/index_popup.php?einrichtung_email_programm", - Name = "versatel.de" - }, - new - { - Id = 188, - DisplayName = "???", - DisplayShortName = "???", - Name = "violet.plala.or.jp" - }, - new - { - Id = 189, - DisplayName = "aikis", - DisplayShortName = "aikis", - Name = "vm.aikis.or.jp" - }, - new - { - Id = 190, - DisplayName = "???", - DisplayShortName = "???", - Name = "vmail.plala.or.jp" - }, - new - { - Id = 191, - DisplayName = "TikiTiki???????", - DisplayShortName = "TikiTiki", - Name = "vp.tiki.ne.jp" - }, - new - { - Id = 192, - DisplayName = "???", - DisplayShortName = "???", - Name = "waltz.plala.or.jp" - }, - new - { - Id = 193, - DisplayName = "???", - DisplayShortName = "???", - Name = "wave.plala.or.jp" - }, - new - { - Id = 194, - DisplayName = "WEB.DE Freemail", - DisplayShortName = "Web.de", - Documentation = "http://hilfe.freemail.web.de/freemail/e-mail/pop3/thunderbird/", - Name = "web.de" - }, - new - { - Id = 195, - DisplayName = "???", - DisplayShortName = "???", - Name = "white.plala.or.jp" - }, - new - { - Id = 196, - DisplayName = "Your WildWest domain", - DisplayShortName = "WildWest", - Name = "wildwestdomains.com" - }, - new - { - Id = 197, - DisplayName = "???", - DisplayShortName = "???", - Name = "wine.plala.or.jp" - }, - new - { - Id = 198, - DisplayName = "???", - DisplayShortName = "???", - Name = "wmail.plala.or.jp" - }, - new - { - Id = 199, - DisplayName = "Poczta Wirtualna Polska", - DisplayShortName = "Poczta WP", - Name = "wp.pl" - }, - new - { - Id = 200, - DisplayName = "???", - DisplayShortName = "???", - Name = "xmail.plala.or.jp" - }, - new - { - Id = 201, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "xp.wind.jp" - }, - new - { - Id = 202, - DisplayName = "???", - DisplayShortName = "???", - Name = "xpost.plala.or.jp" - }, - new - { - Id = 203, - DisplayName = "XS4All", - DisplayShortName = "XS4All", - Name = "xs4all.nl" - }, - new - { - Id = 204, - DisplayName = "Yahoo! Mail", - DisplayShortName = "Yahoo", - Name = "xtra.co.nz" - }, - new - { - Id = 205, - DisplayName = "Yahoo! ???", - DisplayShortName = "Yahoo! ??? ", - Name = "yahoo.co.jp" - }, - new - { - Id = 206, - DisplayName = "Yahoo! Mail", - DisplayShortName = "Yahoo", - Name = "yahoo.com" - }, - new - { - Id = 207, - DisplayName = "Yandex Mail", - DisplayShortName = "Yandex", - Name = "yandex.ru" - }, - new - { - Id = 208, - DisplayName = "Yahoo! BB", - DisplayShortName = "Yahoo! BB", - Name = "ybb.ne.jp" - }, - new - { - Id = 209, - DisplayName = "???", - DisplayShortName = "???", - Name = "yellow.plala.or.jp" - }, - new - { - Id = 210, - DisplayName = "???", - DisplayShortName = "???", - Name = "ymail.plala.or.jp" - }, - new - { - Id = 211, - DisplayName = "???", - DisplayShortName = "???", - Name = "ypost.plala.or.jp" - }, - new - { - Id = 212, - DisplayName = "Ziggo", - DisplayShortName = "Ziggo", - Name = "ziggo.nl" - }, - new - { - Id = 213, - DisplayName = "???", - DisplayShortName = "???", - Name = "zmail.plala.or.jp" - }, - new - { - Id = 214, - DisplayName = "???", - DisplayShortName = "???", - Name = "zpost.plala.or.jp" - }, - new - { - Id = 215, - DisplayName = "avsmedia.com", - DisplayShortName = "avsmedia", - Name = "avsmedia.com" - }, - new - { - Id = 216, - DisplayName = "avsmedia.net", - DisplayShortName = "avsmedia", - Name = "avsmedia.net" - }, - new - { - Id = 218, - DisplayName = "ilearney.com", - DisplayShortName = "ilearney.com", - Name = "ilearney.com" - }, - new - { - Id = 219, - DisplayName = "fpl-technology.com", - DisplayShortName = "fpl-technology.com", - Documentation = "http://fpl-technology.com", - Name = "fpl -technology.com" - }, - new - { - Id = 220, - DisplayName = "Apple iCloud", - DisplayShortName = "Apple", - Name = "icloud.com" - }, - new - { - Id = 221, - DisplayName = "Microsoft Office 365", - DisplayShortName = "Office365", - Documentation = "https://products.office.com", - Name = "office365.com" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.MailboxServer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("Authentication") - .HasColumnType("longtext"); - - b.Property("Hostname") - .HasColumnType("longtext"); - - b.Property("IdProvider") - .HasColumnType("int"); - - b.Property("IsUserData") - .HasColumnType("tinyint(1)"); - - b.Property("Port") - .HasColumnType("int"); - - b.Property("SocketType") - .HasColumnType("longtext"); - - b.Property("Type") - .HasColumnType("longtext"); - - b.Property("UserName") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.ToTable("MailboxServer"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.ServerServer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ConnectionString") - .IsRequired() - .HasColumnType("text") - .HasColumnName("connection_string") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ImapSettingsId") - .HasColumnType("int") - .HasColumnName("imap_settings_id"); - - b.Property("MxRecord") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(128)") - .HasColumnName("mx_record") - .HasDefaultValueSql("''") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ServerType") - .HasColumnType("int") - .HasColumnName("server_type"); - - b.Property("SmtpSettingsId") - .HasColumnType("int") - .HasColumnName("smtp_settings_id"); - - b.HasKey("Id"); - - b.HasIndex("ServerType") - .HasDatabaseName("mail_server_server_type_server_type_fk_id"); - - b.ToTable("mail_server_server"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/MailDbContextMySql/20211012145332_MailDbContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/MailDbContextMySql/20211012145332_MailDbContextMySql.cs deleted file mode 100644 index 18cc89568e..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/MailDbContextMySql/20211012145332_MailDbContextMySql.cs +++ /dev/null @@ -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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - AccessToken = table.Column(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(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Source = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - tenant = table.Column(type: "int", nullable: false), - id_user = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - address = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - name = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - enabled = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"), - is_removed = table.Column(type: "tinyint(1)", nullable: false), - is_processed = table.Column(type: "tinyint(1)", nullable: false), - is_server_mailbox = table.Column(type: "tinyint(1)", nullable: false), - IsTeamlabMailbox = table.Column(type: "tinyint(1)", nullable: false), - imap = table.Column(type: "tinyint(1)", nullable: false), - user_online = table.Column(type: "tinyint(1)", nullable: false), - is_default = table.Column(type: "tinyint(1)", nullable: false), - msg_count_last = table.Column(type: "int", nullable: false), - size_last = table.Column(type: "int", nullable: false), - login_delay = table.Column(type: "int", nullable: false, defaultValueSql: "'30'"), - quota_error = table.Column(type: "tinyint(1)", nullable: false), - imap_intervals = table.Column(type: "mediumtext", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - begin_date = table.Column(type: "timestamp", nullable: false, defaultValueSql: "'1975-01-01 00:00:00'"), - email_in_folder = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - pop3_password = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - smtp_password = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - token_type = table.Column(type: "int", nullable: false), - token = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - id_smtp_server = table.Column(type: "int", nullable: false), - id_in_server = table.Column(type: "int", nullable: false), - date_checked = table.Column(type: "datetime", nullable: false), - date_user_checked = table.Column(type: "datetime", nullable: false), - date_login_delay_expires = table.Column(type: "datetime", nullable: false, defaultValueSql: "'1975-01-01 00:00:00'"), - date_auth_error = table.Column(type: "datetime", nullable: true), - date_created = table.Column(type: "datetime", nullable: false), - date_modified = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - display_name = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - display_short_name = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - documentation = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - mx_record = table.Column(type: "varchar(128)", nullable: false, defaultValueSql: "''", collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - connection_string = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - server_type = table.Column(type: "int", nullable: false), - smtp_settings_id = table.Column(type: "int", nullable: false), - imap_settings_id = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - IdProvider = table.Column(type: "int", nullable: false), - Type = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Hostname = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Port = table.Column(type: "int", nullable: false), - SocketType = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - UserName = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Authentication = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsUserData = table.Column(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"); - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/MailDbContextMySql/MySqlMailDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/MailDbContextMySql/MySqlMailDbContextModelSnapshot.cs deleted file mode 100644 index 5a0572df66..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/MailDbContextMySql/MySqlMailDbContextModelSnapshot.cs +++ /dev/null @@ -1,1903 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.MailDbContextMySql -{ - [DbContext(typeof(MySqlMailDbContext))] - partial class MySqlMailDbContextModelSnapshot : 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.Mail.ApiKeys", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("AccessToken") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.ToTable("ApiKeys"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.GreyListingWhiteList", b => - { - b.Property("Comment") - .HasColumnType("varchar(255)"); - - b.Property("Source") - .HasColumnType("longtext"); - - b.HasKey("Comment"); - - b.ToTable("GreyListingWhiteList"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.Mailbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Address") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("address") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("BeginDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("begin_date") - .HasDefaultValueSql("'1975-01-01 00:00:00'"); - - b.Property("DateAuthError") - .HasColumnType("datetime") - .HasColumnName("date_auth_error"); - - b.Property("DateChecked") - .HasColumnType("datetime") - .HasColumnName("date_checked"); - - b.Property("DateCreated") - .HasColumnType("datetime") - .HasColumnName("date_created"); - - b.Property("DateLoginDelayExpires") - .ValueGeneratedOnAdd() - .HasColumnType("datetime") - .HasColumnName("date_login_delay_expires") - .HasDefaultValueSql("'1975-01-01 00:00:00'"); - - b.Property("DateModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("date_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DateUserChecked") - .HasColumnType("datetime") - .HasColumnName("date_user_checked"); - - b.Property("EmailInFolder") - .HasColumnType("text") - .HasColumnName("email_in_folder") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Enabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("enabled") - .HasDefaultValueSql("'1'"); - - b.Property("IdInServer") - .HasColumnType("int") - .HasColumnName("id_in_server"); - - b.Property("IdSmtpServer") - .HasColumnType("int") - .HasColumnName("id_smtp_server"); - - b.Property("IdUser") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("id_user") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Imap") - .HasColumnType("tinyint(1)") - .HasColumnName("imap"); - - b.Property("ImapIntervals") - .HasColumnType("mediumtext") - .HasColumnName("imap_intervals") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("is_default"); - - b.Property("IsProcessed") - .HasColumnType("tinyint(1)") - .HasColumnName("is_processed"); - - b.Property("IsRemoved") - .HasColumnType("tinyint(1)") - .HasColumnName("is_removed"); - - b.Property("IsServerMailbox") - .HasColumnType("tinyint(1)") - .HasColumnName("is_server_mailbox"); - - b.Property("IsTeamlabMailbox") - .HasColumnType("tinyint(1)"); - - b.Property("LoginDelay") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("login_delay") - .HasDefaultValueSql("'30'"); - - b.Property("MsgCountLast") - .HasColumnType("int") - .HasColumnName("msg_count_last"); - - b.Property("Name") - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Pop3Password") - .HasColumnType("varchar(255)") - .HasColumnName("pop3_password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("QuotaError") - .HasColumnType("tinyint(1)") - .HasColumnName("quota_error"); - - b.Property("SizeLast") - .HasColumnType("int") - .HasColumnName("size_last"); - - b.Property("SmtpPassword") - .HasColumnType("varchar(255)") - .HasColumnName("smtp_password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TokenType") - .HasColumnType("int") - .HasColumnName("token_type"); - - b.Property("UserOnline") - .HasColumnType("tinyint(1)") - .HasColumnName("user_online"); - - b.HasKey("Id"); - - b.HasIndex("Address") - .HasDatabaseName("address_index"); - - b.HasIndex("IdInServer") - .HasDatabaseName("main_mailbox_id_in_server_mail_mailbox_server_id"); - - b.HasIndex("IdSmtpServer") - .HasDatabaseName("main_mailbox_id_smtp_server_mail_mailbox_server_id"); - - b.HasIndex("DateChecked", "DateLoginDelayExpires") - .HasDatabaseName("date_login_delay_expires"); - - b.HasIndex("Tenant", "IdUser") - .HasDatabaseName("user_id_index"); - - b.ToTable("mail_mailbox"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.MailboxProvider", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DisplayName") - .HasColumnType("varchar(255)") - .HasColumnName("display_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("DisplayShortName") - .HasColumnType("varchar(255)") - .HasColumnName("display_short_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Documentation") - .HasColumnType("varchar(255)") - .HasColumnName("documentation") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.ToTable("mail_mailbox_provider"); - - b.HasData( - new - { - Id = 1, - DisplayName = "1&1", - DisplayShortName = "1&1", - Documentation = "http://hilfe-center.1und1.de/access/search/go.php?t=e698123", - Name = "1und1.de" - }, - new - { - Id = 2, - DisplayName = "???", - DisplayShortName = "???", - Name = "abc.plala.or.jp" - }, - new - { - Id = 3, - DisplayName = "???", - DisplayShortName = "???", - Name = "agate.plala.or.jp" - }, - new - { - Id = 4, - DisplayName = "Alice Italy", - DisplayShortName = "Alice", - Documentation = "http://aiuto.alice.it/informazioni/clientemail/thunderbird.html", - Name = "alice.it" - }, - new - { - Id = 5, - DisplayName = "???", - DisplayShortName = "???", - Name = "amail.plala.or.jp" - }, - new - { - Id = 6, - DisplayName = "???", - DisplayShortName = "???", - Name = "amber.plala.or.jp" - }, - new - { - Id = 7, - DisplayName = "AOL Mail", - DisplayShortName = "AOL", - Name = "aol.com" - }, - new - { - Id = 8, - DisplayName = "???", - DisplayShortName = "???", - Name = "apost.plala.or.jp" - }, - new - { - Id = 9, - DisplayName = "???", - DisplayShortName = "???", - Name = "aqua.plala.or.jp" - }, - new - { - Id = 10, - DisplayName = "Arcor", - DisplayShortName = "Arcor", - Name = "arcor.de" - }, - new - { - Id = 11, - DisplayName = "Aruba PEC", - DisplayShortName = "Aruba", - Documentation = "http://pec.aruba.it/guide_filmate.asp", - Name = "arubapec.it" - }, - new - { - Id = 12, - DisplayName = "AT&T", - DisplayShortName = "AT&T", - Documentation = "http://www.att.com/esupport/article.jsp?sid=KB401570&ct=9000152", - Name = "att.net" - }, - new - { - Id = 13, - DisplayName = "???", - DisplayShortName = "???", - Name = "ballade.plala.or.jp" - }, - new - { - Id = 14, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "bay.wind.ne.jp" - }, - new - { - Id = 15, - DisplayName = "BB????", - DisplayShortName = "BB-NIIGATA", - Name = "bb-niigata.jp" - }, - new - { - Id = 16, - DisplayName = "???", - DisplayShortName = "???", - Name = "beige.plala.or.jp" - }, - new - { - Id = 17, - DisplayName = "Biglobe", - DisplayShortName = "Biglobe", - Name = "biglobe.ne.jp" - }, - new - { - Id = 18, - DisplayName = "Telstra Bigpond", - DisplayShortName = "Bigpond", - Name = "bigpond.com" - }, - new - { - Id = 19, - DisplayName = "???", - DisplayShortName = "???", - Name = "blue.plala.or.jp" - }, - new - { - Id = 20, - DisplayName = "bluewin.ch", - DisplayShortName = "bluewin.ch", - Documentation = "http://smtphelp.bluewin.ch/swisscomdtg/setup/?", - Name = "bluemail.ch" - }, - new - { - Id = 21, - DisplayName = "bluewin.ch", - DisplayShortName = "bluewin.ch", - Documentation = "http://smtphelp.bluewin.ch/swisscomdtg/setup/", - Name = "bluewin.ch" - }, - new - { - Id = 22, - DisplayName = "???", - DisplayShortName = "???", - Name = "bmail.plala.or.jp" - }, - new - { - Id = 23, - DisplayName = "???", - DisplayShortName = "???", - Name = "bolero.plala.or.jp" - }, - new - { - Id = 24, - DisplayName = "???", - DisplayShortName = "???", - Name = "bpost.plala.or.jp" - }, - new - { - Id = 25, - DisplayName = "???", - DisplayShortName = "???", - Name = "broba.cc" - }, - new - { - Id = 26, - DisplayName = "???", - DisplayShortName = "???", - Name = "brown.plala.or.jp" - }, - new - { - Id = 27, - DisplayName = "???", - DisplayShortName = "???", - Name = "camel.plala.or.jp" - }, - new - { - Id = 28, - DisplayName = "???", - DisplayShortName = "???", - Name = "cameo.plala.or.jp" - }, - new - { - Id = 29, - DisplayName = "CC9???????????", - DisplayShortName = "CC9", - Name = "cc9.ne.jp" - }, - new - { - Id = 30, - DisplayName = "???????????", - DisplayShortName = "CEK-Net", - Name = "cek.ne.jp" - }, - new - { - Id = 31, - DisplayName = "UCSF CGL email", - DisplayShortName = "CGL emai", - Name = "cgl.ucsf.edu" - }, - new - { - Id = 32, - DisplayName = "Charter Commuications", - DisplayShortName = "Charter", - Name = "charter.com" - }, - new - { - Id = 33, - DisplayName = "CLIO-Net??????", - DisplayShortName = "CLIO-Net", - Name = "clio.ne.jp" - }, - new - { - Id = 34, - DisplayName = "???", - DisplayShortName = "???", - Name = "cmail.plala.or.jp" - }, - new - { - Id = 35, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "co1.wind.ne.jp" - }, - new - { - Id = 36, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "co2.wind.ne.jp" - }, - new - { - Id = 37, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "co3.wind.ne.jp" - }, - new - { - Id = 38, - DisplayName = "???", - DisplayShortName = "???", - Name = "cocoa.plala.or.jp" - }, - new - { - Id = 39, - DisplayName = "???", - DisplayShortName = "Arcor", - Name = "coda.plala.or.jp" - }, - new - { - Id = 40, - DisplayName = "???", - DisplayShortName = "Comcast", - Name = "comcast.net" - }, - new - { - Id = 41, - DisplayName = "???", - DisplayShortName = "???", - Name = "concerto.plala.or.jp" - }, - new - { - Id = 42, - DisplayName = "???", - DisplayShortName = "???", - Name = "coral.plala.or.jp" - }, - new - { - Id = 43, - DisplayName = "???", - DisplayShortName = "???", - Name = "courante.plala.or.jp" - }, - new - { - Id = 44, - DisplayName = "???", - DisplayShortName = "???", - Name = "cpost.plala.or.jp" - }, - new - { - Id = 45, - DisplayName = "???", - DisplayShortName = "???", - Name = "cream.plala.or.jp" - }, - new - { - Id = 46, - DisplayName = "???", - DisplayShortName = "wind", - Name = "dan.wind.ne.jp" - }, - new - { - Id = 47, - DisplayName = "???", - DisplayShortName = "???", - Name = "dance.plala.or.jp" - }, - new - { - Id = 48, - DisplayName = "IIJ4U", - DisplayShortName = "???", - Name = "dd.iij4u.or.jp" - }, - new - { - Id = 49, - DisplayName = "domainFACTORY", - DisplayShortName = "domainFACTORY", - Documentation = "http://www.df.eu/de/service/df-faq/e-mail/mail-programme/", - Name = "df.eu" - }, - new - { - Id = 50, - DisplayName = "???", - DisplayShortName = "???", - Name = "dmail.plala.or.jp" - }, - new - { - Id = 51, - DisplayName = "EarthLink", - DisplayShortName = "EarthLink", - Documentation = "http://support.earthlink.net/email/email-server-settings.php", - Name = "earthlink.net" - }, - new - { - Id = 52, - DisplayName = "???", - DisplayShortName = "???", - Name = "ebony.plala.or.jp" - }, - new - { - Id = 53, - DisplayName = "email.it", - DisplayShortName = "email.it", - Documentation = "http://www.email.it/ita/config/thunder.php", - Name = "email.it" - }, - new - { - Id = 54, - DisplayName = "???", - DisplayShortName = "???", - Name = "email.plala.or.jp" - }, - new - { - Id = 55, - DisplayName = "EWE Tel", - DisplayShortName = "EWE Tel", - Name = "ewetel.de" - }, - new - { - Id = 56, - DisplayName = "???", - DisplayShortName = "???", - Name = "fantasy.plala.or.jp" - }, - new - { - Id = 57, - DisplayName = "???", - DisplayShortName = "???", - Name = "flamenco.plala.or.jp" - }, - new - { - Id = 58, - DisplayName = "???", - DisplayShortName = "???", - Name = "fmail.plala.or.jp" - }, - new - { - Id = 59, - DisplayName = "France Telecom / Orange", - DisplayShortName = "Orange", - Name = "francetelecom.fr" - }, - new - { - Id = 60, - DisplayName = "Free Telecom", - DisplayShortName = "free.fr", - Documentation = "http://www.free.fr/assistance/599-thunderbird.html", - Name = "free.fr" - }, - new - { - Id = 61, - DisplayName = "Freenet Mail", - DisplayShortName = "Freenet", - Name = "freenet.de" - }, - new - { - Id = 62, - DisplayName = "???", - DisplayShortName = "???", - Name = "fuga.plala.or.jp" - }, - new - { - Id = 63, - DisplayName = "Gandi Mail", - DisplayShortName = "Gandi", - Name = "gandi.net" - }, - new - { - Id = 64, - DisplayName = "???", - DisplayShortName = "???", - Name = "gmail.plala.or.jp" - }, - new - { - Id = 65, - DisplayName = "GMX Freemail", - DisplayShortName = "GMX", - Name = "gmx.com" - }, - new - { - Id = 66, - DisplayName = "GMX Freemail", - DisplayShortName = "GMX", - Name = "gmx.net" - }, - new - { - Id = 67, - DisplayName = "????????????????????", - DisplayShortName = "TVM-Net", - Name = "go.tvm.ne.jp" - }, - new - { - Id = 68, - DisplayName = "goo ????????", - DisplayShortName = "goo", - Name = "goo.jp" - }, - new - { - Id = 69, - DisplayName = "Google Mail", - DisplayShortName = "GMail", - Name = "googlemail.com" - }, - new - { - Id = 70, - DisplayName = "???", - DisplayShortName = "???", - Name = "grape.plala.or.jp" - }, - new - { - Id = 71, - DisplayName = "???", - DisplayShortName = "???", - Name = "gray.plala.or.jp" - }, - new - { - Id = 72, - DisplayName = "?????????", - DisplayShortName = "HAL", - Name = "hal.ne.jp" - }, - new - { - Id = 73, - DisplayName = "????????", - DisplayShortName = "????", - Name = "hana.or.jp" - }, - new - { - Id = 74, - DisplayName = "Microsoft Live Hotmail", - DisplayShortName = "Hotmail", - Name = "hotmail.com" - }, - new - { - Id = 75, - DisplayName = "SoftBank", - DisplayShortName = "SoftBank", - Name = "i.softbank.jp" - }, - new - { - Id = 76, - DisplayName = "IC-NET", - DisplayShortName = "IC-NET", - Name = "ic-net.or.jp" - }, - new - { - Id = 77, - DisplayName = "IIJmio ????????", - DisplayShortName = "IIJmio", - Name = "iijmio-mail.jp" - }, - new - { - Id = 78, - DisplayName = "???????i?????", - DisplayShortName = "i?????", - Name = "iiyama-catv.ne.jp" - }, - new - { - Id = 79, - DisplayName = "???", - DisplayShortName = "???", - Name = "imail.plala.or.jp" - }, - new - { - Id = 80, - DisplayName = "Inbox.lt", - DisplayShortName = "Inbox.lt", - Name = "inbox.lt" - }, - new - { - Id = 81, - DisplayName = "Inbox.lv", - DisplayShortName = "Inbox.lv", - Name = "inbox.lv" - }, - new - { - Id = 82, - DisplayName = "???", - DisplayShortName = "???", - Name = "indigo.plala.or.jp" - }, - new - { - Id = 83, - DisplayName = "??????????", - DisplayShortName = "INET-SHIBATA", - Name = "inet-shibata.or.jp" - }, - new - { - Id = 84, - DisplayName = "Internode", - DisplayShortName = "Internode", - Documentation = "http://www.internode.on.net/support/guides/email/secure_email/", - Name = "internode.on.net" - }, - new - { - Id = 85, - DisplayName = "IPAX Internet Services", - DisplayShortName = "IPAX", - Name = "ipax.at" - }, - new - { - Id = 86, - DisplayName = "???", - DisplayShortName = "???", - Name = "ivory.plala.or.jp" - }, - new - { - Id = 87, - DisplayName = "???????????", - DisplayShortName = "IWAFUNE", - Name = "iwafune.ne.jp" - }, - new - { - Id = 88, - DisplayName = "???", - DisplayShortName = "???", - Name = "jade.plala.or.jp" - }, - new - { - Id = 89, - DisplayName = "Janis", - DisplayShortName = "Janis", - Name = "janis.or.jp" - }, - new - { - Id = 90, - DisplayName = "JETINTERNET", - DisplayShortName = "JET", - Name = "jet.ne.jp" - }, - new - { - Id = 91, - DisplayName = "JETINTERNET", - DisplayShortName = "JET", - Name = "ji.jet.ne.jp" - }, - new - { - Id = 92, - DisplayName = "???", - DisplayShortName = "???", - Name = "jmail.plala.or.jp" - }, - new - { - Id = 93, - DisplayName = "Kabel Deutschland", - DisplayShortName = "Kabel D", - Name = "kabelmail.de" - }, - new - { - Id = 94, - DisplayName = "KELCOM Internet", - DisplayShortName = "KELCOM", - Name = "kelcom.net" - }, - new - { - Id = 95, - DisplayName = "???", - DisplayShortName = "???", - Name = "khaki.plala.or.jp" - }, - new - { - Id = 96, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "kl.wind.ne.jp" - }, - new - { - Id = 97, - DisplayName = "???", - DisplayShortName = "???", - Name = "kmail.plala.or.jp" - }, - new - { - Id = 98, - DisplayName = "????????????", - DisplayShortName = "?????", - Name = "kokuyou.ne.jp" - }, - new - { - Id = 99, - DisplayName = "???", - DisplayShortName = "???", - Name = "lapis.plala.or.jp" - }, - new - { - Id = 100, - DisplayName = "LaPoste", - DisplayShortName = "LaPoste", - Documentation = "http://www.geckozone.org/forum/viewtopic.php?f=4&t=93118", - Name = "laposte.net" - }, - new - { - Id = 101, - DisplayName = "???", - DisplayShortName = "???", - Name = "lemon.plala.or.jp" - }, - new - { - Id = 102, - DisplayName = "Libero Mail", - DisplayShortName = "Libero", - Documentation = "http://aiuto.libero.it/mail/istruzioni/configura-mozilla-thunderbird-per-windows-a11.phtml", - Name = "libero.it" - }, - new - { - Id = 103, - DisplayName = "???", - DisplayShortName = "???", - Name = "lilac.plala.or.jp" - }, - new - { - Id = 104, - DisplayName = "???", - DisplayShortName = "???", - Name = "lime.plala.or.jp" - }, - new - { - Id = 105, - DisplayName = "???????????", - DisplayShortName = "????", - Name = "mahoroba.ne.jp" - }, - new - { - Id = 106, - DisplayName = "mail.com", - DisplayShortName = "mail.com", - Name = "mail.com" - }, - new - { - Id = 107, - DisplayName = "TDC (DK)", - DisplayShortName = "TDC", - Name = "mail.dk" - }, - new - { - Id = 108, - DisplayName = "???????????", - DisplayShortName = "IWAFUNE", - Name = "mail.iwafune.ne.jp" - }, - new - { - Id = 109, - DisplayName = "mail.ru", - DisplayShortName = "mail.ru", - Name = "mail.ru" - }, - new - { - Id = 110, - DisplayName = "Telenor Danmark", - DisplayShortName = "Telenor", - Name = "mail.telenor.dk" - }, - new - { - Id = 111, - DisplayName = "?????????", - DisplayShortName = "???", - Name = "mail.wind.ne.jp" - }, - new - { - Id = 112, - DisplayName = "???", - DisplayShortName = "???", - Name = "maroon.plala.or.jp" - }, - new - { - Id = 113, - DisplayName = "Apple iCloud", - DisplayShortName = "Apple", - Name = "me.com" - }, - new - { - Id = 114, - DisplayName = "???", - DisplayShortName = "???", - Name = "minuet.plala.or.jp" - }, - new - { - Id = 115, - DisplayName = "???????????", - DisplayShortName = "IWAFUNE", - Name = "ml.murakami.ne.jp" - }, - new - { - Id = 116, - DisplayName = "Mnet ??? ????", - DisplayShortName = "Mnet???", - Name = "mnet.ne.jp" - }, - new - { - Id = 117, - DisplayName = "mopera U", - DisplayShortName = "mopera U", - Name = "'mopera.net" - }, - new - { - Id = 118, - DisplayName = "Mozilla Corporation and Mozilla Foundation internal email addresses", - DisplayShortName = "mozilla.com", - Name = "mozilla.com" - }, - new - { - Id = 119, - DisplayName = "TikiTiki???????", - DisplayShortName = "TikiTiki", - Name = "mx1.tiki.ne.jp" - }, - new - { - Id = 120, - DisplayName = "???", - DisplayShortName = "???", - Name = "navy.plala.or.jp" - }, - new - { - Id = 121, - DisplayName = "nctsoft", - DisplayShortName = "nct", - Name = "nctsoft.com" - }, - new - { - Id = 122, - DisplayName = "@nifty", - DisplayShortName = "@nifty", - Name = "nifty.com" - }, - new - { - Id = 123, - DisplayName = "BB????", - DisplayShortName = "NSAT", - Name = "nsat.jp" - }, - new - { - Id = 124, - DisplayName = "o2 Poczta", - DisplayShortName = "o2", - Name = "o2.pl" - }, - new - { - Id = 125, - DisplayName = "???", - DisplayShortName = "???", - Name = "olive.plala.or.jp" - }, - new - { - Id = 126, - DisplayName = "Poczta Onet", - DisplayShortName = "Onet", - Name = "onet.pl" - }, - new - { - Id = 127, - DisplayName = "???", - DisplayShortName = "???", - Name = "opal.plala.or.jp" - }, - new - { - Id = 128, - DisplayName = "???", - DisplayShortName = "???", - Name = "orange.plala.or.jp" - }, - new - { - Id = 129, - DisplayName = "???", - DisplayShortName = "???", - Name = "orchid.plala.or.jp" - }, - new - { - Id = 130, - DisplayName = "OVH", - DisplayShortName = "OVH", - Documentation = "http://guides.ovh.com/ConfigurationEmail", - Name = "ovh.net" - }, - new - { - Id = 131, - DisplayName = "????FTTH", - DisplayShortName = "????FTTH", - Name = "pal.kijimadaira.jp" - }, - new - { - Id = 132, - DisplayName = "???", - DisplayShortName = "???", - Name = "palette.plala.or.jp" - }, - new - { - Id = 133, - DisplayName = "??????", - DisplayShortName = "PARABOX", - Name = "parabox.or.jp" - }, - new - { - Id = 134, - DisplayName = "Portland State University Mail", - DisplayShortName = "PSU Mail", - Name = "pdx.edu" - }, - new - { - Id = 135, - DisplayName = "???", - DisplayShortName = "???", - Name = "peach.plala.or.jp" - }, - new - { - Id = 136, - DisplayName = "PeoplePC", - DisplayShortName = "PeoplePC", - Name = "peoplepc.com" - }, - new - { - Id = 137, - DisplayName = "???", - DisplayShortName = "???", - Name = "plum.plala.or.jp" - }, - new - { - Id = 138, - DisplayName = "DCN???????????", - DisplayShortName = "DCN", - Name = "po.dcn.ne.jp" - }, - new - { - Id = 139, - DisplayName = "'?????????", - DisplayShortName = "wind", - Name = "po.wind.ne.jp" - }, - new - { - Id = 140, - DisplayName = "???", - DisplayShortName = "???", - Name = "polka.plala.or.jp" - }, - new - { - Id = 141, - DisplayName = "??????????", - DisplayShortName = "INET-SHIBATA", - Name = "pop.shibata.ne.jp" - }, - new - { - Id = 142, - DisplayName = "Posteo", - DisplayShortName = "Posteo", - Name = "posteo.de" - }, - new - { - Id = 143, - DisplayName = "???", - DisplayShortName = "???", - Name = "purple.plala.or.jp" - }, - new - { - Id = 144, - DisplayName = "qip.ru", - DisplayShortName = "qip.ru", - Name = "qip.ru" - }, - new - { - Id = 145, - DisplayName = "???", - DisplayShortName = "???", - Name = "rainbow.plala.or.jp" - }, - new - { - Id = 146, - DisplayName = "Rambler Mail", - DisplayShortName = "Rambler", - Name = "rambler.ru" - }, - new - { - Id = 147, - DisplayName = "???", - DisplayShortName = "???", - Name = "red.plala.or.jp" - }, - new - { - Id = 148, - DisplayName = "???", - DisplayShortName = "???", - Name = "rmail.plala.or.jp" - }, - new - { - Id = 149, - DisplayName = "???", - DisplayShortName = "???", - Name = "rondo.plala.or.jp" - }, - new - { - Id = 150, - DisplayName = "???", - DisplayShortName = "???", - Name = "rose.plala.or.jp" - }, - new - { - Id = 151, - DisplayName = "???", - DisplayShortName = "???", - Name = "rouge.plala.or.jp" - }, - new - { - Id = 152, - DisplayName = "RoadRunner", - DisplayShortName = "RR", - Documentation = "http://help.rr.com/HMSFaqs/e_emailserveraddys.aspx", - Name = "rr.com" - }, - new - { - Id = 153, - DisplayName = "???", - DisplayShortName = "???", - Name = "ruby.plala.or.jp" - }, - new - { - Id = 154, - DisplayName = "?????????", - DisplayShortName = "Saku-Net", - Name = "sakunet.ne.jp" - }, - new - { - Id = 155, - DisplayName = "???", - DisplayShortName = "???", - Name = "sea.plala.or.jp" - }, - new - { - Id = 156, - DisplayName = "???", - DisplayShortName = "???", - Name = "sepia.plala.or.jp" - }, - new - { - Id = 157, - DisplayName = "???", - DisplayShortName = "???", - Name = "serenade.plala.or.jp" - }, - new - { - Id = 158, - DisplayName = "Seznam", - DisplayShortName = "Seznam", - Documentation = "http://napoveda.seznam.cz/cz/jake-jsou-adresy-pop3-a-smtp-serveru.html", - Name = "seznam.cz" - }, - new - { - Id = 159, - DisplayName = "SFR / Neuf", - DisplayShortName = "SFR", - Documentation = "http://assistance.sfr.fr/internet_neufbox-de-SFR/utiliser-email/parametrer-id-sfr/fc-505-50680", - Name = "sfr.fr" - }, - new - { - Id = 160, - DisplayName = "???", - DisplayShortName = "???", - Name = "silk.plala.or.jp" - }, - new - { - Id = 161, - DisplayName = "???", - DisplayShortName = "???", - Name = "silver.plala.or.jp" - }, - new - { - Id = 162, - DisplayName = "???", - DisplayShortName = "???", - Name = "sky.plala.or.jp" - }, - new - { - Id = 163, - DisplayName = "skynet", - DisplayShortName = "skynet", - Documentation = "http://support.en.belgacom.be/app/answers/detail/a_id/14337/kw/thunderbird", - Name = "skynet.be" - }, - new - { - Id = 164, - DisplayName = "???", - DisplayShortName = "???", - Name = "smail.plala.or.jp" - }, - new - { - Id = 165, - DisplayName = "???", - DisplayShortName = "???", - Name = "snow.plala.or.jp" - }, - new - { - Id = 166, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "so.wind.ne.jp" - }, - new - { - Id = 167, - DisplayName = "???", - DisplayShortName = "???", - Name = "sonata.plala.or.jp" - }, - new - { - Id = 168, - DisplayName = "Strato", - DisplayShortName = "Strato", - Name = "strato.de" - }, - new - { - Id = 169, - DisplayName = "Universita degli Studi di Verona", - DisplayShortName = "UniVR", - Name = "studenti.univr.it" - }, - new - { - Id = 170, - DisplayName = "???", - DisplayShortName = "???", - Name = "suite.plala.or.jp" - }, - new - { - Id = 171, - DisplayName = "Sympatico Email", - DisplayShortName = "Sympatico", - Documentation = "http://internet.bell.ca/index.cfm?method=content.view&category_id=585&content_id=12767", - Name = "sympatico.ca" - }, - new - { - Id = 172, - DisplayName = "???", - DisplayShortName = "???", - Name = "symphony.plala.or.jp" - }, - new - { - Id = 173, - DisplayName = "T-Online", - DisplayShortName = "T-Online", - Name = "t-online.de" - }, - new - { - Id = 174, - DisplayName = "???", - DisplayShortName = "???", - Name = "taupe.plala.or.jp" - }, - new - { - Id = 175, - DisplayName = "Correo Terra", - DisplayShortName = "Terra", - Name = "terra.es" - }, - new - { - Id = 176, - DisplayName = "TikiTiki???????", - DisplayShortName = "TikiTiki", - Name = "tiki.ne.jp" - }, - new - { - Id = 177, - DisplayName = "Tiscali", - DisplayShortName = "Tiscali", - Name = "tiscali.cz" - }, - new - { - Id = 178, - DisplayName = "Tiscali Italy", - DisplayShortName = "Tiscali", - Documentation = "http://assistenza.tiscali.it/tecnica/posta/configurazioni/", - Name = "tiscali.it" - }, - new - { - Id = 179, - DisplayName = "???", - DisplayShortName = "???", - Name = "tmail.plala.or.jp" - }, - new - { - Id = 180, - DisplayName = "???", - DisplayShortName = "???", - Name = "toccata.plala.or.jp" - }, - new - { - Id = 181, - DisplayName = "???", - DisplayShortName = "???", - Name = "topaz.plala.or.jp" - }, - new - { - Id = 182, - DisplayName = "???", - DisplayShortName = "???", - Name = "trio.plala.or.jp" - }, - new - { - Id = 183, - DisplayName = "???", - DisplayShortName = "???", - Name = "umail.plala.or.jp" - }, - new - { - Id = 184, - DisplayName = "UM ITCS Email", - DisplayShortName = "UM ITCS", - Name = "umich.edu" - }, - new - { - Id = 185, - DisplayName = "UPC Nederland", - DisplayShortName = "UPC", - Name = "upcmail.nl" - }, - new - { - Id = 186, - DisplayName = "Verizon Online", - DisplayShortName = "Verizon", - Name = "verizon.net" - }, - new - { - Id = 187, - DisplayName = "Versatel", - DisplayShortName = "Versatel", - Documentation = "http://www.versatel.de/hilfe/index_popup.php?einrichtung_email_programm", - Name = "versatel.de" - }, - new - { - Id = 188, - DisplayName = "???", - DisplayShortName = "???", - Name = "violet.plala.or.jp" - }, - new - { - Id = 189, - DisplayName = "aikis", - DisplayShortName = "aikis", - Name = "vm.aikis.or.jp" - }, - new - { - Id = 190, - DisplayName = "???", - DisplayShortName = "???", - Name = "vmail.plala.or.jp" - }, - new - { - Id = 191, - DisplayName = "TikiTiki???????", - DisplayShortName = "TikiTiki", - Name = "vp.tiki.ne.jp" - }, - new - { - Id = 192, - DisplayName = "???", - DisplayShortName = "???", - Name = "waltz.plala.or.jp" - }, - new - { - Id = 193, - DisplayName = "???", - DisplayShortName = "???", - Name = "wave.plala.or.jp" - }, - new - { - Id = 194, - DisplayName = "WEB.DE Freemail", - DisplayShortName = "Web.de", - Documentation = "http://hilfe.freemail.web.de/freemail/e-mail/pop3/thunderbird/", - Name = "web.de" - }, - new - { - Id = 195, - DisplayName = "???", - DisplayShortName = "???", - Name = "white.plala.or.jp" - }, - new - { - Id = 196, - DisplayName = "Your WildWest domain", - DisplayShortName = "WildWest", - Name = "wildwestdomains.com" - }, - new - { - Id = 197, - DisplayName = "???", - DisplayShortName = "???", - Name = "wine.plala.or.jp" - }, - new - { - Id = 198, - DisplayName = "???", - DisplayShortName = "???", - Name = "wmail.plala.or.jp" - }, - new - { - Id = 199, - DisplayName = "Poczta Wirtualna Polska", - DisplayShortName = "Poczta WP", - Name = "wp.pl" - }, - new - { - Id = 200, - DisplayName = "???", - DisplayShortName = "???", - Name = "xmail.plala.or.jp" - }, - new - { - Id = 201, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "xp.wind.jp" - }, - new - { - Id = 202, - DisplayName = "???", - DisplayShortName = "???", - Name = "xpost.plala.or.jp" - }, - new - { - Id = 203, - DisplayName = "XS4All", - DisplayShortName = "XS4All", - Name = "xs4all.nl" - }, - new - { - Id = 204, - DisplayName = "Yahoo! Mail", - DisplayShortName = "Yahoo", - Name = "xtra.co.nz" - }, - new - { - Id = 205, - DisplayName = "Yahoo! ???", - DisplayShortName = "Yahoo! ??? ", - Name = "yahoo.co.jp" - }, - new - { - Id = 206, - DisplayName = "Yahoo! Mail", - DisplayShortName = "Yahoo", - Name = "yahoo.com" - }, - new - { - Id = 207, - DisplayName = "Yandex Mail", - DisplayShortName = "Yandex", - Name = "yandex.ru" - }, - new - { - Id = 208, - DisplayName = "Yahoo! BB", - DisplayShortName = "Yahoo! BB", - Name = "ybb.ne.jp" - }, - new - { - Id = 209, - DisplayName = "???", - DisplayShortName = "???", - Name = "yellow.plala.or.jp" - }, - new - { - Id = 210, - DisplayName = "???", - DisplayShortName = "???", - Name = "ymail.plala.or.jp" - }, - new - { - Id = 211, - DisplayName = "???", - DisplayShortName = "???", - Name = "ypost.plala.or.jp" - }, - new - { - Id = 212, - DisplayName = "Ziggo", - DisplayShortName = "Ziggo", - Name = "ziggo.nl" - }, - new - { - Id = 213, - DisplayName = "???", - DisplayShortName = "???", - Name = "zmail.plala.or.jp" - }, - new - { - Id = 214, - DisplayName = "???", - DisplayShortName = "???", - Name = "zpost.plala.or.jp" - }, - new - { - Id = 215, - DisplayName = "avsmedia.com", - DisplayShortName = "avsmedia", - Name = "avsmedia.com" - }, - new - { - Id = 216, - DisplayName = "avsmedia.net", - DisplayShortName = "avsmedia", - Name = "avsmedia.net" - }, - new - { - Id = 218, - DisplayName = "ilearney.com", - DisplayShortName = "ilearney.com", - Name = "ilearney.com" - }, - new - { - Id = 219, - DisplayName = "fpl-technology.com", - DisplayShortName = "fpl-technology.com", - Documentation = "http://fpl-technology.com", - Name = "fpl -technology.com" - }, - new - { - Id = 220, - DisplayName = "Apple iCloud", - DisplayShortName = "Apple", - Name = "icloud.com" - }, - new - { - Id = 221, - DisplayName = "Microsoft Office 365", - DisplayShortName = "Office365", - Documentation = "https://products.office.com", - Name = "office365.com" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.MailboxServer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("Authentication") - .HasColumnType("longtext"); - - b.Property("Hostname") - .HasColumnType("longtext"); - - b.Property("IdProvider") - .HasColumnType("int"); - - b.Property("IsUserData") - .HasColumnType("tinyint(1)"); - - b.Property("Port") - .HasColumnType("int"); - - b.Property("SocketType") - .HasColumnType("longtext"); - - b.Property("Type") - .HasColumnType("longtext"); - - b.Property("UserName") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.ToTable("MailboxServer"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.ServerServer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ConnectionString") - .IsRequired() - .HasColumnType("text") - .HasColumnName("connection_string") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ImapSettingsId") - .HasColumnType("int") - .HasColumnName("imap_settings_id"); - - b.Property("MxRecord") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(128)") - .HasColumnName("mx_record") - .HasDefaultValueSql("''") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ServerType") - .HasColumnType("int") - .HasColumnName("server_type"); - - b.Property("SmtpSettingsId") - .HasColumnType("int") - .HasColumnName("smtp_settings_id"); - - b.HasKey("Id"); - - b.HasIndex("ServerType") - .HasDatabaseName("mail_server_server_type_server_type_fk_id"); - - b.ToTable("mail_server_server"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/MessagesContextMySql/20211012145334_MessagesContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/MessagesContextMySql/20211012145334_MessagesContextMySql.cs deleted file mode 100644 index 30a6a01efb..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/MessagesContextMySql/20211012145334_MessagesContextMySql.cs +++ /dev/null @@ -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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - initiator = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - target = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - ip = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - browser = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - platform = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - date = table.Column(type: "datetime", nullable: false), - tenant_id = table.Column(type: "int", nullable: false), - user_id = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - page = table.Column(type: "varchar(300)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - action = table.Column(type: "int", nullable: false), - description = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - login = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - ip = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - browser = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - platform = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - date = table.Column(type: "datetime", nullable: false), - tenant_id = table.Column(type: "int", nullable: false), - active = table.Column(type: "int", nullable: false), - user_id = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - page = table.Column(type: "varchar(300)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - action = table.Column(type: "int", nullable: false), - description = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - alias = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - mappeddomain = table.Column(type: "varchar(100)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - version = table.Column(type: "int", nullable: false, defaultValueSql: "'2'"), - version_changed = table.Column(type: "datetime", nullable: true), - language = table.Column(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - timezone = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - trusteddomains = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - trusteddomainsenabled = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), - status = table.Column(type: "int", nullable: false), - statuschanged = table.Column(type: "datetime", nullable: true), - creationdatetime = table.Column(type: "datetime", nullable: false), - owner_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - payment_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - industry = table.Column(type: "int", nullable: true), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - spam = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "true"), - calls = table.Column(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(type: "int", nullable: false), - ID = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - UserID = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - Data = table.Column(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"); - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/MessagesContextMySql/MySqlMessagesContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/MessagesContextMySql/MySqlMessagesContextModelSnapshot.cs deleted file mode 100644 index 1f36b665a5..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/MessagesContextMySql/MySqlMessagesContextModelSnapshot.cs +++ /dev/null @@ -1,94 +0,0 @@ -// - -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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("Browser") - .HasColumnType("varchar(200)") - .HasColumnName("browser") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Date") - .HasColumnType("datetime") - .HasColumnName("date"); - - b.Property("Description") - .HasColumnType("varchar(500)") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Ip") - .HasColumnType("varchar(50)") - .HasColumnName("ip") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Login") - .HasColumnType("varchar(200)") - .HasColumnName("login") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Page") - .HasColumnType("varchar(300)") - .HasColumnName("page") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Platform") - .HasColumnType("varchar(200)") - .HasColumnName("platform") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Active") - .HasColumnType("int") - .HasColumnName("active"); - - b.Property("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 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/NotifyDbContextMySql/20211012145336_NotifyDbContextMySql.Designer.cs b/common/ASC.Core.Common/Migrations/MySql/NotifyDbContextMySql/20211012145336_NotifyDbContextMySql.Designer.cs deleted file mode 100644 index 6f83b55508..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/NotifyDbContextMySql/20211012145336_NotifyDbContextMySql.Designer.cs +++ /dev/null @@ -1,125 +0,0 @@ -// - -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("NotifyId") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("notify_id"); - - b.Property("Attempts") - .HasColumnType("int") - .HasColumnName("attempts"); - - b.Property("ModifyDate") - .HasColumnType("datetime") - .HasColumnName("modify_date"); - - b.Property("Priority") - .HasColumnType("int") - .HasColumnName("priority"); - - b.Property("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("NotifyId") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("notify_id"); - - b.Property("Attachments") - .HasColumnType("text") - .HasColumnName("attachments") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AutoSubmitted") - .HasColumnType("varchar(64)") - .HasColumnName("auto_submitted") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Content") - .HasColumnType("text") - .HasColumnName("content") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ContentType") - .HasColumnType("varchar(64)") - .HasColumnName("content_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreationDate") - .HasColumnType("datetime") - .HasColumnName("creation_date"); - - b.Property("Reciever") - .HasColumnType("varchar(255)") - .HasColumnName("reciever") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ReplyTo") - .HasColumnType("varchar(1024)") - .HasColumnName("reply_to") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Sender") - .HasColumnType("varchar(255)") - .HasColumnName("sender") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("SenderType") - .HasColumnType("varchar(64)") - .HasColumnName("sender_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Subject") - .HasColumnType("varchar(1024)") - .HasColumnName("subject") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.HasKey("NotifyId") - .HasName("PRIMARY"); - - b.ToTable("notify_queue"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/NotifyDbContextMySql/20211012145336_NotifyDbContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/NotifyDbContextMySql/20211012145336_NotifyDbContextMySql.cs deleted file mode 100644 index 38f58a6a23..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/NotifyDbContextMySql/20211012145336_NotifyDbContextMySql.cs +++ /dev/null @@ -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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - state = table.Column(type: "int", nullable: false), - attempts = table.Column(type: "int", nullable: false), - modify_date = table.Column(type: "datetime", nullable: false), - priority = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - tenant_id = table.Column(type: "int", nullable: false), - sender = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - reciever = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - subject = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - content_type = table.Column(type: "varchar(64)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - content = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sender_type = table.Column(type: "varchar(64)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - reply_to = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - creation_date = table.Column(type: "datetime", nullable: false), - attachments = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - auto_submitted = table.Column(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"); - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/NotifyDbContextMySql/MySqlNotifyDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/NotifyDbContextMySql/MySqlNotifyDbContextModelSnapshot.cs deleted file mode 100644 index 60513d2547..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/NotifyDbContextMySql/MySqlNotifyDbContextModelSnapshot.cs +++ /dev/null @@ -1,124 +0,0 @@ -// - -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("NotifyId") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("notify_id"); - - b.Property("Attempts") - .HasColumnType("int") - .HasColumnName("attempts"); - - b.Property("ModifyDate") - .HasColumnType("datetime") - .HasColumnName("modify_date"); - - b.Property("Priority") - .HasColumnType("int") - .HasColumnName("priority"); - - b.Property("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("NotifyId") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("notify_id"); - - b.Property("Attachments") - .HasColumnType("text") - .HasColumnName("attachments") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AutoSubmitted") - .HasColumnType("varchar(64)") - .HasColumnName("auto_submitted") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Content") - .HasColumnType("text") - .HasColumnName("content") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ContentType") - .HasColumnType("varchar(64)") - .HasColumnName("content_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreationDate") - .HasColumnType("datetime") - .HasColumnName("creation_date"); - - b.Property("Reciever") - .HasColumnType("varchar(255)") - .HasColumnName("reciever") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ReplyTo") - .HasColumnType("varchar(1024)") - .HasColumnName("reply_to") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Sender") - .HasColumnType("varchar(255)") - .HasColumnName("sender") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("SenderType") - .HasColumnType("varchar(64)") - .HasColumnName("sender_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Subject") - .HasColumnType("varchar(1024)") - .HasColumnName("subject") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.HasKey("NotifyId") - .HasName("PRIMARY"); - - b.ToTable("notify_queue"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/ResourceDbContextMySql/20211012145338_ResourceDbContextMySql.Designer.cs b/common/ASC.Core.Common/Migrations/MySql/ResourceDbContextMySql/20211012145338_ResourceDbContextMySql.Designer.cs deleted file mode 100644 index dd59680efe..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/ResourceDbContextMySql/20211012145338_ResourceDbContextMySql.Designer.cs +++ /dev/null @@ -1,311 +0,0 @@ -// - -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("Login") - .HasColumnType("varchar(150)") - .HasColumnName("login") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)") - .HasColumnName("isAdmin"); - - b.Property("LastVisit") - .HasColumnType("datetime") - .HasColumnName("lastVisit"); - - b.Property("Online") - .HasColumnType("tinyint(1)") - .HasColumnName("online"); - - b.Property("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("AuthorLogin") - .HasColumnType("varchar(50)") - .HasColumnName("authorLogin") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FileId") - .HasColumnType("int") - .HasColumnName("fileid"); - - b.Property("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("AuthorLogin") - .HasColumnType("varchar(50)") - .HasColumnName("authorLogin") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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("Title") - .HasColumnType("varchar(120)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Available") - .HasColumnType("tinyint(1)") - .HasColumnName("available"); - - b.Property("CreationDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("creationDate") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("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("FileId") - .HasColumnType("int") - .HasColumnName("fileid"); - - b.Property("CultureTitle") - .HasColumnType("varchar(20)") - .HasColumnName("cultureTitle") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Title") - .HasColumnType("varchar(120)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AuthorLogin") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(50)") - .HasColumnName("authorLogin") - .HasDefaultValueSql("'Console'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Flag") - .HasColumnType("int") - .HasColumnName("flag"); - - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Link") - .HasColumnType("varchar(120)") - .HasColumnName("link") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ResourceType") - .HasColumnType("varchar(20)") - .HasColumnName("resourceType") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TextValue") - .HasColumnType("text") - .HasColumnName("textValue") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreationDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("creationDate") - .HasDefaultValueSql("'0000-00-00 00:00:00'"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasColumnName("isLock"); - - b.Property("LastUpdate") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("lastUpdate") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("ModuleName") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("moduleName") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ProjectName") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("projectName") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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("FileId") - .HasColumnType("int") - .HasColumnName("fileid"); - - b.Property("Title") - .HasColumnType("varchar(120)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CultureTitle") - .HasColumnType("varchar(20)") - .HasColumnName("cultureTitle") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Flag") - .HasColumnType("int") - .HasColumnName("flag"); - - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("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 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/ResourceDbContextMySql/20211012145338_ResourceDbContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/ResourceDbContextMySql/20211012145338_ResourceDbContextMySql.cs deleted file mode 100644 index d43b4537c5..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/ResourceDbContextMySql/20211012145338_ResourceDbContextMySql.cs +++ /dev/null @@ -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(type: "varchar(150)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - password = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - isAdmin = table.Column(type: "tinyint(1)", nullable: false), - online = table.Column(type: "tinyint(1)", nullable: false), - lastVisit = table.Column(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(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - fileid = table.Column(type: "int", nullable: false), - writeAccess = table.Column(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(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - cultureTitle = table.Column(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(type: "varchar(120)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - value = table.Column(type: "varchar(120)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - available = table.Column(type: "tinyint(1)", nullable: false), - creationDate = table.Column(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(type: "int", nullable: false), - title = table.Column(type: "varchar(120)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - cultureTitle = table.Column(type: "varchar(20)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - textValue = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - description = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - timeChanges = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - resourceType = table.Column(type: "varchar(20)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - flag = table.Column(type: "int", nullable: false), - link = table.Column(type: "varchar(120)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - authorLogin = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - projectName = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - moduleName = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - resName = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - isLock = table.Column(type: "tinyint(1)", nullable: false), - lastUpdate = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - creationDate = table.Column(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(type: "int", nullable: false), - title = table.Column(type: "varchar(120)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - cultureTitle = table.Column(type: "varchar(20)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - textValue = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - flag = table.Column(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"); - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/ResourceDbContextMySql/MySqlResourceDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/ResourceDbContextMySql/MySqlResourceDbContextModelSnapshot.cs deleted file mode 100644 index bc31756ece..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/ResourceDbContextMySql/MySqlResourceDbContextModelSnapshot.cs +++ /dev/null @@ -1,310 +0,0 @@ -// - -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("Login") - .HasColumnType("varchar(150)") - .HasColumnName("login") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)") - .HasColumnName("isAdmin"); - - b.Property("LastVisit") - .HasColumnType("datetime") - .HasColumnName("lastVisit"); - - b.Property("Online") - .HasColumnType("tinyint(1)") - .HasColumnName("online"); - - b.Property("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("AuthorLogin") - .HasColumnType("varchar(50)") - .HasColumnName("authorLogin") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FileId") - .HasColumnType("int") - .HasColumnName("fileid"); - - b.Property("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("AuthorLogin") - .HasColumnType("varchar(50)") - .HasColumnName("authorLogin") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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("Title") - .HasColumnType("varchar(120)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Available") - .HasColumnType("tinyint(1)") - .HasColumnName("available"); - - b.Property("CreationDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("creationDate") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("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("FileId") - .HasColumnType("int") - .HasColumnName("fileid"); - - b.Property("CultureTitle") - .HasColumnType("varchar(20)") - .HasColumnName("cultureTitle") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Title") - .HasColumnType("varchar(120)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AuthorLogin") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(50)") - .HasColumnName("authorLogin") - .HasDefaultValueSql("'Console'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Flag") - .HasColumnType("int") - .HasColumnName("flag"); - - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Link") - .HasColumnType("varchar(120)") - .HasColumnName("link") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ResourceType") - .HasColumnType("varchar(20)") - .HasColumnName("resourceType") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TextValue") - .HasColumnType("text") - .HasColumnName("textValue") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreationDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("creationDate") - .HasDefaultValueSql("'0000-00-00 00:00:00'"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasColumnName("isLock"); - - b.Property("LastUpdate") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("lastUpdate") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("ModuleName") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("moduleName") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ProjectName") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("projectName") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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("FileId") - .HasColumnType("int") - .HasColumnName("fileid"); - - b.Property("Title") - .HasColumnType("varchar(120)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CultureTitle") - .HasColumnType("varchar(20)") - .HasColumnName("cultureTitle") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Flag") - .HasColumnType("int") - .HasColumnName("flag"); - - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("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 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/TelegramDbContextMySql/20211012145340_TelegramDbContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/TelegramDbContextMySql/20211012145340_TelegramDbContextMySql.cs deleted file mode 100644 index 7fbcae955e..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/TelegramDbContextMySql/20211012145340_TelegramDbContextMySql.cs +++ /dev/null @@ -1,62 +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.TelegramDbContextMySql; - -public partial class TelegramDbContextMySql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "telegram_users", - columns: table => new - { - portal_user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant_id = table.Column(type: "int", nullable: false), - telegram_user_id = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.portal_user_id }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "tgId", - table: "telegram_users", - column: "telegram_user_id"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "telegram_users"); - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/TelegramDbContextMySql/MySqlTelegramDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/TelegramDbContextMySql/MySqlTelegramDbContextModelSnapshot.cs deleted file mode 100644 index de3e423e7e..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/TelegramDbContextMySql/MySqlTelegramDbContextModelSnapshot.cs +++ /dev/null @@ -1,42 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.TelegramDbContextMySql -{ - [DbContext(typeof(MySqlTelegramDbContext))] - partial class MySqlTelegramDbContextModelSnapshot : 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.TelegramUser", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("PortalUserId") - .HasColumnType("varchar(38)") - .HasColumnName("portal_user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TelegramUserId") - .HasColumnType("int") - .HasColumnName("telegram_user_id"); - - b.HasKey("TenantId", "PortalUserId") - .HasName("PRIMARY"); - - b.HasIndex("TelegramUserId") - .HasDatabaseName("tgId"); - - b.ToTable("telegram_users"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/TenantDbContextMySql/20211012145342_TenantDbContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/TenantDbContextMySql/20211012145342_TenantDbContextMySql.cs deleted file mode 100644 index c3265e54b6..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/TenantDbContextMySql/20211012145342_TenantDbContextMySql.cs +++ /dev/null @@ -1,223 +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.TenantDbContextMySql; - -public partial class TenantDbContextMySql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_settings", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - id = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - value = table.Column(type: "mediumblob", nullable: false), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.id }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_forbiden", - columns: table => new - { - address = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.address); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_iprestrictions", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - tenant = table.Column(type: "int", nullable: false), - ip = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PK_tenants_iprestrictions", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_partners", - columns: table => new - { - tenant_id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - partner_id = table.Column(type: "varchar(36)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - affiliate_id = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - campaign = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.tenant_id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_tenants", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - alias = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - mappeddomain = table.Column(type: "varchar(100)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - version = table.Column(type: "int", nullable: false, defaultValueSql: "'2'"), - version_changed = table.Column(type: "datetime", nullable: true), - language = table.Column(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - timezone = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - trusteddomains = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - trusteddomainsenabled = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), - status = table.Column(type: "int", nullable: false), - statuschanged = table.Column(type: "datetime", nullable: true), - creationdatetime = table.Column(type: "datetime", nullable: false), - owner_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - payment_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - industry = table.Column(type: "int", nullable: true), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - spam = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "true"), - calls = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "true") - }, - constraints: table => - { - table.PrimaryKey("PK_tenants_tenants", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_version", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - version = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - url = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - default_version = table.Column(type: "int", nullable: false), - visible = table.Column(type: "tinyint(1)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_tenants_version", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.InsertData( - table: "core_settings", - columns: new[] { "id", "tenant", "value" }, - values: new object[,] - { - { "CompanyWhiteLabelSettings", -1, 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 } }, - { "FullTextSearchSettings", -1, 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 } }, - { "SmtpSettings", -1, 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 } } - }); - - migrationBuilder.InsertData( - table: "tenants_forbiden", - column: "address", - values: new object[] - { - "controlpanel", - "localhost" - }); - - 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.CreateIndex( - name: "tenant", - table: "tenants_iprestrictions", - column: "tenant"); - - 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"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "core_settings"); - - migrationBuilder.DropTable( - name: "tenants_forbiden"); - - migrationBuilder.DropTable( - name: "tenants_iprestrictions"); - - migrationBuilder.DropTable( - name: "tenants_partners"); - - migrationBuilder.DropTable( - name: "tenants_tenants"); - - migrationBuilder.DropTable( - name: "tenants_version"); - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/UserDbContextMySql/20211012145322_UserDbContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/UserDbContextMySql/20211012145322_UserDbContextMySql.cs deleted file mode 100644 index e43076b11b..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/UserDbContextMySql/20211012145322_UserDbContextMySql.cs +++ /dev/null @@ -1,465 +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.UserDbContextMySql; - -public partial class UserDbContextMySql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_acl", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - subject = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - action = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - @object = table.Column(name: "object", type: "varchar(255)", nullable: false, defaultValueSql: "''", collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - acetype = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.subject, x.action, x.@object }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_group", - columns: table => new - { - id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant = table.Column(type: "int", nullable: false), - name = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - categoryid = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - parentid = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sid = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - removed = table.Column(type: "tinyint(1)", nullable: false), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PK_core_group", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_subscription", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - source = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - action = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - recipient = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - @object = table.Column(name: "object", type: "varchar(128)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - unsubscribed = table.Column(type: "tinyint(1)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.source, x.action, x.recipient, x.@object }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_subscriptionmethod", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - source = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - action = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - recipient = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sender = table.Column(type: "varchar(1024)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.source, x.action, x.recipient }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_user", - columns: table => new - { - id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant = table.Column(type: "int", nullable: false), - username = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - firstname = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - lastname = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sex = table.Column(type: "tinyint(1)", nullable: true), - bithdate = table.Column(type: "datetime", nullable: true), - status = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), - activation_status = table.Column(type: "int", nullable: false), - email = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - workfromdate = table.Column(type: "datetime", nullable: true), - terminateddate = table.Column(type: "datetime", nullable: true), - title = table.Column(type: "varchar(64)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - culture = table.Column(type: "varchar(20)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - contacts = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - phone = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - phone_activation = table.Column(type: "int", nullable: false), - location = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - notes = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sid = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sso_name_id = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sso_session_id = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - removed = table.Column(type: "tinyint(1)", nullable: false), - create_on = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - last_modified = table.Column(type: "datetime", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_core_user", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_userphoto", - columns: table => new - { - userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant = table.Column(type: "int", nullable: false), - photo = table.Column(type: "mediumblob", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.userid); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_usergroup", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - groupid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - ref_type = table.Column(type: "int", nullable: false), - removed = table.Column(type: "tinyint(1)", nullable: false), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.userid, x.groupid, x.ref_type }); - table.ForeignKey( - name: "FK_core_usergroup_core_user_userid", - column: x => x.userid, - principalTable: "core_user", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_usersecurity", - columns: table => new - { - userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant = table.Column(type: "int", nullable: false), - pwdhash = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - LastModified = table.Column(type: "timestamp", nullable: true, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.userid); - table.ForeignKey( - name: "FK_core_usersecurity_core_user_userid", - column: x => x.userid, - principalTable: "core_user", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.InsertData( - table: "core_acl", - columns: new[] { "action", "object", "subject", "tenant", "acetype" }, - values: new object[,] - { - { "ef5e6790-f346-4b6e-b662-722bc28cb0db", "", "5d5b7260-f7f7-49f1-a1c9-95fbb6a12604", -1, 0 }, - { "00e7dfc5-ac49-4fd3-a1d6-98d84e877ac4", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "14be970f-7af5-4590-8e81-ea32b5f7866d", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "18ecc94d-6afa-4994-8406-aee9dff12ce2", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "298530eb-435e-4dc6-a776-9abcd95c70e9", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "430eaf70-1886-483c-a746-1a18e3e6bb63", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "557d6503-633b-4490-a14c-6473147ce2b3", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "724cbb75-d1c9-451e-bae0-4de0db96b1f7", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "7cb5c0d1-d254-433f-abe3-ff23373ec631", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "91b29dcd-9430-4403-b17a-27d09189be88", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "a18480a4-6d18-4c71-84fa-789888791f45", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "b630d29b-1844-4bda-bbbe-cf5542df3559", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "c62a9e8d-b24c-4513-90aa-7ff0f8ba38eb", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "d7cdb020-288b-41e5-a857-597347618533", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "662f3db7-9bc8-42cf-84da-2765f563e9b0", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "f11e8f3f-46e6-4e55-90e3-09c22ec565bd", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "e0759a42-47f0-4763-a26a-d5aa665bec35", "", "712d9ec3-5d2b-4b13-824f-71f00191dcca", -1, 0 }, - { "6f05c382-8bca-4469-9424-c807a98c40d7", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|f4d98afdd336433287783c6945c81ea0", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "0d68b142-e20a-446e-a832-0d6b0b65a164", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "f11e88d7-f185-4372-927c-d88008d2c483", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "e0759a42-47f0-4763-a26a-d5aa665bec35", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "e37239bd-c5b5-4f1e-a9f8-3ceeac209615", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "f11e8f3f-46e6-4e55-90e3-09c22ec565bd", "", "5d5b7260-f7f7-49f1-a1c9-95fbb6a12604", -1, 0 }, - { "088d5940-a80f-4403-9741-d610718ce95c", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "08d66144-e1c9-4065-9aa1-aa4bba0a7bc8", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "0d1f72a8-63da-47ea-ae42-0900e4ac72a9", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "13e30b51-5b4d-40a5-8575-cb561899eeb1", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "19f658ae-722b-4cd8-8236-3ad150801d96", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "2c6552b3-b2e0-4a00-b8fd-13c161e337b1", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "388c29d3-c662-4a61-bf47-fc2f7094224a", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "40bf31f4-3132-4e76-8d5c-9828a89501a3", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "49ae8915-2b30-4348-ab74-b152279364fb", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "9018c001-24c2-44bf-a1db-d1121a570e74", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "948ad738-434b-4a88-8e38-7569d332910a", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "9d75a568-52aa-49d8-ad43-473756cd8903", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "08d75c97-cf3f-494b-90d1-751c941fe2dd", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "c426c349-9ad4-47cd-9b8f-99fc30675951", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "a362fe79-684e-4d43-a599-65bc1f4e167f", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "9018c001-24c2-44bf-a1db-d1121a570e74", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "49ae8915-2b30-4348-ab74-b152279364fb", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "13e30b51-5b4d-40a5-8575-cb561899eeb1", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "fcac42b8-9386-48eb-a938-d19b3c576912", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "d1f3b53d-d9e2-4259-80e7-d24380978395", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "e37239bd-c5b5-4f1e-a9f8-3ceeac209615", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "e0759a42-47f0-4763-a26a-d5aa665bec35", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "d852b66f-6719-45e1-8657-18f0bb791690", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "d49f4e30-da10-4b39-bc6d-b41ef6e039d3", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "d1f3b53d-d9e2-4259-80e7-d24380978395", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "d11ebcb9-0e6e-45e6-a6d0-99c41d687598", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "fbc37705-a04c-40ad-a68c-ce2f0423f397", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 } - }); - - migrationBuilder.InsertData( - table: "core_subscription", - columns: new[] { "action", "object", "recipient", "source", "tenant", "unsubscribed" }, - values: new object[,] - { - { "send_whats_new", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, false }, - { "sharedocument", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, false }, - { "new post", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6a598c74-91ae-437d-a5f4-ad339bd11bb2", -1, false }, - { "new topic in forum", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "853b6eb9-73ee-438d-9b09-8ffeedf36234", -1, false }, - { "new photo uploaded", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "9d51954f-db9b-4aed-94e3-ed70b914e10", -1, false }, - { "new bookmark created", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "28b10049-dd20-4f54-b986-873bc14ccfc7", -1, false }, - { "new wiki page", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "742cf945-cbbc-4a57-82d6-1600a12cf8ca", -1, false }, - { "BirthdayReminderd", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "37620ae5-c40b-45ce-855a-39dd7d76a1fa", -1, false }, - { "new feed", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6504977c-75af-4691-9099-084d3ddeea04", -1, false }, - { "SetAccess", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, - { "calendar_sharing", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, false }, - { "event_alert", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, false }, - { "admin_notify", "", "cd84e66b-b803-40fc-99f9-b2969a54a1de", "asc.web.studio", -1, false }, - { "ResponsibleForTask", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, - { "AddRelationshipEvent", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, - { "ExportCompleted", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, - { "CreateNewContact", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, - { "ResponsibleForOpportunity", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, - { "periodic_notify", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, false }, - { "sharefolder", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, false } - }); - - migrationBuilder.InsertData( - table: "core_subscriptionmethod", - columns: new[] { "action", "recipient", "source", "tenant", "sender" }, - values: new object[,] - { - { "AddRelationshipEvent", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, - { "periodic_notify", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, "email.sender" }, - { "ResponsibleForOpportunity", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, - { "CreateNewContact", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender" }, - { "ExportCompleted", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, - { "ResponsibleForTask", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, - { "updatedocument", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, "email.sender|messanger.sender" }, - { "admin_notify", "cd84e66b-b803-40fc-99f9-b2969a54a1de", "asc.web.studio", -1, "email.sender" }, - { "send_whats_new", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, "email.sender" }, - { "new feed", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6504977c-75af-4691-9099-084d3ddeea04", -1, "email.sender|messanger.sender" }, - { "new post", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6a598c74-91ae-437d-a5f4-ad339bd11bb2", -1, "email.sender|messanger.sender" }, - { "new topic in forum", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "853b6eb9-73ee-438d-9b09-8ffeedf36234", -1, "email.sender|messanger.sender" }, - { "new photo uploaded", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "9d51954f-db9b-4aed-94e3-ed70b914e101", -1, "email.sender|messanger.sender" }, - { "new bookmark created", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "28b10049-dd20-4f54-b986-873bc14ccfc7", -1, "email.sender|messanger.sender" }, - { "new wiki page", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "742cf945-cbbc-4a57-82d6-1600a12cf8ca", -1, "email.sender|messanger.sender" }, - { "BirthdayReminder", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "37620ae5-c40b-45ce-855a-39dd7d76a1fa", -1, "email.sender|messanger.sender" }, - { "sharedocument", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, "email.sender|messanger.sender" }, - { "sharefolder", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, "email.sender|messanger.sender" }, - { "invitetoproject", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "milestonedeadline", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "newcommentformessage", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "newcommentformilestone", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "newcommentfortask", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "projectcreaterequest", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "projecteditrequest", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "removefromproject", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "responsibleforproject", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "responsiblefortask", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "taskclosed", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "calendar_sharing", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, "email.sender|messanger.sender" }, - { "event_alert", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, "email.sender|messanger.sender" }, - { "SetAccess", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" } - }); - - migrationBuilder.InsertData( - table: "core_user", - columns: new[] { "id", "activation_status", "bithdate", "contacts", "culture", "email", "firstname", "last_modified", "lastname", "location", "notes", "phone", "phone_activation", "removed", "sex", "sid", "sso_name_id", "sso_session_id", "status", "tenant", "terminateddate", "title", "username", "workfromdate" }, - values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", 0, null, null, null, "", "Administrator", new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), "", null, null, null, 0, false, null, null, null, null, 1, 1, null, null, "administrator", new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) }); - - migrationBuilder.InsertData( - table: "core_usergroup", - columns: new[] { "groupid", "ref_type", "tenant", "userid", "removed" }, - values: new object[] { "cd84e66b-b803-40fc-99f9-b2969a54a1de", 0, 1, "66faa6e4-f133-11ea-b126-00ffeec8b4ef", false }); - - migrationBuilder.InsertData( - table: "core_usersecurity", - columns: new[] { "userid", "pwdhash", "tenant" }, - values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", "vLFfghR5tNV3K9DKhmwArV+SbjWAcgZZzIDTnJ0JgCo=", 1 }); - - migrationBuilder.CreateIndex( - name: "last_modified", - table: "core_group", - column: "last_modified"); - - migrationBuilder.CreateIndex( - name: "parentid", - table: "core_group", - columns: new[] { "tenant", "parentid" }); - - migrationBuilder.CreateIndex( - name: "email", - table: "core_user", - column: "email"); - - migrationBuilder.CreateIndex( - name: "last_modified", - table: "core_user", - column: "last_modified"); - - migrationBuilder.CreateIndex( - name: "username", - table: "core_user", - columns: new[] { "tenant", "username" }); - - migrationBuilder.CreateIndex( - name: "IX_core_usergroup_userid", - table: "core_usergroup", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "last_modified", - table: "core_usergroup", - column: "last_modified"); - - migrationBuilder.CreateIndex( - name: "tenant", - table: "core_userphoto", - column: "tenant"); - - migrationBuilder.CreateIndex( - name: "pwdhash", - table: "core_usersecurity", - column: "pwdhash"); - - migrationBuilder.CreateIndex( - name: "tenant", - table: "core_usersecurity", - column: "tenant"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "core_acl"); - - migrationBuilder.DropTable( - name: "core_group"); - - migrationBuilder.DropTable( - name: "core_subscription"); - - migrationBuilder.DropTable( - name: "core_subscriptionmethod"); - - migrationBuilder.DropTable( - name: "core_usergroup"); - - migrationBuilder.DropTable( - name: "core_userphoto"); - - migrationBuilder.DropTable( - name: "core_usersecurity"); - - migrationBuilder.DropTable( - name: "core_user"); - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/WebstudioDbContextMySql/20211012145346_WebstudioDbContextMySql.Designer.cs b/common/ASC.Core.Common/Migrations/MySql/WebstudioDbContextMySql/20211012145346_WebstudioDbContextMySql.Designer.cs deleted file mode 100644 index dd70929a12..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/WebstudioDbContextMySql/20211012145346_WebstudioDbContextMySql.Designer.cs +++ /dev/null @@ -1,123 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.WebstudioDbContextMySql -{ - [DbContext(typeof(MySqlWebstudioDbContext))] - [Migration("20211012145346_WebstudioDbContextMySql")] - partial class WebstudioDbContextMySql - { - 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.DbWebstudioIndex", b => - { - b.Property("IndexName") - .HasColumnType("varchar(50)") - .HasColumnName("index_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.HasKey("IndexName") - .HasName("PRIMARY"); - - b.ToTable("webstudio_index"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("TenantID"); - - b.Property("Id") - .HasColumnType("varchar(64)") - .HasColumnName("ID") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("varchar(64)") - .HasColumnName("UserID") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Data") - .IsRequired() - .HasColumnType("mediumtext") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "Id", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("Id") - .HasDatabaseName("ID"); - - b.ToTable("webstudio_settings"); - - b.HasData( - new - { - TenantId = 1, - Id = "9a925891-1f92-4ed7-b277-d6f649739f06", - UserId = "00000000-0000-0000-0000-000000000000", - Data = "{\"Completed\":false}" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioUserVisit", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenantid"); - - b.Property("VisitDate") - .HasColumnType("datetime") - .HasColumnName("visitdate"); - - b.Property("ProductId") - .HasColumnType("varchar(38)") - .HasColumnName("productid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("userid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FirstVisitTime") - .HasColumnType("datetime") - .HasColumnName("firstvisittime"); - - b.Property("LastVisitTime") - .HasColumnType("datetime") - .HasColumnName("lastvisittime"); - - b.Property("VisitCount") - .HasColumnType("int") - .HasColumnName("visitcount"); - - b.HasKey("TenantId", "VisitDate", "ProductId", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("VisitDate") - .HasDatabaseName("visitdate"); - - b.ToTable("webstudio_uservisit"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/WebstudioDbContextMySql/20211012145346_WebstudioDbContextMySql.cs b/common/ASC.Core.Common/Migrations/MySql/WebstudioDbContextMySql/20211012145346_WebstudioDbContextMySql.cs deleted file mode 100644 index 9658b56672..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/WebstudioDbContextMySql/20211012145346_WebstudioDbContextMySql.cs +++ /dev/null @@ -1,115 +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.WebstudioDbContextMySql; - -public partial class WebstudioDbContextMySql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "webstudio_index", - columns: table => new - { - index_name = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.index_name); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "webstudio_settings", - columns: table => new - { - TenantID = table.Column(type: "int", nullable: false), - ID = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - UserID = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - Data = table.Column(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.CreateTable( - name: "webstudio_uservisit", - columns: table => new - { - tenantid = table.Column(type: "int", nullable: false), - visitdate = table.Column(type: "datetime", nullable: false), - productid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - visitcount = table.Column(type: "int", nullable: false), - firstvisittime = table.Column(type: "datetime", nullable: false), - lastvisittime = table.Column(type: "datetime", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.visitdate, x.productid, x.userid }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - 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: "ID", - table: "webstudio_settings", - column: "ID"); - - migrationBuilder.CreateIndex( - name: "visitdate", - table: "webstudio_uservisit", - column: "visitdate"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "webstudio_index"); - - migrationBuilder.DropTable( - name: "webstudio_settings"); - - migrationBuilder.DropTable( - name: "webstudio_uservisit"); - } -} diff --git a/common/ASC.Core.Common/Migrations/MySql/WebstudioDbContextMySql/MySqlWebstudioDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/MySql/WebstudioDbContextMySql/MySqlWebstudioDbContextModelSnapshot.cs deleted file mode 100644 index 9f832d243d..0000000000 --- a/common/ASC.Core.Common/Migrations/MySql/WebstudioDbContextMySql/MySqlWebstudioDbContextModelSnapshot.cs +++ /dev/null @@ -1,124 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.WebstudioDbContextMySql -{ - [DbContext(typeof(MySqlWebstudioDbContext))] - partial class MySqlWebstudioDbContextModelSnapshot : 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.DbWebstudioIndex", b => - { - b.Property("IndexName") - .HasColumnType("varchar(50)") - .HasColumnName("index_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.HasKey("IndexName") - .HasName("PRIMARY"); - - b.ToTable("webstudio_index"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("TenantID"); - - b.Property("Id") - .HasColumnType("varchar(64)") - .HasColumnName("ID") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("varchar(64)") - .HasColumnName("UserID") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Data") - .IsRequired() - .HasColumnType("mediumtext") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "Id", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("Id") - .HasDatabaseName("ID"); - - b.ToTable("webstudio_settings"); - - b.HasData( - new - { - TenantId = 1, - Id = "9a925891-1f92-4ed7-b277-d6f649739f06", - UserId = "00000000-0000-0000-0000-000000000000", - Data = "{\"Completed\":false}" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioUserVisit", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenantid"); - - b.Property("VisitDate") - .HasColumnType("datetime") - .HasColumnName("visitdate"); - - b.Property("ProductId") - .HasColumnType("varchar(38)") - .HasColumnName("productid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("userid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FirstVisitTime") - .HasColumnType("datetime") - .HasColumnName("firstvisittime"); - - b.Property("LastVisitTime") - .HasColumnType("datetime") - .HasColumnName("lastvisittime"); - - b.Property("VisitCount") - .HasColumnType("int") - .HasColumnName("visitcount"); - - b.HasKey("TenantId", "VisitDate", "ProductId", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("VisitDate") - .HasDatabaseName("visitdate"); - - b.ToTable("webstudio_uservisit"); - - - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/AccountLinkContextPostgreSql/20211012145325_AccountLinkContextPostgreSql.Designer.cs b/common/ASC.Core.Common/Migrations/PostgreSql/AccountLinkContextPostgreSql/20211012145325_AccountLinkContextPostgreSql.Designer.cs deleted file mode 100644 index 01d6fe19c8..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/AccountLinkContextPostgreSql/20211012145325_AccountLinkContextPostgreSql.Designer.cs +++ /dev/null @@ -1,58 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.AccountLinkContextPostgreSql -{ - [DbContext(typeof(PostgreSqlAccountLinkContext))] - [Migration("20211012145325_AccountLinkContextPostgreSql")] - partial class AccountLinkContextPostgreSql - { - 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.AccountLinks", b => - { - b.Property("Id") - .HasColumnType("varchar(200)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UId") - .HasColumnType("varchar(200)") - .HasColumnName("uid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Linked") - .HasColumnType("datetime") - .HasColumnName("linked"); - - b.Property("Profile") - .IsRequired() - .HasColumnType("text") - .HasColumnName("profile") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Provider") - .HasColumnType("char(60)") - .HasColumnName("provider") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id", "UId") - .HasName("PRIMARY"); - - b.HasIndex("UId") - .HasDatabaseName("uid"); - - b.ToTable("account_links"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/AccountLinkContextPostgreSql/20211012145325_AccountLinkContextPostgreSql.cs b/common/ASC.Core.Common/Migrations/PostgreSql/AccountLinkContextPostgreSql/20211012145325_AccountLinkContextPostgreSql.cs deleted file mode 100644 index 2f2bb11a6b..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/AccountLinkContextPostgreSql/20211012145325_AccountLinkContextPostgreSql.cs +++ /dev/null @@ -1,67 +0,0 @@ -// (c) Copyright Ascensio System SIA 2010-2022 -// -// This program is a free software product. -// You can redistribute it and/or modify it under the terms -// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software -// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended -// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of -// any third-party rights. -// -// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty -// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see -// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html -// -// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021. -// -// The interactive user interfaces in modified source and object code versions of the Program must -// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3. -// -// Pursuant to Section 7(b) of the License you must retain the original Product logo when -// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under -// trademark law for use of our trademarks. -// -// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing -// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 -// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode - -namespace ASC.Core.Common.Migrations.PostgreSql.AccountLinkContextPostgreSql; - -public partial class AccountLinkContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "account_links", - columns: table => new - { - id = table.Column(type: "varchar(200)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - uid = table.Column(type: "varchar(200)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - provider = table.Column(type: "char(60)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - profile = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - linked = table.Column(type: "datetime", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.id, x.uid }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "uid", - table: "account_links", - column: "uid"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "account_links"); - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/CoreDbContextPostgreSql/20211012145321_CoreDbContextPostgreSql.cs b/common/ASC.Core.Common/Migrations/PostgreSql/CoreDbContextPostgreSql/20211012145321_CoreDbContextPostgreSql.cs deleted file mode 100644 index c8407a5c61..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/CoreDbContextPostgreSql/20211012145321_CoreDbContextPostgreSql.cs +++ /dev/null @@ -1,223 +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.PostgreSql.CoreDbContextPostgreSql; - -public partial class CoreDbContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_buttons", - columns: table => new - { - tariff_id = table.Column(type: "int", nullable: false), - partner_id = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - button_url = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tariff_id, x.partner_id }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_quota", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - name = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - description = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - max_file_size = table.Column(type: "bigint", nullable: false), - max_total_size = table.Column(type: "bigint", nullable: false), - active_users = table.Column(type: "int", nullable: false), - features = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - price = table.Column(type: "decimal(10,2)", nullable: false), - avangate_id = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - visible = table.Column(type: "tinyint(1)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.tenant); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_quotarow", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - path = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - counter = table.Column(type: "bigint", nullable: false), - tag = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.path }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_tariff", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - tenant = table.Column(type: "int", nullable: false), - tariff = table.Column(type: "int", nullable: false), - stamp = table.Column(type: "datetime", nullable: false), - quantity = table.Column(type: "int", nullable: false), - comment = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - create_on = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PK_tenants_tariff", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.InsertData( - table: "core_acl", - columns: new[] { "action", "object", "subject", "tenant", "acetype" }, - values: new object[,] - { - { "ef5e6790-f346-4b6e-b662-722bc28cb0db", "", "5d5b7260-f7f7-49f1-a1c9-95fbb6a12604", -1, 0 }, - { "00e7dfc5-ac49-4fd3-a1d6-98d84e877ac4", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "14be970f-7af5-4590-8e81-ea32b5f7866d", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "18ecc94d-6afa-4994-8406-aee9dff12ce2", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "298530eb-435e-4dc6-a776-9abcd95c70e9", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "430eaf70-1886-483c-a746-1a18e3e6bb63", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "557d6503-633b-4490-a14c-6473147ce2b3", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "724cbb75-d1c9-451e-bae0-4de0db96b1f7", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "7cb5c0d1-d254-433f-abe3-ff23373ec631", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "91b29dcd-9430-4403-b17a-27d09189be88", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "a18480a4-6d18-4c71-84fa-789888791f45", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "b630d29b-1844-4bda-bbbe-cf5542df3559", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "c62a9e8d-b24c-4513-90aa-7ff0f8ba38eb", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "d7cdb020-288b-41e5-a857-597347618533", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "662f3db7-9bc8-42cf-84da-2765f563e9b0", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "f11e8f3f-46e6-4e55-90e3-09c22ec565bd", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "e0759a42-47f0-4763-a26a-d5aa665bec35", "", "712d9ec3-5d2b-4b13-824f-71f00191dcca", -1, 0 }, - { "6f05c382-8bca-4469-9424-c807a98c40d7", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|f4d98afdd336433287783c6945c81ea0", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, - { "0d68b142-e20a-446e-a832-0d6b0b65a164", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "f11e88d7-f185-4372-927c-d88008d2c483", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "e0759a42-47f0-4763-a26a-d5aa665bec35", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "f11e8f3f-46e6-4e55-90e3-09c22ec565bd", "", "5d5b7260-f7f7-49f1-a1c9-95fbb6a12604", -1, 0 }, - { "088d5940-a80f-4403-9741-d610718ce95c", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "08d66144-e1c9-4065-9aa1-aa4bba0a7bc8", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "08d75c97-cf3f-494b-90d1-751c941fe2dd", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "0d1f72a8-63da-47ea-ae42-0900e4ac72a9", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "13e30b51-5b4d-40a5-8575-cb561899eeb1", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "19f658ae-722b-4cd8-8236-3ad150801d96", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "2c6552b3-b2e0-4a00-b8fd-13c161e337b1", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "388c29d3-c662-4a61-bf47-fc2f7094224a", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "40bf31f4-3132-4e76-8d5c-9828a89501a3", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "49ae8915-2b30-4348-ab74-b152279364fb", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "9018c001-24c2-44bf-a1db-d1121a570e74", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "948ad738-434b-4a88-8e38-7569d332910a", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "e37239bd-c5b5-4f1e-a9f8-3ceeac209615", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "9d75a568-52aa-49d8-ad43-473756cd8903", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "c426c349-9ad4-47cd-9b8f-99fc30675951", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "d11ebcb9-0e6e-45e6-a6d0-99c41d687598", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "d1f3b53d-d9e2-4259-80e7-d24380978395", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "d49f4e30-da10-4b39-bc6d-b41ef6e039d3", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "d852b66f-6719-45e1-8657-18f0bb791690", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "e0759a42-47f0-4763-a26a-d5aa665bec35", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "e37239bd-c5b5-4f1e-a9f8-3ceeac209615", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "fbc37705-a04c-40ad-a68c-ce2f0423f397", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "fcac42b8-9386-48eb-a938-d19b3c576912", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "13e30b51-5b4d-40a5-8575-cb561899eeb1", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "49ae8915-2b30-4348-ab74-b152279364fb", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "9018c001-24c2-44bf-a1db-d1121a570e74", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "d1f3b53d-d9e2-4259-80e7-d24380978395", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "a362fe79-684e-4d43-a599-65bc1f4e167f", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 } - }); - - migrationBuilder.InsertData( - table: "tenants_quota", - columns: new[] { "tenant", "active_users", "avangate_id", "description", "features", "max_file_size", "max_total_size", "name", "price", "visible" }, - values: new object[] { -1, 10000, "0", null, "update", 102400L, 10995116277760L, "default", 0.00m, false }); - - migrationBuilder.CreateIndex( - name: "last_modified", - table: "tenants_quotarow", - column: "last_modified"); - - migrationBuilder.CreateIndex( - name: "tenant", - table: "tenants_tariff", - column: "tenant"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "core_acl"); - - migrationBuilder.DropTable( - name: "tenants_buttons"); - - migrationBuilder.DropTable( - name: "tenants_quota"); - - migrationBuilder.DropTable( - name: "tenants_quotarow"); - - migrationBuilder.DropTable( - name: "tenants_tariff"); - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/DbContextPostgreSql/20211012145327_DbContextPostgreSql.cs b/common/ASC.Core.Common/Migrations/PostgreSql/DbContextPostgreSql/20211012145327_DbContextPostgreSql.cs deleted file mode 100644 index 33450d0758..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/DbContextPostgreSql/20211012145327_DbContextPostgreSql.cs +++ /dev/null @@ -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.PostgreSql.DbContextPostgreSql; - -public partial class DbContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "dbip_location", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - addr_type = table.Column(type: "enum('ipv4','ipv6')", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - ip_start = table.Column(type: "varchar(39)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - ip_end = table.Column(type: "varchar(39)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - country = table.Column(type: "varchar(2)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - stateprov = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - district = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - city = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - zipcode = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - latitude = table.Column(type: "bigint", nullable: false), - longitude = table.Column(type: "bigint", nullable: false), - geoname_id = table.Column(type: "int", nullable: false), - timezone_offset = table.Column(type: "double", nullable: false), - timezone_name = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - processed = table.Column(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(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - app_type = table.Column(type: "int", nullable: false), - registered_on = table.Column(type: "datetime", nullable: false), - last_sign = table.Column(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(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Provider = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - ConnectionString = table.Column(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"); - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/FilesDbContextPostgreSql/20211012145331_FilesDbContextPostgreSql.Designer.cs b/common/ASC.Core.Common/Migrations/PostgreSql/FilesDbContextPostgreSql/20211012145331_FilesDbContextPostgreSql.Designer.cs deleted file mode 100644 index 32e3f01c60..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/FilesDbContextPostgreSql/20211012145331_FilesDbContextPostgreSql.Designer.cs +++ /dev/null @@ -1,389 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.FilesDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlFilesDbContext))] - [Migration("20211012145331_FilesDbContextPostgreSql")] - partial class FilesDbContextPostgreSql - { - 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("Input") - .HasColumnType("varchar(50)") - .HasColumnName("input") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/FilesDbContextPostgreSql/20211012145331_FilesDbContextPostgreSql.cs b/common/ASC.Core.Common/Migrations/PostgreSql/FilesDbContextPostgreSql/20211012145331_FilesDbContextPostgreSql.cs deleted file mode 100644 index dc115fa1ec..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/FilesDbContextPostgreSql/20211012145331_FilesDbContextPostgreSql.cs +++ /dev/null @@ -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.PostgreSql.FilesDbContextPostgreSql; - -public partial class FilesDbContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_converts", - columns: table => new - { - input = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - output = table.Column(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"); - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/FilesDbContextPostgreSql/PostgreSqlFilesDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/PostgreSql/FilesDbContextPostgreSql/PostgreSqlFilesDbContextModelSnapshot.cs deleted file mode 100644 index df29d0f85e..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/FilesDbContextPostgreSql/PostgreSqlFilesDbContextModelSnapshot.cs +++ /dev/null @@ -1,388 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.FilesDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlFilesDbContext))] - partial class PostgreSqlFilesDbContextModelSnapshot : 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("Input") - .HasColumnType("varchar(50)") - .HasColumnName("input") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/MailDbContextPostgreSql/20211012145333_MailDbContextPostgreSql.Designer.cs b/common/ASC.Core.Common/Migrations/PostgreSql/MailDbContextPostgreSql/20211012145333_MailDbContextPostgreSql.Designer.cs deleted file mode 100644 index b0aff47916..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/MailDbContextPostgreSql/20211012145333_MailDbContextPostgreSql.Designer.cs +++ /dev/null @@ -1,1904 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.MailDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlMailDbContext))] - [Migration("20211012145333_MailDbContextPostgreSql")] - partial class MailDbContextPostgreSql - { - 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.Mail.ApiKeys", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("AccessToken") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.ToTable("ApiKeys"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.GreyListingWhiteList", b => - { - b.Property("Comment") - .HasColumnType("varchar(255)"); - - b.Property("Source") - .HasColumnType("longtext"); - - b.HasKey("Comment"); - - b.ToTable("GreyListingWhiteList"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.Mailbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Address") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("address") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("BeginDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("begin_date") - .HasDefaultValueSql("'1975-01-01 00:00:00'"); - - b.Property("DateAuthError") - .HasColumnType("datetime") - .HasColumnName("date_auth_error"); - - b.Property("DateChecked") - .HasColumnType("datetime") - .HasColumnName("date_checked"); - - b.Property("DateCreated") - .HasColumnType("datetime") - .HasColumnName("date_created"); - - b.Property("DateLoginDelayExpires") - .ValueGeneratedOnAdd() - .HasColumnType("datetime") - .HasColumnName("date_login_delay_expires") - .HasDefaultValueSql("'1975-01-01 00:00:00'"); - - b.Property("DateModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("date_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DateUserChecked") - .HasColumnType("datetime") - .HasColumnName("date_user_checked"); - - b.Property("EmailInFolder") - .HasColumnType("text") - .HasColumnName("email_in_folder") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Enabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("enabled") - .HasDefaultValueSql("'1'"); - - b.Property("IdInServer") - .HasColumnType("int") - .HasColumnName("id_in_server"); - - b.Property("IdSmtpServer") - .HasColumnType("int") - .HasColumnName("id_smtp_server"); - - b.Property("IdUser") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("id_user") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Imap") - .HasColumnType("tinyint(1)") - .HasColumnName("imap"); - - b.Property("ImapIntervals") - .HasColumnType("mediumtext") - .HasColumnName("imap_intervals") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("is_default"); - - b.Property("IsProcessed") - .HasColumnType("tinyint(1)") - .HasColumnName("is_processed"); - - b.Property("IsRemoved") - .HasColumnType("tinyint(1)") - .HasColumnName("is_removed"); - - b.Property("IsServerMailbox") - .HasColumnType("tinyint(1)") - .HasColumnName("is_server_mailbox"); - - b.Property("IsTeamlabMailbox") - .HasColumnType("tinyint(1)"); - - b.Property("LoginDelay") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("login_delay") - .HasDefaultValueSql("'30'"); - - b.Property("MsgCountLast") - .HasColumnType("int") - .HasColumnName("msg_count_last"); - - b.Property("Name") - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Pop3Password") - .HasColumnType("varchar(255)") - .HasColumnName("pop3_password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("QuotaError") - .HasColumnType("tinyint(1)") - .HasColumnName("quota_error"); - - b.Property("SizeLast") - .HasColumnType("int") - .HasColumnName("size_last"); - - b.Property("SmtpPassword") - .HasColumnType("varchar(255)") - .HasColumnName("smtp_password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TokenType") - .HasColumnType("int") - .HasColumnName("token_type"); - - b.Property("UserOnline") - .HasColumnType("tinyint(1)") - .HasColumnName("user_online"); - - b.HasKey("Id"); - - b.HasIndex("Address") - .HasDatabaseName("address_index"); - - b.HasIndex("IdInServer") - .HasDatabaseName("main_mailbox_id_in_server_mail_mailbox_server_id"); - - b.HasIndex("IdSmtpServer") - .HasDatabaseName("main_mailbox_id_smtp_server_mail_mailbox_server_id"); - - b.HasIndex("DateChecked", "DateLoginDelayExpires") - .HasDatabaseName("date_login_delay_expires"); - - b.HasIndex("Tenant", "IdUser") - .HasDatabaseName("user_id_index"); - - b.ToTable("mail_mailbox"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.MailboxProvider", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DisplayName") - .HasColumnType("varchar(255)") - .HasColumnName("display_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("DisplayShortName") - .HasColumnType("varchar(255)") - .HasColumnName("display_short_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Documentation") - .HasColumnType("varchar(255)") - .HasColumnName("documentation") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.ToTable("mail_mailbox_provider"); - - b.HasData( - new - { - Id = 1, - DisplayName = "1&1", - DisplayShortName = "1&1", - Documentation = "http://hilfe-center.1und1.de/access/search/go.php?t=e698123", - Name = "1und1.de" - }, - new - { - Id = 2, - DisplayName = "???", - DisplayShortName = "???", - Name = "abc.plala.or.jp" - }, - new - { - Id = 3, - DisplayName = "???", - DisplayShortName = "???", - Name = "agate.plala.or.jp" - }, - new - { - Id = 4, - DisplayName = "Alice Italy", - DisplayShortName = "Alice", - Documentation = "http://aiuto.alice.it/informazioni/clientemail/thunderbird.html", - Name = "alice.it" - }, - new - { - Id = 5, - DisplayName = "???", - DisplayShortName = "???", - Name = "amail.plala.or.jp" - }, - new - { - Id = 6, - DisplayName = "???", - DisplayShortName = "???", - Name = "amber.plala.or.jp" - }, - new - { - Id = 7, - DisplayName = "AOL Mail", - DisplayShortName = "AOL", - Name = "aol.com" - }, - new - { - Id = 8, - DisplayName = "???", - DisplayShortName = "???", - Name = "apost.plala.or.jp" - }, - new - { - Id = 9, - DisplayName = "???", - DisplayShortName = "???", - Name = "aqua.plala.or.jp" - }, - new - { - Id = 10, - DisplayName = "Arcor", - DisplayShortName = "Arcor", - Name = "arcor.de" - }, - new - { - Id = 11, - DisplayName = "Aruba PEC", - DisplayShortName = "Aruba", - Documentation = "http://pec.aruba.it/guide_filmate.asp", - Name = "arubapec.it" - }, - new - { - Id = 12, - DisplayName = "AT&T", - DisplayShortName = "AT&T", - Documentation = "http://www.att.com/esupport/article.jsp?sid=KB401570&ct=9000152", - Name = "att.net" - }, - new - { - Id = 13, - DisplayName = "???", - DisplayShortName = "???", - Name = "ballade.plala.or.jp" - }, - new - { - Id = 14, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "bay.wind.ne.jp" - }, - new - { - Id = 15, - DisplayName = "BB????", - DisplayShortName = "BB-NIIGATA", - Name = "bb-niigata.jp" - }, - new - { - Id = 16, - DisplayName = "???", - DisplayShortName = "???", - Name = "beige.plala.or.jp" - }, - new - { - Id = 17, - DisplayName = "Biglobe", - DisplayShortName = "Biglobe", - Name = "biglobe.ne.jp" - }, - new - { - Id = 18, - DisplayName = "Telstra Bigpond", - DisplayShortName = "Bigpond", - Name = "bigpond.com" - }, - new - { - Id = 19, - DisplayName = "???", - DisplayShortName = "???", - Name = "blue.plala.or.jp" - }, - new - { - Id = 20, - DisplayName = "bluewin.ch", - DisplayShortName = "bluewin.ch", - Documentation = "http://smtphelp.bluewin.ch/swisscomdtg/setup/?", - Name = "bluemail.ch" - }, - new - { - Id = 21, - DisplayName = "bluewin.ch", - DisplayShortName = "bluewin.ch", - Documentation = "http://smtphelp.bluewin.ch/swisscomdtg/setup/", - Name = "bluewin.ch" - }, - new - { - Id = 22, - DisplayName = "???", - DisplayShortName = "???", - Name = "bmail.plala.or.jp" - }, - new - { - Id = 23, - DisplayName = "???", - DisplayShortName = "???", - Name = "bolero.plala.or.jp" - }, - new - { - Id = 24, - DisplayName = "???", - DisplayShortName = "???", - Name = "bpost.plala.or.jp" - }, - new - { - Id = 25, - DisplayName = "???", - DisplayShortName = "???", - Name = "broba.cc" - }, - new - { - Id = 26, - DisplayName = "???", - DisplayShortName = "???", - Name = "brown.plala.or.jp" - }, - new - { - Id = 27, - DisplayName = "???", - DisplayShortName = "???", - Name = "camel.plala.or.jp" - }, - new - { - Id = 28, - DisplayName = "???", - DisplayShortName = "???", - Name = "cameo.plala.or.jp" - }, - new - { - Id = 29, - DisplayName = "CC9???????????", - DisplayShortName = "CC9", - Name = "cc9.ne.jp" - }, - new - { - Id = 30, - DisplayName = "???????????", - DisplayShortName = "CEK-Net", - Name = "cek.ne.jp" - }, - new - { - Id = 31, - DisplayName = "UCSF CGL email", - DisplayShortName = "CGL emai", - Name = "cgl.ucsf.edu" - }, - new - { - Id = 32, - DisplayName = "Charter Commuications", - DisplayShortName = "Charter", - Name = "charter.com" - }, - new - { - Id = 33, - DisplayName = "CLIO-Net??????", - DisplayShortName = "CLIO-Net", - Name = "clio.ne.jp" - }, - new - { - Id = 34, - DisplayName = "???", - DisplayShortName = "???", - Name = "cmail.plala.or.jp" - }, - new - { - Id = 35, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "co1.wind.ne.jp" - }, - new - { - Id = 36, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "co2.wind.ne.jp" - }, - new - { - Id = 37, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "co3.wind.ne.jp" - }, - new - { - Id = 38, - DisplayName = "???", - DisplayShortName = "???", - Name = "cocoa.plala.or.jp" - }, - new - { - Id = 39, - DisplayName = "???", - DisplayShortName = "Arcor", - Name = "coda.plala.or.jp" - }, - new - { - Id = 40, - DisplayName = "???", - DisplayShortName = "Comcast", - Name = "comcast.net" - }, - new - { - Id = 41, - DisplayName = "???", - DisplayShortName = "???", - Name = "concerto.plala.or.jp" - }, - new - { - Id = 42, - DisplayName = "???", - DisplayShortName = "???", - Name = "coral.plala.or.jp" - }, - new - { - Id = 43, - DisplayName = "???", - DisplayShortName = "???", - Name = "courante.plala.or.jp" - }, - new - { - Id = 44, - DisplayName = "???", - DisplayShortName = "???", - Name = "cpost.plala.or.jp" - }, - new - { - Id = 45, - DisplayName = "???", - DisplayShortName = "???", - Name = "cream.plala.or.jp" - }, - new - { - Id = 46, - DisplayName = "???", - DisplayShortName = "wind", - Name = "dan.wind.ne.jp" - }, - new - { - Id = 47, - DisplayName = "???", - DisplayShortName = "???", - Name = "dance.plala.or.jp" - }, - new - { - Id = 48, - DisplayName = "IIJ4U", - DisplayShortName = "???", - Name = "dd.iij4u.or.jp" - }, - new - { - Id = 49, - DisplayName = "domainFACTORY", - DisplayShortName = "domainFACTORY", - Documentation = "http://www.df.eu/de/service/df-faq/e-mail/mail-programme/", - Name = "df.eu" - }, - new - { - Id = 50, - DisplayName = "???", - DisplayShortName = "???", - Name = "dmail.plala.or.jp" - }, - new - { - Id = 51, - DisplayName = "EarthLink", - DisplayShortName = "EarthLink", - Documentation = "http://support.earthlink.net/email/email-server-settings.php", - Name = "earthlink.net" - }, - new - { - Id = 52, - DisplayName = "???", - DisplayShortName = "???", - Name = "ebony.plala.or.jp" - }, - new - { - Id = 53, - DisplayName = "email.it", - DisplayShortName = "email.it", - Documentation = "http://www.email.it/ita/config/thunder.php", - Name = "email.it" - }, - new - { - Id = 54, - DisplayName = "???", - DisplayShortName = "???", - Name = "email.plala.or.jp" - }, - new - { - Id = 55, - DisplayName = "EWE Tel", - DisplayShortName = "EWE Tel", - Name = "ewetel.de" - }, - new - { - Id = 56, - DisplayName = "???", - DisplayShortName = "???", - Name = "fantasy.plala.or.jp" - }, - new - { - Id = 57, - DisplayName = "???", - DisplayShortName = "???", - Name = "flamenco.plala.or.jp" - }, - new - { - Id = 58, - DisplayName = "???", - DisplayShortName = "???", - Name = "fmail.plala.or.jp" - }, - new - { - Id = 59, - DisplayName = "France Telecom / Orange", - DisplayShortName = "Orange", - Name = "francetelecom.fr" - }, - new - { - Id = 60, - DisplayName = "Free Telecom", - DisplayShortName = "free.fr", - Documentation = "http://www.free.fr/assistance/599-thunderbird.html", - Name = "free.fr" - }, - new - { - Id = 61, - DisplayName = "Freenet Mail", - DisplayShortName = "Freenet", - Name = "freenet.de" - }, - new - { - Id = 62, - DisplayName = "???", - DisplayShortName = "???", - Name = "fuga.plala.or.jp" - }, - new - { - Id = 63, - DisplayName = "Gandi Mail", - DisplayShortName = "Gandi", - Name = "gandi.net" - }, - new - { - Id = 64, - DisplayName = "???", - DisplayShortName = "???", - Name = "gmail.plala.or.jp" - }, - new - { - Id = 65, - DisplayName = "GMX Freemail", - DisplayShortName = "GMX", - Name = "gmx.com" - }, - new - { - Id = 66, - DisplayName = "GMX Freemail", - DisplayShortName = "GMX", - Name = "gmx.net" - }, - new - { - Id = 67, - DisplayName = "????????????????????", - DisplayShortName = "TVM-Net", - Name = "go.tvm.ne.jp" - }, - new - { - Id = 68, - DisplayName = "goo ????????", - DisplayShortName = "goo", - Name = "goo.jp" - }, - new - { - Id = 69, - DisplayName = "Google Mail", - DisplayShortName = "GMail", - Name = "googlemail.com" - }, - new - { - Id = 70, - DisplayName = "???", - DisplayShortName = "???", - Name = "grape.plala.or.jp" - }, - new - { - Id = 71, - DisplayName = "???", - DisplayShortName = "???", - Name = "gray.plala.or.jp" - }, - new - { - Id = 72, - DisplayName = "?????????", - DisplayShortName = "HAL", - Name = "hal.ne.jp" - }, - new - { - Id = 73, - DisplayName = "????????", - DisplayShortName = "????", - Name = "hana.or.jp" - }, - new - { - Id = 74, - DisplayName = "Microsoft Live Hotmail", - DisplayShortName = "Hotmail", - Name = "hotmail.com" - }, - new - { - Id = 75, - DisplayName = "SoftBank", - DisplayShortName = "SoftBank", - Name = "i.softbank.jp" - }, - new - { - Id = 76, - DisplayName = "IC-NET", - DisplayShortName = "IC-NET", - Name = "ic-net.or.jp" - }, - new - { - Id = 77, - DisplayName = "IIJmio ????????", - DisplayShortName = "IIJmio", - Name = "iijmio-mail.jp" - }, - new - { - Id = 78, - DisplayName = "???????i?????", - DisplayShortName = "i?????", - Name = "iiyama-catv.ne.jp" - }, - new - { - Id = 79, - DisplayName = "???", - DisplayShortName = "???", - Name = "imail.plala.or.jp" - }, - new - { - Id = 80, - DisplayName = "Inbox.lt", - DisplayShortName = "Inbox.lt", - Name = "inbox.lt" - }, - new - { - Id = 81, - DisplayName = "Inbox.lv", - DisplayShortName = "Inbox.lv", - Name = "inbox.lv" - }, - new - { - Id = 82, - DisplayName = "???", - DisplayShortName = "???", - Name = "indigo.plala.or.jp" - }, - new - { - Id = 83, - DisplayName = "??????????", - DisplayShortName = "INET-SHIBATA", - Name = "inet-shibata.or.jp" - }, - new - { - Id = 84, - DisplayName = "Internode", - DisplayShortName = "Internode", - Documentation = "http://www.internode.on.net/support/guides/email/secure_email/", - Name = "internode.on.net" - }, - new - { - Id = 85, - DisplayName = "IPAX Internet Services", - DisplayShortName = "IPAX", - Name = "ipax.at" - }, - new - { - Id = 86, - DisplayName = "???", - DisplayShortName = "???", - Name = "ivory.plala.or.jp" - }, - new - { - Id = 87, - DisplayName = "???????????", - DisplayShortName = "IWAFUNE", - Name = "iwafune.ne.jp" - }, - new - { - Id = 88, - DisplayName = "???", - DisplayShortName = "???", - Name = "jade.plala.or.jp" - }, - new - { - Id = 89, - DisplayName = "Janis", - DisplayShortName = "Janis", - Name = "janis.or.jp" - }, - new - { - Id = 90, - DisplayName = "JETINTERNET", - DisplayShortName = "JET", - Name = "jet.ne.jp" - }, - new - { - Id = 91, - DisplayName = "JETINTERNET", - DisplayShortName = "JET", - Name = "ji.jet.ne.jp" - }, - new - { - Id = 92, - DisplayName = "???", - DisplayShortName = "???", - Name = "jmail.plala.or.jp" - }, - new - { - Id = 93, - DisplayName = "Kabel Deutschland", - DisplayShortName = "Kabel D", - Name = "kabelmail.de" - }, - new - { - Id = 94, - DisplayName = "KELCOM Internet", - DisplayShortName = "KELCOM", - Name = "kelcom.net" - }, - new - { - Id = 95, - DisplayName = "???", - DisplayShortName = "???", - Name = "khaki.plala.or.jp" - }, - new - { - Id = 96, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "kl.wind.ne.jp" - }, - new - { - Id = 97, - DisplayName = "???", - DisplayShortName = "???", - Name = "kmail.plala.or.jp" - }, - new - { - Id = 98, - DisplayName = "????????????", - DisplayShortName = "?????", - Name = "kokuyou.ne.jp" - }, - new - { - Id = 99, - DisplayName = "???", - DisplayShortName = "???", - Name = "lapis.plala.or.jp" - }, - new - { - Id = 100, - DisplayName = "LaPoste", - DisplayShortName = "LaPoste", - Documentation = "http://www.geckozone.org/forum/viewtopic.php?f=4&t=93118", - Name = "laposte.net" - }, - new - { - Id = 101, - DisplayName = "???", - DisplayShortName = "???", - Name = "lemon.plala.or.jp" - }, - new - { - Id = 102, - DisplayName = "Libero Mail", - DisplayShortName = "Libero", - Documentation = "http://aiuto.libero.it/mail/istruzioni/configura-mozilla-thunderbird-per-windows-a11.phtml", - Name = "libero.it" - }, - new - { - Id = 103, - DisplayName = "???", - DisplayShortName = "???", - Name = "lilac.plala.or.jp" - }, - new - { - Id = 104, - DisplayName = "???", - DisplayShortName = "???", - Name = "lime.plala.or.jp" - }, - new - { - Id = 105, - DisplayName = "???????????", - DisplayShortName = "????", - Name = "mahoroba.ne.jp" - }, - new - { - Id = 106, - DisplayName = "mail.com", - DisplayShortName = "mail.com", - Name = "mail.com" - }, - new - { - Id = 107, - DisplayName = "TDC (DK)", - DisplayShortName = "TDC", - Name = "mail.dk" - }, - new - { - Id = 108, - DisplayName = "???????????", - DisplayShortName = "IWAFUNE", - Name = "mail.iwafune.ne.jp" - }, - new - { - Id = 109, - DisplayName = "mail.ru", - DisplayShortName = "mail.ru", - Name = "mail.ru" - }, - new - { - Id = 110, - DisplayName = "Telenor Danmark", - DisplayShortName = "Telenor", - Name = "mail.telenor.dk" - }, - new - { - Id = 111, - DisplayName = "?????????", - DisplayShortName = "???", - Name = "mail.wind.ne.jp" - }, - new - { - Id = 112, - DisplayName = "???", - DisplayShortName = "???", - Name = "maroon.plala.or.jp" - }, - new - { - Id = 113, - DisplayName = "Apple iCloud", - DisplayShortName = "Apple", - Name = "me.com" - }, - new - { - Id = 114, - DisplayName = "???", - DisplayShortName = "???", - Name = "minuet.plala.or.jp" - }, - new - { - Id = 115, - DisplayName = "???????????", - DisplayShortName = "IWAFUNE", - Name = "ml.murakami.ne.jp" - }, - new - { - Id = 116, - DisplayName = "Mnet ??? ????", - DisplayShortName = "Mnet???", - Name = "mnet.ne.jp" - }, - new - { - Id = 117, - DisplayName = "mopera U", - DisplayShortName = "mopera U", - Name = "'mopera.net" - }, - new - { - Id = 118, - DisplayName = "Mozilla Corporation and Mozilla Foundation internal email addresses", - DisplayShortName = "mozilla.com", - Name = "mozilla.com" - }, - new - { - Id = 119, - DisplayName = "TikiTiki???????", - DisplayShortName = "TikiTiki", - Name = "mx1.tiki.ne.jp" - }, - new - { - Id = 120, - DisplayName = "???", - DisplayShortName = "???", - Name = "navy.plala.or.jp" - }, - new - { - Id = 121, - DisplayName = "nctsoft", - DisplayShortName = "nct", - Name = "nctsoft.com" - }, - new - { - Id = 122, - DisplayName = "@nifty", - DisplayShortName = "@nifty", - Name = "nifty.com" - }, - new - { - Id = 123, - DisplayName = "BB????", - DisplayShortName = "NSAT", - Name = "nsat.jp" - }, - new - { - Id = 124, - DisplayName = "o2 Poczta", - DisplayShortName = "o2", - Name = "o2.pl" - }, - new - { - Id = 125, - DisplayName = "???", - DisplayShortName = "???", - Name = "olive.plala.or.jp" - }, - new - { - Id = 126, - DisplayName = "Poczta Onet", - DisplayShortName = "Onet", - Name = "onet.pl" - }, - new - { - Id = 127, - DisplayName = "???", - DisplayShortName = "???", - Name = "opal.plala.or.jp" - }, - new - { - Id = 128, - DisplayName = "???", - DisplayShortName = "???", - Name = "orange.plala.or.jp" - }, - new - { - Id = 129, - DisplayName = "???", - DisplayShortName = "???", - Name = "orchid.plala.or.jp" - }, - new - { - Id = 130, - DisplayName = "OVH", - DisplayShortName = "OVH", - Documentation = "http://guides.ovh.com/ConfigurationEmail", - Name = "ovh.net" - }, - new - { - Id = 131, - DisplayName = "????FTTH", - DisplayShortName = "????FTTH", - Name = "pal.kijimadaira.jp" - }, - new - { - Id = 132, - DisplayName = "???", - DisplayShortName = "???", - Name = "palette.plala.or.jp" - }, - new - { - Id = 133, - DisplayName = "??????", - DisplayShortName = "PARABOX", - Name = "parabox.or.jp" - }, - new - { - Id = 134, - DisplayName = "Portland State University Mail", - DisplayShortName = "PSU Mail", - Name = "pdx.edu" - }, - new - { - Id = 135, - DisplayName = "???", - DisplayShortName = "???", - Name = "peach.plala.or.jp" - }, - new - { - Id = 136, - DisplayName = "PeoplePC", - DisplayShortName = "PeoplePC", - Name = "peoplepc.com" - }, - new - { - Id = 137, - DisplayName = "???", - DisplayShortName = "???", - Name = "plum.plala.or.jp" - }, - new - { - Id = 138, - DisplayName = "DCN???????????", - DisplayShortName = "DCN", - Name = "po.dcn.ne.jp" - }, - new - { - Id = 139, - DisplayName = "'?????????", - DisplayShortName = "wind", - Name = "po.wind.ne.jp" - }, - new - { - Id = 140, - DisplayName = "???", - DisplayShortName = "???", - Name = "polka.plala.or.jp" - }, - new - { - Id = 141, - DisplayName = "??????????", - DisplayShortName = "INET-SHIBATA", - Name = "pop.shibata.ne.jp" - }, - new - { - Id = 142, - DisplayName = "Posteo", - DisplayShortName = "Posteo", - Name = "posteo.de" - }, - new - { - Id = 143, - DisplayName = "???", - DisplayShortName = "???", - Name = "purple.plala.or.jp" - }, - new - { - Id = 144, - DisplayName = "qip.ru", - DisplayShortName = "qip.ru", - Name = "qip.ru" - }, - new - { - Id = 145, - DisplayName = "???", - DisplayShortName = "???", - Name = "rainbow.plala.or.jp" - }, - new - { - Id = 146, - DisplayName = "Rambler Mail", - DisplayShortName = "Rambler", - Name = "rambler.ru" - }, - new - { - Id = 147, - DisplayName = "???", - DisplayShortName = "???", - Name = "red.plala.or.jp" - }, - new - { - Id = 148, - DisplayName = "???", - DisplayShortName = "???", - Name = "rmail.plala.or.jp" - }, - new - { - Id = 149, - DisplayName = "???", - DisplayShortName = "???", - Name = "rondo.plala.or.jp" - }, - new - { - Id = 150, - DisplayName = "???", - DisplayShortName = "???", - Name = "rose.plala.or.jp" - }, - new - { - Id = 151, - DisplayName = "???", - DisplayShortName = "???", - Name = "rouge.plala.or.jp" - }, - new - { - Id = 152, - DisplayName = "RoadRunner", - DisplayShortName = "RR", - Documentation = "http://help.rr.com/HMSFaqs/e_emailserveraddys.aspx", - Name = "rr.com" - }, - new - { - Id = 153, - DisplayName = "???", - DisplayShortName = "???", - Name = "ruby.plala.or.jp" - }, - new - { - Id = 154, - DisplayName = "?????????", - DisplayShortName = "Saku-Net", - Name = "sakunet.ne.jp" - }, - new - { - Id = 155, - DisplayName = "???", - DisplayShortName = "???", - Name = "sea.plala.or.jp" - }, - new - { - Id = 156, - DisplayName = "???", - DisplayShortName = "???", - Name = "sepia.plala.or.jp" - }, - new - { - Id = 157, - DisplayName = "???", - DisplayShortName = "???", - Name = "serenade.plala.or.jp" - }, - new - { - Id = 158, - DisplayName = "Seznam", - DisplayShortName = "Seznam", - Documentation = "http://napoveda.seznam.cz/cz/jake-jsou-adresy-pop3-a-smtp-serveru.html", - Name = "seznam.cz" - }, - new - { - Id = 159, - DisplayName = "SFR / Neuf", - DisplayShortName = "SFR", - Documentation = "http://assistance.sfr.fr/internet_neufbox-de-SFR/utiliser-email/parametrer-id-sfr/fc-505-50680", - Name = "sfr.fr" - }, - new - { - Id = 160, - DisplayName = "???", - DisplayShortName = "???", - Name = "silk.plala.or.jp" - }, - new - { - Id = 161, - DisplayName = "???", - DisplayShortName = "???", - Name = "silver.plala.or.jp" - }, - new - { - Id = 162, - DisplayName = "???", - DisplayShortName = "???", - Name = "sky.plala.or.jp" - }, - new - { - Id = 163, - DisplayName = "skynet", - DisplayShortName = "skynet", - Documentation = "http://support.en.belgacom.be/app/answers/detail/a_id/14337/kw/thunderbird", - Name = "skynet.be" - }, - new - { - Id = 164, - DisplayName = "???", - DisplayShortName = "???", - Name = "smail.plala.or.jp" - }, - new - { - Id = 165, - DisplayName = "???", - DisplayShortName = "???", - Name = "snow.plala.or.jp" - }, - new - { - Id = 166, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "so.wind.ne.jp" - }, - new - { - Id = 167, - DisplayName = "???", - DisplayShortName = "???", - Name = "sonata.plala.or.jp" - }, - new - { - Id = 168, - DisplayName = "Strato", - DisplayShortName = "Strato", - Name = "strato.de" - }, - new - { - Id = 169, - DisplayName = "Universita degli Studi di Verona", - DisplayShortName = "UniVR", - Name = "studenti.univr.it" - }, - new - { - Id = 170, - DisplayName = "???", - DisplayShortName = "???", - Name = "suite.plala.or.jp" - }, - new - { - Id = 171, - DisplayName = "Sympatico Email", - DisplayShortName = "Sympatico", - Documentation = "http://internet.bell.ca/index.cfm?method=content.view&category_id=585&content_id=12767", - Name = "sympatico.ca" - }, - new - { - Id = 172, - DisplayName = "???", - DisplayShortName = "???", - Name = "symphony.plala.or.jp" - }, - new - { - Id = 173, - DisplayName = "T-Online", - DisplayShortName = "T-Online", - Name = "t-online.de" - }, - new - { - Id = 174, - DisplayName = "???", - DisplayShortName = "???", - Name = "taupe.plala.or.jp" - }, - new - { - Id = 175, - DisplayName = "Correo Terra", - DisplayShortName = "Terra", - Name = "terra.es" - }, - new - { - Id = 176, - DisplayName = "TikiTiki???????", - DisplayShortName = "TikiTiki", - Name = "tiki.ne.jp" - }, - new - { - Id = 177, - DisplayName = "Tiscali", - DisplayShortName = "Tiscali", - Name = "tiscali.cz" - }, - new - { - Id = 178, - DisplayName = "Tiscali Italy", - DisplayShortName = "Tiscali", - Documentation = "http://assistenza.tiscali.it/tecnica/posta/configurazioni/", - Name = "tiscali.it" - }, - new - { - Id = 179, - DisplayName = "???", - DisplayShortName = "???", - Name = "tmail.plala.or.jp" - }, - new - { - Id = 180, - DisplayName = "???", - DisplayShortName = "???", - Name = "toccata.plala.or.jp" - }, - new - { - Id = 181, - DisplayName = "???", - DisplayShortName = "???", - Name = "topaz.plala.or.jp" - }, - new - { - Id = 182, - DisplayName = "???", - DisplayShortName = "???", - Name = "trio.plala.or.jp" - }, - new - { - Id = 183, - DisplayName = "???", - DisplayShortName = "???", - Name = "umail.plala.or.jp" - }, - new - { - Id = 184, - DisplayName = "UM ITCS Email", - DisplayShortName = "UM ITCS", - Name = "umich.edu" - }, - new - { - Id = 185, - DisplayName = "UPC Nederland", - DisplayShortName = "UPC", - Name = "upcmail.nl" - }, - new - { - Id = 186, - DisplayName = "Verizon Online", - DisplayShortName = "Verizon", - Name = "verizon.net" - }, - new - { - Id = 187, - DisplayName = "Versatel", - DisplayShortName = "Versatel", - Documentation = "http://www.versatel.de/hilfe/index_popup.php?einrichtung_email_programm", - Name = "versatel.de" - }, - new - { - Id = 188, - DisplayName = "???", - DisplayShortName = "???", - Name = "violet.plala.or.jp" - }, - new - { - Id = 189, - DisplayName = "aikis", - DisplayShortName = "aikis", - Name = "vm.aikis.or.jp" - }, - new - { - Id = 190, - DisplayName = "???", - DisplayShortName = "???", - Name = "vmail.plala.or.jp" - }, - new - { - Id = 191, - DisplayName = "TikiTiki???????", - DisplayShortName = "TikiTiki", - Name = "vp.tiki.ne.jp" - }, - new - { - Id = 192, - DisplayName = "???", - DisplayShortName = "???", - Name = "waltz.plala.or.jp" - }, - new - { - Id = 193, - DisplayName = "???", - DisplayShortName = "???", - Name = "wave.plala.or.jp" - }, - new - { - Id = 194, - DisplayName = "WEB.DE Freemail", - DisplayShortName = "Web.de", - Documentation = "http://hilfe.freemail.web.de/freemail/e-mail/pop3/thunderbird/", - Name = "web.de" - }, - new - { - Id = 195, - DisplayName = "???", - DisplayShortName = "???", - Name = "white.plala.or.jp" - }, - new - { - Id = 196, - DisplayName = "Your WildWest domain", - DisplayShortName = "WildWest", - Name = "wildwestdomains.com" - }, - new - { - Id = 197, - DisplayName = "???", - DisplayShortName = "???", - Name = "wine.plala.or.jp" - }, - new - { - Id = 198, - DisplayName = "???", - DisplayShortName = "???", - Name = "wmail.plala.or.jp" - }, - new - { - Id = 199, - DisplayName = "Poczta Wirtualna Polska", - DisplayShortName = "Poczta WP", - Name = "wp.pl" - }, - new - { - Id = 200, - DisplayName = "???", - DisplayShortName = "???", - Name = "xmail.plala.or.jp" - }, - new - { - Id = 201, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "xp.wind.jp" - }, - new - { - Id = 202, - DisplayName = "???", - DisplayShortName = "???", - Name = "xpost.plala.or.jp" - }, - new - { - Id = 203, - DisplayName = "XS4All", - DisplayShortName = "XS4All", - Name = "xs4all.nl" - }, - new - { - Id = 204, - DisplayName = "Yahoo! Mail", - DisplayShortName = "Yahoo", - Name = "xtra.co.nz" - }, - new - { - Id = 205, - DisplayName = "Yahoo! ???", - DisplayShortName = "Yahoo! ??? ", - Name = "yahoo.co.jp" - }, - new - { - Id = 206, - DisplayName = "Yahoo! Mail", - DisplayShortName = "Yahoo", - Name = "yahoo.com" - }, - new - { - Id = 207, - DisplayName = "Yandex Mail", - DisplayShortName = "Yandex", - Name = "yandex.ru" - }, - new - { - Id = 208, - DisplayName = "Yahoo! BB", - DisplayShortName = "Yahoo! BB", - Name = "ybb.ne.jp" - }, - new - { - Id = 209, - DisplayName = "???", - DisplayShortName = "???", - Name = "yellow.plala.or.jp" - }, - new - { - Id = 210, - DisplayName = "???", - DisplayShortName = "???", - Name = "ymail.plala.or.jp" - }, - new - { - Id = 211, - DisplayName = "???", - DisplayShortName = "???", - Name = "ypost.plala.or.jp" - }, - new - { - Id = 212, - DisplayName = "Ziggo", - DisplayShortName = "Ziggo", - Name = "ziggo.nl" - }, - new - { - Id = 213, - DisplayName = "???", - DisplayShortName = "???", - Name = "zmail.plala.or.jp" - }, - new - { - Id = 214, - DisplayName = "???", - DisplayShortName = "???", - Name = "zpost.plala.or.jp" - }, - new - { - Id = 215, - DisplayName = "avsmedia.com", - DisplayShortName = "avsmedia", - Name = "avsmedia.com" - }, - new - { - Id = 216, - DisplayName = "avsmedia.net", - DisplayShortName = "avsmedia", - Name = "avsmedia.net" - }, - new - { - Id = 218, - DisplayName = "ilearney.com", - DisplayShortName = "ilearney.com", - Name = "ilearney.com" - }, - new - { - Id = 219, - DisplayName = "fpl-technology.com", - DisplayShortName = "fpl-technology.com", - Documentation = "http://fpl-technology.com", - Name = "fpl -technology.com" - }, - new - { - Id = 220, - DisplayName = "Apple iCloud", - DisplayShortName = "Apple", - Name = "icloud.com" - }, - new - { - Id = 221, - DisplayName = "Microsoft Office 365", - DisplayShortName = "Office365", - Documentation = "https://products.office.com", - Name = "office365.com" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.MailboxServer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("Authentication") - .HasColumnType("longtext"); - - b.Property("Hostname") - .HasColumnType("longtext"); - - b.Property("IdProvider") - .HasColumnType("int"); - - b.Property("IsUserData") - .HasColumnType("tinyint(1)"); - - b.Property("Port") - .HasColumnType("int"); - - b.Property("SocketType") - .HasColumnType("longtext"); - - b.Property("Type") - .HasColumnType("longtext"); - - b.Property("UserName") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.ToTable("MailboxServer"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.ServerServer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ConnectionString") - .IsRequired() - .HasColumnType("text") - .HasColumnName("connection_string") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ImapSettingsId") - .HasColumnType("int") - .HasColumnName("imap_settings_id"); - - b.Property("MxRecord") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(128)") - .HasColumnName("mx_record") - .HasDefaultValueSql("''") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ServerType") - .HasColumnType("int") - .HasColumnName("server_type"); - - b.Property("SmtpSettingsId") - .HasColumnType("int") - .HasColumnName("smtp_settings_id"); - - b.HasKey("Id"); - - b.HasIndex("ServerType") - .HasDatabaseName("mail_server_server_type_server_type_fk_id"); - - b.ToTable("mail_server_server"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/MailDbContextPostgreSql/20211012145333_MailDbContextPostgreSql.cs b/common/ASC.Core.Common/Migrations/PostgreSql/MailDbContextPostgreSql/20211012145333_MailDbContextPostgreSql.cs deleted file mode 100644 index de9fc866de..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/MailDbContextPostgreSql/20211012145333_MailDbContextPostgreSql.cs +++ /dev/null @@ -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.PostgreSql.MailDbContextPostgreSql; - -public partial class MailDbContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ApiKeys", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - AccessToken = table.Column(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(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Source = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - tenant = table.Column(type: "int", nullable: false), - id_user = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - address = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - name = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - enabled = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"), - is_removed = table.Column(type: "tinyint(1)", nullable: false), - is_processed = table.Column(type: "tinyint(1)", nullable: false), - is_server_mailbox = table.Column(type: "tinyint(1)", nullable: false), - IsTeamlabMailbox = table.Column(type: "tinyint(1)", nullable: false), - imap = table.Column(type: "tinyint(1)", nullable: false), - user_online = table.Column(type: "tinyint(1)", nullable: false), - is_default = table.Column(type: "tinyint(1)", nullable: false), - msg_count_last = table.Column(type: "int", nullable: false), - size_last = table.Column(type: "int", nullable: false), - login_delay = table.Column(type: "int", nullable: false, defaultValueSql: "'30'"), - quota_error = table.Column(type: "tinyint(1)", nullable: false), - imap_intervals = table.Column(type: "mediumtext", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - begin_date = table.Column(type: "timestamp", nullable: false, defaultValueSql: "'1975-01-01 00:00:00'"), - email_in_folder = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - pop3_password = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - smtp_password = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - token_type = table.Column(type: "int", nullable: false), - token = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - id_smtp_server = table.Column(type: "int", nullable: false), - id_in_server = table.Column(type: "int", nullable: false), - date_checked = table.Column(type: "datetime", nullable: false), - date_user_checked = table.Column(type: "datetime", nullable: false), - date_login_delay_expires = table.Column(type: "datetime", nullable: false, defaultValueSql: "'1975-01-01 00:00:00'"), - date_auth_error = table.Column(type: "datetime", nullable: true), - date_created = table.Column(type: "datetime", nullable: false), - date_modified = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - display_name = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - display_short_name = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - documentation = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - mx_record = table.Column(type: "varchar(128)", nullable: false, defaultValueSql: "''", collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - connection_string = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - server_type = table.Column(type: "int", nullable: false), - smtp_settings_id = table.Column(type: "int", nullable: false), - imap_settings_id = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - IdProvider = table.Column(type: "int", nullable: false), - Type = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Hostname = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Port = table.Column(type: "int", nullable: false), - SocketType = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - UserName = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Authentication = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - IsUserData = table.Column(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"); - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/MailDbContextPostgreSql/PostgreSqlMailDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/PostgreSql/MailDbContextPostgreSql/PostgreSqlMailDbContextModelSnapshot.cs deleted file mode 100644 index bdee36188f..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/MailDbContextPostgreSql/PostgreSqlMailDbContextModelSnapshot.cs +++ /dev/null @@ -1,1903 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.MailDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlMailDbContext))] - partial class PostgreSqlMailDbContextModelSnapshot : 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.Mail.ApiKeys", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("AccessToken") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.ToTable("ApiKeys"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.GreyListingWhiteList", b => - { - b.Property("Comment") - .HasColumnType("varchar(255)"); - - b.Property("Source") - .HasColumnType("longtext"); - - b.HasKey("Comment"); - - b.ToTable("GreyListingWhiteList"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.Mailbox", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Address") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("address") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("BeginDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("begin_date") - .HasDefaultValueSql("'1975-01-01 00:00:00'"); - - b.Property("DateAuthError") - .HasColumnType("datetime") - .HasColumnName("date_auth_error"); - - b.Property("DateChecked") - .HasColumnType("datetime") - .HasColumnName("date_checked"); - - b.Property("DateCreated") - .HasColumnType("datetime") - .HasColumnName("date_created"); - - b.Property("DateLoginDelayExpires") - .ValueGeneratedOnAdd() - .HasColumnType("datetime") - .HasColumnName("date_login_delay_expires") - .HasDefaultValueSql("'1975-01-01 00:00:00'"); - - b.Property("DateModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("date_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DateUserChecked") - .HasColumnType("datetime") - .HasColumnName("date_user_checked"); - - b.Property("EmailInFolder") - .HasColumnType("text") - .HasColumnName("email_in_folder") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Enabled") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("enabled") - .HasDefaultValueSql("'1'"); - - b.Property("IdInServer") - .HasColumnType("int") - .HasColumnName("id_in_server"); - - b.Property("IdSmtpServer") - .HasColumnType("int") - .HasColumnName("id_smtp_server"); - - b.Property("IdUser") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("id_user") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Imap") - .HasColumnType("tinyint(1)") - .HasColumnName("imap"); - - b.Property("ImapIntervals") - .HasColumnType("mediumtext") - .HasColumnName("imap_intervals") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("IsDefault") - .HasColumnType("tinyint(1)") - .HasColumnName("is_default"); - - b.Property("IsProcessed") - .HasColumnType("tinyint(1)") - .HasColumnName("is_processed"); - - b.Property("IsRemoved") - .HasColumnType("tinyint(1)") - .HasColumnName("is_removed"); - - b.Property("IsServerMailbox") - .HasColumnType("tinyint(1)") - .HasColumnName("is_server_mailbox"); - - b.Property("IsTeamlabMailbox") - .HasColumnType("tinyint(1)"); - - b.Property("LoginDelay") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("login_delay") - .HasDefaultValueSql("'30'"); - - b.Property("MsgCountLast") - .HasColumnType("int") - .HasColumnName("msg_count_last"); - - b.Property("Name") - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Pop3Password") - .HasColumnType("varchar(255)") - .HasColumnName("pop3_password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("QuotaError") - .HasColumnType("tinyint(1)") - .HasColumnName("quota_error"); - - b.Property("SizeLast") - .HasColumnType("int") - .HasColumnName("size_last"); - - b.Property("SmtpPassword") - .HasColumnType("varchar(255)") - .HasColumnName("smtp_password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TokenType") - .HasColumnType("int") - .HasColumnName("token_type"); - - b.Property("UserOnline") - .HasColumnType("tinyint(1)") - .HasColumnName("user_online"); - - b.HasKey("Id"); - - b.HasIndex("Address") - .HasDatabaseName("address_index"); - - b.HasIndex("IdInServer") - .HasDatabaseName("main_mailbox_id_in_server_mail_mailbox_server_id"); - - b.HasIndex("IdSmtpServer") - .HasDatabaseName("main_mailbox_id_smtp_server_mail_mailbox_server_id"); - - b.HasIndex("DateChecked", "DateLoginDelayExpires") - .HasDatabaseName("date_login_delay_expires"); - - b.HasIndex("Tenant", "IdUser") - .HasDatabaseName("user_id_index"); - - b.ToTable("mail_mailbox"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.MailboxProvider", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DisplayName") - .HasColumnType("varchar(255)") - .HasColumnName("display_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("DisplayShortName") - .HasColumnType("varchar(255)") - .HasColumnName("display_short_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Documentation") - .HasColumnType("varchar(255)") - .HasColumnName("documentation") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.ToTable("mail_mailbox_provider"); - - b.HasData( - new - { - Id = 1, - DisplayName = "1&1", - DisplayShortName = "1&1", - Documentation = "http://hilfe-center.1und1.de/access/search/go.php?t=e698123", - Name = "1und1.de" - }, - new - { - Id = 2, - DisplayName = "???", - DisplayShortName = "???", - Name = "abc.plala.or.jp" - }, - new - { - Id = 3, - DisplayName = "???", - DisplayShortName = "???", - Name = "agate.plala.or.jp" - }, - new - { - Id = 4, - DisplayName = "Alice Italy", - DisplayShortName = "Alice", - Documentation = "http://aiuto.alice.it/informazioni/clientemail/thunderbird.html", - Name = "alice.it" - }, - new - { - Id = 5, - DisplayName = "???", - DisplayShortName = "???", - Name = "amail.plala.or.jp" - }, - new - { - Id = 6, - DisplayName = "???", - DisplayShortName = "???", - Name = "amber.plala.or.jp" - }, - new - { - Id = 7, - DisplayName = "AOL Mail", - DisplayShortName = "AOL", - Name = "aol.com" - }, - new - { - Id = 8, - DisplayName = "???", - DisplayShortName = "???", - Name = "apost.plala.or.jp" - }, - new - { - Id = 9, - DisplayName = "???", - DisplayShortName = "???", - Name = "aqua.plala.or.jp" - }, - new - { - Id = 10, - DisplayName = "Arcor", - DisplayShortName = "Arcor", - Name = "arcor.de" - }, - new - { - Id = 11, - DisplayName = "Aruba PEC", - DisplayShortName = "Aruba", - Documentation = "http://pec.aruba.it/guide_filmate.asp", - Name = "arubapec.it" - }, - new - { - Id = 12, - DisplayName = "AT&T", - DisplayShortName = "AT&T", - Documentation = "http://www.att.com/esupport/article.jsp?sid=KB401570&ct=9000152", - Name = "att.net" - }, - new - { - Id = 13, - DisplayName = "???", - DisplayShortName = "???", - Name = "ballade.plala.or.jp" - }, - new - { - Id = 14, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "bay.wind.ne.jp" - }, - new - { - Id = 15, - DisplayName = "BB????", - DisplayShortName = "BB-NIIGATA", - Name = "bb-niigata.jp" - }, - new - { - Id = 16, - DisplayName = "???", - DisplayShortName = "???", - Name = "beige.plala.or.jp" - }, - new - { - Id = 17, - DisplayName = "Biglobe", - DisplayShortName = "Biglobe", - Name = "biglobe.ne.jp" - }, - new - { - Id = 18, - DisplayName = "Telstra Bigpond", - DisplayShortName = "Bigpond", - Name = "bigpond.com" - }, - new - { - Id = 19, - DisplayName = "???", - DisplayShortName = "???", - Name = "blue.plala.or.jp" - }, - new - { - Id = 20, - DisplayName = "bluewin.ch", - DisplayShortName = "bluewin.ch", - Documentation = "http://smtphelp.bluewin.ch/swisscomdtg/setup/?", - Name = "bluemail.ch" - }, - new - { - Id = 21, - DisplayName = "bluewin.ch", - DisplayShortName = "bluewin.ch", - Documentation = "http://smtphelp.bluewin.ch/swisscomdtg/setup/", - Name = "bluewin.ch" - }, - new - { - Id = 22, - DisplayName = "???", - DisplayShortName = "???", - Name = "bmail.plala.or.jp" - }, - new - { - Id = 23, - DisplayName = "???", - DisplayShortName = "???", - Name = "bolero.plala.or.jp" - }, - new - { - Id = 24, - DisplayName = "???", - DisplayShortName = "???", - Name = "bpost.plala.or.jp" - }, - new - { - Id = 25, - DisplayName = "???", - DisplayShortName = "???", - Name = "broba.cc" - }, - new - { - Id = 26, - DisplayName = "???", - DisplayShortName = "???", - Name = "brown.plala.or.jp" - }, - new - { - Id = 27, - DisplayName = "???", - DisplayShortName = "???", - Name = "camel.plala.or.jp" - }, - new - { - Id = 28, - DisplayName = "???", - DisplayShortName = "???", - Name = "cameo.plala.or.jp" - }, - new - { - Id = 29, - DisplayName = "CC9???????????", - DisplayShortName = "CC9", - Name = "cc9.ne.jp" - }, - new - { - Id = 30, - DisplayName = "???????????", - DisplayShortName = "CEK-Net", - Name = "cek.ne.jp" - }, - new - { - Id = 31, - DisplayName = "UCSF CGL email", - DisplayShortName = "CGL emai", - Name = "cgl.ucsf.edu" - }, - new - { - Id = 32, - DisplayName = "Charter Commuications", - DisplayShortName = "Charter", - Name = "charter.com" - }, - new - { - Id = 33, - DisplayName = "CLIO-Net??????", - DisplayShortName = "CLIO-Net", - Name = "clio.ne.jp" - }, - new - { - Id = 34, - DisplayName = "???", - DisplayShortName = "???", - Name = "cmail.plala.or.jp" - }, - new - { - Id = 35, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "co1.wind.ne.jp" - }, - new - { - Id = 36, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "co2.wind.ne.jp" - }, - new - { - Id = 37, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "co3.wind.ne.jp" - }, - new - { - Id = 38, - DisplayName = "???", - DisplayShortName = "???", - Name = "cocoa.plala.or.jp" - }, - new - { - Id = 39, - DisplayName = "???", - DisplayShortName = "Arcor", - Name = "coda.plala.or.jp" - }, - new - { - Id = 40, - DisplayName = "???", - DisplayShortName = "Comcast", - Name = "comcast.net" - }, - new - { - Id = 41, - DisplayName = "???", - DisplayShortName = "???", - Name = "concerto.plala.or.jp" - }, - new - { - Id = 42, - DisplayName = "???", - DisplayShortName = "???", - Name = "coral.plala.or.jp" - }, - new - { - Id = 43, - DisplayName = "???", - DisplayShortName = "???", - Name = "courante.plala.or.jp" - }, - new - { - Id = 44, - DisplayName = "???", - DisplayShortName = "???", - Name = "cpost.plala.or.jp" - }, - new - { - Id = 45, - DisplayName = "???", - DisplayShortName = "???", - Name = "cream.plala.or.jp" - }, - new - { - Id = 46, - DisplayName = "???", - DisplayShortName = "wind", - Name = "dan.wind.ne.jp" - }, - new - { - Id = 47, - DisplayName = "???", - DisplayShortName = "???", - Name = "dance.plala.or.jp" - }, - new - { - Id = 48, - DisplayName = "IIJ4U", - DisplayShortName = "???", - Name = "dd.iij4u.or.jp" - }, - new - { - Id = 49, - DisplayName = "domainFACTORY", - DisplayShortName = "domainFACTORY", - Documentation = "http://www.df.eu/de/service/df-faq/e-mail/mail-programme/", - Name = "df.eu" - }, - new - { - Id = 50, - DisplayName = "???", - DisplayShortName = "???", - Name = "dmail.plala.or.jp" - }, - new - { - Id = 51, - DisplayName = "EarthLink", - DisplayShortName = "EarthLink", - Documentation = "http://support.earthlink.net/email/email-server-settings.php", - Name = "earthlink.net" - }, - new - { - Id = 52, - DisplayName = "???", - DisplayShortName = "???", - Name = "ebony.plala.or.jp" - }, - new - { - Id = 53, - DisplayName = "email.it", - DisplayShortName = "email.it", - Documentation = "http://www.email.it/ita/config/thunder.php", - Name = "email.it" - }, - new - { - Id = 54, - DisplayName = "???", - DisplayShortName = "???", - Name = "email.plala.or.jp" - }, - new - { - Id = 55, - DisplayName = "EWE Tel", - DisplayShortName = "EWE Tel", - Name = "ewetel.de" - }, - new - { - Id = 56, - DisplayName = "???", - DisplayShortName = "???", - Name = "fantasy.plala.or.jp" - }, - new - { - Id = 57, - DisplayName = "???", - DisplayShortName = "???", - Name = "flamenco.plala.or.jp" - }, - new - { - Id = 58, - DisplayName = "???", - DisplayShortName = "???", - Name = "fmail.plala.or.jp" - }, - new - { - Id = 59, - DisplayName = "France Telecom / Orange", - DisplayShortName = "Orange", - Name = "francetelecom.fr" - }, - new - { - Id = 60, - DisplayName = "Free Telecom", - DisplayShortName = "free.fr", - Documentation = "http://www.free.fr/assistance/599-thunderbird.html", - Name = "free.fr" - }, - new - { - Id = 61, - DisplayName = "Freenet Mail", - DisplayShortName = "Freenet", - Name = "freenet.de" - }, - new - { - Id = 62, - DisplayName = "???", - DisplayShortName = "???", - Name = "fuga.plala.or.jp" - }, - new - { - Id = 63, - DisplayName = "Gandi Mail", - DisplayShortName = "Gandi", - Name = "gandi.net" - }, - new - { - Id = 64, - DisplayName = "???", - DisplayShortName = "???", - Name = "gmail.plala.or.jp" - }, - new - { - Id = 65, - DisplayName = "GMX Freemail", - DisplayShortName = "GMX", - Name = "gmx.com" - }, - new - { - Id = 66, - DisplayName = "GMX Freemail", - DisplayShortName = "GMX", - Name = "gmx.net" - }, - new - { - Id = 67, - DisplayName = "????????????????????", - DisplayShortName = "TVM-Net", - Name = "go.tvm.ne.jp" - }, - new - { - Id = 68, - DisplayName = "goo ????????", - DisplayShortName = "goo", - Name = "goo.jp" - }, - new - { - Id = 69, - DisplayName = "Google Mail", - DisplayShortName = "GMail", - Name = "googlemail.com" - }, - new - { - Id = 70, - DisplayName = "???", - DisplayShortName = "???", - Name = "grape.plala.or.jp" - }, - new - { - Id = 71, - DisplayName = "???", - DisplayShortName = "???", - Name = "gray.plala.or.jp" - }, - new - { - Id = 72, - DisplayName = "?????????", - DisplayShortName = "HAL", - Name = "hal.ne.jp" - }, - new - { - Id = 73, - DisplayName = "????????", - DisplayShortName = "????", - Name = "hana.or.jp" - }, - new - { - Id = 74, - DisplayName = "Microsoft Live Hotmail", - DisplayShortName = "Hotmail", - Name = "hotmail.com" - }, - new - { - Id = 75, - DisplayName = "SoftBank", - DisplayShortName = "SoftBank", - Name = "i.softbank.jp" - }, - new - { - Id = 76, - DisplayName = "IC-NET", - DisplayShortName = "IC-NET", - Name = "ic-net.or.jp" - }, - new - { - Id = 77, - DisplayName = "IIJmio ????????", - DisplayShortName = "IIJmio", - Name = "iijmio-mail.jp" - }, - new - { - Id = 78, - DisplayName = "???????i?????", - DisplayShortName = "i?????", - Name = "iiyama-catv.ne.jp" - }, - new - { - Id = 79, - DisplayName = "???", - DisplayShortName = "???", - Name = "imail.plala.or.jp" - }, - new - { - Id = 80, - DisplayName = "Inbox.lt", - DisplayShortName = "Inbox.lt", - Name = "inbox.lt" - }, - new - { - Id = 81, - DisplayName = "Inbox.lv", - DisplayShortName = "Inbox.lv", - Name = "inbox.lv" - }, - new - { - Id = 82, - DisplayName = "???", - DisplayShortName = "???", - Name = "indigo.plala.or.jp" - }, - new - { - Id = 83, - DisplayName = "??????????", - DisplayShortName = "INET-SHIBATA", - Name = "inet-shibata.or.jp" - }, - new - { - Id = 84, - DisplayName = "Internode", - DisplayShortName = "Internode", - Documentation = "http://www.internode.on.net/support/guides/email/secure_email/", - Name = "internode.on.net" - }, - new - { - Id = 85, - DisplayName = "IPAX Internet Services", - DisplayShortName = "IPAX", - Name = "ipax.at" - }, - new - { - Id = 86, - DisplayName = "???", - DisplayShortName = "???", - Name = "ivory.plala.or.jp" - }, - new - { - Id = 87, - DisplayName = "???????????", - DisplayShortName = "IWAFUNE", - Name = "iwafune.ne.jp" - }, - new - { - Id = 88, - DisplayName = "???", - DisplayShortName = "???", - Name = "jade.plala.or.jp" - }, - new - { - Id = 89, - DisplayName = "Janis", - DisplayShortName = "Janis", - Name = "janis.or.jp" - }, - new - { - Id = 90, - DisplayName = "JETINTERNET", - DisplayShortName = "JET", - Name = "jet.ne.jp" - }, - new - { - Id = 91, - DisplayName = "JETINTERNET", - DisplayShortName = "JET", - Name = "ji.jet.ne.jp" - }, - new - { - Id = 92, - DisplayName = "???", - DisplayShortName = "???", - Name = "jmail.plala.or.jp" - }, - new - { - Id = 93, - DisplayName = "Kabel Deutschland", - DisplayShortName = "Kabel D", - Name = "kabelmail.de" - }, - new - { - Id = 94, - DisplayName = "KELCOM Internet", - DisplayShortName = "KELCOM", - Name = "kelcom.net" - }, - new - { - Id = 95, - DisplayName = "???", - DisplayShortName = "???", - Name = "khaki.plala.or.jp" - }, - new - { - Id = 96, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "kl.wind.ne.jp" - }, - new - { - Id = 97, - DisplayName = "???", - DisplayShortName = "???", - Name = "kmail.plala.or.jp" - }, - new - { - Id = 98, - DisplayName = "????????????", - DisplayShortName = "?????", - Name = "kokuyou.ne.jp" - }, - new - { - Id = 99, - DisplayName = "???", - DisplayShortName = "???", - Name = "lapis.plala.or.jp" - }, - new - { - Id = 100, - DisplayName = "LaPoste", - DisplayShortName = "LaPoste", - Documentation = "http://www.geckozone.org/forum/viewtopic.php?f=4&t=93118", - Name = "laposte.net" - }, - new - { - Id = 101, - DisplayName = "???", - DisplayShortName = "???", - Name = "lemon.plala.or.jp" - }, - new - { - Id = 102, - DisplayName = "Libero Mail", - DisplayShortName = "Libero", - Documentation = "http://aiuto.libero.it/mail/istruzioni/configura-mozilla-thunderbird-per-windows-a11.phtml", - Name = "libero.it" - }, - new - { - Id = 103, - DisplayName = "???", - DisplayShortName = "???", - Name = "lilac.plala.or.jp" - }, - new - { - Id = 104, - DisplayName = "???", - DisplayShortName = "???", - Name = "lime.plala.or.jp" - }, - new - { - Id = 105, - DisplayName = "???????????", - DisplayShortName = "????", - Name = "mahoroba.ne.jp" - }, - new - { - Id = 106, - DisplayName = "mail.com", - DisplayShortName = "mail.com", - Name = "mail.com" - }, - new - { - Id = 107, - DisplayName = "TDC (DK)", - DisplayShortName = "TDC", - Name = "mail.dk" - }, - new - { - Id = 108, - DisplayName = "???????????", - DisplayShortName = "IWAFUNE", - Name = "mail.iwafune.ne.jp" - }, - new - { - Id = 109, - DisplayName = "mail.ru", - DisplayShortName = "mail.ru", - Name = "mail.ru" - }, - new - { - Id = 110, - DisplayName = "Telenor Danmark", - DisplayShortName = "Telenor", - Name = "mail.telenor.dk" - }, - new - { - Id = 111, - DisplayName = "?????????", - DisplayShortName = "???", - Name = "mail.wind.ne.jp" - }, - new - { - Id = 112, - DisplayName = "???", - DisplayShortName = "???", - Name = "maroon.plala.or.jp" - }, - new - { - Id = 113, - DisplayName = "Apple iCloud", - DisplayShortName = "Apple", - Name = "me.com" - }, - new - { - Id = 114, - DisplayName = "???", - DisplayShortName = "???", - Name = "minuet.plala.or.jp" - }, - new - { - Id = 115, - DisplayName = "???????????", - DisplayShortName = "IWAFUNE", - Name = "ml.murakami.ne.jp" - }, - new - { - Id = 116, - DisplayName = "Mnet ??? ????", - DisplayShortName = "Mnet???", - Name = "mnet.ne.jp" - }, - new - { - Id = 117, - DisplayName = "mopera U", - DisplayShortName = "mopera U", - Name = "'mopera.net" - }, - new - { - Id = 118, - DisplayName = "Mozilla Corporation and Mozilla Foundation internal email addresses", - DisplayShortName = "mozilla.com", - Name = "mozilla.com" - }, - new - { - Id = 119, - DisplayName = "TikiTiki???????", - DisplayShortName = "TikiTiki", - Name = "mx1.tiki.ne.jp" - }, - new - { - Id = 120, - DisplayName = "???", - DisplayShortName = "???", - Name = "navy.plala.or.jp" - }, - new - { - Id = 121, - DisplayName = "nctsoft", - DisplayShortName = "nct", - Name = "nctsoft.com" - }, - new - { - Id = 122, - DisplayName = "@nifty", - DisplayShortName = "@nifty", - Name = "nifty.com" - }, - new - { - Id = 123, - DisplayName = "BB????", - DisplayShortName = "NSAT", - Name = "nsat.jp" - }, - new - { - Id = 124, - DisplayName = "o2 Poczta", - DisplayShortName = "o2", - Name = "o2.pl" - }, - new - { - Id = 125, - DisplayName = "???", - DisplayShortName = "???", - Name = "olive.plala.or.jp" - }, - new - { - Id = 126, - DisplayName = "Poczta Onet", - DisplayShortName = "Onet", - Name = "onet.pl" - }, - new - { - Id = 127, - DisplayName = "???", - DisplayShortName = "???", - Name = "opal.plala.or.jp" - }, - new - { - Id = 128, - DisplayName = "???", - DisplayShortName = "???", - Name = "orange.plala.or.jp" - }, - new - { - Id = 129, - DisplayName = "???", - DisplayShortName = "???", - Name = "orchid.plala.or.jp" - }, - new - { - Id = 130, - DisplayName = "OVH", - DisplayShortName = "OVH", - Documentation = "http://guides.ovh.com/ConfigurationEmail", - Name = "ovh.net" - }, - new - { - Id = 131, - DisplayName = "????FTTH", - DisplayShortName = "????FTTH", - Name = "pal.kijimadaira.jp" - }, - new - { - Id = 132, - DisplayName = "???", - DisplayShortName = "???", - Name = "palette.plala.or.jp" - }, - new - { - Id = 133, - DisplayName = "??????", - DisplayShortName = "PARABOX", - Name = "parabox.or.jp" - }, - new - { - Id = 134, - DisplayName = "Portland State University Mail", - DisplayShortName = "PSU Mail", - Name = "pdx.edu" - }, - new - { - Id = 135, - DisplayName = "???", - DisplayShortName = "???", - Name = "peach.plala.or.jp" - }, - new - { - Id = 136, - DisplayName = "PeoplePC", - DisplayShortName = "PeoplePC", - Name = "peoplepc.com" - }, - new - { - Id = 137, - DisplayName = "???", - DisplayShortName = "???", - Name = "plum.plala.or.jp" - }, - new - { - Id = 138, - DisplayName = "DCN???????????", - DisplayShortName = "DCN", - Name = "po.dcn.ne.jp" - }, - new - { - Id = 139, - DisplayName = "'?????????", - DisplayShortName = "wind", - Name = "po.wind.ne.jp" - }, - new - { - Id = 140, - DisplayName = "???", - DisplayShortName = "???", - Name = "polka.plala.or.jp" - }, - new - { - Id = 141, - DisplayName = "??????????", - DisplayShortName = "INET-SHIBATA", - Name = "pop.shibata.ne.jp" - }, - new - { - Id = 142, - DisplayName = "Posteo", - DisplayShortName = "Posteo", - Name = "posteo.de" - }, - new - { - Id = 143, - DisplayName = "???", - DisplayShortName = "???", - Name = "purple.plala.or.jp" - }, - new - { - Id = 144, - DisplayName = "qip.ru", - DisplayShortName = "qip.ru", - Name = "qip.ru" - }, - new - { - Id = 145, - DisplayName = "???", - DisplayShortName = "???", - Name = "rainbow.plala.or.jp" - }, - new - { - Id = 146, - DisplayName = "Rambler Mail", - DisplayShortName = "Rambler", - Name = "rambler.ru" - }, - new - { - Id = 147, - DisplayName = "???", - DisplayShortName = "???", - Name = "red.plala.or.jp" - }, - new - { - Id = 148, - DisplayName = "???", - DisplayShortName = "???", - Name = "rmail.plala.or.jp" - }, - new - { - Id = 149, - DisplayName = "???", - DisplayShortName = "???", - Name = "rondo.plala.or.jp" - }, - new - { - Id = 150, - DisplayName = "???", - DisplayShortName = "???", - Name = "rose.plala.or.jp" - }, - new - { - Id = 151, - DisplayName = "???", - DisplayShortName = "???", - Name = "rouge.plala.or.jp" - }, - new - { - Id = 152, - DisplayName = "RoadRunner", - DisplayShortName = "RR", - Documentation = "http://help.rr.com/HMSFaqs/e_emailserveraddys.aspx", - Name = "rr.com" - }, - new - { - Id = 153, - DisplayName = "???", - DisplayShortName = "???", - Name = "ruby.plala.or.jp" - }, - new - { - Id = 154, - DisplayName = "?????????", - DisplayShortName = "Saku-Net", - Name = "sakunet.ne.jp" - }, - new - { - Id = 155, - DisplayName = "???", - DisplayShortName = "???", - Name = "sea.plala.or.jp" - }, - new - { - Id = 156, - DisplayName = "???", - DisplayShortName = "???", - Name = "sepia.plala.or.jp" - }, - new - { - Id = 157, - DisplayName = "???", - DisplayShortName = "???", - Name = "serenade.plala.or.jp" - }, - new - { - Id = 158, - DisplayName = "Seznam", - DisplayShortName = "Seznam", - Documentation = "http://napoveda.seznam.cz/cz/jake-jsou-adresy-pop3-a-smtp-serveru.html", - Name = "seznam.cz" - }, - new - { - Id = 159, - DisplayName = "SFR / Neuf", - DisplayShortName = "SFR", - Documentation = "http://assistance.sfr.fr/internet_neufbox-de-SFR/utiliser-email/parametrer-id-sfr/fc-505-50680", - Name = "sfr.fr" - }, - new - { - Id = 160, - DisplayName = "???", - DisplayShortName = "???", - Name = "silk.plala.or.jp" - }, - new - { - Id = 161, - DisplayName = "???", - DisplayShortName = "???", - Name = "silver.plala.or.jp" - }, - new - { - Id = 162, - DisplayName = "???", - DisplayShortName = "???", - Name = "sky.plala.or.jp" - }, - new - { - Id = 163, - DisplayName = "skynet", - DisplayShortName = "skynet", - Documentation = "http://support.en.belgacom.be/app/answers/detail/a_id/14337/kw/thunderbird", - Name = "skynet.be" - }, - new - { - Id = 164, - DisplayName = "???", - DisplayShortName = "???", - Name = "smail.plala.or.jp" - }, - new - { - Id = 165, - DisplayName = "???", - DisplayShortName = "???", - Name = "snow.plala.or.jp" - }, - new - { - Id = 166, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "so.wind.ne.jp" - }, - new - { - Id = 167, - DisplayName = "???", - DisplayShortName = "???", - Name = "sonata.plala.or.jp" - }, - new - { - Id = 168, - DisplayName = "Strato", - DisplayShortName = "Strato", - Name = "strato.de" - }, - new - { - Id = 169, - DisplayName = "Universita degli Studi di Verona", - DisplayShortName = "UniVR", - Name = "studenti.univr.it" - }, - new - { - Id = 170, - DisplayName = "???", - DisplayShortName = "???", - Name = "suite.plala.or.jp" - }, - new - { - Id = 171, - DisplayName = "Sympatico Email", - DisplayShortName = "Sympatico", - Documentation = "http://internet.bell.ca/index.cfm?method=content.view&category_id=585&content_id=12767", - Name = "sympatico.ca" - }, - new - { - Id = 172, - DisplayName = "???", - DisplayShortName = "???", - Name = "symphony.plala.or.jp" - }, - new - { - Id = 173, - DisplayName = "T-Online", - DisplayShortName = "T-Online", - Name = "t-online.de" - }, - new - { - Id = 174, - DisplayName = "???", - DisplayShortName = "???", - Name = "taupe.plala.or.jp" - }, - new - { - Id = 175, - DisplayName = "Correo Terra", - DisplayShortName = "Terra", - Name = "terra.es" - }, - new - { - Id = 176, - DisplayName = "TikiTiki???????", - DisplayShortName = "TikiTiki", - Name = "tiki.ne.jp" - }, - new - { - Id = 177, - DisplayName = "Tiscali", - DisplayShortName = "Tiscali", - Name = "tiscali.cz" - }, - new - { - Id = 178, - DisplayName = "Tiscali Italy", - DisplayShortName = "Tiscali", - Documentation = "http://assistenza.tiscali.it/tecnica/posta/configurazioni/", - Name = "tiscali.it" - }, - new - { - Id = 179, - DisplayName = "???", - DisplayShortName = "???", - Name = "tmail.plala.or.jp" - }, - new - { - Id = 180, - DisplayName = "???", - DisplayShortName = "???", - Name = "toccata.plala.or.jp" - }, - new - { - Id = 181, - DisplayName = "???", - DisplayShortName = "???", - Name = "topaz.plala.or.jp" - }, - new - { - Id = 182, - DisplayName = "???", - DisplayShortName = "???", - Name = "trio.plala.or.jp" - }, - new - { - Id = 183, - DisplayName = "???", - DisplayShortName = "???", - Name = "umail.plala.or.jp" - }, - new - { - Id = 184, - DisplayName = "UM ITCS Email", - DisplayShortName = "UM ITCS", - Name = "umich.edu" - }, - new - { - Id = 185, - DisplayName = "UPC Nederland", - DisplayShortName = "UPC", - Name = "upcmail.nl" - }, - new - { - Id = 186, - DisplayName = "Verizon Online", - DisplayShortName = "Verizon", - Name = "verizon.net" - }, - new - { - Id = 187, - DisplayName = "Versatel", - DisplayShortName = "Versatel", - Documentation = "http://www.versatel.de/hilfe/index_popup.php?einrichtung_email_programm", - Name = "versatel.de" - }, - new - { - Id = 188, - DisplayName = "???", - DisplayShortName = "???", - Name = "violet.plala.or.jp" - }, - new - { - Id = 189, - DisplayName = "aikis", - DisplayShortName = "aikis", - Name = "vm.aikis.or.jp" - }, - new - { - Id = 190, - DisplayName = "???", - DisplayShortName = "???", - Name = "vmail.plala.or.jp" - }, - new - { - Id = 191, - DisplayName = "TikiTiki???????", - DisplayShortName = "TikiTiki", - Name = "vp.tiki.ne.jp" - }, - new - { - Id = 192, - DisplayName = "???", - DisplayShortName = "???", - Name = "waltz.plala.or.jp" - }, - new - { - Id = 193, - DisplayName = "???", - DisplayShortName = "???", - Name = "wave.plala.or.jp" - }, - new - { - Id = 194, - DisplayName = "WEB.DE Freemail", - DisplayShortName = "Web.de", - Documentation = "http://hilfe.freemail.web.de/freemail/e-mail/pop3/thunderbird/", - Name = "web.de" - }, - new - { - Id = 195, - DisplayName = "???", - DisplayShortName = "???", - Name = "white.plala.or.jp" - }, - new - { - Id = 196, - DisplayName = "Your WildWest domain", - DisplayShortName = "WildWest", - Name = "wildwestdomains.com" - }, - new - { - Id = 197, - DisplayName = "???", - DisplayShortName = "???", - Name = "wine.plala.or.jp" - }, - new - { - Id = 198, - DisplayName = "???", - DisplayShortName = "???", - Name = "wmail.plala.or.jp" - }, - new - { - Id = 199, - DisplayName = "Poczta Wirtualna Polska", - DisplayShortName = "Poczta WP", - Name = "wp.pl" - }, - new - { - Id = 200, - DisplayName = "???", - DisplayShortName = "???", - Name = "xmail.plala.or.jp" - }, - new - { - Id = 201, - DisplayName = "?????????", - DisplayShortName = "wind", - Name = "xp.wind.jp" - }, - new - { - Id = 202, - DisplayName = "???", - DisplayShortName = "???", - Name = "xpost.plala.or.jp" - }, - new - { - Id = 203, - DisplayName = "XS4All", - DisplayShortName = "XS4All", - Name = "xs4all.nl" - }, - new - { - Id = 204, - DisplayName = "Yahoo! Mail", - DisplayShortName = "Yahoo", - Name = "xtra.co.nz" - }, - new - { - Id = 205, - DisplayName = "Yahoo! ???", - DisplayShortName = "Yahoo! ??? ", - Name = "yahoo.co.jp" - }, - new - { - Id = 206, - DisplayName = "Yahoo! Mail", - DisplayShortName = "Yahoo", - Name = "yahoo.com" - }, - new - { - Id = 207, - DisplayName = "Yandex Mail", - DisplayShortName = "Yandex", - Name = "yandex.ru" - }, - new - { - Id = 208, - DisplayName = "Yahoo! BB", - DisplayShortName = "Yahoo! BB", - Name = "ybb.ne.jp" - }, - new - { - Id = 209, - DisplayName = "???", - DisplayShortName = "???", - Name = "yellow.plala.or.jp" - }, - new - { - Id = 210, - DisplayName = "???", - DisplayShortName = "???", - Name = "ymail.plala.or.jp" - }, - new - { - Id = 211, - DisplayName = "???", - DisplayShortName = "???", - Name = "ypost.plala.or.jp" - }, - new - { - Id = 212, - DisplayName = "Ziggo", - DisplayShortName = "Ziggo", - Name = "ziggo.nl" - }, - new - { - Id = 213, - DisplayName = "???", - DisplayShortName = "???", - Name = "zmail.plala.or.jp" - }, - new - { - Id = 214, - DisplayName = "???", - DisplayShortName = "???", - Name = "zpost.plala.or.jp" - }, - new - { - Id = 215, - DisplayName = "avsmedia.com", - DisplayShortName = "avsmedia", - Name = "avsmedia.com" - }, - new - { - Id = 216, - DisplayName = "avsmedia.net", - DisplayShortName = "avsmedia", - Name = "avsmedia.net" - }, - new - { - Id = 218, - DisplayName = "ilearney.com", - DisplayShortName = "ilearney.com", - Name = "ilearney.com" - }, - new - { - Id = 219, - DisplayName = "fpl-technology.com", - DisplayShortName = "fpl-technology.com", - Documentation = "http://fpl-technology.com", - Name = "fpl -technology.com" - }, - new - { - Id = 220, - DisplayName = "Apple iCloud", - DisplayShortName = "Apple", - Name = "icloud.com" - }, - new - { - Id = 221, - DisplayName = "Microsoft Office 365", - DisplayShortName = "Office365", - Documentation = "https://products.office.com", - Name = "office365.com" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.MailboxServer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - b.Property("Authentication") - .HasColumnType("longtext"); - - b.Property("Hostname") - .HasColumnType("longtext"); - - b.Property("IdProvider") - .HasColumnType("int"); - - b.Property("IsUserData") - .HasColumnType("tinyint(1)"); - - b.Property("Port") - .HasColumnType("int"); - - b.Property("SocketType") - .HasColumnType("longtext"); - - b.Property("Type") - .HasColumnType("longtext"); - - b.Property("UserName") - .HasColumnType("longtext"); - - b.HasKey("Id"); - - b.ToTable("MailboxServer"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.Mail.ServerServer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ConnectionString") - .IsRequired() - .HasColumnType("text") - .HasColumnName("connection_string") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ImapSettingsId") - .HasColumnType("int") - .HasColumnName("imap_settings_id"); - - b.Property("MxRecord") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(128)") - .HasColumnName("mx_record") - .HasDefaultValueSql("''") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ServerType") - .HasColumnType("int") - .HasColumnName("server_type"); - - b.Property("SmtpSettingsId") - .HasColumnType("int") - .HasColumnName("smtp_settings_id"); - - b.HasKey("Id"); - - b.HasIndex("ServerType") - .HasDatabaseName("mail_server_server_type_server_type_fk_id"); - - b.ToTable("mail_server_server"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/MessagesContextPostgreSql/20211012145335_MessagesContextPostgreSql.cs b/common/ASC.Core.Common/Migrations/PostgreSql/MessagesContextPostgreSql/20211012145335_MessagesContextPostgreSql.cs deleted file mode 100644 index 7ae6e6b0cd..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/MessagesContextPostgreSql/20211012145335_MessagesContextPostgreSql.cs +++ /dev/null @@ -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.PostgreSql.MessagesContextPostgreSql; - -public partial class MessagesContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "audit_events", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - initiator = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - target = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - ip = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - browser = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - platform = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - date = table.Column(type: "datetime", nullable: false), - tenant_id = table.Column(type: "int", nullable: false), - user_id = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - page = table.Column(type: "varchar(300)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - action = table.Column(type: "int", nullable: false), - description = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - login = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - ip = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - browser = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - platform = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - date = table.Column(type: "datetime", nullable: false), - tenant_id = table.Column(type: "int", nullable: false), - active = table.Column(type: "int", nullable: false), - user_id = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - page = table.Column(type: "varchar(300)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - action = table.Column(type: "int", nullable: false), - description = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - alias = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - mappeddomain = table.Column(type: "varchar(100)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - version = table.Column(type: "int", nullable: false, defaultValueSql: "'2'"), - version_changed = table.Column(type: "datetime", nullable: true), - language = table.Column(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - timezone = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - trusteddomains = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - trusteddomainsenabled = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), - status = table.Column(type: "int", nullable: false), - statuschanged = table.Column(type: "datetime", nullable: true), - creationdatetime = table.Column(type: "datetime", nullable: false), - owner_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - payment_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - industry = table.Column(type: "int", nullable: true), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - spam = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "true"), - calls = table.Column(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(type: "int", nullable: false), - ID = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - UserID = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - Data = table.Column(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"); - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/MessagesContextPostgreSql/PostgreSqlMessagesContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/PostgreSql/MessagesContextPostgreSql/PostgreSqlMessagesContextModelSnapshot.cs deleted file mode 100644 index d824da4c8a..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/MessagesContextPostgreSql/PostgreSqlMessagesContextModelSnapshot.cs +++ /dev/null @@ -1,94 +0,0 @@ -// - -namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql -{ - [DbContext(typeof(PostgreSqlMessagesContext))] - partial class PostgreSqlMessagesContextModelSnapshot : 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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("Browser") - .HasColumnType("varchar(200)") - .HasColumnName("browser") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Date") - .HasColumnType("datetime") - .HasColumnName("date"); - - b.Property("Description") - .HasColumnType("varchar(500)") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Ip") - .HasColumnType("varchar(50)") - .HasColumnName("ip") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Login") - .HasColumnType("varchar(200)") - .HasColumnName("login") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Page") - .HasColumnType("varchar(300)") - .HasColumnName("page") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Platform") - .HasColumnType("varchar(200)") - .HasColumnName("platform") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Active") - .HasColumnType("int") - .HasColumnName("active"); - - b.Property("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 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/NotifyDbContextPostgreSql/20211012145337_NotifyDbContextPostgreSql.cs b/common/ASC.Core.Common/Migrations/PostgreSql/NotifyDbContextPostgreSql/20211012145337_NotifyDbContextPostgreSql.cs deleted file mode 100644 index 2f9d33e84a..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/NotifyDbContextPostgreSql/20211012145337_NotifyDbContextPostgreSql.cs +++ /dev/null @@ -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.PostgreSql.NotifyDbContextPostgreSql; - -public partial class NotifyDbContextPostgreSql : 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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - state = table.Column(type: "int", nullable: false), - attempts = table.Column(type: "int", nullable: false), - modify_date = table.Column(type: "datetime", nullable: false), - priority = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - tenant_id = table.Column(type: "int", nullable: false), - sender = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - reciever = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - subject = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - content_type = table.Column(type: "varchar(64)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - content = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sender_type = table.Column(type: "varchar(64)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - reply_to = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - creation_date = table.Column(type: "datetime", nullable: false), - attachments = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - auto_submitted = table.Column(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"); - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/ResourceDbContextPostgreSql/20211012145339_ResourceDbContextPostgreSql.Designer.cs b/common/ASC.Core.Common/Migrations/PostgreSql/ResourceDbContextPostgreSql/20211012145339_ResourceDbContextPostgreSql.Designer.cs deleted file mode 100644 index 5dbaacf49b..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/ResourceDbContextPostgreSql/20211012145339_ResourceDbContextPostgreSql.Designer.cs +++ /dev/null @@ -1,311 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.ResourceDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlResourceDbContext))] - [Migration("20211012145339_ResourceDbContextPostgreSql")] - partial class ResourceDbContextPostgreSql - { - 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("Login") - .HasColumnType("varchar(150)") - .HasColumnName("login") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)") - .HasColumnName("isAdmin"); - - b.Property("LastVisit") - .HasColumnType("datetime") - .HasColumnName("lastVisit"); - - b.Property("Online") - .HasColumnType("tinyint(1)") - .HasColumnName("online"); - - b.Property("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("AuthorLogin") - .HasColumnType("varchar(50)") - .HasColumnName("authorLogin") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FileId") - .HasColumnType("int") - .HasColumnName("fileid"); - - b.Property("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("AuthorLogin") - .HasColumnType("varchar(50)") - .HasColumnName("authorLogin") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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("Title") - .HasColumnType("varchar(120)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Available") - .HasColumnType("tinyint(1)") - .HasColumnName("available"); - - b.Property("CreationDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("creationDate") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("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("FileId") - .HasColumnType("int") - .HasColumnName("fileid"); - - b.Property("CultureTitle") - .HasColumnType("varchar(20)") - .HasColumnName("cultureTitle") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Title") - .HasColumnType("varchar(120)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AuthorLogin") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(50)") - .HasColumnName("authorLogin") - .HasDefaultValueSql("'Console'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Flag") - .HasColumnType("int") - .HasColumnName("flag"); - - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Link") - .HasColumnType("varchar(120)") - .HasColumnName("link") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ResourceType") - .HasColumnType("varchar(20)") - .HasColumnName("resourceType") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TextValue") - .HasColumnType("text") - .HasColumnName("textValue") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreationDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("creationDate") - .HasDefaultValueSql("'0000-00-00 00:00:00'"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasColumnName("isLock"); - - b.Property("LastUpdate") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("lastUpdate") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("ModuleName") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("moduleName") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ProjectName") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("projectName") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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("FileId") - .HasColumnType("int") - .HasColumnName("fileid"); - - b.Property("Title") - .HasColumnType("varchar(120)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CultureTitle") - .HasColumnType("varchar(20)") - .HasColumnName("cultureTitle") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Flag") - .HasColumnType("int") - .HasColumnName("flag"); - - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("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 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/ResourceDbContextPostgreSql/20211012145339_ResourceDbContextPostgreSql.cs b/common/ASC.Core.Common/Migrations/PostgreSql/ResourceDbContextPostgreSql/20211012145339_ResourceDbContextPostgreSql.cs deleted file mode 100644 index 943c14d0e1..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/ResourceDbContextPostgreSql/20211012145339_ResourceDbContextPostgreSql.cs +++ /dev/null @@ -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.PostgreSql.ResourceDbContextPostgreSql; - -public partial class ResourceDbContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "res_authors", - columns: table => new - { - login = table.Column(type: "varchar(150)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - password = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - isAdmin = table.Column(type: "tinyint(1)", nullable: false), - online = table.Column(type: "tinyint(1)", nullable: false), - lastVisit = table.Column(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(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - fileid = table.Column(type: "int", nullable: false), - writeAccess = table.Column(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(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - cultureTitle = table.Column(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(type: "varchar(120)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - value = table.Column(type: "varchar(120)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - available = table.Column(type: "tinyint(1)", nullable: false), - creationDate = table.Column(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(type: "int", nullable: false), - title = table.Column(type: "varchar(120)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - cultureTitle = table.Column(type: "varchar(20)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - textValue = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - description = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - timeChanges = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - resourceType = table.Column(type: "varchar(20)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - flag = table.Column(type: "int", nullable: false), - link = table.Column(type: "varchar(120)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - authorLogin = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - projectName = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - moduleName = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - resName = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - isLock = table.Column(type: "tinyint(1)", nullable: false), - lastUpdate = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - creationDate = table.Column(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(type: "int", nullable: false), - title = table.Column(type: "varchar(120)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - cultureTitle = table.Column(type: "varchar(20)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - textValue = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - flag = table.Column(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"); - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/ResourceDbContextPostgreSql/PostgreSqlResourceDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/PostgreSql/ResourceDbContextPostgreSql/PostgreSqlResourceDbContextModelSnapshot.cs deleted file mode 100644 index a456712dbf..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/ResourceDbContextPostgreSql/PostgreSqlResourceDbContextModelSnapshot.cs +++ /dev/null @@ -1,310 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.ResourceDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlResourceDbContext))] - partial class PostgreSqlResourceDbContextModelSnapshot : 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("Login") - .HasColumnType("varchar(150)") - .HasColumnName("login") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("IsAdmin") - .HasColumnType("tinyint(1)") - .HasColumnName("isAdmin"); - - b.Property("LastVisit") - .HasColumnType("datetime") - .HasColumnName("lastVisit"); - - b.Property("Online") - .HasColumnType("tinyint(1)") - .HasColumnName("online"); - - b.Property("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("AuthorLogin") - .HasColumnType("varchar(50)") - .HasColumnName("authorLogin") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FileId") - .HasColumnType("int") - .HasColumnName("fileid"); - - b.Property("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("AuthorLogin") - .HasColumnType("varchar(50)") - .HasColumnName("authorLogin") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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("Title") - .HasColumnType("varchar(120)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Available") - .HasColumnType("tinyint(1)") - .HasColumnName("available"); - - b.Property("CreationDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("creationDate") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("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("FileId") - .HasColumnType("int") - .HasColumnName("fileid"); - - b.Property("CultureTitle") - .HasColumnType("varchar(20)") - .HasColumnName("cultureTitle") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Title") - .HasColumnType("varchar(120)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AuthorLogin") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(50)") - .HasColumnName("authorLogin") - .HasDefaultValueSql("'Console'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Description") - .HasColumnType("text") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Flag") - .HasColumnType("int") - .HasColumnName("flag"); - - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Link") - .HasColumnType("varchar(120)") - .HasColumnName("link") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ResourceType") - .HasColumnType("varchar(20)") - .HasColumnName("resourceType") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TextValue") - .HasColumnType("text") - .HasColumnName("textValue") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreationDate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("creationDate") - .HasDefaultValueSql("'0000-00-00 00:00:00'"); - - b.Property("IsLock") - .HasColumnType("tinyint(1)") - .HasColumnName("isLock"); - - b.Property("LastUpdate") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("lastUpdate") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("ModuleName") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("moduleName") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ProjectName") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("projectName") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("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("FileId") - .HasColumnType("int") - .HasColumnName("fileid"); - - b.Property("Title") - .HasColumnType("varchar(120)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CultureTitle") - .HasColumnType("varchar(20)") - .HasColumnName("cultureTitle") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Flag") - .HasColumnType("int") - .HasColumnName("flag"); - - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("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 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/TelegramDbContextPostgreSql/20211012145341_TelegramDbContextPostgreSql.Designer.cs b/common/ASC.Core.Common/Migrations/PostgreSql/TelegramDbContextPostgreSql/20211012145341_TelegramDbContextPostgreSql.Designer.cs deleted file mode 100644 index 356577122a..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/TelegramDbContextPostgreSql/20211012145341_TelegramDbContextPostgreSql.Designer.cs +++ /dev/null @@ -1,43 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.TelegramDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlTelegramDbContext))] - [Migration("20211012145341_TelegramDbContextPostgreSql")] - partial class TelegramDbContextPostgreSql - { - 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.TelegramUser", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("PortalUserId") - .HasColumnType("varchar(38)") - .HasColumnName("portal_user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TelegramUserId") - .HasColumnType("int") - .HasColumnName("telegram_user_id"); - - b.HasKey("TenantId", "PortalUserId") - .HasName("PRIMARY"); - - b.HasIndex("TelegramUserId") - .HasDatabaseName("tgId"); - - b.ToTable("telegram_users"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/TelegramDbContextPostgreSql/20211012145341_TelegramDbContextPostgreSql.cs b/common/ASC.Core.Common/Migrations/PostgreSql/TelegramDbContextPostgreSql/20211012145341_TelegramDbContextPostgreSql.cs deleted file mode 100644 index 004487ad3c..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/TelegramDbContextPostgreSql/20211012145341_TelegramDbContextPostgreSql.cs +++ /dev/null @@ -1,62 +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.PostgreSql.TelegramDbContextPostgreSql; - -public partial class TelegramDbContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "telegram_users", - columns: table => new - { - portal_user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant_id = table.Column(type: "int", nullable: false), - telegram_user_id = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.portal_user_id }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "tgId", - table: "telegram_users", - column: "telegram_user_id"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "telegram_users"); - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/TenantDbContextPostgreSql/20211012145343_TenantDbContextPostgreSql.cs b/common/ASC.Core.Common/Migrations/PostgreSql/TenantDbContextPostgreSql/20211012145343_TenantDbContextPostgreSql.cs deleted file mode 100644 index 667e975131..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/TenantDbContextPostgreSql/20211012145343_TenantDbContextPostgreSql.cs +++ /dev/null @@ -1,375 +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.PostgreSql.TenantDbContextPostgreSql; - -public partial class TenantDbContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_settings", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - id = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - value = table.Column(type: "mediumblob", nullable: false), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.id }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_user", - columns: table => new - { - id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant = table.Column(type: "int", nullable: false), - username = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - firstname = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - lastname = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sex = table.Column(type: "tinyint(1)", nullable: true), - bithdate = table.Column(type: "datetime", nullable: true), - status = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), - activation_status = table.Column(type: "int", nullable: false), - email = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - workfromdate = table.Column(type: "datetime", nullable: true), - terminateddate = table.Column(type: "datetime", nullable: true), - title = table.Column(type: "varchar(64)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - culture = table.Column(type: "varchar(20)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - contacts = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - phone = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - phone_activation = table.Column(type: "int", nullable: false), - location = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - notes = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sid = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sso_name_id = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sso_session_id = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - removed = table.Column(type: "tinyint(1)", nullable: false), - create_on = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - last_modified = table.Column(type: "datetime", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_core_user", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_forbiden", - columns: table => new - { - address = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.address); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_iprestrictions", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - tenant = table.Column(type: "int", nullable: false), - ip = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PK_tenants_iprestrictions", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_partners", - columns: table => new - { - tenant_id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - partner_id = table.Column(type: "varchar(36)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - affiliate_id = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - campaign = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.tenant_id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_tenants", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - alias = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - mappeddomain = table.Column(type: "varchar(100)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - version = table.Column(type: "int", nullable: false, defaultValueSql: "'2'"), - version_changed = table.Column(type: "datetime", nullable: true), - language = table.Column(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - timezone = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - trusteddomains = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - trusteddomainsenabled = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), - status = table.Column(type: "int", nullable: false), - statuschanged = table.Column(type: "datetime", nullable: true), - creationdatetime = table.Column(type: "datetime", nullable: false), - owner_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - payment_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - industry = table.Column(type: "int", nullable: true), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - spam = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "true"), - calls = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "true") - }, - constraints: table => - { - table.PrimaryKey("PK_tenants_tenants", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_version", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - version = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - url = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - default_version = table.Column(type: "int", nullable: false), - visible = table.Column(type: "tinyint(1)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_tenants_version", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_usergroup", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - groupid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - ref_type = table.Column(type: "int", nullable: false), - removed = table.Column(type: "tinyint(1)", nullable: false), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.userid, x.groupid, x.ref_type }); - table.ForeignKey( - name: "FK_core_usergroup_core_user_userid", - column: x => x.userid, - principalTable: "core_user", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_usersecurity", - columns: table => new - { - userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant = table.Column(type: "int", nullable: false), - pwdhash = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - LastModified = table.Column(type: "timestamp", nullable: true, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.userid); - table.ForeignKey( - name: "FK_core_usersecurity_core_user_userid", - column: x => x.userid, - principalTable: "core_user", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.InsertData( - table: "core_settings", - columns: new[] { "id", "tenant", "value" }, - values: new object[,] - { - { "CompanyWhiteLabelSettings", -1, 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 } }, - { "FullTextSearchSettings", -1, 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 } }, - { "SmtpSettings", -1, 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 } } - }); - - migrationBuilder.InsertData( - table: "core_user", - columns: new[] { "id", "activation_status", "bithdate", "contacts", "culture", "email", "firstname", "last_modified", "lastname", "location", "notes", "phone", "phone_activation", "removed", "sex", "sid", "sso_name_id", "sso_session_id", "status", "tenant", "terminateddate", "title", "username", "workfromdate" }, - values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", 0, null, null, null, "", "Administrator", new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), "", null, null, null, 0, false, null, null, null, null, 1, 1, null, null, "administrator", new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) }); - - migrationBuilder.InsertData( - table: "tenants_forbiden", - column: "address", - values: new object[] - { - "controlpanel", - "localhost" - }); - - 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: "core_usersecurity", - columns: new[] { "userid", "pwdhash", "tenant" }, - values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", "vLFfghR5tNV3K9DKhmwArV+SbjWAcgZZzIDTnJ0JgCo=", 1 }); - - migrationBuilder.CreateIndex( - name: "email", - table: "core_user", - column: "email"); - - migrationBuilder.CreateIndex( - name: "last_modified", - table: "core_user", - column: "last_modified"); - - migrationBuilder.CreateIndex( - name: "username", - table: "core_user", - columns: new[] { "tenant", "username" }); - - migrationBuilder.CreateIndex( - name: "IX_core_usergroup_userid", - table: "core_usergroup", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "last_modified", - table: "core_usergroup", - column: "last_modified"); - - migrationBuilder.CreateIndex( - name: "pwdhash", - table: "core_usersecurity", - column: "pwdhash"); - - migrationBuilder.CreateIndex( - name: "tenant", - table: "core_usersecurity", - column: "tenant"); - - migrationBuilder.CreateIndex( - name: "tenant", - table: "tenants_iprestrictions", - column: "tenant"); - - 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"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "core_settings"); - - migrationBuilder.DropTable( - name: "core_usergroup"); - - migrationBuilder.DropTable( - name: "core_usersecurity"); - - migrationBuilder.DropTable( - name: "tenants_forbiden"); - - migrationBuilder.DropTable( - name: "tenants_iprestrictions"); - - migrationBuilder.DropTable( - name: "tenants_partners"); - - migrationBuilder.DropTable( - name: "tenants_tenants"); - - migrationBuilder.DropTable( - name: "tenants_version"); - - migrationBuilder.DropTable( - name: "core_user"); - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/UserDbContextPostgreSql/20211012145323_UserDbContextPostgreSql.cs b/common/ASC.Core.Common/Migrations/PostgreSql/UserDbContextPostgreSql/20211012145323_UserDbContextPostgreSql.cs deleted file mode 100644 index a0ae71b35d..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/UserDbContextPostgreSql/20211012145323_UserDbContextPostgreSql.cs +++ /dev/null @@ -1,464 +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.PostgreSql.UserDbContextPostgreSql; - -public partial class UserDbContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_acl", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - subject = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - action = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - @object = table.Column(name: "object", type: "varchar(255)", nullable: false, defaultValueSql: "''", collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - acetype = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.subject, x.action, x.@object }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_group", - columns: table => new - { - id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant = table.Column(type: "int", nullable: false), - name = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - categoryid = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - parentid = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sid = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - removed = table.Column(type: "tinyint(1)", nullable: false), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PK_core_group", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_subscription", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - source = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - action = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - recipient = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - @object = table.Column(name: "object", type: "varchar(128)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - unsubscribed = table.Column(type: "tinyint(1)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.source, x.action, x.recipient, x.@object }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_subscriptionmethod", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - source = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - action = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - recipient = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sender = table.Column(type: "varchar(1024)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.source, x.action, x.recipient }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_user", - columns: table => new - { - id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant = table.Column(type: "int", nullable: false), - username = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - firstname = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - lastname = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sex = table.Column(type: "tinyint(1)", nullable: true), - bithdate = table.Column(type: "datetime", nullable: true), - status = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), - activation_status = table.Column(type: "int", nullable: false), - email = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - workfromdate = table.Column(type: "datetime", nullable: true), - terminateddate = table.Column(type: "datetime", nullable: true), - title = table.Column(type: "varchar(64)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - culture = table.Column(type: "varchar(20)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - contacts = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - phone = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - phone_activation = table.Column(type: "int", nullable: false), - location = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - notes = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sid = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sso_name_id = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - sso_session_id = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - removed = table.Column(type: "tinyint(1)", nullable: false), - create_on = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - last_modified = table.Column(type: "datetime", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_core_user", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_userphoto", - columns: table => new - { - userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant = table.Column(type: "int", nullable: false), - photo = table.Column(type: "mediumblob", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.userid); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_usergroup", - columns: table => new - { - tenant = table.Column(type: "int", nullable: false), - userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - groupid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - ref_type = table.Column(type: "int", nullable: false), - removed = table.Column(type: "tinyint(1)", nullable: false), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant, x.userid, x.groupid, x.ref_type }); - table.ForeignKey( - name: "FK_core_usergroup_core_user_userid", - column: x => x.userid, - principalTable: "core_user", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "core_usersecurity", - columns: table => new - { - userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant = table.Column(type: "int", nullable: false), - pwdhash = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - LastModified = table.Column(type: "timestamp", nullable: true, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.userid); - table.ForeignKey( - name: "FK_core_usersecurity_core_user_userid", - column: x => x.userid, - principalTable: "core_user", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.InsertData( - table: "core_acl", - columns: new[] { "action", "object", "subject", "tenant", "acetype" }, - values: new object[,] - { - { "ef5e6790-f346-4b6e-b662-722bc28cb0db", "", "5d5b7260-f7f7-49f1-a1c9-95fbb6a12604", -1, 0 }, - { "00e7dfc5-ac49-4fd3-a1d6-98d84e877ac4", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "14be970f-7af5-4590-8e81-ea32b5f7866d", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "18ecc94d-6afa-4994-8406-aee9dff12ce2", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "298530eb-435e-4dc6-a776-9abcd95c70e9", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "430eaf70-1886-483c-a746-1a18e3e6bb63", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "557d6503-633b-4490-a14c-6473147ce2b3", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "724cbb75-d1c9-451e-bae0-4de0db96b1f7", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "7cb5c0d1-d254-433f-abe3-ff23373ec631", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "91b29dcd-9430-4403-b17a-27d09189be88", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "a18480a4-6d18-4c71-84fa-789888791f45", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "b630d29b-1844-4bda-bbbe-cf5542df3559", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "c62a9e8d-b24c-4513-90aa-7ff0f8ba38eb", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "d7cdb020-288b-41e5-a857-597347618533", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "662f3db7-9bc8-42cf-84da-2765f563e9b0", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "f11e8f3f-46e6-4e55-90e3-09c22ec565bd", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "e0759a42-47f0-4763-a26a-d5aa665bec35", "", "712d9ec3-5d2b-4b13-824f-71f00191dcca", -1, 0 }, - { "6f05c382-8bca-4469-9424-c807a98c40d7", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "0d68b142-e20a-446e-a832-0d6b0b65a164", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, - { "f11e88d7-f185-4372-927c-d88008d2c483", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|f4d98afdd336433287783c6945c81ea0", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "e0759a42-47f0-4763-a26a-d5aa665bec35", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "e37239bd-c5b5-4f1e-a9f8-3ceeac209615", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "f11e8f3f-46e6-4e55-90e3-09c22ec565bd", "", "5d5b7260-f7f7-49f1-a1c9-95fbb6a12604", -1, 0 }, - { "088d5940-a80f-4403-9741-d610718ce95c", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "08d66144-e1c9-4065-9aa1-aa4bba0a7bc8", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "0d1f72a8-63da-47ea-ae42-0900e4ac72a9", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "13e30b51-5b4d-40a5-8575-cb561899eeb1", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "19f658ae-722b-4cd8-8236-3ad150801d96", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "2c6552b3-b2e0-4a00-b8fd-13c161e337b1", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "388c29d3-c662-4a61-bf47-fc2f7094224a", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "40bf31f4-3132-4e76-8d5c-9828a89501a3", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "49ae8915-2b30-4348-ab74-b152279364fb", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "9018c001-24c2-44bf-a1db-d1121a570e74", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "948ad738-434b-4a88-8e38-7569d332910a", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "9d75a568-52aa-49d8-ad43-473756cd8903", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "08d75c97-cf3f-494b-90d1-751c941fe2dd", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "c426c349-9ad4-47cd-9b8f-99fc30675951", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "a362fe79-684e-4d43-a599-65bc1f4e167f", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "9018c001-24c2-44bf-a1db-d1121a570e74", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "49ae8915-2b30-4348-ab74-b152279364fb", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "13e30b51-5b4d-40a5-8575-cb561899eeb1", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "fcac42b8-9386-48eb-a938-d19b3c576912", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "d1f3b53d-d9e2-4259-80e7-d24380978395", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, - { "e37239bd-c5b5-4f1e-a9f8-3ceeac209615", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "e0759a42-47f0-4763-a26a-d5aa665bec35", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "d852b66f-6719-45e1-8657-18f0bb791690", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "d49f4e30-da10-4b39-bc6d-b41ef6e039d3", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, - { "d1f3b53d-d9e2-4259-80e7-d24380978395", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "d11ebcb9-0e6e-45e6-a6d0-99c41d687598", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, - { "fbc37705-a04c-40ad-a68c-ce2f0423f397", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 } - }); - - migrationBuilder.InsertData( - table: "core_subscription", - columns: new[] { "action", "object", "recipient", "source", "tenant", "unsubscribed" }, - values: new object[,] - { - { "send_whats_new", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, false }, - { "sharedocument", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, false }, - { "new post", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6a598c74-91ae-437d-a5f4-ad339bd11bb2", -1, false }, - { "new topic in forum", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "853b6eb9-73ee-438d-9b09-8ffeedf36234", -1, false }, - { "new photo uploaded", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "9d51954f-db9b-4aed-94e3-ed70b914e10", -1, false }, - { "new bookmark created", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "28b10049-dd20-4f54-b986-873bc14ccfc7", -1, false }, - { "new wiki page", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "742cf945-cbbc-4a57-82d6-1600a12cf8ca", -1, false }, - { "BirthdayReminderd", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "37620ae5-c40b-45ce-855a-39dd7d76a1fa", -1, false }, - { "new feed", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6504977c-75af-4691-9099-084d3ddeea04", -1, false }, - { "SetAccess", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, - { "calendar_sharing", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, false }, - { "event_alert", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, false }, - { "admin_notify", "", "cd84e66b-b803-40fc-99f9-b2969a54a1de", "asc.web.studio", -1, false }, - { "ResponsibleForTask", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, - { "AddRelationshipEvent", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, - { "ExportCompleted", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, - { "CreateNewContact", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, - { "ResponsibleForOpportunity", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, - { "periodic_notify", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, false }, - { "sharefolder", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, false } - }); - - migrationBuilder.InsertData( - table: "core_subscriptionmethod", - columns: new[] { "action", "recipient", "source", "tenant", "sender" }, - values: new object[,] - { - { "AddRelationshipEvent", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, - { "periodic_notify", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, "email.sender" }, - { "ResponsibleForOpportunity", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, - { "CreateNewContact", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender" }, - { "ExportCompleted", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, - { "ResponsibleForTask", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, - { "updatedocument", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, "email.sender|messanger.sender" }, - { "admin_notify", "cd84e66b-b803-40fc-99f9-b2969a54a1de", "asc.web.studio", -1, "email.sender" }, - { "send_whats_new", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, "email.sender" }, - { "new feed", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6504977c-75af-4691-9099-084d3ddeea04", -1, "email.sender|messanger.sender" }, - { "new post", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6a598c74-91ae-437d-a5f4-ad339bd11bb2", -1, "email.sender|messanger.sender" }, - { "new topic in forum", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "853b6eb9-73ee-438d-9b09-8ffeedf36234", -1, "email.sender|messanger.sender" }, - { "new photo uploaded", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "9d51954f-db9b-4aed-94e3-ed70b914e101", -1, "email.sender|messanger.sender" }, - { "new bookmark created", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "28b10049-dd20-4f54-b986-873bc14ccfc7", -1, "email.sender|messanger.sender" }, - { "new wiki page", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "742cf945-cbbc-4a57-82d6-1600a12cf8ca", -1, "email.sender|messanger.sender" }, - { "BirthdayReminder", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "37620ae5-c40b-45ce-855a-39dd7d76a1fa", -1, "email.sender|messanger.sender" }, - { "sharedocument", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, "email.sender|messanger.sender" }, - { "sharefolder", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, "email.sender|messanger.sender" }, - { "invitetoproject", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "milestonedeadline", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "newcommentformessage", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "newcommentformilestone", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "newcommentfortask", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "projectcreaterequest", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "projecteditrequest", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "removefromproject", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "responsibleforproject", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "responsiblefortask", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "taskclosed", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, - { "calendar_sharing", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, "email.sender|messanger.sender" }, - { "event_alert", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, "email.sender|messanger.sender" }, - { "SetAccess", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" } - }); - - migrationBuilder.InsertData( - table: "core_user", - columns: new[] { "id", "activation_status", "bithdate", "contacts", "culture", "email", "firstname", "last_modified", "lastname", "location", "notes", "phone", "phone_activation", "removed", "sex", "sid", "sso_name_id", "sso_session_id", "status", "tenant", "terminateddate", "title", "username", "workfromdate" }, - values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", 0, null, null, null, "", "Administrator", new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), "", null, null, null, 0, false, null, null, null, null, 1, 1, null, null, "administrator", new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) }); - - migrationBuilder.InsertData( - table: "core_usergroup", - columns: new[] { "groupid", "ref_type", "tenant", "userid", "removed" }, - values: new object[] { "cd84e66b-b803-40fc-99f9-b2969a54a1de", 0, 1, "66faa6e4-f133-11ea-b126-00ffeec8b4ef", false }); - - migrationBuilder.InsertData( - table: "core_usersecurity", - columns: new[] { "userid", "pwdhash", "tenant" }, - values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", "vLFfghR5tNV3K9DKhmwArV+SbjWAcgZZzIDTnJ0JgCo=", 1 }); - - migrationBuilder.CreateIndex( - name: "last_modified", - table: "core_group", - column: "last_modified"); - - migrationBuilder.CreateIndex( - name: "parentid", - table: "core_group", - columns: new[] { "tenant", "parentid" }); - - migrationBuilder.CreateIndex( - name: "email", - table: "core_user", - column: "email"); - - migrationBuilder.CreateIndex( - name: "last_modified", - table: "core_user", - column: "last_modified"); - - migrationBuilder.CreateIndex( - name: "username", - table: "core_user", - columns: new[] { "tenant", "username" }); - - migrationBuilder.CreateIndex( - name: "IX_core_usergroup_userid", - table: "core_usergroup", - column: "userid"); - - migrationBuilder.CreateIndex( - name: "last_modified", - table: "core_usergroup", - column: "last_modified"); - - migrationBuilder.CreateIndex( - name: "tenant", - table: "core_userphoto", - column: "tenant"); - - migrationBuilder.CreateIndex( - name: "pwdhash", - table: "core_usersecurity", - column: "pwdhash"); - - migrationBuilder.CreateIndex( - name: "tenant", - table: "core_usersecurity", - column: "tenant"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "core_acl"); - - migrationBuilder.DropTable( - name: "core_group"); - - migrationBuilder.DropTable( - name: "core_subscription"); - - migrationBuilder.DropTable( - name: "core_subscriptionmethod"); - - migrationBuilder.DropTable( - name: "core_usergroup"); - - migrationBuilder.DropTable( - name: "core_userphoto"); - - migrationBuilder.DropTable( - name: "core_usersecurity"); - - migrationBuilder.DropTable( - name: "core_user"); - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/WebstudioDbContextPostgreSql/20211012145347_WebstudioDbContextPostgreSql.Designer.cs b/common/ASC.Core.Common/Migrations/PostgreSql/WebstudioDbContextPostgreSql/20211012145347_WebstudioDbContextPostgreSql.Designer.cs deleted file mode 100644 index 7f7060b11a..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/WebstudioDbContextPostgreSql/20211012145347_WebstudioDbContextPostgreSql.Designer.cs +++ /dev/null @@ -1,123 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.WebstudioDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlWebstudioDbContext))] - [Migration("20211012145347_WebstudioDbContextPostgreSql")] - partial class WebstudioDbContextPostgreSql - { - 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.DbWebstudioIndex", b => - { - b.Property("IndexName") - .HasColumnType("varchar(50)") - .HasColumnName("index_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.HasKey("IndexName") - .HasName("PRIMARY"); - - b.ToTable("webstudio_index"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("TenantID"); - - b.Property("Id") - .HasColumnType("varchar(64)") - .HasColumnName("ID") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("varchar(64)") - .HasColumnName("UserID") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Data") - .IsRequired() - .HasColumnType("mediumtext") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "Id", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("Id") - .HasDatabaseName("ID"); - - b.ToTable("webstudio_settings"); - - b.HasData( - new - { - TenantId = 1, - Id = "9a925891-1f92-4ed7-b277-d6f649739f06", - UserId = "00000000-0000-0000-0000-000000000000", - Data = "{'Completed':false}" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioUserVisit", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenantid"); - - b.Property("VisitDate") - .HasColumnType("datetime") - .HasColumnName("visitdate"); - - b.Property("ProductId") - .HasColumnType("varchar(38)") - .HasColumnName("productid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("userid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FirstVisitTime") - .HasColumnType("datetime") - .HasColumnName("firstvisittime"); - - b.Property("LastVisitTime") - .HasColumnType("datetime") - .HasColumnName("lastvisittime"); - - b.Property("VisitCount") - .HasColumnType("int") - .HasColumnName("visitcount"); - - b.HasKey("TenantId", "VisitDate", "ProductId", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("VisitDate") - .HasDatabaseName("visitdate"); - - b.ToTable("webstudio_uservisit"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/WebstudioDbContextPostgreSql/20211012145347_WebstudioDbContextPostgreSql.cs b/common/ASC.Core.Common/Migrations/PostgreSql/WebstudioDbContextPostgreSql/20211012145347_WebstudioDbContextPostgreSql.cs deleted file mode 100644 index eb20f7d1dc..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/WebstudioDbContextPostgreSql/20211012145347_WebstudioDbContextPostgreSql.cs +++ /dev/null @@ -1,115 +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.PostgreSql.WebstudioDbContextPostgreSql; - -public partial class WebstudioDbContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "webstudio_index", - columns: table => new - { - index_name = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.index_name); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "webstudio_settings", - columns: table => new - { - TenantID = table.Column(type: "int", nullable: false), - ID = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - UserID = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - Data = table.Column(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.CreateTable( - name: "webstudio_uservisit", - columns: table => new - { - tenantid = table.Column(type: "int", nullable: false), - visitdate = table.Column(type: "datetime", nullable: false), - productid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - visitcount = table.Column(type: "int", nullable: false), - firstvisittime = table.Column(type: "datetime", nullable: false), - lastvisittime = table.Column(type: "datetime", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.visitdate, x.productid, x.userid }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - 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: "ID", - table: "webstudio_settings", - column: "ID"); - - migrationBuilder.CreateIndex( - name: "visitdate", - table: "webstudio_uservisit", - column: "visitdate"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "webstudio_index"); - - migrationBuilder.DropTable( - name: "webstudio_settings"); - - migrationBuilder.DropTable( - name: "webstudio_uservisit"); - } -} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/WebstudioDbContextPostgreSql/PostgreSqlWebstudioDbContextModelSnapshot.cs b/common/ASC.Core.Common/Migrations/PostgreSql/WebstudioDbContextPostgreSql/PostgreSqlWebstudioDbContextModelSnapshot.cs deleted file mode 100644 index 91b4d37de3..0000000000 --- a/common/ASC.Core.Common/Migrations/PostgreSql/WebstudioDbContextPostgreSql/PostgreSqlWebstudioDbContextModelSnapshot.cs +++ /dev/null @@ -1,122 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.WebstudioDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlWebstudioDbContext))] - partial class PostgreSqlWebstudioDbContextModelSnapshot : 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.DbWebstudioIndex", b => - { - b.Property("IndexName") - .HasColumnType("varchar(50)") - .HasColumnName("index_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.HasKey("IndexName") - .HasName("PRIMARY"); - - b.ToTable("webstudio_index"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("TenantID"); - - b.Property("Id") - .HasColumnType("varchar(64)") - .HasColumnName("ID") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("varchar(64)") - .HasColumnName("UserID") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Data") - .IsRequired() - .HasColumnType("mediumtext") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "Id", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("Id") - .HasDatabaseName("ID"); - - b.ToTable("webstudio_settings"); - - b.HasData( - new - { - TenantId = 1, - Id = "9a925891-1f92-4ed7-b277-d6f649739f06", - UserId = "00000000-0000-0000-0000-000000000000", - Data = "{\"Completed\":false}" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioUserVisit", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenantid"); - - b.Property("VisitDate") - .HasColumnType("datetime") - .HasColumnName("visitdate"); - - b.Property("ProductId") - .HasColumnType("varchar(38)") - .HasColumnName("productid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("userid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FirstVisitTime") - .HasColumnType("datetime") - .HasColumnName("firstvisittime"); - - b.Property("LastVisitTime") - .HasColumnType("datetime") - .HasColumnName("lastvisittime"); - - b.Property("VisitCount") - .HasColumnType("int") - .HasColumnName("visitcount"); - - b.HasKey("TenantId", "VisitDate", "ProductId", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("VisitDate") - .HasDatabaseName("visitdate"); - - b.ToTable("webstudio_uservisit"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Core.Common/MultiRegionHostedSolution.cs b/common/ASC.Core.Common/MultiRegionHostedSolution.cs index 9949abc53b..c2f42e0437 100644 --- a/common/ASC.Core.Common/MultiRegionHostedSolution.cs +++ b/common/ASC.Core.Common/MultiRegionHostedSolution.cs @@ -24,8 +24,6 @@ // 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.Core; public class MultiRegionHostedSolution @@ -211,14 +209,14 @@ public class MultiRegionHostedSolution var find = false; foreach (var cs in connectionStrings) { - var dbContextOptionsBuilder = new DbContextOptionsBuilder(); + var dbContextOptionsBuilder = new DbContextOptionsBuilder(); var options = dbContextOptionsBuilder //.UseMySql(cs.ConnectionString) .UseNpgsql(cs.ConnectionString) .UseLoggerFactory(_loggerFactory) .Options; - using var dbContext = new DbContext(options); + using var dbContext = new CustomDbContext(options); if (cs.Name.StartsWith(_dbid + ".")) { @@ -241,14 +239,14 @@ public class MultiRegionHostedSolution { try { - var dbContextOptionsBuilder = new DbContextOptionsBuilder(); + var dbContextOptionsBuilder = new DbContextOptionsBuilder(); var options = dbContextOptionsBuilder //.UseMySql(connectionString.ConnectionString) .UseNpgsql(connectionString.ConnectionString) .UseLoggerFactory(_loggerFactory) .Options; - using var dbContext = new DbContext(options); + using var dbContext = new CustomDbContext(options); var q = dbContext.Regions.ToList(); diff --git a/common/ASC.Data.Backup.Core/Core/DbHelper.cs b/common/ASC.Data.Backup.Core/Core/DbHelper.cs index 486d3c3c35..3ad28ab3ef 100644 --- a/common/ASC.Data.Backup.Core/Core/DbHelper.cs +++ b/common/ASC.Data.Backup.Core/Core/DbHelper.cs @@ -184,6 +184,7 @@ public class DbHelper : IDisposable { var tariff = _coreDbContext.Tariffs.FirstOrDefault(t => t.Tenant == tenant.Id); tariff.Tenant = (int)r[table.Columns["id"]]; + tariff.CreateOn = DateTime.Now; // CreateCommand("update tenants_tariff set tenant = " + r[table.Columns["id"]] + " where tenant = " + tenantid).ExecuteNonQuery(); _coreDbContext.Entry(tariff).State = EntityState.Modified; _coreDbContext.SaveChanges(); diff --git a/common/ASC.Data.Backup.Core/EF/BackupsContext.cs b/common/ASC.Data.Backup.Core/EF/Context/BackupsContext.cs similarity index 93% rename from common/ASC.Data.Backup.Core/EF/BackupsContext.cs rename to common/ASC.Data.Backup.Core/EF/Context/BackupsContext.cs index ed0ea4bf89..4bffbc0989 100644 --- a/common/ASC.Data.Backup.Core/EF/BackupsContext.cs +++ b/common/ASC.Data.Backup.Core/EF/Context/BackupsContext.cs @@ -32,16 +32,13 @@ public class BackupsContext : BaseDbContext public DbSet Schedules { get; set; } public DbSet Tenants { get; set; } - public BackupsContext() { } - - public BackupsContext(DbContextOptions options) - : base(options) { } - protected override void OnModelCreating(ModelBuilder modelBuilder) { ModelBuilderWrapper .From(modelBuilder, _provider) - .AddDbTenant(); + .AddDbTenant() + .AddBackupSchedule() + .AddBackupRecord(); } } diff --git a/common/ASC.Data.Backup.Core/EF/Model/BackupRecord.cs b/common/ASC.Data.Backup.Core/EF/Model/BackupRecord.cs new file mode 100644 index 0000000000..98096a7e7e --- /dev/null +++ b/common/ASC.Data.Backup.Core/EF/Model/BackupRecord.cs @@ -0,0 +1,243 @@ +// (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.Data.Backup.EF.Model; + +public class BackupRecord : BaseEntity +{ + public Guid Id { get; set; } + + public int TenantId { get; set; } + + public bool IsScheduled { get; set; } + public string Name { get; set; } + public string Hash { get; set; } + + public BackupStorageType StorageType { get; set; } + + public string StorageBasePath { get; set; } + + public string StoragePath { get; set; } + + public DateTime CreatedOn { get; set; } + + public DateTime ExpiresOn { get; set; } + + public string StorageParams { get; set; } + + public override object[] GetKeys() + { + return new object[] { Id }; + } +} + +public static class BackupRecordExtension +{ + public static ModelBuilderWrapper AddBackupRecord(this ModelBuilderWrapper modelBuilder) + { + modelBuilder + .Add(MySqlAddBackupRecord, Provider.MySql) + .Add(PgSqlAddBackupRecord, Provider.PostgreSql); + + return modelBuilder; + } + + public static void MySqlAddBackupRecord(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.ToTable("backup_backup") + .HasCharSet("utf8"); + + entity.HasIndex(e => e.TenantId) + .HasDatabaseName("tenant_id"); + + entity.HasIndex(e => e.ExpiresOn) + .HasDatabaseName("expires_on"); + + entity.HasIndex(e => e.IsScheduled) + .HasDatabaseName("is_scheduled"); + + entity.HasKey(e => new { e.Id }) + .HasName("PRIMARY"); + + entity.Property(e => e.Id) + .HasColumnName("id") + .HasColumnType("char(38)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.TenantId) + .IsRequired() + .HasColumnName("tenant_id") + .HasColumnType("int(10)"); + + entity.Property(e => e.IsScheduled) + .IsRequired() + .HasColumnName("is_scheduled") + .HasColumnType("tinyint(1)"); + + entity.Property(e => e.Name) + .IsRequired() + .HasColumnName("name") + .HasColumnType("varchar(255)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.StorageType) + .IsRequired() + .HasColumnName("storage_type") + .HasColumnType("int(10)"); + + entity.Property(e => e.StorageBasePath) + .HasColumnName("storage_base_path") + .HasColumnType("varchar(255)") + .HasDefaultValueSql("NULL") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.StoragePath) + .IsRequired() + .HasColumnName("storage_path") + .HasColumnType("varchar(255)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.CreatedOn) + .IsRequired() + .HasColumnName("created_on") + .HasColumnType("datetime"); + + entity.Property(e => e.ExpiresOn) + .HasColumnName("expires_on") + .HasColumnType("datetime") + .HasDefaultValueSql("'0001-01-01 00:00:00'"); + + entity.Property(e => e.StorageParams) + .HasColumnName("storage_params") + .HasColumnType("text") + .HasDefaultValueSql("NULL") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.Hash) + .IsRequired() + .HasColumnName("hash") + .HasColumnType("varchar(64)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + }); + } + public static void PgSqlAddBackupRecord(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.ToTable("backup_backup"); + + entity.HasIndex(e => e.TenantId) + .HasDatabaseName("tenant_id"); + + entity.HasIndex(e => e.ExpiresOn) + .HasDatabaseName("expires_on"); + + entity.HasIndex(e => e.IsScheduled) + .HasDatabaseName("is_scheduled"); + + entity.HasKey(e => new { e.Id }) + .HasName("PRIMARY"); + + entity.Property(e => e.Id) + .HasColumnName("id") + .HasColumnType("char") + .HasMaxLength(38) + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.TenantId) + .IsRequired() + .HasColumnName("tenant_id") + .HasColumnType("int") + .HasMaxLength(10); + + entity.Property(e => e.IsScheduled) + .IsRequired() + .HasColumnName("is_scheduled") + .HasColumnType("int") + .HasMaxLength(10); + + entity.Property(e => e.Name) + .IsRequired() + .HasColumnName("name") + .HasMaxLength(255) + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.StorageType) + .IsRequired() + .HasColumnName("storage_type") + .HasColumnType("int") + .HasMaxLength(10); + + entity.Property(e => e.StorageBasePath) + .HasColumnName("storage_base_path") + .HasMaxLength(255) + .HasDefaultValueSql("NULL") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.StoragePath) + .IsRequired() + .HasColumnName("storage_path") + .HasMaxLength(255) + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.CreatedOn) + .IsRequired() + .HasColumnName("created_on") + .HasColumnType("datetime"); + + entity.Property(e => e.ExpiresOn) + .HasColumnName("expires_on") + .HasColumnType("datetime") + .HasDefaultValueSql("'0001-01-01 00:00:00'"); + + entity.Property(e => e.StorageParams) + .HasColumnName("storage_params") + .HasColumnType("text") + .HasDefaultValueSql("NULL") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.Hash) + .IsRequired() + .HasColumnName("hash") + .HasMaxLength(64) + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + }); + } +} diff --git a/common/ASC.Data.Backup.Core/EF/Model/BackupSchedule.cs b/common/ASC.Data.Backup.Core/EF/Model/BackupSchedule.cs new file mode 100644 index 0000000000..1d339d9e94 --- /dev/null +++ b/common/ASC.Data.Backup.Core/EF/Model/BackupSchedule.cs @@ -0,0 +1,177 @@ +// (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.Data.Backup.EF.Model; + +public class BackupSchedule : BaseEntity +{ + public int TenantId { get; set; } + + public bool BackupMail { get; set; } + + public string Cron { get; set; } + + public int BackupsStored { get; set; } + + public BackupStorageType StorageType { get; set; } + + public string StorageBasePath { get; set; } + + public DateTime LastBackupTime { get; set; } + + public string StorageParams { get; set; } + + public override object[] GetKeys() + { + return new object[] { TenantId }; + } +} + +public static class BackupScheduleExtension +{ + public static ModelBuilderWrapper AddBackupSchedule(this ModelBuilderWrapper modelBuilder) + { + modelBuilder + .Add(MySqlAddBackupSchedule, Provider.MySql) + .Add(PgSqlAddBackupSchedule, Provider.PostgreSql); + + return modelBuilder; + } + + public static void MySqlAddBackupSchedule(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.TenantId }) + .HasName("PRIMARY"); + + entity.ToTable("backup_schedule") + .HasCharSet("utf8"); + + entity.Property(e => e.TenantId) + .HasColumnName("tenant_id") + .HasColumnType("int(10)") + .ValueGeneratedNever(); + + entity.Property(e => e.BackupMail) + .HasColumnName("backup_mail") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Cron) + .IsRequired() + .HasColumnName("cron") + .HasColumnType("varchar(255)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); ; + + entity.Property(e => e.BackupsStored) + .IsRequired() + .HasColumnName("backups_stored") + .HasColumnType("int(10)"); + + entity.Property(e => e.StorageType) + .IsRequired() + .HasColumnName("storage_type") + .HasColumnType("int(10)"); + + entity.Property(e => e.StorageBasePath) + .HasColumnName("storage_base_path") + .HasColumnType("varchar(255)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci") + .HasDefaultValueSql("NULL"); + + entity.Property(e => e.LastBackupTime) + .IsRequired() + .HasColumnName("last_backup_time") + .HasColumnType("datetime"); + + entity.Property(e => e.StorageParams) + .HasColumnName("storage_params") + .HasColumnType("text") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci") + .HasDefaultValueSql("NULL"); + }); + } + public static void PgSqlAddBackupSchedule(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.TenantId }) + .HasName("PRIMARY"); + + entity.ToTable("backup_schedule"); + + entity.Property(e => e.TenantId) + .IsRequired() + .HasColumnName("tenant_id") + .HasMaxLength(10); + + entity.Property(e => e.BackupMail) + .HasColumnName("backup_mail") + .HasMaxLength(10) + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Cron) + .IsRequired() + .HasColumnName("cron") + .HasMaxLength(255) + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); ; + + entity.Property(e => e.BackupsStored) + .IsRequired() + .HasColumnName("backups_stored") + .HasMaxLength(10); + + entity.Property(e => e.StorageType) + .IsRequired() + .HasColumnName("storage_type") + .HasMaxLength(10); + + entity.Property(e => e.StorageBasePath) + .HasColumnName("storage_base_path") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci") + .HasDefaultValueSql("NULL") + .HasMaxLength(255); + + entity.Property(e => e.LastBackupTime) + .IsRequired() + .HasColumnName("last_backup_time") + .HasColumnType("datetime"); + + entity.Property(e => e.StorageParams) + .HasColumnName("storage_params") + .HasColumnType("text") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci") + .HasDefaultValueSql("NULL"); + }); + } +} diff --git a/common/ASC.Data.Backup.Core/GlobalUsings.cs b/common/ASC.Data.Backup.Core/GlobalUsings.cs index bb57cfe646..13b4eeec4d 100644 --- a/common/ASC.Data.Backup.Core/GlobalUsings.cs +++ b/common/ASC.Data.Backup.Core/GlobalUsings.cs @@ -24,8 +24,6 @@ // 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 -global using System.ComponentModel.DataAnnotations; -global using System.ComponentModel.DataAnnotations.Schema; global using System.Configuration; global using System.Data; global using System.Data.Common; diff --git a/common/ASC.Data.Reassigns/GlobalUsings.cs b/common/ASC.Data.Reassigns/GlobalUsings.cs index 7d34921508..59694a4e68 100644 --- a/common/ASC.Data.Reassigns/GlobalUsings.cs +++ b/common/ASC.Data.Reassigns/GlobalUsings.cs @@ -35,7 +35,7 @@ global using ASC.Core.Users; global using ASC.Data.Reassigns.Log; global using ASC.Data.Storage; global using ASC.MessagingSystem.Core; -global using ASC.MessagingSystem.Models; +global using ASC.MessagingSystem.EF.Model; global using ASC.Web.Core; global using ASC.Web.Core.Users; global using ASC.Web.Studio.Core.Notify; diff --git a/common/ASC.EventBus.Extensions.Logger/Extensions/IntegrationEventLogExtension.cs b/common/ASC.EventBus.Extensions.Logger/Extensions/IntegrationEventLogExtension.cs index 607f9b8180..a5817635fc 100644 --- a/common/ASC.EventBus.Extensions.Logger/Extensions/IntegrationEventLogExtension.cs +++ b/common/ASC.EventBus.Extensions.Logger/Extensions/IntegrationEventLogExtension.cs @@ -40,7 +40,8 @@ public static class IntegrationEventLogExtension { modelBuilder.Entity(entity => { - entity.ToTable("event_bus_integration_event_log"); + entity.ToTable("event_bus_integration_event_log") + .HasCharSet("utf8"); entity.HasKey(e => e.EventId) .HasName("PRIMARY"); @@ -99,7 +100,65 @@ public static class IntegrationEventLogExtension } public static void PgSqlAddIntegrationEventLog(this ModelBuilder modelBuilder) - { - throw new NotImplementedException(); + { + modelBuilder.Entity(entity => + { + entity.ToTable("event_bus_integration_event_log") + .HasCharSet("utf8"); + + entity.HasKey(e => e.EventId) + .HasName("PRIMARY"); + + entity.HasIndex(e => e.TenantId) + .HasDatabaseName("tenant_id"); + + entity.Property(e => e.EventId) + .HasColumnName("event_id") + .HasColumnType("char(38)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci") + .IsRequired(); + + entity.Property(e => e.Content) + .HasColumnName("content") + .HasColumnType("text") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci") + .IsRequired(); + + entity.Property(e => e.CreateOn) + .HasColumnName("create_on") + .HasColumnType("datetime") + .IsRequired(); + + entity.Property(e => e.CreateBy) + .HasColumnName("create_by") + .HasColumnType("char(38)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci") + .IsRequired(); + + entity.Property(e => e.State) + .HasColumnName("state") + .HasColumnType("int(11)") + .IsRequired(); + + entity.Property(e => e.TimesSent) + .HasColumnName("times_sent") + .HasColumnType("int(11)") + .IsRequired(); + + entity.Property(e => e.EventTypeName) + .HasColumnName("event_type_name") + .HasColumnType("varchar(255)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci") + .IsRequired(); + + entity.Property(e => e.TenantId) + .HasColumnName("tenant_id") + .HasColumnType("int(11)") + .IsRequired(); + }); } } diff --git a/common/ASC.EventBus.Extensions.Logger/IntegrationEventLogContext.cs b/common/ASC.EventBus.Extensions.Logger/IntegrationEventLogContext.cs index 1ba1f79f8c..020dfb3b52 100644 --- a/common/ASC.EventBus.Extensions.Logger/IntegrationEventLogContext.cs +++ b/common/ASC.EventBus.Extensions.Logger/IntegrationEventLogContext.cs @@ -26,9 +26,6 @@ namespace ASC.EventBus.Extensions.Logger; -public class MySqlIntegrationEventLogContext : IntegrationEventLogContext { } -public class PostgreSqlIntegrationEventLogContext : IntegrationEventLogContext { } - public class IntegrationEventLogContext : BaseDbContext { public DbSet IntegrationEventLogs { get; set; } @@ -39,18 +36,6 @@ public class IntegrationEventLogContext : BaseDbContext .AddIntegrationEventLog(); } - - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlIntegrationEventLogContext() } , - { Provider.PostgreSql, () => new PostgreSqlIntegrationEventLogContext() } , - }; - } - } } diff --git a/common/ASC.Feed/Data/FeedDbContext.cs b/common/ASC.Feed/EF/Context/FeedDbContext.cs similarity index 81% rename from common/ASC.Feed/Data/FeedDbContext.cs rename to common/ASC.Feed/EF/Context/FeedDbContext.cs index 725c3fbede..2da0722a9b 100644 --- a/common/ASC.Feed/Data/FeedDbContext.cs +++ b/common/ASC.Feed/EF/Context/FeedDbContext.cs @@ -24,10 +24,8 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.Feed.Data; +namespace ASC.Feed.Context; -public class MySqlFeedDbContext : FeedDbContext { } -public class PostgreSqlFeedDbContext : FeedDbContext { } public class FeedDbContext : BaseDbContext { public DbSet FeedLast { get; set; } @@ -35,18 +33,6 @@ public class FeedDbContext : BaseDbContext public DbSet FeedUsers { get; set; } public DbSet FeedReaded { get; set; } - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlFeedDbContext() } , - { Provider.PostgreSql, () => new PostgreSqlFeedDbContext() } , - }; - } - } - protected override void OnModelCreating(ModelBuilder modelBuilder) { ModelBuilderWrapper diff --git a/common/ASC.Feed/Models/FeedAggregate.cs b/common/ASC.Feed/EF/Model/FeedAggregate.cs similarity index 98% rename from common/ASC.Feed/Models/FeedAggregate.cs rename to common/ASC.Feed/EF/Model/FeedAggregate.cs index 75b369f7c0..3e64d6b510 100644 --- a/common/ASC.Feed/Models/FeedAggregate.cs +++ b/common/ASC.Feed/EF/Model/FeedAggregate.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.Feed.Models; +namespace ASC.Feed.Model; public class FeedAggregate : BaseEntity, IMapFrom { @@ -59,7 +59,8 @@ public static class FeedAggregateExtension { modelBuilder.Entity(entity => { - entity.ToTable("feed_aggregate"); + entity.ToTable("feed_aggregate") + .HasCharSet("utf8"); entity.HasIndex(e => new { e.Tenant, e.AggregateDate }) .HasDatabaseName("aggregated_date"); diff --git a/common/ASC.Feed/Models/FeedLast.cs b/common/ASC.Feed/EF/Model/FeedLast.cs similarity index 96% rename from common/ASC.Feed/Models/FeedLast.cs rename to common/ASC.Feed/EF/Model/FeedLast.cs index a75fecf89f..59c76c601f 100644 --- a/common/ASC.Feed/Models/FeedLast.cs +++ b/common/ASC.Feed/EF/Model/FeedLast.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.Feed.Models; +namespace ASC.Feed.Model; public class FeedLast : BaseEntity { @@ -52,7 +52,8 @@ public static class FeedLastExtension entity.HasKey(e => e.LastKey) .HasName("PRIMARY"); - entity.ToTable("feed_last"); + entity.ToTable("feed_last") + .HasCharSet("utf8"); entity.Property(e => e.LastKey) .HasColumnName("last_key") diff --git a/common/ASC.Feed/Models/FeedReaded.cs b/common/ASC.Feed/EF/Model/FeedReaded.cs similarity index 97% rename from common/ASC.Feed/Models/FeedReaded.cs rename to common/ASC.Feed/EF/Model/FeedReaded.cs index 2eb65bf5fe..478d6e5ed7 100644 --- a/common/ASC.Feed/Models/FeedReaded.cs +++ b/common/ASC.Feed/EF/Model/FeedReaded.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.Feed.Models; +namespace ASC.Feed.Model; public class FeedReaded : BaseEntity { @@ -55,7 +55,8 @@ public static class FeedReadedExtension entity.HasKey(e => new { e.Tenant, e.UserId, e.Module }) .HasName("PRIMARY"); - entity.ToTable("feed_readed"); + entity.ToTable("feed_readed") + .HasCharSet("utf8"); entity.Property(e => e.Tenant).HasColumnName("tenant_id"); diff --git a/common/ASC.Feed/Models/FeedUsers.cs b/common/ASC.Feed/EF/Model/FeedUsers.cs similarity index 97% rename from common/ASC.Feed/Models/FeedUsers.cs rename to common/ASC.Feed/EF/Model/FeedUsers.cs index 7d9724a397..4776769479 100644 --- a/common/ASC.Feed/Models/FeedUsers.cs +++ b/common/ASC.Feed/EF/Model/FeedUsers.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.Feed.Models; +namespace ASC.Feed.Model; public class FeedUsers : BaseEntity { @@ -54,7 +54,8 @@ public static class FeedUsersExtension entity.HasKey(e => new { e.FeedId, e.UserId }) .HasName("PRIMARY"); - entity.ToTable("feed_users"); + entity.ToTable("feed_users") + .HasCharSet("utf8"); entity.HasIndex(e => e.UserId) .HasDatabaseName("user_id"); diff --git a/common/ASC.Feed/GlobalUsings.cs b/common/ASC.Feed/GlobalUsings.cs index 346c4710ed..509380efc1 100644 --- a/common/ASC.Feed/GlobalUsings.cs +++ b/common/ASC.Feed/GlobalUsings.cs @@ -34,10 +34,11 @@ global using ASC.Core.Common.EF; global using ASC.Core.Common.EF.Model; global using ASC.Core.Tenants; global using ASC.Core.Users; +global using ASC.Feed.Context; global using ASC.Feed.Core; global using ASC.Feed.Data; global using ASC.Feed.Mapping; -global using ASC.Feed.Models; +global using ASC.Feed.Model; global using Autofac; diff --git a/common/ASC.Feed/Migrations/MySql/FeedDbContextMySql/20211012145328_FeedDbContextMySql.Designer.cs b/common/ASC.Feed/Migrations/MySql/FeedDbContextMySql/20211012145328_FeedDbContextMySql.Designer.cs deleted file mode 100644 index c8d0923996..0000000000 --- a/common/ASC.Feed/Migrations/MySql/FeedDbContextMySql/20211012145328_FeedDbContextMySql.Designer.cs +++ /dev/null @@ -1,172 +0,0 @@ -// - -namespace ASC.Feed.Migrations.MySql.FeedDbContextMySql -{ - [DbContext(typeof(MySqlFeedDbContext))] - [Migration("20211012145328_FeedDbContextMySql")] - partial class FeedDbContextMySql - { - 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.FeedAggregate", b => - { - b.Property("Id") - .HasColumnType("varchar(88)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AggregateDate") - .HasColumnType("datetime") - .HasColumnName("aggregated_date"); - - b.Property("Author") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("author") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreatedDate") - .HasColumnType("datetime") - .HasColumnName("created_date"); - - b.Property("GroupId") - .HasColumnType("varchar(70)") - .HasColumnName("group_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Json") - .IsRequired() - .HasColumnType("mediumtext") - .HasColumnName("json") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Keywords") - .HasColumnType("text") - .HasColumnName("keywords") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedDate") - .HasColumnType("datetime") - .HasColumnName("modified_date"); - - b.Property("Module") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("module") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Product") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("product") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("Tenant", "AggregateDate") - .HasDatabaseName("aggregated_date"); - - b.HasIndex("Tenant", "ModifiedDate") - .HasDatabaseName("modified_date"); - - b.HasIndex("Tenant", "Product") - .HasDatabaseName("product"); - - b.ToTable("feed_aggregate"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.FeedLast", b => - { - b.Property("LastKey") - .HasColumnType("varchar(128)") - .HasColumnName("last_key") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastDate") - .HasColumnType("datetime") - .HasColumnName("last_date"); - - b.HasKey("LastKey") - .HasName("PRIMARY"); - - b.ToTable("feed_last"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.FeedReaded", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Module") - .HasColumnType("varchar(50)") - .HasColumnName("module") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TimeStamp") - .HasColumnType("datetime") - .HasColumnName("timestamp"); - - b.HasKey("Tenant", "UserId", "Module") - .HasName("PRIMARY"); - - b.ToTable("feed_readed"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.FeedUsers", b => - { - b.Property("FeedId") - .HasColumnType("varchar(88)") - .HasColumnName("feed_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("char(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("FeedId", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("UserId") - .HasDatabaseName("user_id"); - - b.ToTable("feed_users"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Feed/Migrations/MySql/FeedDbContextMySql/20211012145328_FeedDbContextMySql.cs b/common/ASC.Feed/Migrations/MySql/FeedDbContextMySql/20211012145328_FeedDbContextMySql.cs deleted file mode 100644 index fd094df5f5..0000000000 --- a/common/ASC.Feed/Migrations/MySql/FeedDbContextMySql/20211012145328_FeedDbContextMySql.cs +++ /dev/null @@ -1,148 +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.Feed.Migrations.MySql.FeedDbContextMySql; - -public partial class FeedDbContextMySql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "feed_aggregate", - columns: table => new - { - id = table.Column(type: "varchar(88)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant = table.Column(type: "int", nullable: false), - product = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - module = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - author = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - modified_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - created_date = table.Column(type: "datetime", nullable: false), - modified_date = table.Column(type: "datetime", nullable: false), - group_id = table.Column(type: "varchar(70)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - aggregated_date = table.Column(type: "datetime", nullable: false), - json = table.Column(type: "mediumtext", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - keywords = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PK_feed_aggregate", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "feed_last", - columns: table => new - { - last_key = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - last_date = table.Column(type: "datetime", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.last_key); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "feed_readed", - columns: table => new - { - user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - module = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant_id = table.Column(type: "int", nullable: false), - timestamp = table.Column(type: "datetime", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.user_id, x.module }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "feed_users", - columns: table => new - { - feed_id = table.Column(type: "varchar(88)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - user_id = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.feed_id, x.user_id }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "aggregated_date", - table: "feed_aggregate", - columns: new[] { "tenant", "aggregated_date" }); - - migrationBuilder.CreateIndex( - name: "modified_date", - table: "feed_aggregate", - columns: new[] { "tenant", "modified_date" }); - - migrationBuilder.CreateIndex( - name: "product", - table: "feed_aggregate", - columns: new[] { "tenant", "product" }); - - migrationBuilder.CreateIndex( - name: "user_id", - table: "feed_users", - column: "user_id"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "feed_aggregate"); - - migrationBuilder.DropTable( - name: "feed_last"); - - migrationBuilder.DropTable( - name: "feed_readed"); - - migrationBuilder.DropTable( - name: "feed_users"); - } -} diff --git a/common/ASC.Feed/Migrations/MySql/FeedDbContextMySql/MySqlFeedDbContextModelSnapshot.cs b/common/ASC.Feed/Migrations/MySql/FeedDbContextMySql/MySqlFeedDbContextModelSnapshot.cs deleted file mode 100644 index 3cb98fd445..0000000000 --- a/common/ASC.Feed/Migrations/MySql/FeedDbContextMySql/MySqlFeedDbContextModelSnapshot.cs +++ /dev/null @@ -1,171 +0,0 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.FeedDbContextMySql -{ - [DbContext(typeof(MySqlFeedDbContext))] - partial class MySqlFeedDbContextModelSnapshot : 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.FeedAggregate", b => - { - b.Property("Id") - .HasColumnType("varchar(88)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AggregateDate") - .HasColumnType("datetime") - .HasColumnName("aggregated_date"); - - b.Property("Author") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("author") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreatedDate") - .HasColumnType("datetime") - .HasColumnName("created_date"); - - b.Property("GroupId") - .HasColumnType("varchar(70)") - .HasColumnName("group_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Json") - .IsRequired() - .HasColumnType("mediumtext") - .HasColumnName("json") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Keywords") - .HasColumnType("text") - .HasColumnName("keywords") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedDate") - .HasColumnType("datetime") - .HasColumnName("modified_date"); - - b.Property("Module") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("module") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Product") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("product") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("Tenant", "AggregateDate") - .HasDatabaseName("aggregated_date"); - - b.HasIndex("Tenant", "ModifiedDate") - .HasDatabaseName("modified_date"); - - b.HasIndex("Tenant", "Product") - .HasDatabaseName("product"); - - b.ToTable("feed_aggregate"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.FeedLast", b => - { - b.Property("LastKey") - .HasColumnType("varchar(128)") - .HasColumnName("last_key") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastDate") - .HasColumnType("datetime") - .HasColumnName("last_date"); - - b.HasKey("LastKey") - .HasName("PRIMARY"); - - b.ToTable("feed_last"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.FeedReaded", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Module") - .HasColumnType("varchar(50)") - .HasColumnName("module") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TimeStamp") - .HasColumnType("datetime") - .HasColumnName("timestamp"); - - b.HasKey("Tenant", "UserId", "Module") - .HasName("PRIMARY"); - - b.ToTable("feed_readed"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.FeedUsers", b => - { - b.Property("FeedId") - .HasColumnType("varchar(88)") - .HasColumnName("feed_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("char(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("FeedId", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("UserId") - .HasDatabaseName("user_id"); - - b.ToTable("feed_users"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/common/ASC.Feed/Migrations/PostgreSql/FeedDbContextPostgreSql/20211012145329_FeedDbContextPostgreSql.cs b/common/ASC.Feed/Migrations/PostgreSql/FeedDbContextPostgreSql/20211012145329_FeedDbContextPostgreSql.cs deleted file mode 100644 index 91efe39311..0000000000 --- a/common/ASC.Feed/Migrations/PostgreSql/FeedDbContextPostgreSql/20211012145329_FeedDbContextPostgreSql.cs +++ /dev/null @@ -1,148 +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.Feed.Migrations.PostgreSql.FeedDbContextPostgreSql; - -public partial class FeedDbContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "feed_aggregate", - columns: table => new - { - id = table.Column(type: "varchar(88)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant = table.Column(type: "int", nullable: false), - product = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - module = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - author = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - modified_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - created_date = table.Column(type: "datetime", nullable: false), - modified_date = table.Column(type: "datetime", nullable: false), - group_id = table.Column(type: "varchar(70)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - aggregated_date = table.Column(type: "datetime", nullable: false), - json = table.Column(type: "mediumtext", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - keywords = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PK_feed_aggregate", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "feed_last", - columns: table => new - { - last_key = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - last_date = table.Column(type: "datetime", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.last_key); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "feed_readed", - columns: table => new - { - user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - module = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant_id = table.Column(type: "int", nullable: false), - timestamp = table.Column(type: "datetime", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.user_id, x.module }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "feed_users", - columns: table => new - { - feed_id = table.Column(type: "varchar(88)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - user_id = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.feed_id, x.user_id }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "aggregated_date", - table: "feed_aggregate", - columns: new[] { "tenant", "aggregated_date" }); - - migrationBuilder.CreateIndex( - name: "modified_date", - table: "feed_aggregate", - columns: new[] { "tenant", "modified_date" }); - - migrationBuilder.CreateIndex( - name: "product", - table: "feed_aggregate", - columns: new[] { "tenant", "product" }); - - migrationBuilder.CreateIndex( - name: "user_id", - table: "feed_users", - column: "user_id"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "feed_aggregate"); - - migrationBuilder.DropTable( - name: "feed_last"); - - migrationBuilder.DropTable( - name: "feed_readed"); - - migrationBuilder.DropTable( - name: "feed_users"); - } -} diff --git a/common/ASC.MessagingSystem/Models/MessagePolicy.cs b/common/ASC.MessagingSystem/EF/Model/MessagePolicy.cs similarity index 98% rename from common/ASC.MessagingSystem/Models/MessagePolicy.cs rename to common/ASC.MessagingSystem/EF/Model/MessagePolicy.cs index 4643bf0d48..a53988b1bd 100644 --- a/common/ASC.MessagingSystem/Models/MessagePolicy.cs +++ b/common/ASC.MessagingSystem/EF/Model/MessagePolicy.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.MessagingSystem.Models; +namespace ASC.MessagingSystem.EF.Model; [Singletone] public class MessagePolicy diff --git a/common/ASC.MessagingSystem/Models/MessageUserData.cs b/common/ASC.MessagingSystem/EF/Model/MessageUserData.cs similarity index 97% rename from common/ASC.MessagingSystem/Models/MessageUserData.cs rename to common/ASC.MessagingSystem/EF/Model/MessageUserData.cs index a04787f5b2..bb10475fe6 100644 --- a/common/ASC.MessagingSystem/Models/MessageUserData.cs +++ b/common/ASC.MessagingSystem/EF/Model/MessageUserData.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.MessagingSystem.Models; +namespace ASC.MessagingSystem.EF.Model; public class MessageUserData { diff --git a/common/ASC.MessagingSystem/GlobalUsings.cs b/common/ASC.MessagingSystem/GlobalUsings.cs index 5f699ba0b2..abee5bd72d 100644 --- a/common/ASC.MessagingSystem/GlobalUsings.cs +++ b/common/ASC.MessagingSystem/GlobalUsings.cs @@ -32,10 +32,11 @@ global using ASC.Core; global using ASC.Core.Common.EF; global using ASC.MessagingSystem.Core; global using ASC.MessagingSystem.Core.Sender; -global using ASC.MessagingSystem.Data; +global using ASC.MessagingSystem.Data; +global using ASC.MessagingSystem.EF.Context; +global using ASC.MessagingSystem.EF.Model; global using ASC.MessagingSystem.Log; global using ASC.MessagingSystem.Mapping; -global using ASC.MessagingSystem.Models; global using AutoMapper; diff --git a/common/ASC.Core.Common/EF/Context/ResourceDbContext.cs b/common/ASC.Resource.Manager/EF/Context/ResourceDbContext.cs similarity index 92% rename from common/ASC.Core.Common/EF/Context/ResourceDbContext.cs rename to common/ASC.Resource.Manager/EF/Context/ResourceDbContext.cs index 933eabcacb..3af2b7f7cf 100644 --- a/common/ASC.Core.Common/EF/Context/ResourceDbContext.cs +++ b/common/ASC.Resource.Manager/EF/Context/ResourceDbContext.cs @@ -1,72 +1,82 @@ -// (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 MySqlResourceDbContext : ResourceDbContext { } -public class PostgreSqlResourceDbContext : ResourceDbContext { } -public class ResourceDbContext : BaseDbContext -{ - public DbSet Authors { get; set; } - public DbSet ResAuthorsFiles { get; set; } - public DbSet ResAuthorsLang { get; set; } - public DbSet ResCultures { get; set; } - public DbSet ResData { get; set; } - public DbSet ResFiles { get; set; } - public DbSet ResReserve { get; set; } - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlResourceDbContext() } , - { Provider.PostgreSql, () => new PostgreSqlResourceDbContext() } , - }; - } - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - ModelBuilderWrapper - .From(modelBuilder, _provider) - .AddResAuthorsLang() - .AddResAuthorsFile() - .AddResCultures() - .AddResFiles() - .AddResData() - .AddResAuthors() - .AddResReserve(); - } -} - -public static class ResourceDbExtension -{ - public static DIHelper AddResourceDbService(this DIHelper services) - { - return services.AddDbContextManagerService(); - } -} +// (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 + +using System; +using System.Collections.Generic; + +using ASC.Common; +using ASC.Core.Common.EF; +using ASC.Core.Common.EF.Model; +using ASC.Resource.Manager.EF.Model; + +using Microsoft.EntityFrameworkCore; + +namespace ASC.Resource.Manager.EF.Context; + +public class MySqlResourceDbContext : ResourceDbContext { } +public class PostgreSqlResourceDbContext : ResourceDbContext { } +public class ResourceDbContext : BaseDbContext +{ + public DbSet Authors { get; set; } + public DbSet ResAuthorsFiles { get; set; } + public DbSet ResAuthorsLang { get; set; } + public DbSet ResCultures { get; set; } + public DbSet ResData { get; set; } + public DbSet ResFiles { get; set; } + public DbSet ResReserve { get; set; } + protected override Dictionary> ProviderContext + { + get + { + return new Dictionary>() + { + { Provider.MySql, () => new MySqlResourceDbContext() } , + { Provider.PostgreSql, () => new PostgreSqlResourceDbContext() } , + }; + } + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + ModelBuilderWrapper + .From(modelBuilder, _provider) + .AddResAuthorsLang() + .AddResAuthorsFile() + .AddResCultures() + .AddResFiles() + .AddResData() + .AddResAuthors() + .AddResReserve(); + } +} + +public static class ResourceDbExtension +{ + public static DIHelper AddResourceDbService(this DIHelper services) + { + return services.AddDbContextManagerService(); + } +} diff --git a/common/ASC.Core.Common/EF/Model/Resource/ResAuthors.cs b/common/ASC.Resource.Manager/EF/Model/ResAuthors.cs similarity index 83% rename from common/ASC.Core.Common/EF/Model/Resource/ResAuthors.cs rename to common/ASC.Resource.Manager/EF/Model/ResAuthors.cs index 963df03d08..8fbfc7a94f 100644 --- a/common/ASC.Core.Common/EF/Model/Resource/ResAuthors.cs +++ b/common/ASC.Resource.Manager/EF/Model/ResAuthors.cs @@ -1,103 +1,118 @@ -// (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.Resource; - -public class ResAuthors -{ - public string Login { get; set; } - public string Password { get; set; } - public bool IsAdmin { get; set; } - public bool Online { get; set; } - public DateTime LastVisit { get; set; } -} -public static class ResAuthorsExtension -{ - public static ModelBuilderWrapper AddResAuthors(this ModelBuilderWrapper modelBuilder) - { - modelBuilder - .Add(MySqlAddResAuthors, Provider.MySql) - .Add(PgSqlAddResAuthors, Provider.PostgreSql); - - return modelBuilder; - } - public static void MySqlAddResAuthors(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.Login) - .HasName("PRIMARY"); - - entity.ToTable("res_authors"); - - entity.Property(e => e.Login) - .HasColumnName("login") - .HasColumnType("varchar(150)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.IsAdmin).HasColumnName("isAdmin"); - - entity.Property(e => e.LastVisit) - .HasColumnName("lastVisit") - .HasColumnType("datetime"); - - entity.Property(e => e.Online).HasColumnName("online"); - - entity.Property(e => e.Password) - .IsRequired() - .HasColumnName("password") - .HasColumnType("varchar(50)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - }); - } - public static void PgSqlAddResAuthors(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.Login) - .HasName("res_authors_pkey"); - - entity.ToTable("res_authors", "onlyoffice"); - - entity.Property(e => e.Login) - .HasColumnName("login") - .HasMaxLength(150); - - entity.Property(e => e.IsAdmin).HasColumnName("isAdmin"); - - entity.Property(e => e.LastVisit).HasColumnName("lastVisit"); - - entity.Property(e => e.Online).HasColumnName("online"); - - entity.Property(e => e.Password) - .IsRequired() - .HasColumnName("password") - .HasMaxLength(50); - }); - } -} +// (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 + +using System; + +using ASC.Core.Common.EF; +using ASC.Core.Common.EF.Model; + +using Microsoft.EntityFrameworkCore; + +namespace ASC.Resource.Manager.EF.Model; + +public class ResAuthors +{ + public string Login { get; set; } + public string Password { get; set; } + public bool IsAdmin { get; set; } + public bool Online { get; set; } + public DateTime? LastVisit { get; set; } +} +public static class ResAuthorsExtension +{ + public static ModelBuilderWrapper AddResAuthors(this ModelBuilderWrapper modelBuilder) + { + modelBuilder + .Add(MySqlAddResAuthors, Provider.MySql) + .Add(PgSqlAddResAuthors, Provider.PostgreSql); + + return modelBuilder; + } + public static void MySqlAddResAuthors(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Login) + .HasName("PRIMARY"); + + entity.ToTable("res_authors") + .HasCharSet("utf8"); + + entity.Property(e => e.Login) + .HasColumnName("login") + .HasColumnType("varchar(150)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.IsAdmin) + .HasColumnName("isAdmin") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.LastVisit) + .HasColumnName("lastVisit") + .IsRequired(false) + .HasColumnType("datetime") + .HasDefaultValueSql("NULL"); + + entity.Property(e => e.Online) + .HasColumnType("int") + .HasColumnName("online") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Password) + .IsRequired() + .HasColumnName("password") + .HasColumnType("varchar(50)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + }); + } + public static void PgSqlAddResAuthors(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Login) + .HasName("res_authors_pkey"); + + entity.ToTable("res_authors", "onlyoffice"); + + entity.Property(e => e.Login) + .HasColumnName("login") + .HasMaxLength(150); + + entity.Property(e => e.IsAdmin).HasColumnName("isAdmin"); + + entity.Property(e => e.LastVisit).HasColumnName("lastVisit"); + + entity.Property(e => e.Online).HasColumnName("online"); + + entity.Property(e => e.Password) + .IsRequired() + .HasColumnName("password") + .HasMaxLength(50); + }); + } +} diff --git a/common/ASC.Core.Common/EF/Model/Resource/ResAuthorsFile.cs b/common/ASC.Resource.Manager/EF/Model/ResAuthorsFile.cs similarity index 88% rename from common/ASC.Core.Common/EF/Model/Resource/ResAuthorsFile.cs rename to common/ASC.Resource.Manager/EF/Model/ResAuthorsFile.cs index fa72da56e0..abaa5caea5 100644 --- a/common/ASC.Core.Common/EF/Model/Resource/ResAuthorsFile.cs +++ b/common/ASC.Resource.Manager/EF/Model/ResAuthorsFile.cs @@ -1,90 +1,99 @@ -// (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.Resource; - -public class ResAuthorsFile -{ - public string AuthorLogin { get; set; } - public int FileId { get; set; } - public bool WriteAccess { get; set; } -} - -public static class ResAuthorsFileExtension -{ - public static ModelBuilderWrapper AddResAuthorsFile(this ModelBuilderWrapper modelBuilder) - { - modelBuilder - .Add(MySqlAddResAuthorsFile, Provider.MySql) - .Add(PgSqlAddResAuthorsFile, Provider.PostgreSql); - - return modelBuilder; - } - public static void MySqlAddResAuthorsFile(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.AuthorLogin, e.FileId }) - .HasName("PRIMARY"); - - entity.ToTable("res_authorsfile"); - - entity.HasIndex(e => e.FileId) - .HasDatabaseName("res_authorsfile_FK2"); - - entity.Property(e => e.AuthorLogin) - .HasColumnName("authorLogin") - .HasColumnType("varchar(50)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.FileId).HasColumnName("fileid"); - - entity.Property(e => e.WriteAccess).HasColumnName("writeAccess"); - }); - } - public static void PgSqlAddResAuthorsFile(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.AuthorLogin, e.FileId }) - .HasName("res_authorsfile_pkey"); - - entity.ToTable("res_authorsfile", "onlyoffice"); - - entity.HasIndex(e => e.FileId) - .HasDatabaseName("res_authorsfile_FK2"); - - entity.Property(e => e.AuthorLogin) - .HasColumnName("authorLogin") - .HasMaxLength(50); - - entity.Property(e => e.FileId).HasColumnName("fileid"); - - entity.Property(e => e.WriteAccess).HasColumnName("writeAccess"); - }); - } -} +// (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 + +using ASC.Core.Common.EF; +using ASC.Core.Common.EF.Model; + +using Microsoft.EntityFrameworkCore; + +namespace ASC.Resource.Manager.EF.Model; + +public class ResAuthorsFile +{ + public string AuthorLogin { get; set; } + public int FileId { get; set; } + public bool? WriteAccess { get; set; } +} + +public static class ResAuthorsFileExtension +{ + public static ModelBuilderWrapper AddResAuthorsFile(this ModelBuilderWrapper modelBuilder) + { + modelBuilder + .Add(MySqlAddResAuthorsFile, Provider.MySql) + .Add(PgSqlAddResAuthorsFile, Provider.PostgreSql); + + return modelBuilder; + } + public static void MySqlAddResAuthorsFile(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.AuthorLogin, e.FileId }) + .HasName("PRIMARY"); + + entity.ToTable("res_authorsfile") + .HasCharSet("utf8"); + + entity.HasIndex(e => e.FileId) + .HasDatabaseName("res_authorsfile_FK2"); + + entity.Property(e => e.AuthorLogin) + .HasColumnName("authorLogin") + .HasColumnType("varchar(50)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.FileId).HasColumnName("fileid"); + + entity.Property(e => e.WriteAccess) + .HasColumnName("writeAccess") + .IsRequired(false) + .HasDefaultValueSql("NULL"); + }); + } + public static void PgSqlAddResAuthorsFile(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.AuthorLogin, e.FileId }) + .HasName("res_authorsfile_pkey"); + + entity.ToTable("res_authorsfile", "onlyoffice"); + + entity.HasIndex(e => e.FileId) + .HasDatabaseName("res_authorsfile_FK2"); + + entity.Property(e => e.AuthorLogin) + .HasColumnName("authorLogin") + .HasMaxLength(50); + + entity.Property(e => e.FileId).HasColumnName("fileid"); + + entity.Property(e => e.WriteAccess).HasColumnName("writeAccess"); + }); + } +} diff --git a/common/ASC.Core.Common/EF/Model/Resource/ResAuthorsLang.cs b/common/ASC.Resource.Manager/EF/Model/ResAuthorsLang.cs similarity index 94% rename from common/ASC.Core.Common/EF/Model/Resource/ResAuthorsLang.cs rename to common/ASC.Resource.Manager/EF/Model/ResAuthorsLang.cs index 6f008a2253..616b4bc54d 100644 --- a/common/ASC.Core.Common/EF/Model/Resource/ResAuthorsLang.cs +++ b/common/ASC.Resource.Manager/EF/Model/ResAuthorsLang.cs @@ -1,91 +1,97 @@ -// (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.Resource; - -public class ResAuthorsLang -{ - public string AuthorLogin { get; set; } - public string CultureTitle { get; set; } -} - -public static class ResAuthorsLangExtension -{ - public static ModelBuilderWrapper AddResAuthorsLang(this ModelBuilderWrapper modelBuilder) - { - modelBuilder - .Add(MySqlAddResAuthorsLang, Provider.MySql) - .Add(PgSqlAddResAuthorsLang, Provider.PostgreSql); - - return modelBuilder; - } - public static void MySqlAddResAuthorsLang(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.AuthorLogin, e.CultureTitle }) - .HasName("PRIMARY"); - - entity.ToTable("res_authorslang"); - - entity.HasIndex(e => e.CultureTitle) - .HasDatabaseName("res_authorslang_FK2"); - - entity.Property(e => e.AuthorLogin) - .HasColumnName("authorLogin") - .HasColumnType("varchar(50)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.CultureTitle) - .HasColumnName("cultureTitle") - .HasColumnType("varchar(20)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - }); - } - public static void PgSqlAddResAuthorsLang(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.AuthorLogin, e.CultureTitle }) - .HasName("res_authorslang_pkey"); - - entity.ToTable("res_authorslang", "onlyoffice"); - - entity.HasIndex(e => e.CultureTitle) - .HasDatabaseName("res_authorslang_FK2"); - - entity.Property(e => e.AuthorLogin) - .HasColumnName("authorLogin") - .HasMaxLength(50); - - entity.Property(e => e.CultureTitle) - .HasColumnName("cultureTitle") - .HasMaxLength(50); - }); - } -} +// (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 + +using ASC.Core.Common.EF; +using ASC.Core.Common.EF.Model; + +using Microsoft.EntityFrameworkCore; + +namespace ASC.Resource.Manager.EF.Model; + +public class ResAuthorsLang +{ + public string AuthorLogin { get; set; } + public string CultureTitle { get; set; } +} + +public static class ResAuthorsLangExtension +{ + public static ModelBuilderWrapper AddResAuthorsLang(this ModelBuilderWrapper modelBuilder) + { + modelBuilder + .Add(MySqlAddResAuthorsLang, Provider.MySql) + .Add(PgSqlAddResAuthorsLang, Provider.PostgreSql); + + return modelBuilder; + } + public static void MySqlAddResAuthorsLang(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.AuthorLogin, e.CultureTitle }) + .HasName("PRIMARY"); + + entity.ToTable("res_authorslang") + .HasCharSet("utf8"); + + entity.HasIndex(e => e.CultureTitle) + .HasDatabaseName("res_authorslang_FK2"); + + entity.Property(e => e.AuthorLogin) + .HasColumnName("authorLogin") + .HasColumnType("varchar(50)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.CultureTitle) + .HasColumnName("cultureTitle") + .HasColumnType("varchar(20)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + }); + } + public static void PgSqlAddResAuthorsLang(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.AuthorLogin, e.CultureTitle }) + .HasName("res_authorslang_pkey"); + + entity.ToTable("res_authorslang", "onlyoffice"); + + entity.HasIndex(e => e.CultureTitle) + .HasDatabaseName("res_authorslang_FK2"); + + entity.Property(e => e.AuthorLogin) + .HasColumnName("authorLogin") + .HasMaxLength(50); + + entity.Property(e => e.CultureTitle) + .HasColumnName("cultureTitle") + .HasMaxLength(50); + }); + } +} diff --git a/common/ASC.Core.Common/EF/Model/Resource/ResCultures.cs b/common/ASC.Resource.Manager/EF/Model/ResCultures.cs similarity index 94% rename from common/ASC.Core.Common/EF/Model/Resource/ResCultures.cs rename to common/ASC.Resource.Manager/EF/Model/ResCultures.cs index 1436c1fdd1..7b56aa3897 100644 --- a/common/ASC.Core.Common/EF/Model/Resource/ResCultures.cs +++ b/common/ASC.Resource.Manager/EF/Model/ResCultures.cs @@ -1,105 +1,113 @@ -// (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.Resource; - -public class ResCultures -{ - public string Title { get; set; } - public string Value { get; set; } - public bool Available { get; set; } - public DateTime CreationDate { get; set; } -} - -public static class ResCulturesExtension -{ - public static ModelBuilderWrapper AddResCultures(this ModelBuilderWrapper modelBuilder) - { - modelBuilder - .Add(MySqlAddResCultures, Provider.MySql) - .Add(PgSqlAddResCultures, Provider.PostgreSql); - - return modelBuilder; - } - - public static void MySqlAddResCultures(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.Title) - .HasName("PRIMARY"); - - entity.ToTable("res_cultures"); - - entity.Property(e => e.Title) - .HasColumnName("title") - .HasColumnType("varchar(120)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.Available).HasColumnName("available"); - - entity.Property(e => e.CreationDate) - .HasColumnName("creationDate") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - entity.Property(e => e.Value) - .IsRequired() - .HasColumnName("value") - .HasColumnType("varchar(120)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - }); - } - public static void PgSqlAddResCultures(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.Title) - .HasName("res_cultures_pkey"); - - entity.ToTable("res_cultures", "onlyoffice"); - - entity.Property(e => e.Title) - .HasColumnName("title") - .HasColumnType("character varying"); - - entity.Property(e => e.Available) - .HasColumnName("available") - .HasDefaultValueSql("'0'"); - - entity.Property(e => e.CreationDate) - .HasColumnName("creationDate") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - entity.Property(e => e.Value) - .IsRequired() - .HasColumnName("value") - .HasColumnType("character varying"); - }); - } -} +// (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 + +using System; + +using ASC.Core.Common.EF; +using ASC.Core.Common.EF.Model; + +using Microsoft.EntityFrameworkCore; + +namespace ASC.Resource.Manager.EF.Model; + +public class ResCultures +{ + public string Title { get; set; } + public string Value { get; set; } + public bool Available { get; set; } + public DateTime CreationDate { get; set; } +} + +public static class ResCulturesExtension +{ + public static ModelBuilderWrapper AddResCultures(this ModelBuilderWrapper modelBuilder) + { + modelBuilder + .Add(MySqlAddResCultures, Provider.MySql) + .Add(PgSqlAddResCultures, Provider.PostgreSql); + + return modelBuilder; + } + + public static void MySqlAddResCultures(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Title) + .HasName("PRIMARY"); + + entity.ToTable("res_cultures") + .HasCharSet("utf8"); + + entity.Property(e => e.Title) + .HasColumnName("title") + .HasColumnType("varchar(120)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.Available).HasColumnName("available"); + + entity.Property(e => e.CreationDate) + .HasColumnName("creationDate") + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + entity.Property(e => e.Value) + .IsRequired() + .HasColumnName("value") + .HasColumnType("varchar(120)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + }); + } + public static void PgSqlAddResCultures(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Title) + .HasName("res_cultures_pkey"); + + entity.ToTable("res_cultures", "onlyoffice"); + + entity.Property(e => e.Title) + .HasColumnName("title") + .HasColumnType("character varying"); + + entity.Property(e => e.Available) + .HasColumnName("available") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.CreationDate) + .HasColumnName("creationDate") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + entity.Property(e => e.Value) + .IsRequired() + .HasColumnName("value") + .HasColumnType("character varying"); + }); + } +} diff --git a/common/ASC.Core.Common/EF/Model/Resource/ResData.cs b/common/ASC.Resource.Manager/EF/Model/ResData.cs similarity index 92% rename from common/ASC.Core.Common/EF/Model/Resource/ResData.cs rename to common/ASC.Resource.Manager/EF/Model/ResData.cs index 19d6622c6c..54cf1f1e2a 100644 --- a/common/ASC.Core.Common/EF/Model/Resource/ResData.cs +++ b/common/ASC.Resource.Manager/EF/Model/ResData.cs @@ -1,193 +1,200 @@ -// (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.Resource; - -public class ResData -{ - public int Id { get; set; } - public int FileId { get; set; } - public string Title { get; set; } - public string CultureTitle { get; set; } - public string TextValue { get; set; } - public string Description { get; set; } - public DateTime TimeChanges { get; set; } - public string ResourceType { get; set; } - public int Flag { get; set; } - public string Link { get; set; } - public string AuthorLogin { get; set; } -} - -public static class ResDataExtension -{ - public static ModelBuilderWrapper AddResData(this ModelBuilderWrapper modelBuilder) - { - modelBuilder - .Add(MySqlAddResData, Provider.MySql) - .Add(PgSqlAddResData, Provider.PostgreSql); - - return modelBuilder; - } - - public static void MySqlAddResData(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.FileId, e.CultureTitle, e.Title }) - .HasName("PRIMARY"); - - entity.ToTable("res_data"); - - entity.HasIndex(e => e.CultureTitle) - .HasDatabaseName("resources_FK2"); - - entity.HasIndex(e => e.Id) - .HasDatabaseName("id") - .IsUnique(); - - entity.HasIndex(e => e.TimeChanges) - .HasDatabaseName("dateIndex"); - - entity.Property(e => e.FileId).HasColumnName("fileid"); - - entity.Property(e => e.CultureTitle) - .HasColumnName("cultureTitle") - .HasColumnType("varchar(20)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.Title) - .HasColumnName("title") - .HasColumnType("varchar(120)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.AuthorLogin) - .IsRequired() - .HasColumnName("authorLogin") - .HasColumnType("varchar(50)") - .HasDefaultValueSql("'Console'") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.Description) - .HasColumnName("description") - .HasColumnType("text") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.Flag).HasColumnName("flag"); - - entity.Property(e => e.Id) - .HasColumnName("id") - .ValueGeneratedOnAdd(); - - entity.Property(e => e.Link) - .HasColumnName("link") - .HasColumnType("varchar(120)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.ResourceType) - .HasColumnName("resourceType") - .HasColumnType("varchar(20)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.TextValue) - .HasColumnName("textValue") - .HasColumnType("text") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.TimeChanges) - .HasColumnName("timeChanges") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP") - .ValueGeneratedOnAddOrUpdate(); - }); - } - public static void PgSqlAddResData(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.FileId, e.CultureTitle, e.Title }) - .HasName("res_data_pkey"); - - entity.ToTable("res_data", "onlyoffice"); - - entity.HasIndex(e => e.CultureTitle) - .HasDatabaseName("resources_FK2"); - - entity.HasIndex(e => e.Id) - .HasDatabaseName("id_res_data") - .IsUnique(); - - entity.HasIndex(e => e.TimeChanges) - .HasDatabaseName("dateIndex"); - - entity.Property(e => e.FileId).HasColumnName("fileid"); - - entity.Property(e => e.CultureTitle) - .HasColumnName("cultureTitle") - .HasMaxLength(20); - - entity.Property(e => e.Title) - .HasColumnName("title") - .HasMaxLength(120); - - entity.Property(e => e.AuthorLogin) - .IsRequired() - .HasColumnName("authorLogin") - .HasMaxLength(50) - .HasDefaultValueSql("'Console'"); - - entity.Property(e => e.Description).HasColumnName("description"); - - entity.Property(e => e.Flag).HasColumnName("flag"); - - entity.Property(e => e.Id) - .HasColumnName("id") - .ValueGeneratedOnAdd(); - - entity.Property(e => e.Link) - .HasColumnName("link") - .HasMaxLength(120) - .HasDefaultValueSql("NULL"); - - entity.Property(e => e.ResourceType) - .HasColumnName("resourceType") - .HasMaxLength(20) - .HasDefaultValueSql("NULL"); - - entity.Property(e => e.TextValue).HasColumnName("textValue"); - - entity.Property(e => e.TimeChanges) - .HasColumnName("timeChanges") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - }); - } -} +// (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 + +using System; + +using ASC.Core.Common.EF; +using ASC.Core.Common.EF.Model; + +using Microsoft.EntityFrameworkCore; + +namespace ASC.Resource.Manager.EF.Model; + +public class ResData +{ + public int Id { get; set; } + public int FileId { get; set; } + public string Title { get; set; } + public string CultureTitle { get; set; } + public string TextValue { get; set; } + public string Description { get; set; } + public DateTime TimeChanges { get; set; } + public string ResourceType { get; set; } + public int Flag { get; set; } + public string Link { get; set; } + public string AuthorLogin { get; set; } +} + +public static class ResDataExtension +{ + public static ModelBuilderWrapper AddResData(this ModelBuilderWrapper modelBuilder) + { + modelBuilder + .Add(MySqlAddResData, Provider.MySql) + .Add(PgSqlAddResData, Provider.PostgreSql); + + return modelBuilder; + } + + public static void MySqlAddResData(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.FileId, e.CultureTitle, e.Title }) + .HasName("PRIMARY"); + + entity.HasAlternateKey(e => e.Id).HasName("id"); + + entity.ToTable("res_data") + .HasCharSet("utf8"); + + entity.HasIndex(e => e.CultureTitle) + .HasDatabaseName("resources_FK2"); + + entity.HasIndex(e => e.TimeChanges) + .HasDatabaseName("dateIndex"); + + entity.Property(e => e.FileId).HasColumnName("fileid"); + + entity.Property(e => e.CultureTitle) + .HasColumnName("cultureTitle") + .HasColumnType("varchar(20)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.Title) + .HasColumnName("title") + .HasColumnType("varchar(120)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.AuthorLogin) + .IsRequired() + .HasColumnName("authorLogin") + .HasColumnType("varchar(50)") + .HasDefaultValueSql("'Console'") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.Description) + .HasColumnName("description") + .HasColumnType("text") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.Flag) + .HasColumnName("flag") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Id) + .HasColumnName("id") + .ValueGeneratedOnAdd(); + + entity.Property(e => e.Link) + .HasColumnName("link") + .HasColumnType("varchar(120)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.ResourceType) + .HasColumnName("resourceType") + .HasColumnType("varchar(20)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.TextValue) + .HasColumnName("textValue") + .HasColumnType("text") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.TimeChanges) + .HasColumnName("timeChanges") + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + }); + } + public static void PgSqlAddResData(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.FileId, e.CultureTitle, e.Title }) + .HasName("res_data_pkey"); + + entity.ToTable("res_data", "onlyoffice"); + + entity.HasIndex(e => e.CultureTitle) + .HasDatabaseName("resources_FK2"); + + entity.HasIndex(e => e.Id) + .HasDatabaseName("id_res_data") + .IsUnique(); + + entity.HasIndex(e => e.TimeChanges) + .HasDatabaseName("dateIndex"); + + entity.Property(e => e.FileId).HasColumnName("fileid"); + + entity.Property(e => e.CultureTitle) + .HasColumnName("cultureTitle") + .HasMaxLength(20); + + entity.Property(e => e.Title) + .HasColumnName("title") + .HasMaxLength(120); + + entity.Property(e => e.AuthorLogin) + .IsRequired() + .HasColumnName("authorLogin") + .HasMaxLength(50) + .HasDefaultValueSql("'Console'"); + + entity.Property(e => e.Description).HasColumnName("description"); + + entity.Property(e => e.Flag).HasColumnName("flag"); + + entity.Property(e => e.Id) + .HasColumnName("id") + .ValueGeneratedOnAdd(); + + entity.Property(e => e.Link) + .HasColumnName("link") + .HasMaxLength(120) + .HasDefaultValueSql("NULL"); + + entity.Property(e => e.ResourceType) + .HasColumnName("resourceType") + .HasMaxLength(20) + .HasDefaultValueSql("NULL"); + + entity.Property(e => e.TextValue).HasColumnName("textValue"); + + entity.Property(e => e.TimeChanges) + .HasColumnName("timeChanges") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + }); + } +} diff --git a/common/ASC.Core.Common/EF/Model/Resource/ResFiles.cs b/common/ASC.Resource.Manager/EF/Model/ResFiles.cs similarity index 92% rename from common/ASC.Core.Common/EF/Model/Resource/ResFiles.cs rename to common/ASC.Resource.Manager/EF/Model/ResFiles.cs index 0053303b7b..b9f6ccf48a 100644 --- a/common/ASC.Core.Common/EF/Model/Resource/ResFiles.cs +++ b/common/ASC.Resource.Manager/EF/Model/ResFiles.cs @@ -1,138 +1,147 @@ -// (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.Resource; - -public class ResFiles -{ - public int Id { get; set; } - public string ProjectName { get; set; } - public string ModuleName { get; set; } - public string ResName { get; set; } - public bool IsLock { get; set; } - public DateTime LastUpdate { get; set; } - public DateTime CreationDate { get; set; } -} - -public static class ResFilesExtension -{ - public static ModelBuilderWrapper AddResFiles(this ModelBuilderWrapper modelBuilder) - { - modelBuilder - .Add(MySqlAddResFiles, Provider.MySql) - .Add(PgSqlAddResFiles, Provider.PostgreSql); - - return modelBuilder; - } - - public static void MySqlAddResFiles(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.ToTable("res_files"); - - entity.HasIndex(e => e.ResName) - .HasDatabaseName("resname") - .IsUnique(); - - entity.Property(e => e.Id).HasColumnName("id"); - - entity.Property(e => e.CreationDate) - .HasColumnName("creationDate") - .HasColumnType("timestamp") - .HasDefaultValueSql("'0000-00-00 00:00:00'"); - - entity.Property(e => e.IsLock).HasColumnName("isLock"); - - entity.Property(e => e.LastUpdate) - .HasColumnName("lastUpdate") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP") - .ValueGeneratedOnAddOrUpdate(); - - entity.Property(e => e.ModuleName) - .IsRequired() - .HasColumnName("moduleName") - .HasColumnType("varchar(50)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.ProjectName) - .IsRequired() - .HasColumnName("projectName") - .HasColumnType("varchar(50)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.ResName) - .IsRequired() - .HasColumnName("resName") - .HasColumnType("varchar(50)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - }); - } - public static void PgSqlAddResFiles(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.ToTable("res_files", "onlyoffice"); - - entity.HasIndex(e => e.ResName) - .HasDatabaseName("resname") - .IsUnique(); - - entity.Property(e => e.Id).HasColumnName("id"); - - entity.Property(e => e.CreationDate) - .HasColumnName("creationDate") - .HasDefaultValueSql("'1975-03-03 00:00:00'"); - - entity.Property(e => e.IsLock) - .HasColumnName("isLock") - .HasDefaultValueSql("'0'"); - - entity.Property(e => e.LastUpdate) - .HasColumnName("lastUpdate") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - entity.Property(e => e.ModuleName) - .IsRequired() - .HasColumnName("moduleName") - .HasMaxLength(50); - - entity.Property(e => e.ProjectName) - .IsRequired() - .HasColumnName("projectName") - .HasMaxLength(50); - - entity.Property(e => e.ResName) - .IsRequired() - .HasColumnName("resName") - .HasMaxLength(50); - }); - } -} +// (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 + +using System; + +using ASC.Core.Common.EF; +using ASC.Core.Common.EF.Model; + +using Microsoft.EntityFrameworkCore; + +namespace ASC.Resource.Manager.EF.Model; + +public class ResFiles +{ + public int Id { get; set; } + public string ProjectName { get; set; } + public string ModuleName { get; set; } + public string ResName { get; set; } + public bool IsLock { get; set; } + public DateTime LastUpdate { get; set; } + public DateTime CreationDate { get; set; } +} + +public static class ResFilesExtension +{ + public static ModelBuilderWrapper AddResFiles(this ModelBuilderWrapper modelBuilder) + { + modelBuilder + .Add(MySqlAddResFiles, Provider.MySql) + .Add(PgSqlAddResFiles, Provider.PostgreSql); + + return modelBuilder; + } + + public static void MySqlAddResFiles(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.ToTable("res_files") + .HasCharSet("utf8"); + + entity.HasIndex(e => e.ResName) + .HasDatabaseName("resname") + .IsUnique(); + + entity.Property(e => e.Id).HasColumnName("id"); + + entity.Property(e => e.CreationDate) + .HasColumnName("creationDate") + .HasColumnType("timestamp") + .HasDefaultValueSql("'0000-00-00 00:00:00'"); + + entity.Property(e => e.IsLock) + .HasColumnName("isLock") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.LastUpdate) + .HasColumnName("lastUpdate") + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + entity.Property(e => e.ModuleName) + .IsRequired() + .HasColumnName("moduleName") + .HasColumnType("varchar(50)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.ProjectName) + .IsRequired() + .HasColumnName("projectName") + .HasColumnType("varchar(50)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.ResName) + .IsRequired() + .HasColumnName("resName") + .HasColumnType("varchar(50)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + }); + } + public static void PgSqlAddResFiles(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.ToTable("res_files", "onlyoffice"); + + entity.HasIndex(e => e.ResName) + .HasDatabaseName("resname") + .IsUnique(); + + entity.Property(e => e.Id).HasColumnName("id"); + + entity.Property(e => e.CreationDate) + .HasColumnName("creationDate") + .HasDefaultValueSql("'1975-03-03 00:00:00'"); + + entity.Property(e => e.IsLock) + .HasColumnName("isLock") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.LastUpdate) + .HasColumnName("lastUpdate") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + entity.Property(e => e.ModuleName) + .IsRequired() + .HasColumnName("moduleName") + .HasMaxLength(50); + + entity.Property(e => e.ProjectName) + .IsRequired() + .HasColumnName("projectName") + .HasMaxLength(50); + + entity.Property(e => e.ResName) + .IsRequired() + .HasColumnName("resName") + .HasMaxLength(50); + }); + } +} diff --git a/common/ASC.Core.Common/EF/Model/Resource/ResReserve.cs b/common/ASC.Resource.Manager/EF/Model/ResReserve.cs similarity index 91% rename from common/ASC.Core.Common/EF/Model/Resource/ResReserve.cs rename to common/ASC.Resource.Manager/EF/Model/ResReserve.cs index 8dd329e3db..861ed164b3 100644 --- a/common/ASC.Core.Common/EF/Model/Resource/ResReserve.cs +++ b/common/ASC.Resource.Manager/EF/Model/ResReserve.cs @@ -1,121 +1,127 @@ -// (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.Resource; - -public class ResReserve -{ - public int Id { get; set; } - public int FileId { get; set; } - public string Title { get; set; } - public string CultureTitle { get; set; } - public string TextValue { get; set; } - public int Flag { get; set; } -} - -public static class ResReserveExtension -{ - public static ModelBuilderWrapper AddResReserve(this ModelBuilderWrapper modelBuilder) - { - modelBuilder - .Add(MySqlAddResReserve, Provider.MySql) - .Add(PgSqlAddResReserve, Provider.PostgreSql); - - return modelBuilder; - } - - public static void MySqlAddResReserve(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.FileId, e.Title, e.CultureTitle }) - .HasName("PRIMARY"); - - entity.ToTable("res_reserve"); - - entity.HasIndex(e => e.CultureTitle) - .HasDatabaseName("resources_FK2"); - - entity.HasIndex(e => e.Id) - .HasDatabaseName("id") - .IsUnique(); - - entity.Property(e => e.FileId).HasColumnName("fileid"); - - entity.Property(e => e.Title) - .HasColumnName("title") - .HasColumnType("varchar(120)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.CultureTitle) - .HasColumnName("cultureTitle") - .HasColumnType("varchar(20)") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - - entity.Property(e => e.Flag).HasColumnName("flag"); - - entity.Property(e => e.Id) - .HasColumnName("id") - .ValueGeneratedOnAdd(); - - entity.Property(e => e.TextValue) - .HasColumnName("textValue") - .HasColumnType("text") - .HasCharSet("utf8") - .UseCollation("utf8_general_ci"); - }); - } - public static void PgSqlAddResReserve(this ModelBuilder modelBuilder) - { - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.FileId, e.Title, e.CultureTitle }) - .HasName("res_reserve_pkey"); - - entity.ToTable("res_reserve", "onlyoffice"); - - entity.Property(e => e.FileId).HasColumnName("fileid"); - - entity.Property(e => e.Title) - .HasColumnName("title") - .HasMaxLength(120); - - entity.Property(e => e.CultureTitle) - .HasColumnName("cultureTitle") - .HasMaxLength(20); - - entity.Property(e => e.Flag).HasColumnName("flag"); - - entity.Property(e => e.Id) - .HasColumnName("id") - .ValueGeneratedOnAdd(); - - entity.Property(e => e.TextValue).HasColumnName("textValue"); - }); - } -} +// (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 + +using ASC.Core.Common.EF; +using ASC.Core.Common.EF.Model; + +using Microsoft.EntityFrameworkCore; + +namespace ASC.Resource.Manager.EF.Model; + +public class ResReserve +{ + public int Id { get; set; } + public int FileId { get; set; } + public string Title { get; set; } + public string CultureTitle { get; set; } + public string TextValue { get; set; } + public int Flag { get; set; } +} + +public static class ResReserveExtension +{ + public static ModelBuilderWrapper AddResReserve(this ModelBuilderWrapper modelBuilder) + { + modelBuilder + .Add(MySqlAddResReserve, Provider.MySql) + .Add(PgSqlAddResReserve, Provider.PostgreSql); + + return modelBuilder; + } + + public static void MySqlAddResReserve(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.FileId, e.Title, e.CultureTitle }) + .HasName("PRIMARY"); + + entity.HasAlternateKey(e => e.Id).HasName("id"); + + entity.ToTable("res_reserve") + .HasCharSet("utf8"); + + entity.HasIndex(e => e.CultureTitle) + .HasDatabaseName("resources_FK2"); + + entity.Property(e => e.FileId).HasColumnName("fileid"); + + entity.Property(e => e.Title) + .HasColumnName("title") + .HasColumnType("varchar(120)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.CultureTitle) + .HasColumnName("cultureTitle") + .HasColumnType("varchar(20)") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + + entity.Property(e => e.Flag) + .HasColumnName("flag") + .HasDefaultValueSql("'0'"); + + entity.Property(e => e.Id) + .HasColumnName("id") + .ValueGeneratedOnAdd(); + + entity.Property(e => e.TextValue) + .HasColumnName("textValue") + .HasColumnType("text") + .HasCharSet("utf8") + .UseCollation("utf8_general_ci"); + }); + } + public static void PgSqlAddResReserve(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.FileId, e.Title, e.CultureTitle }) + .HasName("res_reserve_pkey"); + + entity.ToTable("res_reserve", "onlyoffice"); + + entity.Property(e => e.FileId).HasColumnName("fileid"); + + entity.Property(e => e.Title) + .HasColumnName("title") + .HasMaxLength(120); + + entity.Property(e => e.CultureTitle) + .HasColumnName("cultureTitle") + .HasMaxLength(20); + + entity.Property(e => e.Flag).HasColumnName("flag"); + + entity.Property(e => e.Id) + .HasColumnName("id") + .ValueGeneratedOnAdd(); + + entity.Property(e => e.TextValue).HasColumnName("textValue"); + }); + } +} diff --git a/common/ASC.Resource.Manager/GlobalUsings.cs b/common/ASC.Resource.Manager/GlobalUsings.cs index e0a952f1d9..470e071ec9 100644 --- a/common/ASC.Resource.Manager/GlobalUsings.cs +++ b/common/ASC.Resource.Manager/GlobalUsings.cs @@ -46,8 +46,8 @@ global using System.Xml.Linq; global using ASC.Common; global using ASC.Common.Utils; global using ASC.Core.Common.EF; -global using ASC.Core.Common.EF.Context; -global using ASC.Core.Common.EF.Model.Resource; +global using ASC.Resource.Manager.EF.Context; +global using ASC.Resource.Manager.EF.Model; global using Autofac; diff --git a/common/ASC.Resource.Manager/JsonManager.cs b/common/ASC.Resource.Manager/JsonManager.cs index ad30014e45..6b2a22014b 100644 --- a/common/ASC.Resource.Manager/JsonManager.cs +++ b/common/ASC.Resource.Manager/JsonManager.cs @@ -24,32 +24,6 @@ // 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 Limited 2010-2018 - * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL 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 more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. - * -*/ - - namespace ASC.Resource.Manager; public static class JsonManager diff --git a/common/ASC.Resource.Manager/ResourceData.cs b/common/ASC.Resource.Manager/ResourceData.cs index 9689f92649..7933defff1 100644 --- a/common/ASC.Resource.Manager/ResourceData.cs +++ b/common/ASC.Resource.Manager/ResourceData.cs @@ -24,31 +24,6 @@ // 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 Limited 2010-2018 - * - * This program is freeware. You can redistribute it and/or modify it under the terms of the GNU - * General Public License (GPL) version 3 as published by the Free Software Foundation (https://www.gnu.org/copyleft/gpl.html). - * In accordance with Section 7(a) of the GNU GPL 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 more details, see GNU GPL at https://www.gnu.org/copyleft/gpl.html - * - * You can contact Ascensio System SIA by email at sales@onlyoffice.com - * - * The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display - * Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3. - * - * Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains - * relevant author attributions when distributing the software. If the display of the logo in its graphic - * form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE" - * in every copy of the program you distribute. - * Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks. - * -*/ - namespace ASC.Resource.Manager; [Scope] @@ -57,7 +32,6 @@ public class ResourceData private const string Dbid = "tmresource"; private ResourceDbContext DbContext { get; } - public ResourceData(DbContextManager dbContext) { DbContext = dbContext.Get(Dbid); diff --git a/common/ASC.Webhooks.Core/Dao/WebhooksDbContext.cs b/common/ASC.Webhooks.Core/EF/Context/WebhooksDbContext.cs similarity index 71% rename from common/ASC.Webhooks.Core/Dao/WebhooksDbContext.cs rename to common/ASC.Webhooks.Core/EF/Context/WebhooksDbContext.cs index d0db04f9ed..92bb1b4f44 100644 --- a/common/ASC.Webhooks.Core/Dao/WebhooksDbContext.cs +++ b/common/ASC.Webhooks.Core/EF/Context/WebhooksDbContext.cs @@ -24,32 +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.Webhooks.Core.Dao; -public class MySqlWebhooksDbContext : WebhooksDbContext { } -public class PostgreSqlWebhooksDbContext : WebhooksDbContext { } -public partial class WebhooksDbContext : BaseDbContext +namespace ASC.Webhooks.Core.EF.Context; + +public class WebhooksDbContext : BaseDbContext { - public WebhooksDbContext() { } - - public WebhooksDbContext(DbContextOptions options) - : base(options) - { - - } - public virtual DbSet WebhooksConfigs { get; set; } public virtual DbSet WebhooksLogs { get; set; } - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlWebhooksDbContext() } , - { Provider.PostgreSql, () => new PostgreSqlWebhooksDbContext() } , - }; - } - } protected override void OnModelCreating(ModelBuilder modelBuilder) { @@ -64,6 +44,6 @@ public static class WebhooksDbExtension { public static DIHelper AddWebhooksDbContextService(this DIHelper services) { - return services.AddDbContextManagerService(); + return services.AddDbContextManagerService(); } } diff --git a/common/ASC.Webhooks.Core/Dao/Models/WebhookEntry.cs b/common/ASC.Webhooks.Core/EF/Model/WebhookEntry.cs similarity index 98% rename from common/ASC.Webhooks.Core/Dao/Models/WebhookEntry.cs rename to common/ASC.Webhooks.Core/EF/Model/WebhookEntry.cs index a64c21dd1e..d47799c99f 100644 --- a/common/ASC.Webhooks.Core/Dao/Models/WebhookEntry.cs +++ b/common/ASC.Webhooks.Core/EF/Model/WebhookEntry.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.Webhooks.Core.Dao.Models; +namespace ASC.Webhooks.Core.EF.Model; public class WebhookEntry { diff --git a/common/ASC.Webhooks.Core/Dao/Models/WebhooksConfig.cs b/common/ASC.Webhooks.Core/EF/Model/WebhooksConfig.cs similarity index 72% rename from common/ASC.Webhooks.Core/Dao/Models/WebhooksConfig.cs rename to common/ASC.Webhooks.Core/EF/Model/WebhooksConfig.cs index 82071ae7a8..b5832d00ed 100644 --- a/common/ASC.Webhooks.Core/Dao/Models/WebhooksConfig.cs +++ b/common/ASC.Webhooks.Core/EF/Model/WebhooksConfig.cs @@ -1,34 +1,34 @@ -// (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.Webhooks.Core.Dao.Models; +// (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.Webhooks.Core.EF.Model; public partial class WebhooksConfig { public int ConfigId { get; set; } - public string SecretKey { get; set; } + public string SecretKey { get; set; } public int TenantId { get; set; } public string Uri { get; set; } } @@ -38,11 +38,41 @@ public static class WebhooksConfigExtension public static ModelBuilderWrapper AddWebhooksConfig(this ModelBuilderWrapper modelBuilder) { modelBuilder - .Add(MySqlAddWebhooksConfig, Provider.MySql); - //.Add(PgSqlAddLoginEvents, Provider.Postgre); + .Add(MySqlAddWebhooksConfig, Provider.MySql) + .Add(PgSqlAddWebhooksConfig, Provider.PostgreSql); return modelBuilder; } public static void MySqlAddWebhooksConfig(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.ConfigId }) + .HasName("PRIMARY"); + + entity.ToTable("webhooks_config") + .HasCharSet("utf8"); + + entity.Property(e => e.ConfigId) + .HasColumnType("int") + .HasColumnName("config_id"); + + entity.Property(e => e.TenantId) + .HasColumnName("tenant_id") + .HasColumnType("int unsigned"); + + entity.Property(e => e.Uri) + .HasMaxLength(50) + .HasColumnName("uri") + .HasDefaultValueSql("''"); + + entity.Property(e => e.SecretKey) + .HasMaxLength(50) + .HasColumnName("secret_key") + .HasDefaultValueSql("''"); + }); + } + + public static void PgSqlAddWebhooksConfig(this ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { @@ -69,5 +99,5 @@ public static class WebhooksConfigExtension .HasColumnName("secret_key") .HasDefaultValueSql("''"); }); - } + } } diff --git a/common/ASC.Webhooks.Core/Dao/Models/WebhooksLog.cs b/common/ASC.Webhooks.Core/EF/Model/WebhooksLog.cs similarity index 66% rename from common/ASC.Webhooks.Core/Dao/Models/WebhooksLog.cs rename to common/ASC.Webhooks.Core/EF/Model/WebhooksLog.cs index fe5c8ae5bc..8766f3b17e 100644 --- a/common/ASC.Webhooks.Core/Dao/Models/WebhooksLog.cs +++ b/common/ASC.Webhooks.Core/EF/Model/WebhooksLog.cs @@ -1,43 +1,43 @@ -// (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.Webhooks.Core.Dao.Models; +// (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.Webhooks.Core.EF.Model; public partial class WebhooksLog { - public int ConfigId { get; set; } - public DateTime CreationTime { get; set; } - public string Event { get; set; } + public int ConfigId { get; set; } + public DateTime CreationTime { get; set; } + public string Event { get; set; } public int Id { get; set; } - public string RequestHeaders { get; set; } - public string RequestPayload { get; set; } - public string ResponseHeaders { get; set; } - public string ResponsePayload { get; set; } - public ProcessStatus Status { get; set; } - public int TenantId { get; set; } + public string RequestHeaders { get; set; } + public string RequestPayload { get; set; } + public string ResponseHeaders { get; set; } + public string ResponsePayload { get; set; } + public ProcessStatus Status { get; set; } + public int TenantId { get; set; } public string Uid { get; set; } } @@ -46,13 +46,74 @@ public static class WebhooksPayloadExtension public static ModelBuilderWrapper AddWebhooksLog(this ModelBuilderWrapper modelBuilder) { modelBuilder - .Add(MySqlAddWebhooksLog, Provider.MySql); - //.Add(PgSqlAddUser, Provider.Postgre) - + .Add(MySqlAddWebhooksLog, Provider.MySql) + .Add(PgSqlAddWebhooksLog, Provider.PostgreSql); + return modelBuilder; } private static void MySqlAddWebhooksLog(this ModelBuilder modelBuilder) + { + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.Id }) + .HasName("PRIMARY"); + + entity.ToTable("webhooks_logs") + .HasCharSet("utf8"); + + entity.Property(e => e.Id) + .HasColumnType("int") + .HasColumnName("id") + .ValueGeneratedOnAdd(); + + entity.Property(e => e.ConfigId) + .HasColumnType("int") + .HasColumnName("config_id"); + + entity.Property(e => e.Uid) + .HasColumnType("varchar") + .HasColumnName("uid") + .HasMaxLength(50); + + entity.Property(e => e.TenantId) + .HasColumnName("tenant_id") + .HasColumnType("int unsigned"); + + entity.Property(e => e.RequestPayload) + .IsRequired() + .HasColumnName("request_payload") + .HasColumnType("json"); + + entity.Property(e => e.RequestHeaders) + .HasColumnName("request_headers") + .HasColumnType("json"); + + entity.Property(e => e.ResponsePayload) + .HasColumnName("response_payload") + .HasColumnType("json"); + + entity.Property(e => e.ResponseHeaders) + .HasColumnName("response_headers") + .HasColumnType("json"); + + entity.Property(e => e.Event) + .HasColumnType("varchar") + .HasColumnName("event") + .HasMaxLength(100); + + entity.Property(e => e.CreationTime) + .HasColumnType("datetime") + .HasColumnName("creation_time"); + + entity.Property(e => e.Status) + .HasColumnType("varchar") + .HasColumnName("status") + .HasMaxLength(50); + }); + } + + private static void PgSqlAddWebhooksLog(this ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { @@ -109,6 +170,6 @@ public static class WebhooksPayloadExtension .HasColumnType("varchar") .HasColumnName("status") .HasMaxLength(50); - }); + }); } } \ No newline at end of file diff --git a/common/ASC.Webhooks.Core/GlobalUsings.cs b/common/ASC.Webhooks.Core/GlobalUsings.cs index 07703733ae..4c9c79ac4b 100644 --- a/common/ASC.Webhooks.Core/GlobalUsings.cs +++ b/common/ASC.Webhooks.Core/GlobalUsings.cs @@ -31,8 +31,8 @@ global using ASC.Core.Common.EF; global using ASC.Core.Common.EF.Context; global using ASC.Core.Common.EF.Model; global using ASC.Web.Webhooks; -global using ASC.Webhooks.Core.Dao; -global using ASC.Webhooks.Core.Dao.Models; +global using ASC.Webhooks.Core.EF.Context; +global using ASC.Webhooks.Core.EF.Model; global using Microsoft.EntityFrameworkCore; global using Microsoft.EntityFrameworkCore.Infrastructure; diff --git a/common/ASC.Webhooks.Core/Migrations/20210902223117_WebhooksDbContextMySql.cs b/common/ASC.Webhooks.Core/Migrations/20210902223117_WebhooksDbContextMySql.cs deleted file mode 100644 index 554f4f6748..0000000000 --- a/common/ASC.Webhooks.Core/Migrations/20210902223117_WebhooksDbContextMySql.cs +++ /dev/null @@ -1,93 +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.Webhooks.Core.Migrations; - -public partial class WebhooksDbContextMySql : Migration -{ - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "webhooks_config"); - - migrationBuilder.DropTable( - name: "webhooks_logs"); - } - - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "webhooks_config", - columns: table => new - { - config_id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - tenant_id = table.Column(type: "int unsigned", nullable: false), - uri = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, defaultValueSql: "''") - .Annotation("MySql:CharSet", "utf8mb4"), - secret_key = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, defaultValueSql: "''") - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.config_id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "webhooks_logs", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - config_id = table.Column(type: "int", nullable: false), - uid = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - tenant_id = table.Column(type: "int unsigned", nullable: false), - request_payload = table.Column(type: "json", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - request_headers = table.Column(type: "json", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - response_payload = table.Column(type: "json", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - response_headers = table.Column(type: "json", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - creation_time = table.Column(type: "datetime", nullable: false), - @event = table.Column(name: "event", type: "varchar(100)", maxLength: 100, nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - status = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - } -} diff --git a/common/Tests/ASC.Common.Tests/ASC.Common.Tests.csproj b/common/Tests/ASC.Common.Tests/ASC.Common.Tests.csproj index cc20a23b92..a7df669ec9 100644 --- a/common/Tests/ASC.Common.Tests/ASC.Common.Tests.csproj +++ b/common/Tests/ASC.Common.Tests/ASC.Common.Tests.csproj @@ -8,6 +8,7 @@ + diff --git a/common/Tests/ASC.Core.Common.Tests/ASC.Core.Common.Tests.csproj b/common/Tests/ASC.Core.Common.Tests/ASC.Core.Common.Tests.csproj index 68f663c9ee..59b5e6850a 100644 --- a/common/Tests/ASC.Core.Common.Tests/ASC.Core.Common.Tests.csproj +++ b/common/Tests/ASC.Core.Common.Tests/ASC.Core.Common.Tests.csproj @@ -6,6 +6,7 @@ + diff --git a/common/Tests/ASC.Notify.Textile.Tests/ASC.Notify.Textile.Tests.csproj b/common/Tests/ASC.Notify.Textile.Tests/ASC.Notify.Textile.Tests.csproj index b2172b66a9..55666992a7 100644 --- a/common/Tests/ASC.Notify.Textile.Tests/ASC.Notify.Textile.Tests.csproj +++ b/common/Tests/ASC.Notify.Textile.Tests/ASC.Notify.Textile.Tests.csproj @@ -6,6 +6,7 @@ + diff --git a/common/Tests/ASC.Web.Api.Tests/ASC.Web.Api.Tests.csproj b/common/Tests/ASC.Web.Api.Tests/ASC.Web.Api.Tests.csproj index 02ec5bfd31..dccff52353 100644 --- a/common/Tests/ASC.Web.Api.Tests/ASC.Web.Api.Tests.csproj +++ b/common/Tests/ASC.Web.Api.Tests/ASC.Web.Api.Tests.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/common/Tests/ASC.Web.Api.Tests/BaseApiTests.cs b/common/Tests/ASC.Web.Api.Tests/BaseApiTests.cs index 4751b01afa..2ab3032802 100644 --- a/common/Tests/ASC.Web.Api.Tests/BaseApiTests.cs +++ b/common/Tests/ASC.Web.Api.Tests/BaseApiTests.cs @@ -25,6 +25,7 @@ // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode +using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; namespace ASC.Web.Api.Tests; @@ -109,7 +110,7 @@ public class MySetUpClass } using var db = scope.ServiceProvider.GetService>(); - db.Value.Migrate(); + db.Value.Database.Migrate(); } } diff --git a/common/Tests/ASC.Web.Api.Tests/TestMigrations/20210804110106_TestMigration.Designer.cs b/common/Tests/ASC.Web.Api.Tests/TestMigrations/20210804110106_TestMigration.Designer.cs index 3436fc5a74..92343f5b4b 100644 --- a/common/Tests/ASC.Web.Api.Tests/TestMigrations/20210804110106_TestMigration.Designer.cs +++ b/common/Tests/ASC.Web.Api.Tests/TestMigrations/20210804110106_TestMigration.Designer.cs @@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace ASC.Core.Common.Migrations { - [DbContext(typeof(MySqlUserDbContext))] + [DbContext(typeof(UserDbContext))] [Migration("20210804110106_TestMigration")] partial class TestMigration { diff --git a/common/Tests/ASC.Webhooks.Tests/ASC.Webhooks.Tests.csproj b/common/Tests/ASC.Webhooks.Tests/ASC.Webhooks.Tests.csproj index 895e44bc58..0048e77d74 100644 --- a/common/Tests/ASC.Webhooks.Tests/ASC.Webhooks.Tests.csproj +++ b/common/Tests/ASC.Webhooks.Tests/ASC.Webhooks.Tests.csproj @@ -8,11 +8,11 @@ - + - + diff --git a/common/Tests/ASC.Webhooks.Tests/BaseSetUp.cs b/common/Tests/ASC.Webhooks.Tests/BaseSetUp.cs index a2fb3847e5..23d37762eb 100644 --- a/common/Tests/ASC.Webhooks.Tests/BaseSetUp.cs +++ b/common/Tests/ASC.Webhooks.Tests/BaseSetUp.cs @@ -1,4 +1,30 @@ -using System; +// (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 + +using System; using System.IO; using System.Net; using System.Net.Http; @@ -10,11 +36,12 @@ using ASC.Common.Caching; using ASC.Common.Utils; using ASC.Core.Common.EF; using ASC.Webhooks.Core; -using ASC.Webhooks.Core.Dao; +using ASC.Webhooks.Core.EF.Context; using ASC.Webhooks.Service; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; +using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; @@ -122,7 +149,7 @@ namespace ASC.Webhooks.Tests } using var db = serviceProvider.GetService>(); - db.Value.Migrate(); + db.Value.Database.Migrate(); } } } diff --git a/common/Tests/ASC.Webhooks.Tests/CommonWebhooksTests.cs b/common/Tests/ASC.Webhooks.Tests/CommonWebhooksTests.cs index 4cc3378963..20f908f995 100644 --- a/common/Tests/ASC.Webhooks.Tests/CommonWebhooksTests.cs +++ b/common/Tests/ASC.Webhooks.Tests/CommonWebhooksTests.cs @@ -38,7 +38,7 @@ using ASC.Core; using ASC.Core.Tenants; using ASC.Web.Webhooks; using ASC.Webhooks.Core; -using ASC.Webhooks.Core.Dao.Models; +using ASC.Webhooks.Core.EF.Model; using ASC.Webhooks.Service; using Microsoft.AspNetCore.Builder; diff --git a/common/Tools/AutoMigrationCreator/Core/ContextFinder.cs b/common/Tools/AutoMigrationCreator/Core/ContextFinder.cs deleted file mode 100644 index a089f66817..0000000000 --- a/common/Tools/AutoMigrationCreator/Core/ContextFinder.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; - -using ASC.Core.Common.EF; - -using AutoMigrationCreator.Core; - -namespace AutoMigrationCreator -{ - public class ContextFinder - { - private readonly Type _baseType = typeof(BaseDbContext); - private ProjectInfo _projectInfo; - - public ContextFinder(ProjectInfo projectInfo) - { - _projectInfo = projectInfo; - } - - public IEnumerable GetContextsTypes() - { - var coreContextAssembly = Assembly.Load(_projectInfo.AssemblyName); - var assemblyTypes = coreContextAssembly.GetTypes(); - - var independetProviderTypes = GetProviderIndependentContextTypes(assemblyTypes); - var dependetProviderTypes = GetProviderDependetContextTypes(assemblyTypes, independetProviderTypes); - - foreach (var contextType in dependetProviderTypes) - { - yield return contextType; - } - } - - private IEnumerable GetProviderIndependentContextTypes(IEnumerable assemblyTypes) - { - return assemblyTypes.Where(b => b.BaseType == _baseType); - } - - private IEnumerable GetProviderDependetContextTypes(IEnumerable assemblyTypes, - IEnumerable indepentedTypes) - { - foreach (var assemblyType in assemblyTypes) - { - foreach (var independtType in indepentedTypes) - { - if (assemblyType.BaseType == independtType) yield return assemblyType; - } - } - } - } -} diff --git a/common/Tools/AutoMigrationCreator/Core/MigrationCreator.cs b/common/Tools/AutoMigrationCreator/Core/MigrationCreator.cs deleted file mode 100644 index 841687d136..0000000000 --- a/common/Tools/AutoMigrationCreator/Core/MigrationCreator.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; - -using AutoMigrationCreator.Core; - -namespace AutoMigrationCreator -{ - public class MigrationCreator - { - public static void Run() - { - var counter = 0; - var solution = new Solution(); - - foreach (var projectInfo in solution.GetProjects()) - { - var ctxTypesFinder = new ContextFinder(projectInfo); - - foreach (var contextType in ctxTypesFinder.GetContextsTypes()) - { - var context = DbContextActivator.CreateInstance(contextType); - - var modelDiffChecker = new ModelDifferenceChecker(context); - - if (!modelDiffChecker.IsDifferent()) continue; - - context = DbContextActivator.CreateInstance(contextType); //Hack: refresh context - - var migrationGenerator = new MigrationGenerator(context, projectInfo); - migrationGenerator.Generate(); - - counter++; - } - } - - Console.WriteLine($"Created {counter} migrations"); - } - } -} diff --git a/common/Tools/AutoMigrationCreator/Core/MigrationGenerator.cs b/common/Tools/AutoMigrationCreator/Core/MigrationGenerator.cs deleted file mode 100644 index be30928159..0000000000 --- a/common/Tools/AutoMigrationCreator/Core/MigrationGenerator.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Text.RegularExpressions; - -using ASC.Core.Common.EF; - -using AutoMigrationCreator.Core; - -using Microsoft.EntityFrameworkCore.Migrations.Design; -using Microsoft.Extensions.DependencyInjection; - -namespace AutoMigrationCreator -{ - public class MigrationGenerator - { - private BaseDbContext _dbContext; - private ProjectInfo _projectInfo; - private string _providerName; - private string _typeName; - private string _contextFolderName; - private Regex _pattern = new Regex(@"\d+$", RegexOptions.Compiled); - private string ContextFolderName - { - get - { - if (_contextFolderName == null) _contextFolderName = _typeName[(_providerName.Length)..] + _providerName; - - return _contextFolderName; - } - } - - public MigrationGenerator(BaseDbContext context, ProjectInfo projectInfo) - { - _dbContext = context; - _projectInfo = projectInfo; - _typeName = _dbContext.GetType().Name; - _providerName = GetProviderName(); - } - - public void Generate() - { - var scaffolder = EFCoreDesignTimeServices.GetServiceProvider(_dbContext) - .GetService(); - - var name = GenerateMigrationName(); - - var migration = scaffolder.ScaffoldMigration(name, - $"{_projectInfo.AssemblyName}", $"Migrations.{_providerName}.{ContextFolderName}"); - - SaveMigration(migration); - } - - private void SaveMigration(ScaffoldedMigration migration) - { - var path = Path.Combine(_projectInfo.Path, "Migrations", _providerName, ContextFolderName); - - Directory.CreateDirectory(path); - - var migrationPath = Path.Combine(path, $"{migration.MigrationId}{migration.FileExtension}"); - var designerPath = Path.Combine(path, $"{migration.MigrationId}.Designer{migration.FileExtension}"); - var snapshotPath = Path.Combine(path, $"{migration.SnapshotName}{migration.FileExtension}"); - - File.WriteAllText(migrationPath, migration.MigrationCode); - File.WriteAllText(designerPath, migration.MetadataCode); - File.WriteAllText(snapshotPath, migration.SnapshotCode); - } - - private string GetLastMigrationName() - { - var scaffolderDependecies = EFCoreDesignTimeServices.GetServiceProvider(_dbContext) - .GetService(); - - var lastMigration = scaffolderDependecies.MigrationsAssembly.Migrations.LastOrDefault(); - - return lastMigration.Key; - } - - private string GenerateMigrationName() - { - var last = GetLastMigrationName(); - - if (string.IsNullOrEmpty(last)) return ContextFolderName; - - var migrationNumber = _pattern.Match(last).Value; - - if (string.IsNullOrEmpty(migrationNumber)) - return ContextFolderName + "_Upgrade1"; - - return ContextFolderName + "_Upgrade" + (int.Parse(migrationNumber) + 1); - } - - private string GetProviderName() - { - var providers = Enum.GetNames(typeof(Provider)); - var lowerTypeName = _typeName.ToLower(); - var provider = providers.SingleOrDefault(p => lowerTypeName.Contains(p.ToLower())); - - if (provider == null) throw new Exception("Provider not support"); - - return provider; - } - } -} diff --git a/common/Tools/AutoMigrationCreator/Core/ModelDifferenceChecker.cs b/common/Tools/AutoMigrationCreator/Core/ModelDifferenceChecker.cs deleted file mode 100644 index 5078987835..0000000000 --- a/common/Tools/AutoMigrationCreator/Core/ModelDifferenceChecker.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Collections.Generic; - -using ASC.Core.Common.EF; - -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Migrations.Design; -using Microsoft.EntityFrameworkCore.Migrations.Operations; -using Microsoft.Extensions.DependencyInjection; - -namespace AutoMigrationCreator -{ - public class ModelDifferenceChecker - { - private BaseDbContext _dbContext; - public ModelDifferenceChecker(BaseDbContext context) - { - _dbContext = context; - } - - public bool IsDifferent() - { - var scaffolderDependecies = EFCoreDesignTimeServices.GetServiceProvider(_dbContext) - .GetService(); - - var modelSnapshot = scaffolderDependecies.MigrationsAssembly.ModelSnapshot; - - if (modelSnapshot == null) return true; - - var lastModel = scaffolderDependecies.SnapshotModelProcessor.Process(modelSnapshot.Model) - .GetRelationalModel(); - - if (modelSnapshot == null) return true; - - var upMethodOperations = scaffolderDependecies.MigrationsModelDiffer.GetDifferences( - lastModel, scaffolderDependecies.Model.GetRelationalModel()); - - var downMethodOperations = upMethodOperations.Count != 0 ? - scaffolderDependecies.MigrationsModelDiffer.GetDifferences( - scaffolderDependecies.Model.GetRelationalModel(), lastModel) - : new List(); - - if (upMethodOperations.Count > 0 || downMethodOperations.Count > 0) return true; - - return false; - } - } -} diff --git a/common/Tools/AutoMigrationCreator/Core/Solution.cs b/common/Tools/AutoMigrationCreator/Core/Solution.cs deleted file mode 100644 index 5cb3a7ba79..0000000000 --- a/common/Tools/AutoMigrationCreator/Core/Solution.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; - -using Microsoft.Build.Construction; - -namespace AutoMigrationCreator.Core -{ - public class Solution - { - private const string SOLUTION_NAME = "ASC.Tools.sln"; - - public IEnumerable GetProjects() - { - var solutionPath = Path.GetFullPath(Path.Combine("..", "..", "..", SOLUTION_NAME)); - var source = SolutionFile.Parse(solutionPath); - var currentAssembly = Assembly.GetExecutingAssembly().GetName().Name; - - return source.ProjectsInOrder - .Where(p => p.ProjectType == SolutionProjectType.KnownToBeMSBuildFormat - && p.ProjectName != currentAssembly) - .Select(p => new ProjectInfo - { - AssemblyName = p.ProjectName, - Path = p.AbsolutePath.Replace($"{p.ProjectName}.csproj", string.Empty) - }); - } - } -} diff --git a/common/Tools/AutoMigrationCreator/Models/ProjectInfo.cs b/common/Tools/AutoMigrationCreator/Models/ProjectInfo.cs deleted file mode 100644 index 5226ef0c69..0000000000 --- a/common/Tools/AutoMigrationCreator/Models/ProjectInfo.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace AutoMigrationCreator.Core -{ - public class ProjectInfo - { - public string AssemblyName { get; set; } - public string Path { get; set; } - } -} diff --git a/common/Tools/AutoMigrationCreator/Program.cs b/common/Tools/AutoMigrationCreator/Program.cs deleted file mode 100644 index 776e7e4e56..0000000000 --- a/common/Tools/AutoMigrationCreator/Program.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace AutoMigrationCreator -{ - class Program - { - static void Main(string[] args) - { - MigrationCreator.Run(); - } - } -} diff --git a/common/Tools/AutoMigrationCreator/Utils/DbContextActivator.cs b/common/Tools/AutoMigrationCreator/Utils/DbContextActivator.cs deleted file mode 100644 index cdc14cc0fd..0000000000 --- a/common/Tools/AutoMigrationCreator/Utils/DbContextActivator.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Configuration; - -using ASC.Core.Common.EF; - -namespace AutoMigrationCreator -{ - public class DbContextActivator - { - private const string FAKE_CONNECTION_STRING = "Server=localhost;User ID=root;Password=root"; - public static BaseDbContext CreateInstance(Type contextType) - { - var context = (BaseDbContext)Activator.CreateInstance(contextType); - context.ConnectionStringSettings = new ConnectionStringSettings - { - ConnectionString = FAKE_CONNECTION_STRING - }; - - return context; - } - } -} diff --git a/common/Tools/AutoMigrationCreator/Utils/EFCoreDesignTimeServices.cs b/common/Tools/AutoMigrationCreator/Utils/EFCoreDesignTimeServices.cs deleted file mode 100644 index d0e773251a..0000000000 --- a/common/Tools/AutoMigrationCreator/Utils/EFCoreDesignTimeServices.cs +++ /dev/null @@ -1,28 +0,0 @@ -using ASC.Core.Common.EF; - -using Microsoft.EntityFrameworkCore.Design; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations.Design; -using Microsoft.EntityFrameworkCore.Storage; -using Microsoft.Extensions.DependencyInjection; - -namespace AutoMigrationCreator -{ - public static class EFCoreDesignTimeServices - { - public static ServiceProvider GetServiceProvider(BaseDbContext context) - { - var serviceCollection = new ServiceCollection(); - serviceCollection.AddEntityFrameworkDesignTimeServices(); - serviceCollection.AddDbContextDesignTimeServices(context); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(context.GetService()); - - var designTimeServices = serviceCollection.BuildServiceProvider(); - - return designTimeServices; - } - } -} diff --git a/common/ASC.Core.Common/EF/MigrationHistory.cs b/common/Tools/Migration.Core/Core/AssemblyContextFinder.cs similarity index 83% rename from common/ASC.Core.Common/EF/MigrationHistory.cs rename to common/Tools/Migration.Core/Core/AssemblyContextFinder.cs index 42f1bf0bfb..9b7f733ac2 100644 --- a/common/ASC.Core.Common/EF/MigrationHistory.cs +++ b/common/Tools/Migration.Core/Core/AssemblyContextFinder.cs @@ -24,16 +24,18 @@ // 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; +namespace Migration; -[Singletone] -public class MigrationHistory +public class AssemblyContextFinder : ContextFinder { - private readonly ConcurrentDictionary _historyStore - = new ConcurrentDictionary(); - - public bool TryAddMigratedContext(Type contextType) + private readonly Assembly _assembly; + public AssemblyContextFinder(Assembly assembly) { - return _historyStore.TryAdd(contextType, true); + _assembly = assembly; + } + + protected override Type[] GetAssemblyTypes() + { + return _assembly.GetTypes(); } } diff --git a/common/Tools/Migration.Core/Core/ContextFinder.cs b/common/Tools/Migration.Core/Core/ContextFinder.cs new file mode 100644 index 0000000000..7dd6170d3f --- /dev/null +++ b/common/Tools/Migration.Core/Core/ContextFinder.cs @@ -0,0 +1,62 @@ +// (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 Migration; +public abstract class ContextFinder +{ + private readonly Type _baseType = typeof(BaseDbContext); + + public IEnumerable GetDependetContextsTypes() + { + var assemblyTypes = GetAssemblyTypes(); + + var independetProviderTypes = GetProviderIndependentContextTypes(assemblyTypes); + + foreach (var contextType in independetProviderTypes) + { + yield return contextType; + } + } + + public IEnumerable GetIndependentContextsTypes() + { + var assemblyTypes = GetAssemblyTypes(); + + var independetProviderTypes = GetProviderIndependentContextTypes(assemblyTypes); + + foreach (var contextType in independetProviderTypes) + { + yield return contextType; + } + } + + protected abstract Type[] GetAssemblyTypes(); + + private IEnumerable GetProviderIndependentContextTypes(IEnumerable assemblyTypes) + { + return assemblyTypes.Where(b => b.BaseType == _baseType); + } +} diff --git a/common/Tools/Migration.Core/Core/MigrationGenerator.cs b/common/Tools/Migration.Core/Core/MigrationGenerator.cs new file mode 100644 index 0000000000..7157f03876 --- /dev/null +++ b/common/Tools/Migration.Core/Core/MigrationGenerator.cs @@ -0,0 +1,108 @@ +// (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 Migration; + +public class MigrationGenerator +{ + private readonly BaseDbContext _dbContext; + private readonly string _providerInfoProjectPath; + private readonly string _typeName; + private readonly Regex _pattern = new Regex(@"\d+$", RegexOptions.Compiled); + private readonly string _providerName; + + private string ContextFolderName + { + get + { + return _typeName; + } + } + + public MigrationGenerator(BaseDbContext context, Provider provider, string providerInfoProjectPath) + { + _dbContext = context; + _providerInfoProjectPath = providerInfoProjectPath; + _typeName = _dbContext.GetType().Name; + _providerName = provider.ToString(); + } + + public void Generate() + { + var scaffolder = EFCoreDesignTimeServices.GetServiceProvider(_dbContext) + .GetService(); + + var name = GenerateMigrationName(); + + var migration = scaffolder.ScaffoldMigration(name, $"ASC.Migrations.{_providerName}"); + + SaveMigration(migration); + } + + private void SaveMigration(ScaffoldedMigration migration) + { + var path = Path.Combine(_providerInfoProjectPath, ContextFolderName); + + Directory.CreateDirectory(path); + + var migrationPath = Path.Combine(path, $"{migration.MigrationId}{migration.FileExtension}"); + var designerPath = Path.Combine(path, $"{migration.MigrationId}.Designer{migration.FileExtension}"); + var snapshotPath = Path.Combine(path, $"{migration.SnapshotName}{migration.FileExtension}"); + + File.WriteAllText(migrationPath, migration.MigrationCode); + File.WriteAllText(designerPath, migration.MetadataCode); + File.WriteAllText(snapshotPath, migration.SnapshotCode); + } + + private string GetLastMigrationName() + { + var scaffolderDependecies = EFCoreDesignTimeServices.GetServiceProvider(_dbContext) + .GetService(); + + var lastMigration = scaffolderDependecies.MigrationsAssembly.Migrations.LastOrDefault(); + + return lastMigration.Key; + } + + private string GenerateMigrationName() + { + var last = GetLastMigrationName(); + + if (string.IsNullOrEmpty(last)) + { + return ContextFolderName + "Migrate"; + } + + var migrationNumber = _pattern.Match(last).Value; + + if (string.IsNullOrEmpty(migrationNumber)) + { + return ContextFolderName + "_Upgrade1"; + } + + return ContextFolderName + "_Upgrade" + (int.Parse(migrationNumber) + 1); + } +} diff --git a/common/Tools/Migration.Core/Core/ModelDifferenceChecker.cs b/common/Tools/Migration.Core/Core/ModelDifferenceChecker.cs new file mode 100644 index 0000000000..de1e1f501a --- /dev/null +++ b/common/Tools/Migration.Core/Core/ModelDifferenceChecker.cs @@ -0,0 +1,72 @@ +// (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 Migration; + +public class ModelDifferenceChecker +{ + private readonly BaseDbContext _dbContext; + public ModelDifferenceChecker(BaseDbContext context) + { + _dbContext = context; + } + + public bool IsDifferent() + { + var scaffolderDependecies = EFCoreDesignTimeServices.GetServiceProvider(_dbContext) + .GetService(); + + var modelSnapshot = scaffolderDependecies.MigrationsAssembly.ModelSnapshot; + + if (modelSnapshot == null) + { + return true; + } + + var lastModel = scaffolderDependecies.SnapshotModelProcessor.Process(modelSnapshot.Model) + .GetRelationalModel(); + + if (lastModel == null) + { + return true; + } + + var upMethodOperations = scaffolderDependecies.MigrationsModelDiffer.GetDifferences( + lastModel, scaffolderDependecies.Model.GetRelationalModel()); + + var downMethodOperations = upMethodOperations.Count != 0 ? + scaffolderDependecies.MigrationsModelDiffer.GetDifferences( + scaffolderDependecies.Model.GetRelationalModel(), lastModel) + : new List(); + + if (upMethodOperations.Count > 0 || downMethodOperations.Count > 0) + { + return true; + } + + return false; + } +} diff --git a/common/Tools/Migration.Core/Core/ProjectInfoContextFinder.cs b/common/Tools/Migration.Core/Core/ProjectInfoContextFinder.cs new file mode 100644 index 0000000000..3e5bc18126 --- /dev/null +++ b/common/Tools/Migration.Core/Core/ProjectInfoContextFinder.cs @@ -0,0 +1,49 @@ +// (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 Migration; + +public class ProjectInfoContextFinder : ContextFinder +{ + private readonly ProjectInfo _projectInfo; + public ProjectInfoContextFinder(ProjectInfo projectInfo) + { + _projectInfo = projectInfo; + } + + protected override Type[] GetAssemblyTypes() + { + try + { + var coreContextAssembly = Assembly.Load(_projectInfo.AssemblyName); + return coreContextAssembly.GetTypes(); + } + catch (Exception) + { + return Array.Empty(); + } + } +} diff --git a/common/ASC.Core.Common/EF/Model/Mail/GreyListingWhiteList.cs b/common/Tools/Migration.Core/Core/Solution.cs similarity index 62% rename from common/ASC.Core.Common/EF/Model/Mail/GreyListingWhiteList.cs rename to common/Tools/Migration.Core/Core/Solution.cs index e7dd9341cb..cb32cfa217 100644 --- a/common/ASC.Core.Common/EF/Model/Mail/GreyListingWhiteList.cs +++ b/common/Tools/Migration.Core/Core/Solution.cs @@ -1,58 +1,51 @@ -// (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; - -[Keyless] -public class GreyListingWhiteList -{ - public string Comment { get; set; } - public string Source { get; set; } -} - -public static class GreyListingWhiteListExtension -{ - public static ModelBuilderWrapper AddGreyListingWhiteList(this ModelBuilderWrapper modelBuilder) - { - modelBuilder - .Add(MySqlAddGreyListingWhiteList, Provider.MySql) - .Add(PgSqlAddGreyListingWhiteList, Provider.PostgreSql); - - return modelBuilder; +// (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 Migration; + +public static class Solution +{ + public static IEnumerable GetProjects(string solutionPath) + { + var source = SolutionFile.Parse(solutionPath); + var currentAssembly = Assembly.GetExecutingAssembly().GetName().Name; + + return source.ProjectsInOrder + .Where(p => + p.ProjectType == SolutionProjectType.KnownToBeMSBuildFormat + && p.ProjectName != currentAssembly) + .Select(p => new ProjectInfo + { + AssemblyName = p.ProjectName, + Path = p.AbsolutePath.Replace($"{p.ProjectName}.csproj", string.Empty) + }); } - - public static void MySqlAddGreyListingWhiteList(this ModelBuilder modelBuilder) - { - modelBuilder.Entity() - .HasKey(e => e.Comment); - } - - public static void PgSqlAddGreyListingWhiteList(this ModelBuilder modelBuilder) - { - modelBuilder.Entity() - .HasKey(e => e.Comment); - } -} + + public static string GetProviderProjectPath(string solutionPath, ProviderInfo providerInfo) + { + return GetProjects(solutionPath).FirstOrDefault(r => r.AssemblyName == $"ASC.Migrations.{providerInfo.Provider}")?.Path; + } +} diff --git a/common/Tools/Migration.Core/GlobalUsings.cs b/common/Tools/Migration.Core/GlobalUsings.cs new file mode 100644 index 0000000000..9288a962b1 --- /dev/null +++ b/common/Tools/Migration.Core/GlobalUsings.cs @@ -0,0 +1,45 @@ +// (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 + +global using System.Configuration; +global using System.Reflection; +global using System.Text.RegularExpressions; + +global using ASC.Core.Common.EF; + +global using Autofac; + +global using Microsoft.Build.Construction; +global using Microsoft.EntityFrameworkCore; +global using Microsoft.EntityFrameworkCore.Design; +global using Microsoft.EntityFrameworkCore.Infrastructure; +global using Microsoft.EntityFrameworkCore.Migrations.Design; +global using Microsoft.EntityFrameworkCore.Migrations.Operations; +global using Microsoft.EntityFrameworkCore.Storage; +global using Microsoft.Extensions.DependencyInjection; + +global using Migration.Core.Models; +global using Migration.Core.Utils; diff --git a/common/Tools/AutoMigrationCreator/AutoMigrationCreator.csproj b/common/Tools/Migration.Core/Migration.Core.csproj similarity index 76% rename from common/Tools/AutoMigrationCreator/AutoMigrationCreator.csproj rename to common/Tools/Migration.Core/Migration.Core.csproj index 259264f214..06aa5d69f4 100644 --- a/common/Tools/AutoMigrationCreator/AutoMigrationCreator.csproj +++ b/common/Tools/Migration.Core/Migration.Core.csproj @@ -1,9 +1,9 @@  - Exe net6.0 - AutoMigrationCreator.Program + false + enable @@ -11,8 +11,6 @@ - - all @@ -20,4 +18,8 @@ + + + + diff --git a/common/Tools/Migration.Core/Models/ProjectInfo.cs b/common/Tools/Migration.Core/Models/ProjectInfo.cs new file mode 100644 index 0000000000..3c815185e2 --- /dev/null +++ b/common/Tools/Migration.Core/Models/ProjectInfo.cs @@ -0,0 +1,33 @@ +// (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 Migration.Core.Models; + +public class ProjectInfo +{ + public string AssemblyName { get; set; } + public string Path { get; set; } +} diff --git a/common/Tools/Migration.Core/Models/ProviderInfo.cs b/common/Tools/Migration.Core/Models/ProviderInfo.cs new file mode 100644 index 0000000000..de7b603449 --- /dev/null +++ b/common/Tools/Migration.Core/Models/ProviderInfo.cs @@ -0,0 +1,34 @@ +// (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 Migration.Core.Models; + +public class ProviderInfo +{ + public string ConnectionString { get; set; } + public Provider Provider { get; set; } + public string ProviderFullName { get; set; } +} diff --git a/common/Tools/Migration.Core/Properties/launchSettings.json b/common/Tools/Migration.Core/Properties/launchSettings.json new file mode 100644 index 0000000000..755534536f --- /dev/null +++ b/common/Tools/Migration.Core/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Migration.Creator": { + "commandName": "Project", + "launchBrowser": false + } + } +} \ No newline at end of file diff --git a/common/ASC.Data.Backup.Core/EF/BackupSchedule.cs b/common/Tools/Migration.Core/Utils/DbContextActivator.cs similarity index 66% rename from common/ASC.Data.Backup.Core/EF/BackupSchedule.cs rename to common/Tools/Migration.Core/Utils/DbContextActivator.cs index 6a5dfaedec..f35821233d 100644 --- a/common/ASC.Data.Backup.Core/EF/BackupSchedule.cs +++ b/common/Tools/Migration.Core/Utils/DbContextActivator.cs @@ -24,37 +24,27 @@ // 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.Data.Backup.EF.Model; +namespace Migration.Core.Utils; -[Table("backup_schedule")] -public class BackupSchedule : BaseEntity +public class DbContextActivator { - [Key] - [Column("tenant_id")] - public int TenantId { get; set; } - - [Column("backup_mail")] - public bool BackupMail { get; set; } - - public string Cron { get; set; } - - [Column("backups_stored")] - public int BackupsStored { get; set; } - - [Column("storage_type")] - public BackupStorageType StorageType { get; set; } - - [Column("storage_base_path")] - public string StorageBasePath { get; set; } - - [Column("last_backup_time")] - public DateTime LastBackupTime { get; set; } - - [Column("storage_params")] - public string StorageParams { get; set; } - - public override object[] GetKeys() + private readonly string _dbConnectionString; + public DbContextActivator(string dbConnectionString) { - return new object[] { TenantId }; + _dbConnectionString = dbConnectionString; + } + + public BaseDbContext CreateInstance(Type contextType, ProviderInfo provider) + { + var context = (BaseDbContext)Activator.CreateInstance(contextType); + context.ConnectionStringSettings = new ConnectionStringSettings + { + ConnectionString = _dbConnectionString, + ProviderName = provider.ProviderFullName + }; + + context.MigrateAssembly = $"ASC.Migrations.{provider.Provider}"; + + return context; } } diff --git a/common/Tools/Migration.Core/Utils/EFCoreDesignTimeServices.cs b/common/Tools/Migration.Core/Utils/EFCoreDesignTimeServices.cs new file mode 100644 index 0000000000..1625163641 --- /dev/null +++ b/common/Tools/Migration.Core/Utils/EFCoreDesignTimeServices.cs @@ -0,0 +1,45 @@ +// (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 Migration.Core.Utils; + +public static class EFCoreDesignTimeServices +{ + public static ServiceProvider GetServiceProvider(BaseDbContext context) + { + var serviceCollection = new ServiceCollection(); + serviceCollection.AddEntityFrameworkDesignTimeServices(); + serviceCollection.AddDbContextDesignTimeServices(context); + serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(context.GetService()); + + var designTimeServices = serviceCollection.BuildServiceProvider(); + + return designTimeServices; + } +} diff --git a/common/Tools/Migration.Core/Utils/Options.cs b/common/Tools/Migration.Core/Utils/Options.cs new file mode 100644 index 0000000000..90c79353a8 --- /dev/null +++ b/common/Tools/Migration.Core/Utils/Options.cs @@ -0,0 +1,33 @@ +// (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 Migration.Core.Utils; + +public class Options +{ + public string Path { get; set; } + public IEnumerable Providers { get; set; } +} diff --git a/common/Tools/Migration.Creator/GlobalUsings.cs b/common/Tools/Migration.Creator/GlobalUsings.cs new file mode 100644 index 0000000000..9c68df1969 --- /dev/null +++ b/common/Tools/Migration.Creator/GlobalUsings.cs @@ -0,0 +1,30 @@ +// (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 + +global using Migration; +global using Migration.Core.Utils; + +global using DbContextActivator = Migration.Core.Utils.DbContextActivator; diff --git a/common/Tools/Migration.Creator/Migration.Creator.csproj b/common/Tools/Migration.Creator/Migration.Creator.csproj new file mode 100644 index 0000000000..4b44f564d0 --- /dev/null +++ b/common/Tools/Migration.Creator/Migration.Creator.csproj @@ -0,0 +1,33 @@ + + + + Exe + net6.0 + Migration.Creator.Program + false + enable + + + + 1701;1702;EF1001 + + + + + + + all + + + + + + + + + + + + + + diff --git a/common/Tools/Migration.Creator/MigrationCreator.cs b/common/Tools/Migration.Creator/MigrationCreator.cs new file mode 100644 index 0000000000..c07c763347 --- /dev/null +++ b/common/Tools/Migration.Creator/MigrationCreator.cs @@ -0,0 +1,66 @@ +// (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 Migration.Creator; + +public class MigrationCreator +{ + public void RunCreateMigrations(Options options) + { + var counter = 0; + + foreach (var projectInfo in Solution.GetProjects(options.Path)) + { + var ctxTypesFinder = new ProjectInfoContextFinder(projectInfo); + + foreach (var contextType in ctxTypesFinder.GetDependetContextsTypes()) + { + foreach (var providerInfo in options.Providers) + { + var providerInfoProjectPath = Solution.GetProviderProjectPath(options.Path, providerInfo); + var dbContextActivator = new DbContextActivator(providerInfo.ConnectionString); + var context = dbContextActivator.CreateInstance(contextType, providerInfo); + + var modelDiffChecker = new ModelDifferenceChecker(context); + + if (!modelDiffChecker.IsDifferent()) + { + continue; + } + + context = dbContextActivator.CreateInstance(contextType, providerInfo); //Hack: refresh context + + var migrationGenerator = new MigrationGenerator(context, providerInfo.Provider, providerInfoProjectPath); + migrationGenerator.Generate(); + + counter++; + } + } + } + + Console.WriteLine($"Created {counter} migrations"); + } +} diff --git a/common/ASC.Data.Backup.Core/EF/BackupRecord.cs b/common/Tools/Migration.Creator/Program.cs similarity index 63% rename from common/ASC.Data.Backup.Core/EF/BackupRecord.cs rename to common/Tools/Migration.Creator/Program.cs index dadd19275f..0c67b8e6bf 100644 --- a/common/ASC.Data.Backup.Core/EF/BackupRecord.cs +++ b/common/Tools/Migration.Creator/Program.cs @@ -24,41 +24,25 @@ // 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.Data.Backup.EF.Model; +namespace Migration.Creator; -[Table("backup_backup")] -public class BackupRecord : BaseEntity +class Program { - public Guid Id { get; set; } + static void Main(string[] args) + { + var builder = new ConfigurationBuilder() + .AddJsonFile($"appsettings.json", true) + .AddCommandLine(args); - [Column("tenant_id")] - public int TenantId { get; set; } - - [Column("is_scheduled")] - public bool IsScheduled { get; set; } - public string Name { get; set; } - public string Hash { get; set; } - - [Column("storage_type")] - public BackupStorageType StorageType { get; set; } - - [Column("storage_base_path")] - public string StorageBasePath { get; set; } - - [Column("storage_path")] - public string StoragePath { get; set; } - - [Column("created_on")] - public DateTime CreatedOn { get; set; } - - [Column("expires_on")] - public DateTime ExpiresOn { get; set; } - - [Column("storage_params")] - public string StorageParams { get; set; } - - public override object[] GetKeys() - { - return new object[] { Id }; + var config = builder.Build(); + + var options = config.GetSection("options").Get(); + if (!Path.IsPathRooted(options.Path)) + { + options.Path = Path.GetFullPath(options.Path); + } + + var migrationCreator = new MigrationCreator(); + migrationCreator.RunCreateMigrations(options); } } diff --git a/common/Tools/Migration.Creator/Properties/launchSettings.json b/common/Tools/Migration.Creator/Properties/launchSettings.json new file mode 100644 index 0000000000..755534536f --- /dev/null +++ b/common/Tools/Migration.Creator/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Migration.Creator": { + "commandName": "Project", + "launchBrowser": false + } + } +} \ No newline at end of file diff --git a/common/Tools/Migration.Creator/appsettings.json b/common/Tools/Migration.Creator/appsettings.json new file mode 100644 index 0000000000..32bc5a9f4e --- /dev/null +++ b/common/Tools/Migration.Creator/appsettings.json @@ -0,0 +1,17 @@ +{ + "options": { + "Path": "../../../ASC.Migrations.sln", + "Providers": [ + { + "Provider": "MySql", + "ProviderFullName": "MySql.Data.MySqlClient", + "ConnectionString": "Server=localhost;Database=onlyoffice;User ID=root;Password=root" + }, + { + "Provider": "PostgreSql", + "ProviderFullName": "Npgsql", + "ConnectionString": "Host=localhost;Port=5432;Database=onlyoffice;Username=postgres;Password=dev;" + } + ] + } +} \ No newline at end of file diff --git a/common/Tools/Migration.Runner/GlobalUsings.cs b/common/Tools/Migration.Runner/GlobalUsings.cs new file mode 100644 index 0000000000..7f5993ee86 --- /dev/null +++ b/common/Tools/Migration.Runner/GlobalUsings.cs @@ -0,0 +1,35 @@ +// (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 + +global using System.Reflection; + +global using Microsoft.EntityFrameworkCore; + +global using Migration; +global using Migration.Core.Models; +global using Migration.Core.Utils; + +global using DbContextActivator = Migration.Core.Utils.DbContextActivator; \ No newline at end of file diff --git a/common/Tools/Migration.Runner/Migration.Runner.csproj b/common/Tools/Migration.Runner/Migration.Runner.csproj new file mode 100644 index 0000000000..414c5b47a7 --- /dev/null +++ b/common/Tools/Migration.Runner/Migration.Runner.csproj @@ -0,0 +1,33 @@ + + + + Exe + net6.0 + Migration.Runner.Program + false + enable + + + + 1701;1702;EF1001 + + + + + + + all + + + + + + + + + + + + + + diff --git a/common/Tools/Migration.Runner/MigrationCreator.cs b/common/Tools/Migration.Runner/MigrationCreator.cs new file mode 100644 index 0000000000..fec739cb42 --- /dev/null +++ b/common/Tools/Migration.Runner/MigrationCreator.cs @@ -0,0 +1,69 @@ +// (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 Migration.Runner; + +public class MigrationRunner +{ + private readonly DbContextActivator _dbContextActivator; + + public MigrationRunner(string dbConnectionString) + { + _dbContextActivator = new DbContextActivator(dbConnectionString); + } + + public void RunApplyMigrations(string path, ProviderInfo dbProvider) + { + var counter = 0; + + foreach (var assembly in GetAssemblies(path)) + { + var ctxTypesFinder = new AssemblyContextFinder(assembly); + + foreach (var contextType in ctxTypesFinder.GetIndependentContextsTypes()) + { + var context = _dbContextActivator.CreateInstance(contextType, dbProvider); + + context.Database.EnsureCreated(); + context.Database.Migrate(); + + counter++; + } + } + + Console.WriteLine($"Applied {counter} migrations"); + } + + private static IEnumerable GetAssemblies(string path) + { + var assemblyPaths = Directory.GetFiles(path, "ASC.*.dll"); + + foreach (var assembly in assemblyPaths) + { + yield return Assembly.LoadFrom(assembly); + } + } +} diff --git a/common/Tools/Migration.Runner/Program.cs b/common/Tools/Migration.Runner/Program.cs new file mode 100644 index 0000000000..f2bf078708 --- /dev/null +++ b/common/Tools/Migration.Runner/Program.cs @@ -0,0 +1,52 @@ +// (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 Migration.Runner; + +class Program +{ + static void Main(string[] args) + { + var builder = new ConfigurationBuilder() + .AddJsonFile($"appsettings.json", true) + .AddCommandLine(args); + + var config = builder.Build(); + + var providersInfo = config.GetSection("options").Get(); + var path = providersInfo.Path; + if (!Path.IsPathRooted(path)) + { + path = Path.GetFullPath(path); + } + + foreach (var providerInfo in providersInfo.Providers) + { + var migrationCreator = new MigrationRunner(providerInfo.ConnectionString); + migrationCreator.RunApplyMigrations(path, providerInfo); + } + } +} diff --git a/common/Tools/Migration.Runner/Properties/launchSettings.json b/common/Tools/Migration.Runner/Properties/launchSettings.json new file mode 100644 index 0000000000..74e6b6c98c --- /dev/null +++ b/common/Tools/Migration.Runner/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "Migration.Runner": { + "commandName": "Project", + "launchBrowser": false + } + } +} \ No newline at end of file diff --git a/common/Tools/Migration.Runner/appsettings.json b/common/Tools/Migration.Runner/appsettings.json new file mode 100644 index 0000000000..bae045a74f --- /dev/null +++ b/common/Tools/Migration.Runner/appsettings.json @@ -0,0 +1,12 @@ +{ + "options": { + "Path": "../../../products/ASC.Files/Server/bin/Debug", + "Providers": [ + { + "Provider": "MySql", + "ProviderFullName": "MySql.Data.MySqlClient", + "ConnectionString": "Server=localhost;Database=onlyoffice;User ID=root;Password=root" + } + ] + } +} \ No newline at end of file diff --git a/common/services/ASC.AuditTrail/GlobalUsings.cs b/common/services/ASC.AuditTrail/GlobalUsings.cs index a694f004ac..9e213e2e09 100644 --- a/common/services/ASC.AuditTrail/GlobalUsings.cs +++ b/common/services/ASC.AuditTrail/GlobalUsings.cs @@ -25,10 +25,10 @@ // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode global using System.Collections; -global using System.Globalization; +global using System.Globalization; global using System.Linq.Expressions; global using System.Reflection; -global using System.Text; +global using System.Text; global using ASC.AuditTrail.Log; global using ASC.AuditTrail.Mappers; @@ -40,19 +40,19 @@ global using ASC.Common.Mapping; global using ASC.Core; global using ASC.Core.Common.EF; global using ASC.Core.Users; -global using ASC.MessagingSystem.Core; -global using ASC.MessagingSystem.Data; -global using ASC.MessagingSystem.Models; -global using ASC.Web.Core.Files; -global using ASC.Web.Files.Classes; -global using ASC.Web.Files.Utils; -global using ASC.Web.Studio.Utility; +global using ASC.Files.Core.Helpers; +global using ASC.MessagingSystem.Core; +global using ASC.MessagingSystem.EF.Context; +global using ASC.MessagingSystem.EF.Model; +global using ASC.Web.Files.Classes; +global using ASC.Web.Files.Utils; +global using ASC.Web.Studio.Utility; global using Autofac; global using AutoMapper; -global using CsvHelper; +global using CsvHelper; global using CsvHelper.Configuration; global using Microsoft.Extensions.Logging; diff --git a/common/services/ASC.AuditTrail/Repositories/AuditEventsRepository.cs b/common/services/ASC.AuditTrail/Repositories/AuditEventsRepository.cs index 0021a05fb3..6d867d9128 100644 --- a/common/services/ASC.AuditTrail/Repositories/AuditEventsRepository.cs +++ b/common/services/ASC.AuditTrail/Repositories/AuditEventsRepository.cs @@ -172,7 +172,7 @@ public class AuditEventsRepository else { var keys = actions.Select(x => (int)x.Key).ToList(); - query = query.Where(r => keys.Contains(r.Event.Action)); + query = query.Where(r => keys.Contains(r.Event.Action ?? 0)); } } diff --git a/common/services/ASC.ClearEvents/GlobalUsings.cs b/common/services/ASC.ClearEvents/GlobalUsings.cs index faa1eff4a9..056b7f03ee 100644 --- a/common/services/ASC.ClearEvents/GlobalUsings.cs +++ b/common/services/ASC.ClearEvents/GlobalUsings.cs @@ -34,8 +34,8 @@ global using ASC.Common.DependencyInjection; global using ASC.Common.Log; global using ASC.Core.Common.EF; global using ASC.Core.Tenants; -global using ASC.MessagingSystem.Data; -global using ASC.MessagingSystem.Models; +global using ASC.MessagingSystem.EF.Context; +global using ASC.MessagingSystem.EF.Model; global using Autofac; diff --git a/migrations/mysql/ASC.Migrations.MySql.csproj b/migrations/mysql/ASC.Migrations.MySql.csproj new file mode 100644 index 0000000000..60fa70809f --- /dev/null +++ b/migrations/mysql/ASC.Migrations.MySql.csproj @@ -0,0 +1,13 @@ + + + + net6.0 + enable + enable + + + + + + + diff --git a/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/20211012145324_AccountLinkContextMySql.Designer.cs b/migrations/mysql/AccountLinkContext/20220724114548_AccountLinkContextMigrate.Designer.cs similarity index 72% rename from common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/20211012145324_AccountLinkContextMySql.Designer.cs rename to migrations/mysql/AccountLinkContext/20220724114548_AccountLinkContextMigrate.Designer.cs index 1db3b8e0ac..007ebfa396 100644 --- a/common/ASC.Core.Common/Migrations/MySql/AccountLinkContextMySql/20211012145324_AccountLinkContextMySql.Designer.cs +++ b/migrations/mysql/AccountLinkContext/20220724114548_AccountLinkContextMigrate.Designer.cs @@ -1,58 +1,68 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.AccountLinkContextMySql -{ - [DbContext(typeof(MySqlAccountLinkContext))] - [Migration("20211012145324_AccountLinkContextMySql")] - partial class AccountLinkContextMySql - { - 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.AccountLinks", b => - { - b.Property("Id") - .HasColumnType("varchar(200)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UId") - .HasColumnType("varchar(200)") - .HasColumnName("uid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Linked") - .HasColumnType("datetime") - .HasColumnName("linked"); - - b.Property("Profile") - .IsRequired() - .HasColumnType("text") - .HasColumnName("profile") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Provider") - .HasColumnType("char(60)") - .HasColumnName("provider") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id", "UId") - .HasName("PRIMARY"); - - b.HasIndex("UId") - .HasDatabaseName("uid"); - - b.ToTable("account_links"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(AccountLinkContext))] + [Migration("20220724114548_AccountLinkContextMigrate")] + partial class AccountLinkContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.AccountLinks", b => + { + b.Property("Id") + .HasColumnType("varchar(200)") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UId") + .HasColumnType("varchar(200)") + .HasColumnName("uid") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Linked") + .HasColumnType("datetime") + .HasColumnName("linked"); + + b.Property("Profile") + .IsRequired() + .HasColumnType("text") + .HasColumnName("profile") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Provider") + .HasColumnType("char(60)") + .HasColumnName("provider") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Id", "UId") + .HasName("PRIMARY"); + + b.HasIndex("UId") + .HasDatabaseName("uid"); + + b.ToTable("account_links", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/AccountLinkContext/20220724114548_AccountLinkContextMigrate.cs b/migrations/mysql/AccountLinkContext/20220724114548_AccountLinkContextMigrate.cs new file mode 100644 index 0000000000..38b898b8b5 --- /dev/null +++ b/migrations/mysql/AccountLinkContext/20220724114548_AccountLinkContextMigrate.cs @@ -0,0 +1,47 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class AccountLinkContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "account_links", + columns: table => new + { + id = table.Column(type: "varchar(200)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + uid = table.Column(type: "varchar(200)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + provider = table.Column(type: "char(60)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + profile = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + linked = table.Column(type: "datetime", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.id, x.uid }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateIndex( + name: "uid", + table: "account_links", + column: "uid"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "account_links"); + } + } +} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/AccountLinkContextPostgreSql/PostgreSqlAccountLinkContextModelSnapshot.cs b/migrations/mysql/AccountLinkContext/AccountLinkContextModelSnapshot.cs similarity index 74% rename from common/ASC.Core.Common/Migrations/PostgreSql/AccountLinkContextPostgreSql/PostgreSqlAccountLinkContextModelSnapshot.cs rename to migrations/mysql/AccountLinkContext/AccountLinkContextModelSnapshot.cs index 4bbae6b8d2..8ede502313 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/AccountLinkContextPostgreSql/PostgreSqlAccountLinkContextModelSnapshot.cs +++ b/migrations/mysql/AccountLinkContext/AccountLinkContextModelSnapshot.cs @@ -1,57 +1,66 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.AccountLinkContextPostgreSql -{ - [DbContext(typeof(PostgreSqlAccountLinkContext))] - partial class PostgreSqlAccountLinkContextModelSnapshot : 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.AccountLinks", b => - { - b.Property("Id") - .HasColumnType("varchar(200)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UId") - .HasColumnType("varchar(200)") - .HasColumnName("uid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Linked") - .HasColumnType("datetime") - .HasColumnName("linked"); - - b.Property("Profile") - .IsRequired() - .HasColumnType("text") - .HasColumnName("profile") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Provider") - .HasColumnType("char(60)") - .HasColumnName("provider") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id", "UId") - .HasName("PRIMARY"); - - b.HasIndex("UId") - .HasDatabaseName("uid"); - - b.ToTable("account_links"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(AccountLinkContext))] + partial class AccountLinkContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.AccountLinks", b => + { + b.Property("Id") + .HasColumnType("varchar(200)") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UId") + .HasColumnType("varchar(200)") + .HasColumnName("uid") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Linked") + .HasColumnType("datetime") + .HasColumnName("linked"); + + b.Property("Profile") + .IsRequired() + .HasColumnType("text") + .HasColumnName("profile") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Provider") + .HasColumnType("char(60)") + .HasColumnName("provider") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Id", "UId") + .HasName("PRIMARY"); + + b.HasIndex("UId") + .HasDatabaseName("uid"); + + b.ToTable("account_links", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/BackupsContext/20220724114539_BackupsContextMigrate.Designer.cs b/migrations/mysql/BackupsContext/20220724114539_BackupsContextMigrate.Designer.cs new file mode 100644 index 0000000000..0a6e77c9e8 --- /dev/null +++ b/migrations/mysql/BackupsContext/20220724114539_BackupsContextMigrate.Designer.cs @@ -0,0 +1,315 @@ +// +using System; +using ASC.Data.Backup.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(BackupsContext))] + [Migration("20220724114539_BackupsContextMigrate")] + partial class BackupsContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Alias") + .IsRequired() + .HasColumnType("varchar(100)") + .HasColumnName("alias") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("calls") + .HasDefaultValueSql("'1'"); + + b.Property("CreationDateTime") + .HasColumnType("datetime") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("industry") + .HasDefaultValueSql("'0'"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("char(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.Property("MappedDomain") + .HasColumnType("varchar(100)") + .HasColumnName("mappeddomain") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("OwnerId") + .HasColumnType("varchar(38)") + .HasColumnName("owner_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("PaymentId") + .HasColumnType("varchar(38)") + .HasColumnName("payment_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("spam") + .HasDefaultValueSql("'1'"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("status") + .HasDefaultValueSql("'0'"); + + b.Property("StatusChanged") + .HasColumnType("datetime") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .HasColumnType("varchar(50)") + .HasColumnName("timezone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("'1'"); + + b.Property("TrustedDomainsRaw") + .HasColumnType("varchar(1024)") + .HasColumnName("trusteddomains") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("version") + .HasDefaultValueSql("'2'"); + + b.Property("Version_Changed") + .HasColumnType("datetime") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(38)") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreatedOn") + .HasColumnType("datetime") + .HasColumnName("created_on"); + + b.Property("ExpiresOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime") + .HasColumnName("expires_on") + .HasDefaultValueSql("'0001-01-01 00:00:00'"); + + b.Property("Hash") + .IsRequired() + .HasColumnType("varchar(64)") + .HasColumnName("hash") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("IsScheduled") + .HasColumnType("tinyint(1)") + .HasColumnName("is_scheduled"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageBasePath") + .ValueGeneratedOnAdd() + .HasColumnType("varchar(255)") + .HasColumnName("storage_base_path") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageParams") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasColumnName("storage_params") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StoragePath") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("storage_path") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageType") + .HasColumnType("int(10)") + .HasColumnName("storage_type"); + + b.Property("TenantId") + .HasColumnType("int(10)") + .HasColumnName("tenant_id"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.HasIndex("ExpiresOn") + .HasDatabaseName("expires_on"); + + b.HasIndex("IsScheduled") + .HasDatabaseName("is_scheduled"); + + b.HasIndex("TenantId") + .HasDatabaseName("tenant_id"); + + b.ToTable("backup_backup", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupSchedule", b => + { + b.Property("TenantId") + .HasColumnType("int(10)") + .HasColumnName("tenant_id"); + + b.Property("BackupMail") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("backup_mail") + .HasDefaultValueSql("'0'"); + + b.Property("BackupsStored") + .HasColumnType("int(10)") + .HasColumnName("backups_stored"); + + b.Property("Cron") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("cron") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastBackupTime") + .HasColumnType("datetime") + .HasColumnName("last_backup_time"); + + b.Property("StorageBasePath") + .ValueGeneratedOnAdd() + .HasColumnType("varchar(255)") + .HasColumnName("storage_base_path") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageParams") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasColumnName("storage_params") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageType") + .HasColumnType("int(10)") + .HasColumnName("storage_type"); + + b.HasKey("TenantId") + .HasName("PRIMARY"); + + b.ToTable("backup_schedule", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/BackupsContext/20220724114539_BackupsContextMigrate.cs b/migrations/mysql/BackupsContext/20220724114539_BackupsContextMigrate.cs new file mode 100644 index 0000000000..eee3551a20 --- /dev/null +++ b/migrations/mysql/BackupsContext/20220724114539_BackupsContextMigrate.cs @@ -0,0 +1,159 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class BackupsContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "backup_backup", + columns: table => new + { + id = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + tenant_id = table.Column(type: "int(10)", nullable: false), + is_scheduled = table.Column(type: "tinyint(1)", nullable: false), + name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + hash = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + storage_type = table.Column(type: "int(10)", nullable: false), + storage_base_path = table.Column(type: "varchar(255)", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + storage_path = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + created_on = table.Column(type: "datetime", nullable: false), + expires_on = table.Column(type: "datetime", nullable: false, defaultValueSql: "'0001-01-01 00:00:00'"), + storage_params = table.Column(type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "backup_schedule", + columns: table => new + { + tenant_id = table.Column(type: "int(10)", nullable: false), + backup_mail = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"), + cron = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + backups_stored = table.Column(type: "int(10)", nullable: false), + storage_type = table.Column(type: "int(10)", nullable: false), + storage_base_path = table.Column(type: "varchar(255)", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + last_backup_time = table.Column(type: "datetime", nullable: false), + storage_params = table.Column(type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.tenant_id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_tenants", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + alias = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + mappeddomain = table.Column(type: "varchar(100)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + version = table.Column(type: "int", nullable: false, defaultValueSql: "'2'"), + version_changed = table.Column(type: "datetime", nullable: true), + language = table.Column(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + timezone = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + trusteddomains = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + trusteddomainsenabled = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), + status = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + statuschanged = table.Column(type: "datetime", nullable: true), + creationdatetime = table.Column(type: "datetime", nullable: false), + owner_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + payment_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + industry = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + last_modified = table.Column(type: "timestamp", nullable: false), + spam = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"), + calls = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tenants", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.InsertData( + table: "tenants_tenants", + columns: new[] { "id", "alias", "creationdatetime", "last_modified", "mappeddomain", "name", "owner_id", "payment_id", "statuschanged", "timezone", "trusteddomains", "version_changed" }, + values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "Web Office", "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, null, null, null, null }); + + migrationBuilder.CreateIndex( + name: "expires_on", + table: "backup_backup", + column: "expires_on"); + + migrationBuilder.CreateIndex( + name: "is_scheduled", + table: "backup_backup", + column: "is_scheduled"); + + migrationBuilder.CreateIndex( + name: "tenant_id", + table: "backup_backup", + column: "tenant_id"); + + migrationBuilder.CreateIndex( + name: "alias", + table: "tenants_tenants", + column: "alias", + unique: true); + + 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"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "backup_backup"); + + migrationBuilder.DropTable( + name: "backup_schedule"); + + migrationBuilder.DropTable( + name: "tenants_tenants"); + } + } +} diff --git a/migrations/mysql/BackupsContext/BackupsContextModelSnapshot.cs b/migrations/mysql/BackupsContext/BackupsContextModelSnapshot.cs new file mode 100644 index 0000000000..6a3bfaae38 --- /dev/null +++ b/migrations/mysql/BackupsContext/BackupsContextModelSnapshot.cs @@ -0,0 +1,313 @@ +// +using System; +using ASC.Data.Backup.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(BackupsContext))] + partial class BackupsContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Alias") + .IsRequired() + .HasColumnType("varchar(100)") + .HasColumnName("alias") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("calls") + .HasDefaultValueSql("'1'"); + + b.Property("CreationDateTime") + .HasColumnType("datetime") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("industry") + .HasDefaultValueSql("'0'"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("char(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.Property("MappedDomain") + .HasColumnType("varchar(100)") + .HasColumnName("mappeddomain") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("OwnerId") + .HasColumnType("varchar(38)") + .HasColumnName("owner_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("PaymentId") + .HasColumnType("varchar(38)") + .HasColumnName("payment_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("spam") + .HasDefaultValueSql("'1'"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("status") + .HasDefaultValueSql("'0'"); + + b.Property("StatusChanged") + .HasColumnType("datetime") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .HasColumnType("varchar(50)") + .HasColumnName("timezone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("'1'"); + + b.Property("TrustedDomainsRaw") + .HasColumnType("varchar(1024)") + .HasColumnName("trusteddomains") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("version") + .HasDefaultValueSql("'2'"); + + b.Property("Version_Changed") + .HasColumnType("datetime") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(38)") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreatedOn") + .HasColumnType("datetime") + .HasColumnName("created_on"); + + b.Property("ExpiresOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime") + .HasColumnName("expires_on") + .HasDefaultValueSql("'0001-01-01 00:00:00'"); + + b.Property("Hash") + .IsRequired() + .HasColumnType("varchar(64)") + .HasColumnName("hash") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("IsScheduled") + .HasColumnType("tinyint(1)") + .HasColumnName("is_scheduled"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageBasePath") + .ValueGeneratedOnAdd() + .HasColumnType("varchar(255)") + .HasColumnName("storage_base_path") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageParams") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasColumnName("storage_params") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StoragePath") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("storage_path") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageType") + .HasColumnType("int(10)") + .HasColumnName("storage_type"); + + b.Property("TenantId") + .HasColumnType("int(10)") + .HasColumnName("tenant_id"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.HasIndex("ExpiresOn") + .HasDatabaseName("expires_on"); + + b.HasIndex("IsScheduled") + .HasDatabaseName("is_scheduled"); + + b.HasIndex("TenantId") + .HasDatabaseName("tenant_id"); + + b.ToTable("backup_backup", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupSchedule", b => + { + b.Property("TenantId") + .HasColumnType("int(10)") + .HasColumnName("tenant_id"); + + b.Property("BackupMail") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("backup_mail") + .HasDefaultValueSql("'0'"); + + b.Property("BackupsStored") + .HasColumnType("int(10)") + .HasColumnName("backups_stored"); + + b.Property("Cron") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("cron") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastBackupTime") + .HasColumnType("datetime") + .HasColumnName("last_backup_time"); + + b.Property("StorageBasePath") + .ValueGeneratedOnAdd() + .HasColumnType("varchar(255)") + .HasColumnName("storage_base_path") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageParams") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasColumnName("storage_params") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageType") + .HasColumnType("int(10)") + .HasColumnName("storage_type"); + + b.HasKey("TenantId") + .HasName("PRIMARY"); + + b.ToTable("backup_schedule", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/CoreDbContextPostgreSql/20211012145321_CoreDbContextPostgreSql.Designer.cs b/migrations/mysql/CoreDbContext/20220724114546_CoreDbContextMigrate.Designer.cs similarity index 70% rename from common/ASC.Core.Common/Migrations/PostgreSql/CoreDbContextPostgreSql/20211012145321_CoreDbContextPostgreSql.Designer.cs rename to migrations/mysql/CoreDbContext/20220724114546_CoreDbContextMigrate.Designer.cs index 6e6cf176a0..332e583927 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/CoreDbContextPostgreSql/20211012145321_CoreDbContextPostgreSql.Designer.cs +++ b/migrations/mysql/CoreDbContext/20220724114546_CoreDbContextMigrate.Designer.cs @@ -1,194 +1,217 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlCoreDbContext))] - [Migration("20211012145321_CoreDbContextPostgreSql")] - partial class CoreDbContextPostgreSql - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.10"); - - modelBuilder.Entity("ASC.Core.Common.EF.DbButton", b => - { - b.Property("TariffId") - .HasColumnType("int") - .HasColumnName("tariff_id"); - - b.Property("PartnerId") - .HasColumnType("varchar(50)") - .HasColumnName("partner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ButtonUrl") - .IsRequired() - .HasColumnType("text") - .HasColumnName("button_url") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TariffId", "PartnerId") - .HasName("PRIMARY"); - - b.ToTable("tenants_buttons"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => - { - b.Property("Tenant") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("ActiveUsers") - .HasColumnType("int") - .HasColumnName("active_users"); - - b.Property("AvangateId") - .HasColumnType("varchar(128)") - .HasColumnName("avangate_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Description") - .HasColumnType("varchar(128)") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Features") - .HasColumnType("text") - .HasColumnName("features") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("MaxFileSize") - .HasColumnType("bigint") - .HasColumnName("max_file_size"); - - b.Property("MaxTotalSize") - .HasColumnType("bigint") - .HasColumnName("max_total_size"); - - b.Property("Name") - .HasColumnType("varchar(128)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Price") - .HasColumnType("decimal(10,2)") - .HasColumnName("price"); - - b.Property("Visible") - .HasColumnType("tinyint(1)") - .HasColumnName("visible"); - - b.HasKey("Tenant") - .HasName("PRIMARY"); - - b.ToTable("tenants_quota"); - - b.HasData( - new - { - Tenant = -1, - ActiveUsers = 10000, - AvangateId = "0", - Features = "update", - MaxFileSize = 102400L, - MaxTotalSize = 10995116277760L, - Name = "default", - Price = 0.00m, - Visible = false - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbQuotaRow", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Path") - .HasColumnType("varchar(255)") - .HasColumnName("path") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Counter") - .HasColumnType("bigint") - .HasColumnName("counter"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Tag") - .HasColumnType("varchar(1024)") - .HasColumnName("tag") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Tenant", "Path") - .HasName("PRIMARY"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.ToTable("tenants_quotarow"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Comment") - .HasColumnType("varchar(255)") - .HasColumnName("comment") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("create_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Quantity") - .HasColumnType("int") - .HasColumnName("quantity"); - - b.Property("Stamp") - .HasColumnType("datetime") - .HasColumnName("stamp"); - - b.Property("Tariff") - .HasColumnType("int") - .HasColumnName("tariff"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("Tenant") - .HasDatabaseName("tenant"); - - b.ToTable("tenants_tariff"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Core.Common.EF; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(CoreDbContext))] + [Migration("20220724114546_CoreDbContextMigrate")] + partial class CoreDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.DbButton", b => + { + b.Property("TariffId") + .HasColumnType("int") + .HasColumnName("tariff_id"); + + b.Property("PartnerId") + .HasColumnType("varchar(50)") + .HasColumnName("partner_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ButtonUrl") + .IsRequired() + .HasColumnType("text") + .HasColumnName("button_url") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TariffId", "PartnerId") + .HasName("PRIMARY"); + + b.ToTable("tenants_buttons", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => + { + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.Property("ActiveUsers") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("active_users") + .HasDefaultValueSql("'0'"); + + b.Property("AvangateId") + .HasColumnType("varchar(128)") + .HasColumnName("avangate_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Description") + .HasColumnType("varchar(128)") + .HasColumnName("description") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Features") + .HasColumnType("text") + .HasColumnName("features"); + + b.Property("MaxFileSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_file_size") + .HasDefaultValueSql("'0'"); + + b.Property("MaxTotalSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_total_size") + .HasDefaultValueSql("'0'"); + + b.Property("Name") + .HasColumnType("varchar(128)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Price") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(10,2)") + .HasColumnName("price") + .HasDefaultValueSql("'0.00'"); + + b.Property("Visible") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("visible") + .HasDefaultValueSql("'0'"); + + b.HasKey("Tenant") + .HasName("PRIMARY"); + + b.ToTable("tenants_quota", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Tenant = -1, + ActiveUsers = 10000, + AvangateId = "0", + Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", + MaxFileSize = 102400L, + MaxTotalSize = 10995116277760L, + Name = "default", + Price = 0.00m, + Visible = false + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbQuotaRow", b => + { + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.Property("Path") + .HasColumnType("varchar(255)") + .HasColumnName("path") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Counter") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("counter") + .HasDefaultValueSql("'0'"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.Property("Tag") + .HasColumnType("varchar(1024)") + .HasColumnName("tag") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Tenant", "Path") + .HasName("PRIMARY"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.ToTable("tenants_quotarow", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Comment") + .HasColumnType("varchar(255)") + .HasColumnName("comment") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("timestamp") + .HasColumnName("create_on"); + + b.Property("Quantity") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("quantity") + .HasDefaultValueSql("'1'"); + + b.Property("Stamp") + .HasColumnType("datetime") + .HasColumnName("stamp"); + + b.Property("Tariff") + .HasColumnType("int") + .HasColumnName("tariff"); + + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant"); + + b.ToTable("tenants_tariff", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/CoreDbContext/20220724114546_CoreDbContextMigrate.cs b/migrations/mysql/CoreDbContext/20220724114546_CoreDbContextMigrate.cs new file mode 100644 index 0000000000..13ad293d29 --- /dev/null +++ b/migrations/mysql/CoreDbContext/20220724114546_CoreDbContextMigrate.cs @@ -0,0 +1,126 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class CoreDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "tenants_buttons", + columns: table => new + { + tariff_id = table.Column(type: "int", nullable: false), + partner_id = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + button_url = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tariff_id, x.partner_id }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_quota", + columns: table => new + { + tenant = table.Column(type: "int", nullable: false), + name = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + description = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + max_file_size = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"), + max_total_size = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"), + active_users = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + features = table.Column(type: "text", nullable: true) + .Annotation("MySql:CharSet", "utf8"), + price = table.Column(type: "decimal(10,2)", nullable: false, defaultValueSql: "'0.00'"), + avangate_id = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + visible = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.tenant); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_quotarow", + columns: table => new + { + tenant = table.Column(type: "int", nullable: false), + path = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + counter = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"), + tag = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + last_modified = table.Column(type: "timestamp", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant, x.path }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_tariff", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + tenant = table.Column(type: "int", nullable: false), + tariff = table.Column(type: "int", nullable: false), + stamp = table.Column(type: "datetime", nullable: false), + quantity = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), + comment = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + create_on = table.Column(type: "timestamp", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tariff", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.InsertData( + table: "tenants_quota", + columns: new[] { "tenant", "active_users", "avangate_id", "description", "features", "max_file_size", "max_total_size", "name" }, + values: new object[] { -1, 10000, "0", null, "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", 102400L, 10995116277760L, "default" }); + + 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: "tenants_buttons"); + + migrationBuilder.DropTable( + name: "tenants_quota"); + + migrationBuilder.DropTable( + name: "tenants_quotarow"); + + migrationBuilder.DropTable( + name: "tenants_tariff"); + } + } +} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/CoreDbContextPostgreSql/PostgreSqlCoreDbContextModelSnapshot.cs b/migrations/mysql/CoreDbContext/CoreDbContextModelSnapshot.cs similarity index 71% rename from common/ASC.Core.Common/Migrations/PostgreSql/CoreDbContextPostgreSql/PostgreSqlCoreDbContextModelSnapshot.cs rename to migrations/mysql/CoreDbContext/CoreDbContextModelSnapshot.cs index da8185e720..c18d1cafc1 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/CoreDbContextPostgreSql/PostgreSqlCoreDbContextModelSnapshot.cs +++ b/migrations/mysql/CoreDbContext/CoreDbContextModelSnapshot.cs @@ -1,16 +1,23 @@ // +using System; +using ASC.Core.Common.EF; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql +#nullable disable + +namespace ASC.Migrations.MySql.Migrations { - [DbContext(typeof(PostgreSqlCoreDbContext))] - partial class PostgreSqlCoreDbContextModelSnapshot : ModelSnapshot + [DbContext(typeof(CoreDbContext))] + partial class CoreDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.10"); + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("ASC.Core.Common.EF.DbButton", b => { @@ -34,19 +41,22 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql b.HasKey("TariffId", "PartnerId") .HasName("PRIMARY"); - b.ToTable("tenants_buttons"); + b.ToTable("tenants_buttons", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); }); modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => { b.Property("Tenant") - .ValueGeneratedOnAdd() .HasColumnType("int") .HasColumnName("tenant"); b.Property("ActiveUsers") + .ValueGeneratedOnAdd() .HasColumnType("int") - .HasColumnName("active_users"); + .HasColumnName("active_users") + .HasDefaultValueSql("'0'"); b.Property("AvangateId") .HasColumnType("varchar(128)") @@ -62,17 +72,19 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql b.Property("Features") .HasColumnType("text") - .HasColumnName("features") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasColumnName("features"); b.Property("MaxFileSize") + .ValueGeneratedOnAdd() .HasColumnType("bigint") - .HasColumnName("max_file_size"); + .HasColumnName("max_file_size") + .HasDefaultValueSql("'0'"); b.Property("MaxTotalSize") + .ValueGeneratedOnAdd() .HasColumnType("bigint") - .HasColumnName("max_total_size"); + .HasColumnName("max_total_size") + .HasDefaultValueSql("'0'"); b.Property("Name") .HasColumnType("varchar(128)") @@ -81,17 +93,23 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("Price") + .ValueGeneratedOnAdd() .HasColumnType("decimal(10,2)") - .HasColumnName("price"); + .HasColumnName("price") + .HasDefaultValueSql("'0.00'"); b.Property("Visible") + .ValueGeneratedOnAdd() .HasColumnType("tinyint(1)") - .HasColumnName("visible"); + .HasColumnName("visible") + .HasDefaultValueSql("'0'"); b.HasKey("Tenant") .HasName("PRIMARY"); - b.ToTable("tenants_quota"); + b.ToTable("tenants_quota", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new @@ -99,7 +117,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql Tenant = -1, ActiveUsers = 10000, AvangateId = "0", - Features = "update", + Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", MaxFileSize = 102400L, MaxTotalSize = 10995116277760L, Name = "default", @@ -121,14 +139,14 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("Counter") + .ValueGeneratedOnAdd() .HasColumnType("bigint") - .HasColumnName("counter"); + .HasColumnName("counter") + .HasDefaultValueSql("'0'"); b.Property("LastModified") - .ValueGeneratedOnAdd() .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnName("last_modified"); b.Property("Tag") .HasColumnType("varchar(1024)") @@ -142,7 +160,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql b.HasIndex("LastModified") .HasDatabaseName("last_modified"); - b.ToTable("tenants_quotarow"); + b.ToTable("tenants_quotarow", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); }); modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => @@ -159,14 +179,14 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("CreateOn") - .ValueGeneratedOnAddOrUpdate() .HasColumnType("timestamp") - .HasColumnName("create_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnName("create_on"); b.Property("Quantity") + .ValueGeneratedOnAdd() .HasColumnType("int") - .HasColumnName("quantity"); + .HasColumnName("quantity") + .HasDefaultValueSql("'1'"); b.Property("Stamp") .HasColumnType("datetime") @@ -185,7 +205,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.CoreDbContextPostgreSql b.HasIndex("Tenant") .HasDatabaseName("tenant"); - b.ToTable("tenants_tariff"); + b.ToTable("tenants_tariff", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); }); #pragma warning restore 612, 618 } diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/DbContextPostgreSql/20211012145327_DbContextPostgreSql.Designer.cs b/migrations/mysql/CustomDbContext/20220724114549_CustomDbContextMigrate.Designer.cs similarity index 70% rename from common/ASC.Core.Common/Migrations/PostgreSql/DbContextPostgreSql/20211012145327_DbContextPostgreSql.Designer.cs rename to migrations/mysql/CustomDbContext/20220724114549_CustomDbContextMigrate.Designer.cs index 6937a994fb..91168f7f57 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/DbContextPostgreSql/20211012145327_DbContextPostgreSql.Designer.cs +++ b/migrations/mysql/CustomDbContext/20220724114549_CustomDbContextMigrate.Designer.cs @@ -1,157 +1,181 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.DbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlDbContext))] - [Migration("20211012145327_DbContextPostgreSql")] - partial class DbContextPostgreSql - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.10"); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbipLocation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddrType") - .IsRequired() - .HasColumnType("enum('ipv4','ipv6')") - .HasColumnName("addr_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("City") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("city") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Country") - .IsRequired() - .HasColumnType("varchar(2)") - .HasColumnName("country") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("District") - .HasColumnType("varchar(255)") - .HasColumnName("district") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("GeonameId") - .HasColumnType("int") - .HasColumnName("geoname_id"); - - b.Property("IPEnd") - .IsRequired() - .HasColumnType("varchar(39)") - .HasColumnName("ip_end") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("IPStart") - .IsRequired() - .HasColumnType("varchar(39)") - .HasColumnName("ip_start") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Latitude") - .HasColumnType("bigint") - .HasColumnName("latitude"); - - b.Property("Longitude") - .HasColumnType("bigint") - .HasColumnName("longitude"); - - b.Property("Processed") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("processed") - .HasDefaultValueSql("'1'"); - - b.Property("StateProv") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("stateprov") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TimezoneName") - .HasColumnType("varchar(255)") - .HasColumnName("timezone_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TimezoneOffset") - .HasColumnType("double") - .HasColumnName("timezone_offset"); - - b.Property("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("UserEmail") - .HasColumnType("varchar(255)") - .HasColumnName("user_email") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AppType") - .HasColumnType("int") - .HasColumnName("app_type"); - - b.Property("LastSign") - .HasColumnType("datetime") - .HasColumnName("last_sign"); - - b.Property("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("Region") - .HasColumnType("varchar(255)"); - - b.Property("ConnectionString") - .HasColumnType("longtext"); - - b.Property("Provider") - .HasColumnType("longtext"); - - b.HasKey("Region"); - - b.ToTable("Regions"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(CustomDbContext))] + [Migration("20220724114549_CustomDbContextMigrate")] + partial class CustomDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbipLocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddrType") + .IsRequired() + .HasColumnType("enum('ipv4','ipv6')") + .HasColumnName("addr_type") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("City") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("city") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Country") + .IsRequired() + .HasColumnType("varchar(2)") + .HasColumnName("country") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("District") + .HasColumnType("varchar(255)") + .HasColumnName("district") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("GeonameId") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("geoname_id") + .HasDefaultValueSql("NULL"); + + b.Property("IPEnd") + .IsRequired() + .HasColumnType("varchar(39)") + .HasColumnName("ip_end") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("IPStart") + .IsRequired() + .HasColumnType("varchar(39)") + .HasColumnName("ip_start") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Latitude") + .ValueGeneratedOnAdd() + .HasColumnType("float") + .HasColumnName("latitude") + .HasDefaultValueSql("NULL"); + + b.Property("Longitude") + .ValueGeneratedOnAdd() + .HasColumnType("float") + .HasColumnName("longitude") + .HasDefaultValueSql("NULL"); + + b.Property("Processed") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("processed") + .HasDefaultValueSql("'1'"); + + b.Property("StateProv") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("stateprov") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TimezoneName") + .HasColumnType("varchar(255)") + .HasColumnName("timezone_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TimezoneOffset") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("timezone_offset") + .HasDefaultValueSql("NULL"); + + b.Property("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", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.MobileAppInstall", b => + { + b.Property("UserEmail") + .HasColumnType("varchar(255)") + .HasColumnName("user_email") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("AppType") + .HasColumnType("int") + .HasColumnName("app_type"); + + b.Property("LastSign") + .ValueGeneratedOnAdd() + .HasColumnType("datetime") + .HasColumnName("last_sign") + .HasDefaultValueSql("NULL"); + + b.Property("RegisteredOn") + .HasColumnType("datetime") + .HasColumnName("registered_on"); + + b.HasKey("UserEmail", "AppType") + .HasName("PRIMARY"); + + b.ToTable("mobile_app_install", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.Regions", b => + { + b.Property("Region") + .HasColumnType("varchar(255)"); + + b.Property("ConnectionString") + .HasColumnType("longtext"); + + b.Property("Provider") + .HasColumnType("longtext"); + + b.HasKey("Region"); + + b.ToTable("Regions"); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/CustomDbContext/20220724114549_CustomDbContextMigrate.cs b/migrations/mysql/CustomDbContext/20220724114549_CustomDbContextMigrate.cs new file mode 100644 index 0000000000..9b055643af --- /dev/null +++ b/migrations/mysql/CustomDbContext/20220724114549_CustomDbContextMigrate.cs @@ -0,0 +1,103 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class CustomDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "dbip_location", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + addr_type = table.Column(type: "enum('ipv4','ipv6')", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + ip_start = table.Column(type: "varchar(39)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + ip_end = table.Column(type: "varchar(39)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + country = table.Column(type: "varchar(2)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + stateprov = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + district = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + city = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + zipcode = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + latitude = table.Column(type: "float", nullable: true, defaultValueSql: "NULL"), + longitude = table.Column(type: "float", nullable: true, defaultValueSql: "NULL"), + geoname_id = table.Column(type: "int", nullable: true, defaultValueSql: "NULL"), + timezone_offset = table.Column(type: "int", nullable: true, defaultValueSql: "NULL"), + timezone_name = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + processed = table.Column(type: "int", nullable: false, defaultValueSql: "'1'") + }, + constraints: table => + { + table.PrimaryKey("PK_dbip_location", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "mobile_app_install", + columns: table => new + { + user_email = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + app_type = table.Column(type: "int", nullable: false), + registered_on = table.Column(type: "datetime", nullable: false), + last_sign = table.Column(type: "datetime", nullable: true, defaultValueSql: "NULL") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.user_email, x.app_type }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "Regions", + columns: table => new + { + Region = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8"), + Provider = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8"), + ConnectionString = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PK_Regions", x => x.Region); + }) + .Annotation("MySql:CharSet", "utf8"); + + 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"); + } + } +} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/DbContextPostgreSql/PostgreSqlDbContextModelSnapshot.cs b/migrations/mysql/CustomDbContext/CustomDbContextModelSnapshot.cs similarity index 71% rename from common/ASC.Core.Common/Migrations/PostgreSql/DbContextPostgreSql/PostgreSqlDbContextModelSnapshot.cs rename to migrations/mysql/CustomDbContext/CustomDbContextModelSnapshot.cs index a096df7b29..fe999c94d5 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/DbContextPostgreSql/PostgreSqlDbContextModelSnapshot.cs +++ b/migrations/mysql/CustomDbContext/CustomDbContextModelSnapshot.cs @@ -1,156 +1,179 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.DbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlDbContext))] - partial class PostgreSqlDbContextModelSnapshot : 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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("AddrType") - .IsRequired() - .HasColumnType("enum('ipv4','ipv6')") - .HasColumnName("addr_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("City") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("city") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Country") - .IsRequired() - .HasColumnType("varchar(2)") - .HasColumnName("country") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("District") - .HasColumnType("varchar(255)") - .HasColumnName("district") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("GeonameId") - .HasColumnType("int") - .HasColumnName("geoname_id"); - - b.Property("IPEnd") - .IsRequired() - .HasColumnType("varchar(39)") - .HasColumnName("ip_end") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("IPStart") - .IsRequired() - .HasColumnType("varchar(39)") - .HasColumnName("ip_start") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Latitude") - .HasColumnType("bigint") - .HasColumnName("latitude"); - - b.Property("Longitude") - .HasColumnType("bigint") - .HasColumnName("longitude"); - - b.Property("Processed") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("processed") - .HasDefaultValueSql("'1'"); - - b.Property("StateProv") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("stateprov") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TimezoneName") - .HasColumnType("varchar(255)") - .HasColumnName("timezone_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TimezoneOffset") - .HasColumnType("double") - .HasColumnName("timezone_offset"); - - b.Property("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("UserEmail") - .HasColumnType("varchar(255)") - .HasColumnName("user_email") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AppType") - .HasColumnType("int") - .HasColumnName("app_type"); - - b.Property("LastSign") - .HasColumnType("datetime") - .HasColumnName("last_sign"); - - b.Property("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("Region") - .HasColumnType("varchar(255)"); - - b.Property("ConnectionString") - .HasColumnType("longtext"); - - b.Property("Provider") - .HasColumnType("longtext"); - - b.HasKey("Region"); - - b.ToTable("Regions"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(CustomDbContext))] + partial class CustomDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbipLocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("AddrType") + .IsRequired() + .HasColumnType("enum('ipv4','ipv6')") + .HasColumnName("addr_type") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("City") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("city") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Country") + .IsRequired() + .HasColumnType("varchar(2)") + .HasColumnName("country") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("District") + .HasColumnType("varchar(255)") + .HasColumnName("district") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("GeonameId") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("geoname_id") + .HasDefaultValueSql("NULL"); + + b.Property("IPEnd") + .IsRequired() + .HasColumnType("varchar(39)") + .HasColumnName("ip_end") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("IPStart") + .IsRequired() + .HasColumnType("varchar(39)") + .HasColumnName("ip_start") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Latitude") + .ValueGeneratedOnAdd() + .HasColumnType("float") + .HasColumnName("latitude") + .HasDefaultValueSql("NULL"); + + b.Property("Longitude") + .ValueGeneratedOnAdd() + .HasColumnType("float") + .HasColumnName("longitude") + .HasDefaultValueSql("NULL"); + + b.Property("Processed") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("processed") + .HasDefaultValueSql("'1'"); + + b.Property("StateProv") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("stateprov") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TimezoneName") + .HasColumnType("varchar(255)") + .HasColumnName("timezone_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TimezoneOffset") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("timezone_offset") + .HasDefaultValueSql("NULL"); + + b.Property("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", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.MobileAppInstall", b => + { + b.Property("UserEmail") + .HasColumnType("varchar(255)") + .HasColumnName("user_email") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("AppType") + .HasColumnType("int") + .HasColumnName("app_type"); + + b.Property("LastSign") + .ValueGeneratedOnAdd() + .HasColumnType("datetime") + .HasColumnName("last_sign") + .HasDefaultValueSql("NULL"); + + b.Property("RegisteredOn") + .HasColumnType("datetime") + .HasColumnName("registered_on"); + + b.HasKey("UserEmail", "AppType") + .HasName("PRIMARY"); + + b.ToTable("mobile_app_install", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.Regions", b => + { + b.Property("Region") + .HasColumnType("varchar(255)"); + + b.Property("ConnectionString") + .HasColumnType("longtext"); + + b.Property("Provider") + .HasColumnType("longtext"); + + b.HasKey("Region"); + + b.ToTable("Regions"); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/common/ASC.Feed/Migrations/PostgreSql/FeedDbContextPostgreSql/20211012145329_FeedDbContextPostgreSql.Designer.cs b/migrations/mysql/FeedDbContext/20220724114543_FeedDbContextMigrate.Designer.cs similarity index 80% rename from common/ASC.Feed/Migrations/PostgreSql/FeedDbContextPostgreSql/20211012145329_FeedDbContextPostgreSql.Designer.cs rename to migrations/mysql/FeedDbContext/20220724114543_FeedDbContextMigrate.Designer.cs index 611f653b5a..857486c5e9 100644 --- a/common/ASC.Feed/Migrations/PostgreSql/FeedDbContextPostgreSql/20211012145329_FeedDbContextPostgreSql.Designer.cs +++ b/migrations/mysql/FeedDbContext/20220724114543_FeedDbContextMigrate.Designer.cs @@ -1,172 +1,188 @@ -// - -namespace ASC.Feed.Migrations.PostgreSql.FeedDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlFeedDbContext))] - [Migration("20211012145329_FeedDbContextPostgreSql")] - partial class FeedDbContextPostgreSql - { - 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.FeedAggregate", b => - { - b.Property("Id") - .HasColumnType("varchar(88)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AggregateDate") - .HasColumnType("datetime") - .HasColumnName("aggregated_date"); - - b.Property("Author") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("author") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreatedDate") - .HasColumnType("datetime") - .HasColumnName("created_date"); - - b.Property("GroupId") - .HasColumnType("varchar(70)") - .HasColumnName("group_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Json") - .IsRequired() - .HasColumnType("mediumtext") - .HasColumnName("json") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Keywords") - .HasColumnType("text") - .HasColumnName("keywords") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedDate") - .HasColumnType("datetime") - .HasColumnName("modified_date"); - - b.Property("Module") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("module") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Product") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("product") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("Tenant", "AggregateDate") - .HasDatabaseName("aggregated_date"); - - b.HasIndex("Tenant", "ModifiedDate") - .HasDatabaseName("modified_date"); - - b.HasIndex("Tenant", "Product") - .HasDatabaseName("product"); - - b.ToTable("feed_aggregate"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.FeedLast", b => - { - b.Property("LastKey") - .HasColumnType("varchar(128)") - .HasColumnName("last_key") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastDate") - .HasColumnType("datetime") - .HasColumnName("last_date"); - - b.HasKey("LastKey") - .HasName("PRIMARY"); - - b.ToTable("feed_last"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.FeedReaded", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Module") - .HasColumnType("varchar(50)") - .HasColumnName("module") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TimeStamp") - .HasColumnType("datetime") - .HasColumnName("timestamp"); - - b.HasKey("Tenant", "UserId", "Module") - .HasName("PRIMARY"); - - b.ToTable("feed_readed"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.FeedUsers", b => - { - b.Property("FeedId") - .HasColumnType("varchar(88)") - .HasColumnName("feed_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("char(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("FeedId", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("UserId") - .HasDatabaseName("user_id"); - - b.ToTable("feed_users"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Feed.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(FeedDbContext))] + [Migration("20220724114543_FeedDbContextMigrate")] + partial class FeedDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Feed.Model.FeedAggregate", b => + { + b.Property("Id") + .HasColumnType("varchar(88)") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("AggregateDate") + .HasColumnType("datetime") + .HasColumnName("aggregated_date"); + + b.Property("Author") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("author") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreatedDate") + .HasColumnType("datetime") + .HasColumnName("created_date"); + + b.Property("GroupId") + .HasColumnType("varchar(70)") + .HasColumnName("group_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Json") + .IsRequired() + .HasColumnType("mediumtext") + .HasColumnName("json") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Keywords") + .HasColumnType("text") + .HasColumnName("keywords") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("modified_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ModifiedDate") + .HasColumnType("datetime") + .HasColumnName("modified_date"); + + b.Property("Module") + .IsRequired() + .HasColumnType("varchar(50)") + .HasColumnName("module") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Product") + .IsRequired() + .HasColumnType("varchar(50)") + .HasColumnName("product") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant", "AggregateDate") + .HasDatabaseName("aggregated_date"); + + b.HasIndex("Tenant", "ModifiedDate") + .HasDatabaseName("modified_date"); + + b.HasIndex("Tenant", "Product") + .HasDatabaseName("product"); + + b.ToTable("feed_aggregate", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Feed.Model.FeedLast", b => + { + b.Property("LastKey") + .HasColumnType("varchar(128)") + .HasColumnName("last_key") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastDate") + .HasColumnType("datetime") + .HasColumnName("last_date"); + + b.HasKey("LastKey") + .HasName("PRIMARY"); + + b.ToTable("feed_last", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Feed.Model.FeedReaded", b => + { + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .HasColumnType("varchar(38)") + .HasColumnName("user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Module") + .HasColumnType("varchar(50)") + .HasColumnName("module") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TimeStamp") + .HasColumnType("datetime") + .HasColumnName("timestamp"); + + b.HasKey("Tenant", "UserId", "Module") + .HasName("PRIMARY"); + + b.ToTable("feed_readed", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Feed.Model.FeedUsers", b => + { + b.Property("FeedId") + .HasColumnType("varchar(88)") + .HasColumnName("feed_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserId") + .HasColumnType("char(38)") + .HasColumnName("user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("FeedId", "UserId") + .HasName("PRIMARY"); + + b.HasIndex("UserId") + .HasDatabaseName("user_id"); + + b.ToTable("feed_users", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/FeedDbContext/20220724114543_FeedDbContextMigrate.cs b/migrations/mysql/FeedDbContext/20220724114543_FeedDbContextMigrate.cs new file mode 100644 index 0000000000..69ec5a809c --- /dev/null +++ b/migrations/mysql/FeedDbContext/20220724114543_FeedDbContextMigrate.cs @@ -0,0 +1,128 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class FeedDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "feed_aggregate", + columns: table => new + { + id = table.Column(type: "varchar(88)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + tenant = table.Column(type: "int", nullable: false), + product = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + module = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + author = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + modified_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + created_date = table.Column(type: "datetime", nullable: false), + modified_date = table.Column(type: "datetime", nullable: false), + group_id = table.Column(type: "varchar(70)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + aggregated_date = table.Column(type: "datetime", nullable: false), + json = table.Column(type: "mediumtext", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + keywords = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PK_feed_aggregate", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "feed_last", + columns: table => new + { + last_key = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + last_date = table.Column(type: "datetime", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.last_key); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "feed_readed", + columns: table => new + { + user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + module = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + tenant_id = table.Column(type: "int", nullable: false), + timestamp = table.Column(type: "datetime", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.user_id, x.module }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "feed_users", + columns: table => new + { + feed_id = table.Column(type: "varchar(88)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + user_id = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.feed_id, x.user_id }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateIndex( + name: "aggregated_date", + table: "feed_aggregate", + columns: new[] { "tenant", "aggregated_date" }); + + migrationBuilder.CreateIndex( + name: "modified_date", + table: "feed_aggregate", + columns: new[] { "tenant", "modified_date" }); + + migrationBuilder.CreateIndex( + name: "product", + table: "feed_aggregate", + columns: new[] { "tenant", "product" }); + + migrationBuilder.CreateIndex( + name: "user_id", + table: "feed_users", + column: "user_id"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "feed_aggregate"); + + migrationBuilder.DropTable( + name: "feed_last"); + + migrationBuilder.DropTable( + name: "feed_readed"); + + migrationBuilder.DropTable( + name: "feed_users"); + } + } +} diff --git a/common/ASC.Feed/Migrations/PostgreSql/FeedDbContextPostgreSql/PostgreSqlFeedDbContextModelSnapshot.cs b/migrations/mysql/FeedDbContext/FeedDbContextModelSnapshot.cs similarity index 81% rename from common/ASC.Feed/Migrations/PostgreSql/FeedDbContextPostgreSql/PostgreSqlFeedDbContextModelSnapshot.cs rename to migrations/mysql/FeedDbContext/FeedDbContextModelSnapshot.cs index 2d92cc2790..9e09118252 100644 --- a/common/ASC.Feed/Migrations/PostgreSql/FeedDbContextPostgreSql/PostgreSqlFeedDbContextModelSnapshot.cs +++ b/migrations/mysql/FeedDbContext/FeedDbContextModelSnapshot.cs @@ -1,171 +1,186 @@ -// - -namespace ASC.Feed.Migrations.PostgreSql.FeedDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlFeedDbContext))] - partial class PostgreSqlFeedDbContextModelSnapshot : 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.FeedAggregate", b => - { - b.Property("Id") - .HasColumnType("varchar(88)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AggregateDate") - .HasColumnType("datetime") - .HasColumnName("aggregated_date"); - - b.Property("Author") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("author") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreatedDate") - .HasColumnType("datetime") - .HasColumnName("created_date"); - - b.Property("GroupId") - .HasColumnType("varchar(70)") - .HasColumnName("group_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Json") - .IsRequired() - .HasColumnType("mediumtext") - .HasColumnName("json") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Keywords") - .HasColumnType("text") - .HasColumnName("keywords") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedDate") - .HasColumnType("datetime") - .HasColumnName("modified_date"); - - b.Property("Module") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("module") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Product") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("product") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("Tenant", "AggregateDate") - .HasDatabaseName("aggregated_date"); - - b.HasIndex("Tenant", "ModifiedDate") - .HasDatabaseName("modified_date"); - - b.HasIndex("Tenant", "Product") - .HasDatabaseName("product"); - - b.ToTable("feed_aggregate"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.FeedLast", b => - { - b.Property("LastKey") - .HasColumnType("varchar(128)") - .HasColumnName("last_key") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastDate") - .HasColumnType("datetime") - .HasColumnName("last_date"); - - b.HasKey("LastKey") - .HasName("PRIMARY"); - - b.ToTable("feed_last"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.FeedReaded", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Module") - .HasColumnType("varchar(50)") - .HasColumnName("module") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TimeStamp") - .HasColumnType("datetime") - .HasColumnName("timestamp"); - - b.HasKey("Tenant", "UserId", "Module") - .HasName("PRIMARY"); - - b.ToTable("feed_readed"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.FeedUsers", b => - { - b.Property("FeedId") - .HasColumnType("varchar(88)") - .HasColumnName("feed_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("char(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("FeedId", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("UserId") - .HasDatabaseName("user_id"); - - b.ToTable("feed_users"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Feed.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(FeedDbContext))] + partial class FeedDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Feed.Model.FeedAggregate", b => + { + b.Property("Id") + .HasColumnType("varchar(88)") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("AggregateDate") + .HasColumnType("datetime") + .HasColumnName("aggregated_date"); + + b.Property("Author") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("author") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreatedDate") + .HasColumnType("datetime") + .HasColumnName("created_date"); + + b.Property("GroupId") + .HasColumnType("varchar(70)") + .HasColumnName("group_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Json") + .IsRequired() + .HasColumnType("mediumtext") + .HasColumnName("json") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Keywords") + .HasColumnType("text") + .HasColumnName("keywords") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("modified_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ModifiedDate") + .HasColumnType("datetime") + .HasColumnName("modified_date"); + + b.Property("Module") + .IsRequired() + .HasColumnType("varchar(50)") + .HasColumnName("module") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Product") + .IsRequired() + .HasColumnType("varchar(50)") + .HasColumnName("product") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant", "AggregateDate") + .HasDatabaseName("aggregated_date"); + + b.HasIndex("Tenant", "ModifiedDate") + .HasDatabaseName("modified_date"); + + b.HasIndex("Tenant", "Product") + .HasDatabaseName("product"); + + b.ToTable("feed_aggregate", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Feed.Model.FeedLast", b => + { + b.Property("LastKey") + .HasColumnType("varchar(128)") + .HasColumnName("last_key") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastDate") + .HasColumnType("datetime") + .HasColumnName("last_date"); + + b.HasKey("LastKey") + .HasName("PRIMARY"); + + b.ToTable("feed_last", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Feed.Model.FeedReaded", b => + { + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .HasColumnType("varchar(38)") + .HasColumnName("user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Module") + .HasColumnType("varchar(50)") + .HasColumnName("module") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TimeStamp") + .HasColumnType("datetime") + .HasColumnName("timestamp"); + + b.HasKey("Tenant", "UserId", "Module") + .HasName("PRIMARY"); + + b.ToTable("feed_readed", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Feed.Model.FeedUsers", b => + { + b.Property("FeedId") + .HasColumnType("varchar(88)") + .HasColumnName("feed_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserId") + .HasColumnType("char(38)") + .HasColumnName("user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("FeedId", "UserId") + .HasName("PRIMARY"); + + b.HasIndex("UserId") + .HasDatabaseName("user_id"); + + b.ToTable("feed_users", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/FilesDbContext/20220725110944_FilesDbContextMigrate.Designer.cs b/migrations/mysql/FilesDbContext/20220725110944_FilesDbContextMigrate.Designer.cs new file mode 100644 index 0000000000..db2182d26b --- /dev/null +++ b/migrations/mysql/FilesDbContext/20220725110944_FilesDbContextMigrate.Designer.cs @@ -0,0 +1,2686 @@ +// +using System; +using ASC.Files.Core.EF; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations.FilesDb +{ + [DbContext(typeof(FilesDbContext))] + [Migration("20220725110944_FilesDbContextMigrate")] + partial class FilesDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => + { + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.Property("ActiveUsers") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("active_users") + .HasDefaultValueSql("'0'"); + + b.Property("AvangateId") + .HasColumnType("varchar(128)") + .HasColumnName("avangate_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Description") + .HasColumnType("varchar(128)") + .HasColumnName("description") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Features") + .HasColumnType("text") + .HasColumnName("features"); + + b.Property("MaxFileSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_file_size") + .HasDefaultValueSql("'0'"); + + b.Property("MaxTotalSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_total_size") + .HasDefaultValueSql("'0'"); + + b.Property("Name") + .HasColumnType("varchar(128)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Price") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(10,2)") + .HasColumnName("price") + .HasDefaultValueSql("'0.00'"); + + b.Property("Visible") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("visible") + .HasDefaultValueSql("'0'"); + + b.HasKey("Tenant") + .HasName("PRIMARY"); + + b.ToTable("tenants_quota", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Tenant = -1, + ActiveUsers = 10000, + AvangateId = "0", + Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", + MaxFileSize = 102400L, + MaxTotalSize = 10995116277760L, + Name = "default", + Price = 0.00m, + Visible = false + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Comment") + .HasColumnType("varchar(255)") + .HasColumnName("comment") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("timestamp") + .HasColumnName("create_on"); + + b.Property("Quantity") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("quantity") + .HasDefaultValueSql("'1'"); + + b.Property("Stamp") + .HasColumnType("datetime") + .HasColumnName("stamp"); + + b.Property("Tariff") + .HasColumnType("int") + .HasColumnName("tariff"); + + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant"); + + b.ToTable("tenants_tariff", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Alias") + .IsRequired() + .HasColumnType("varchar(100)") + .HasColumnName("alias") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("calls") + .HasDefaultValueSql("'1'"); + + b.Property("CreationDateTime") + .HasColumnType("datetime") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("industry") + .HasDefaultValueSql("'0'"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("char(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.Property("MappedDomain") + .HasColumnType("varchar(100)") + .HasColumnName("mappeddomain") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("OwnerId") + .HasColumnType("varchar(38)") + .HasColumnName("owner_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("PaymentId") + .HasColumnType("varchar(38)") + .HasColumnName("payment_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("spam") + .HasDefaultValueSql("'1'"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("status") + .HasDefaultValueSql("'0'"); + + b.Property("StatusChanged") + .HasColumnType("datetime") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .HasColumnType("varchar(50)") + .HasColumnName("timezone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("'1'"); + + b.Property("TrustedDomainsRaw") + .HasColumnType("varchar(1024)") + .HasColumnName("trusteddomains") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("version") + .HasDefaultValueSql("'2'"); + + b.Property("Version_Changed") + .HasColumnType("datetime") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.FilesConverts", b => + { + b.Property("Input") + .HasColumnType("varchar(50)") + .HasColumnName("input") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Output") + .HasColumnType("varchar(50)") + .HasColumnName("output") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Input", "Output") + .HasName("PRIMARY"); + + b.ToTable("files_converts", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Input = ".csv", + Output = ".ods" + }, + new + { + Input = ".csv", + Output = ".pdf" + }, + new + { + Input = ".csv", + Output = ".ots" + }, + new + { + Input = ".csv", + Output = ".xlsx" + }, + new + { + Input = ".csv", + Output = ".xlsm" + }, + new + { + Input = ".csv", + Output = ".xltm" + }, + new + { + Input = ".csv", + Output = ".xltx" + }, + new + { + Input = ".doc", + Output = ".docx" + }, + new + { + Input = ".doc", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".doc", + Output = ".odt" + }, + 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 = ".html" + }, + new + { + Input = ".docm", + Output = ".dotx" + }, + new + { + Input = ".docm", + Output = ".epub" + }, + new + { + Input = ".docm", + Output = ".fb2" + }, + new + { + Input = ".docm", + Output = ".ott" + }, + new + { + Input = ".docm", + Output = ".odt" + }, + new + { + Input = ".docm", + Output = ".pdf" + }, + new + { + Input = ".docm", + Output = ".rtf" + }, + new + { + Input = ".docm", + Output = ".txt" + }, + new + { + Input = ".doct", + Output = ".docx" + }, + new + { + Input = ".docx", + Output = ".odt" + }, + new + { + Input = ".docx", + Output = ".pdf" + }, + new + { + Input = ".docx", + Output = ".rtf" + }, + new + { + Input = ".docx", + Output = ".txt" + }, + new + { + Input = ".docx", + Output = ".html" + }, + new + { + Input = ".docx", + Output = ".dotm" + }, + new + { + Input = ".docx", + Output = ".dotx" + }, + new + { + Input = ".docx", + Output = ".epub" + }, + new + { + Input = ".docx", + Output = ".fb2" + }, + new + { + Input = ".docx", + Output = ".ott" + }, + new + { + Input = ".docx", + Output = ".docm" + }, + new + { + Input = ".docx", + Output = ".docxf" + }, + new + { + Input = ".docxf", + Output = ".docx" + }, + new + { + Input = ".docxf", + Output = ".odt" + }, + new + { + Input = ".docxf", + Output = ".oform" + }, + new + { + Input = ".docxf", + Output = ".pdf" + }, + new + { + Input = ".docxf", + Output = ".rtf" + }, + new + { + Input = ".docxf", + Output = ".txt" + }, + new + { + Input = ".docxf", + Output = ".dotx" + }, + new + { + Input = ".docxf", + Output = ".epub" + }, + new + { + Input = ".docxf", + Output = ".fb2" + }, + new + { + Input = ".docxf", + Output = ".html" + }, + new + { + Input = ".docxf", + Output = ".ott" + }, + new + { + Input = ".dot", + Output = ".docx" + }, + new + { + Input = ".dot", + Output = ".odt" + }, + new + { + Input = ".dot", + Output = ".pdf" + }, + new + { + Input = ".dot", + Output = ".rtf" + }, + new + { + Input = ".dot", + Output = ".txt" + }, + new + { + Input = ".dot", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".dotm", + Output = ".docx" + }, + new + { + Input = ".dotm", + Output = ".odt" + }, + new + { + Input = ".dotm", + Output = ".pdf" + }, + new + { + Input = ".dotm", + Output = ".rtf" + }, + new + { + Input = ".dotm", + Output = ".txt" + }, + new + { + Input = ".dotm", + Output = ".docm" + }, + new + { + Input = ".dotm", + Output = ".dotx" + }, + new + { + Input = ".dotm", + Output = ".epub" + }, + new + { + Input = ".dotm", + Output = ".fb2" + }, + new + { + Input = ".dotm", + Output = ".html" + }, + new + { + Input = ".dotm", + Output = ".ott" + }, + new + { + Input = ".dotx", + Output = ".docx" + }, + new + { + Input = ".dotx", + Output = ".odt" + }, + new + { + Input = ".dotx", + Output = ".pdf" + }, + new + { + Input = ".dotx", + Output = ".rtf" + }, + new + { + Input = ".dotx", + Output = ".txt" + }, + new + { + Input = ".dotx", + Output = ".docm" + }, + new + { + Input = ".dotx", + Output = ".dotm" + }, + new + { + Input = ".dotx", + Output = ".epub" + }, + new + { + Input = ".dotx", + Output = ".fb2" + }, + new + { + Input = ".dotx", + Output = ".html" + }, + new + { + Input = ".dotx", + Output = ".ott" + }, + new + { + Input = ".epub", + Output = ".docx" + }, + new + { + Input = ".epub", + Output = ".odt" + }, + new + { + Input = ".epub", + Output = ".pdf" + }, + new + { + Input = ".epub", + Output = ".rtf" + }, + new + { + Input = ".epub", + Output = ".txt" + }, + new + { + Input = ".epub", + Output = ".docm" + }, + new + { + Input = ".epub", + Output = ".dotm" + }, + new + { + Input = ".epub", + Output = ".dotx" + }, + new + { + Input = ".epub", + Output = ".fb2" + }, + new + { + Input = ".epub", + Output = ".html" + }, + new + { + Input = ".epub", + Output = ".ott" + }, + new + { + Input = ".fb2", + Output = ".docx" + }, + new + { + Input = ".fb2", + Output = ".odt" + }, + new + { + Input = ".fb2", + Output = ".pdf" + }, + new + { + Input = ".fb2", + Output = ".rtf" + }, + new + { + Input = ".fb2", + Output = ".txt" + }, + new + { + Input = ".fb2", + Output = ".docm" + }, + new + { + Input = ".fb2", + Output = ".dotm" + }, + new + { + Input = ".fb2", + Output = ".dotx" + }, + new + { + Input = ".fb2", + Output = ".epub" + }, + new + { + Input = ".fb2", + Output = ".html" + }, + new + { + Input = ".fb2", + Output = ".ott" + }, + new + { + Input = ".fodp", + Output = ".odp" + }, + new + { + Input = ".fodp", + Output = ".pdf" + }, + new + { + Input = ".fodp", + Output = ".pptx" + }, + new + { + Input = ".fodp", + Output = ".otp" + }, + new + { + Input = ".fodp", + Output = ".potm" + }, + new + { + Input = ".fodp", + Output = ".potx" + }, + new + { + Input = ".fodp", + Output = ".pptm" + }, + new + { + Input = ".fods", + Output = ".csv" + }, + new + { + Input = ".fods", + Output = ".ods" + }, + new + { + Input = ".fods", + Output = ".pdf" + }, + new + { + Input = ".fods", + Output = ".xlsx" + }, + new + { + Input = ".fods", + Output = ".xlsm" + }, + new + { + Input = ".fods", + Output = ".xltm" + }, + new + { + Input = ".fods", + Output = ".xltx" + }, + new + { + Input = ".fods", + Output = ".ots" + }, + new + { + Input = ".fodt", + Output = ".docx" + }, + new + { + Input = ".fodt", + Output = ".odt" + }, + new + { + Input = ".fodt", + Output = ".docm" + }, + new + { + Input = ".fodt", + Output = ".pdf" + }, + new + { + Input = ".fodt", + Output = ".rtf" + }, + new + { + Input = ".fodt", + Output = ".txt" + }, + 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 = ".ott" + }, + new + { + Input = ".html", + Output = ".docx" + }, + new + { + Input = ".html", + Output = ".odt" + }, + new + { + Input = ".html", + Output = ".pdf" + }, + new + { + Input = ".html", + Output = ".rtf" + }, + new + { + Input = ".html", + Output = ".txt" + }, + new + { + Input = ".html", + Output = ".docm" + }, + new + { + Input = ".html", + Output = ".dotm" + }, + new + { + Input = ".html", + Output = ".dotx" + }, + new + { + Input = ".html", + Output = ".epub" + }, + new + { + Input = ".html", + Output = ".fb2" + }, + new + { + Input = ".html", + Output = ".ott" + }, + new + { + Input = ".mht", + Output = ".docx" + }, + new + { + Input = ".mht", + Output = ".odt" + }, + new + { + Input = ".mht", + Output = ".pdf" + }, + new + { + Input = ".mht", + Output = ".rtf" + }, + new + { + Input = ".mht", + Output = ".txt" + }, + new + { + Input = ".mht", + Output = ".docm" + }, + new + { + Input = ".mht", + Output = ".dotm" + }, + new + { + Input = ".mht", + Output = ".dotx" + }, + new + { + Input = ".mht", + Output = ".epub" + }, + new + { + Input = ".mht", + Output = ".fb2" + }, + new + { + Input = ".mht", + Output = ".ott" + }, + new + { + Input = ".odp", + Output = ".pdf" + }, + new + { + Input = ".odp", + Output = ".pptx" + }, + new + { + Input = ".odp", + Output = ".otp" + }, + new + { + Input = ".odp", + Output = ".potm" + }, + new + { + Input = ".odp", + Output = ".potx" + }, + new + { + Input = ".odp", + Output = ".pptm" + }, + 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 = ".pdf" + }, + new + { + Input = ".ods", + Output = ".xlsx" + }, + new + { + Input = ".ods", + Output = ".ots" + }, + new + { + Input = ".ods", + Output = ".xlsm" + }, + 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 = ".xltm" + }, + new + { + Input = ".ots", + Output = ".xltx" + }, + new + { + Input = ".ots", + Output = ".xlsx" + }, + new + { + Input = ".oxps", + Output = ".pdf" + }, + new + { + Input = ".odt", + Output = ".docx" + }, + new + { + Input = ".odt", + Output = ".pdf" + }, + new + { + Input = ".odt", + Output = ".rtf" + }, + new + { + Input = ".odt", + Output = ".txt" + }, + new + { + Input = ".odt", + Output = ".docm" + }, + 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 = ".ott", + Output = ".docx" + }, + new + { + Input = ".ott", + Output = ".odt" + }, + new + { + Input = ".ott", + Output = ".pdf" + }, + new + { + Input = ".ott", + Output = ".rtf" + }, + new + { + Input = ".ott", + Output = ".txt" + }, + new + { + Input = ".ott", + Output = ".docm" + }, + 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 = ".pot", + Output = ".odp" + }, + new + { + Input = ".pot", + Output = ".pdf" + }, + new + { + Input = ".pot", + Output = ".pptx" + }, + new + { + Input = ".pot", + Output = ".otp" + }, + new + { + Input = ".pot", + Output = ".potm" + }, + new + { + Input = ".pot", + Output = ".potx" + }, + new + { + Input = ".pot", + Output = ".pptm" + }, + new + { + Input = ".potm", + Output = ".odp" + }, + new + { + Input = ".potm", + Output = ".pdf" + }, + new + { + Input = ".potm", + Output = ".pptx" + }, + new + { + Input = ".potm", + Output = ".otp" + }, + new + { + Input = ".potm", + Output = ".potx" + }, + new + { + Input = ".potm", + Output = ".pptm" + }, + new + { + Input = ".potx", + Output = ".odp" + }, + new + { + Input = ".potx", + Output = ".pdf" + }, + new + { + Input = ".potx", + Output = ".pptx" + }, + new + { + Input = ".potx", + Output = ".otp" + }, + new + { + Input = ".potx", + Output = ".potm" + }, + new + { + Input = ".potx", + Output = ".pptm" + }, + new + { + Input = ".pps", + Output = ".odp" + }, + new + { + Input = ".pps", + Output = ".pdf" + }, + new + { + Input = ".pps", + Output = ".pptx" + }, + new + { + Input = ".pps", + Output = ".otp" + }, + new + { + Input = ".pps", + Output = ".potm" + }, + new + { + Input = ".pps", + Output = ".potx" + }, + new + { + Input = ".pps", + Output = ".pptm" + }, + new + { + Input = ".ppsm", + Output = ".odp" + }, + new + { + Input = ".ppsm", + Output = ".pdf" + }, + new + { + Input = ".ppsm", + Output = ".pptx" + }, + new + { + Input = ".ppsm", + Output = ".otp" + }, + new + { + Input = ".ppsm", + Output = ".potm" + }, + new + { + Input = ".ppsm", + Output = ".potx" + }, + new + { + Input = ".ppsm", + Output = ".pptm" + }, + new + { + Input = ".ppsx", + Output = ".odp" + }, + new + { + Input = ".ppsx", + Output = ".pdf" + }, + new + { + Input = ".ppsx", + Output = ".pptx" + }, + new + { + Input = ".ppsx", + Output = ".otp" + }, + new + { + Input = ".ppsx", + Output = ".potm" + }, + new + { + Input = ".ppsx", + Output = ".potx" + }, + new + { + Input = ".ppsx", + Output = ".pptm" + }, + new + { + Input = ".ppt", + Output = ".odp" + }, + new + { + Input = ".ppt", + Output = ".pdf" + }, + new + { + Input = ".ppt", + Output = ".pptx" + }, + new + { + Input = ".ppt", + Output = ".otp" + }, + new + { + Input = ".ppt", + Output = ".potm" + }, + new + { + Input = ".ppt", + Output = ".potx" + }, + new + { + Input = ".ppt", + Output = ".pptm" + }, + new + { + Input = ".pptm", + Output = ".odp" + }, + new + { + Input = ".pptm", + Output = ".pdf" + }, + new + { + Input = ".pptm", + Output = ".pptx" + }, + new + { + Input = ".pptm", + Output = ".otp" + }, + new + { + Input = ".pptm", + Output = ".potm" + }, + new + { + Input = ".pptm", + Output = ".potx" + }, + new + { + Input = ".pptt", + Output = ".pptx" + }, + new + { + Input = ".pptx", + Output = ".odp" + }, + new + { + Input = ".pptx", + Output = ".pdf" + }, + new + { + Input = ".pptx", + Output = ".otp" + }, + new + { + Input = ".pptx", + Output = ".potm" + }, + new + { + Input = ".pptx", + Output = ".potx" + }, + new + { + Input = ".pptx", + Output = ".pptm" + }, + new + { + Input = ".rtf", + Output = ".odt" + }, + new + { + Input = ".rtf", + Output = ".pdf" + }, + new + { + Input = ".rtf", + Output = ".docx" + }, + new + { + Input = ".rtf", + Output = ".txt" + }, + new + { + Input = ".rtf", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".txt", + Output = ".pdf" + }, + new + { + Input = ".txt", + Output = ".docx" + }, + new + { + Input = ".txt", + Output = ".odt" + }, + new + { + Input = ".txt", + Output = ".rtf" + }, + new + { + Input = ".txt", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".xls", + Output = ".csv" + }, + new + { + Input = ".xls", + Output = ".ods" + }, + new + { + Input = ".xls", + Output = ".pdf" + }, + new + { + Input = ".xls", + Output = ".xlsx" + }, + new + { + Input = ".xls", + Output = ".ots" + }, + new + { + Input = ".xls", + Output = ".xlsm" + }, + new + { + Input = ".xls", + Output = ".xltm" + }, + new + { + Input = ".xls", + Output = ".xltx" + }, + new + { + Input = ".xlsm", + Output = ".csv" + }, + new + { + Input = ".xlsm", + Output = ".xltm" + }, + new + { + Input = ".xlsm", + Output = ".xltx" + }, + new + { + Input = ".xlsm", + Output = ".ots" + }, + new + { + Input = ".xlsm", + Output = ".pdf" + }, + new + { + Input = ".xlsm", + Output = ".ods" + }, + new + { + Input = ".xlsm", + 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 = ".xlst", + Output = ".xlsx" + }, + new + { + Input = ".xlt", + Output = ".csv" + }, + new + { + Input = ".xlt", + Output = ".ods" + }, + new + { + Input = ".xlt", + Output = ".pdf" + }, + new + { + Input = ".xlt", + Output = ".xlsx" + }, + new + { + Input = ".xlt", + Output = ".ots" + }, + new + { + Input = ".xlt", + Output = ".xlsm" + }, + new + { + Input = ".xlt", + Output = ".xltm" + }, + new + { + Input = ".xlt", + Output = ".xltx" + }, + new + { + Input = ".xltm", + Output = ".csv" + }, + new + { + Input = ".xltm", + Output = ".ods" + }, + new + { + Input = ".xltm", + Output = ".pdf" + }, + new + { + Input = ".xltm", + Output = ".ots" + }, + new + { + Input = ".xltm", + Output = ".xlsm" + }, + new + { + Input = ".xltm", + Output = ".xltx" + }, + new + { + Input = ".xltm", + Output = ".xlsx" + }, + new + { + Input = ".xltx", + Output = ".pdf" + }, + new + { + Input = ".xltx", + Output = ".csv" + }, + new + { + Input = ".xltx", + Output = ".ods" + }, + new + { + Input = ".xltx", + Output = ".ots" + }, + new + { + Input = ".xltx", + Output = ".xlsm" + }, + new + { + Input = ".xltx", + Output = ".xltm" + }, + new + { + Input = ".xltx", + Output = ".xlsx" + }, + new + { + Input = ".xps", + Output = ".pdf" + }, + 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" + }); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFile", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("Id") + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Version") + .HasColumnType("int") + .HasColumnName("version"); + + b.Property("Category") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("category") + .HasDefaultValueSql("'0'"); + + b.Property("Changes") + .HasColumnType("mediumtext") + .HasColumnName("changes") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Comment") + .HasColumnType("varchar(255)") + .HasColumnName("comment") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ContentLength") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("content_length") + .HasDefaultValueSql("'0'"); + + b.Property("ConvertedType") + .HasColumnType("varchar(10)") + .HasColumnName("converted_type") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateBy") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("create_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("datetime") + .HasColumnName("create_on"); + + b.Property("CurrentVersion") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("current_version") + .HasDefaultValueSql("'0'"); + + b.Property("Encrypted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("encrypted") + .HasDefaultValueSql("'0'"); + + b.Property("FileStatus") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("file_status") + .HasDefaultValueSql("'0'"); + + b.Property("Forcesave") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("forcesave") + .HasDefaultValueSql("'0'"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("modified_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ModifiedOn") + .HasColumnType("datetime") + .HasColumnName("modified_on"); + + b.Property("ParentId") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("folder_id") + .HasDefaultValueSql("'0'"); + + b.Property("ThumbnailStatus") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("thumb") + .HasDefaultValueSql("'0'"); + + b.Property("Title") + .IsRequired() + .HasColumnType("varchar(400)") + .HasColumnName("title") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("VersionGroup") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("version_group") + .HasDefaultValueSql("'1'"); + + b.HasKey("TenantId", "Id", "Version") + .HasName("PRIMARY"); + + b.HasIndex("Id") + .HasDatabaseName("id"); + + b.HasIndex("ModifiedOn") + .HasDatabaseName("modified_on"); + + b.HasIndex("ParentId") + .HasDatabaseName("folder_id"); + + b.ToTable("files_file", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesBunchObjects", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("RightNode") + .HasColumnType("varchar(255)") + .HasColumnName("right_node") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LeftNode") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("left_node") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId", "RightNode") + .HasName("PRIMARY"); + + b.HasIndex("LeftNode") + .HasDatabaseName("left_node"); + + b.ToTable("files_bunch_objects", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesLink", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("SourceId") + .HasColumnType("varchar(32)") + .HasColumnName("source_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LinkedId") + .HasColumnType("varchar(32)") + .HasColumnName("linked_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LinkedFor") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("linked_for") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId", "SourceId", "LinkedId") + .HasName("PRIMARY"); + + b.HasIndex("TenantId", "SourceId", "LinkedId", "LinkedFor") + .HasDatabaseName("linked_for"); + + b.ToTable("files_link", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesProperties", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("EntryId") + .HasColumnType("varchar(32)") + .HasColumnName("entry_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Data") + .HasColumnType("mediumtext") + .HasColumnName("data") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId", "EntryId") + .HasName("PRIMARY"); + + b.ToTable("files_properties", (string)null); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("EntryId") + .HasColumnType("varchar(50)") + .HasColumnName("entry_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("EntryType") + .HasColumnType("int") + .HasColumnName("entry_type"); + + b.Property("Subject") + .HasColumnType("char(38)") + .HasColumnName("subject") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Owner") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("owner") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Share") + .HasColumnType("int") + .HasColumnName("security"); + + b.Property("TimeStamp") + .HasColumnType("timestamp") + .HasColumnName("timestamp"); + + b.HasKey("TenantId", "EntryId", "EntryType", "Subject") + .HasName("PRIMARY"); + + b.HasIndex("Owner") + .HasDatabaseName("owner"); + + b.HasIndex("TenantId", "EntryType", "EntryId", "Owner") + .HasDatabaseName("tenant_id"); + + b.ToTable("files_security", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Owner") + .IsRequired() + .HasColumnType("varchar(38)") + .HasColumnName("owner") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("Type") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("flag") + .HasDefaultValueSql("'0'"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Owner", "Name", "Type") + .HasDatabaseName("name"); + + b.ToTable("files_tag", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTagLink", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("TagId") + .HasColumnType("int") + .HasColumnName("tag_id"); + + b.Property("EntryId") + .HasColumnType("varchar(32)") + .HasColumnName("entry_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("EntryType") + .HasColumnType("int") + .HasColumnName("entry_type"); + + b.Property("Count") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("tag_count") + .HasDefaultValueSql("'0'"); + + b.Property("CreateBy") + .HasColumnType("char(38)") + .HasColumnName("create_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("datetime") + .HasColumnName("create_on"); + + b.HasKey("TenantId", "TagId", "EntryId", "EntryType") + .HasName("PRIMARY"); + + b.HasIndex("CreateOn") + .HasDatabaseName("create_on"); + + b.HasIndex("TenantId", "EntryId", "EntryType") + .HasDatabaseName("entry_id"); + + b.ToTable("files_tag_link", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CreateOn") + .HasColumnType("datetime") + .HasColumnName("create_on"); + + b.Property("FolderId") + .HasColumnType("text") + .HasColumnName("folder_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("FolderType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("folder_type") + .HasDefaultValueSql("'0'"); + + b.Property("Password") + .IsRequired() + .HasColumnType("varchar(512)") + .HasColumnName("password") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Provider") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("varchar(50)") + .HasColumnName("provider") + .HasDefaultValueSql("'0'") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("RoomType") + .HasColumnType("int") + .HasColumnName("room_type"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("Title") + .IsRequired() + .HasColumnType("varchar(400)") + .HasColumnName("customer_title") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Token") + .HasColumnType("text") + .HasColumnName("token") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Url") + .HasColumnType("text") + .HasColumnName("url") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("varchar(38)") + .HasColumnName("user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("varchar(100)") + .HasColumnName("user_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Id"); + + b.HasIndex("TenantId") + .HasDatabaseName("tenant_id"); + + b.ToTable("files_thirdparty_account", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyApp", b => + { + b.Property("UserId") + .HasColumnType("varchar(38)") + .HasColumnName("user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("App") + .HasColumnType("varchar(50)") + .HasColumnName("app") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ModifiedOn") + .HasColumnType("timestamp") + .HasColumnName("modified_on"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("Token") + .HasColumnType("text") + .HasColumnName("token") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("UserId", "App") + .HasName("PRIMARY"); + + b.ToTable("files_thirdparty_app", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyIdMapping", b => + { + b.Property("HashId") + .HasColumnType("char(32)") + .HasColumnName("hash_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Id") + .IsRequired() + .HasColumnType("text") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.HasKey("HashId") + .HasName("PRIMARY"); + + b.HasIndex("TenantId", "HashId") + .HasDatabaseName("index_1"); + + b.ToTable("files_thirdparty_id_mapping", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFolder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CreateBy") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("create_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("datetime") + .HasColumnName("create_on"); + + b.Property("FilesCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("filesCount") + .HasDefaultValueSql("'0'"); + + b.Property("FolderType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("folder_type") + .HasDefaultValueSql("'0'"); + + b.Property("FoldersCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("foldersCount") + .HasDefaultValueSql("'0'"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("modified_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ModifiedOn") + .HasColumnType("datetime") + .HasColumnName("modified_on"); + + b.Property("ParentId") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("parent_id") + .HasDefaultValueSql("'0'"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("Title") + .IsRequired() + .HasColumnType("varchar(400)") + .HasColumnName("title") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Id"); + + b.HasIndex("ModifiedOn") + .HasDatabaseName("modified_on"); + + b.HasIndex("TenantId", "ParentId") + .HasDatabaseName("parent_id"); + + b.ToTable("files_folder", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFolderTree", b => + { + b.Property("ParentId") + .HasColumnType("int") + .HasColumnName("parent_id"); + + b.Property("FolderId") + .HasColumnType("int") + .HasColumnName("folder_id"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.HasKey("ParentId", "FolderId") + .HasName("PRIMARY"); + + b.HasIndex("FolderId") + .HasDatabaseName("folder_id"); + + b.ToTable("files_folder_tree", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/FilesDbContext/20220725110944_FilesDbContextMigrate.cs b/migrations/mysql/FilesDbContext/20220725110944_FilesDbContextMigrate.cs new file mode 100644 index 0000000000..8f39bdb78c --- /dev/null +++ b/migrations/mysql/FilesDbContext/20220725110944_FilesDbContextMigrate.cs @@ -0,0 +1,888 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations.FilesDb +{ + public partial class FilesDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "files_bunch_objects", + columns: table => new + { + tenant_id = table.Column(type: "int", nullable: false), + right_node = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + left_node = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.right_node }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "files_converts", + columns: table => new + { + input = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + output = table.Column(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", "utf8"); + + migrationBuilder.CreateTable( + name: "files_file", + columns: table => new + { + id = table.Column(type: "int", nullable: false), + version = table.Column(type: "int", nullable: false), + tenant_id = table.Column(type: "int", nullable: false), + version_group = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), + current_version = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"), + folder_id = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + title = table.Column(type: "varchar(400)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + content_length = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"), + file_status = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + category = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + create_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + create_on = table.Column(type: "datetime", nullable: false), + modified_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + modified_on = table.Column(type: "datetime", nullable: false), + converted_type = table.Column(type: "varchar(10)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + comment = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + changes = table.Column(type: "mediumtext", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + encrypted = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"), + forcesave = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + thumb = table.Column(type: "int", nullable: false, defaultValueSql: "'0'") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.id, x.version }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "files_folder", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + parent_id = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + title = table.Column(type: "varchar(400)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + folder_type = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + create_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + create_on = table.Column(type: "datetime", nullable: false), + modified_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + modified_on = table.Column(type: "datetime", nullable: false), + tenant_id = table.Column(type: "int", nullable: false), + foldersCount = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + filesCount = table.Column(type: "int", nullable: false, defaultValueSql: "'0'") + }, + constraints: table => + { + table.PrimaryKey("PK_files_folder", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "files_folder_tree", + columns: table => new + { + folder_id = table.Column(type: "int", nullable: false), + parent_id = table.Column(type: "int", nullable: false), + level = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.parent_id, x.folder_id }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "files_link", + columns: table => new + { + tenant_id = table.Column(type: "int", nullable: false), + source_id = table.Column(type: "varchar(32)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + linked_id = table.Column(type: "varchar(32)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + linked_for = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.source_id, x.linked_id }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "files_properties", + columns: table => new + { + tenant_id = table.Column(type: "int", nullable: false), + entry_id = table.Column(type: "varchar(32)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + data = table.Column(type: "mediumtext", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.entry_id }); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "files_security", + columns: table => new + { + tenant_id = table.Column(type: "int", nullable: false), + entry_id = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + entry_type = table.Column(type: "int", nullable: false), + subject = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + owner = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + security = table.Column(type: "int", nullable: false), + timestamp = table.Column(type: "timestamp", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.entry_id, x.entry_type, x.subject }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "files_tag", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + tenant_id = table.Column(type: "int", nullable: false), + name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + owner = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + flag = table.Column(type: "int", nullable: false, defaultValueSql: "'0'") + }, + constraints: table => + { + table.PrimaryKey("PK_files_tag", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "files_tag_link", + columns: table => new + { + tenant_id = table.Column(type: "int", nullable: false), + tag_id = table.Column(type: "int", nullable: false), + entry_type = table.Column(type: "int", nullable: false), + entry_id = table.Column(type: "varchar(32)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + create_by = table.Column(type: "char(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + create_on = table.Column(type: "datetime", nullable: true), + tag_count = table.Column(type: "int", nullable: false, defaultValueSql: "'0'") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.tag_id, x.entry_id, x.entry_type }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "files_thirdparty_account", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + provider = table.Column(type: "varchar(50)", nullable: false, defaultValueSql: "'0'", collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + customer_title = table.Column(type: "varchar(400)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + user_name = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + password = table.Column(type: "varchar(512)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + token = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + folder_type = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + room_type = table.Column(type: "int", nullable: false), + create_on = table.Column(type: "datetime", nullable: false), + url = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + tenant_id = table.Column(type: "int", nullable: false), + folder_id = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PK_files_thirdparty_account", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "files_thirdparty_app", + columns: table => new + { + user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + app = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + token = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + tenant_id = table.Column(type: "int", nullable: false), + modified_on = table.Column(type: "timestamp", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.user_id, x.app }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "files_thirdparty_id_mapping", + columns: table => new + { + hash_id = table.Column(type: "char(32)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + tenant_id = table.Column(type: "int", nullable: false), + id = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.hash_id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_quota", + columns: table => new + { + tenant = table.Column(type: "int", nullable: false), + name = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + description = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + max_file_size = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"), + max_total_size = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"), + active_users = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + features = table.Column(type: "text", nullable: true) + .Annotation("MySql:CharSet", "utf8"), + price = table.Column(type: "decimal(10,2)", nullable: false, defaultValueSql: "'0.00'"), + avangate_id = table.Column(type: "varchar(128)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + visible = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.tenant); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_tariff", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + tenant = table.Column(type: "int", nullable: false), + tariff = table.Column(type: "int", nullable: false), + stamp = table.Column(type: "datetime", nullable: false), + quantity = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), + comment = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + create_on = table.Column(type: "timestamp", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tariff", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_tenants", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + alias = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + mappeddomain = table.Column(type: "varchar(100)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + version = table.Column(type: "int", nullable: false, defaultValueSql: "'2'"), + version_changed = table.Column(type: "datetime", nullable: true), + language = table.Column(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + timezone = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + trusteddomains = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + trusteddomainsenabled = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), + status = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + statuschanged = table.Column(type: "datetime", nullable: true), + creationdatetime = table.Column(type: "datetime", nullable: false), + owner_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + payment_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + industry = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + last_modified = table.Column(type: "timestamp", nullable: false), + spam = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"), + calls = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tenants", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + 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" }, + { ".ods", ".csv" }, + { ".ods", ".ots" }, + { ".ods", ".pdf" }, + { ".ods", ".xlsm" }, + { ".ods", ".xlsx" }, + { ".ods", ".xltm" }, + { ".ods", ".xltx" }, + { ".odt", ".docm" }, + { ".odt", ".docx" }, + { ".odt", ".dotm" }, + { ".odt", ".dotx" }, + { ".odt", ".epub" }, + { ".odt", ".fb2" }, + { ".odt", ".html" }, + { ".odt", ".ott" }, + { ".odt", ".pdf" }, + { ".odt", ".rtf" }, + { ".odt", ".txt" }, + { ".otp", ".odp" }, + { ".otp", ".pdf" }, + { ".otp", ".potm" }, + { ".otp", ".potx" }, + { ".otp", ".pptm" }, + { ".otp", ".pptx" }, + { ".ots", ".csv" }, + { ".ots", ".ods" }, + { ".ots", ".pdf" }, + { ".ots", ".xlsm" }, + { ".ots", ".xlsx" }, + { ".ots", ".xltm" }, + { ".ots", ".xltx" }, + { ".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", ".potm" }, + { ".pot", ".potx" }, + { ".pot", ".pptm" }, + { ".pot", ".pptx" }, + { ".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" } + }); + + migrationBuilder.InsertData( + table: "tenants_quota", + columns: new[] { "tenant", "active_users", "avangate_id", "description", "features", "max_file_size", "max_total_size", "name" }, + values: new object[] { -1, 10000, "0", null, "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", 102400L, 10995116277760L, "default" }); + + migrationBuilder.InsertData( + table: "tenants_tenants", + columns: new[] { "id", "alias", "creationdatetime", "last_modified", "mappeddomain", "name", "owner_id", "payment_id", "statuschanged", "timezone", "trusteddomains", "version_changed" }, + values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "Web Office", "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, null, null, null, null }); + + migrationBuilder.CreateIndex( + name: "left_node", + table: "files_bunch_objects", + column: "left_node"); + + migrationBuilder.CreateIndex( + name: "folder_id", + table: "files_file", + column: "folder_id"); + + migrationBuilder.CreateIndex( + name: "id", + table: "files_file", + column: "id"); + + migrationBuilder.CreateIndex( + name: "modified_on", + table: "files_file", + column: "modified_on"); + + migrationBuilder.CreateIndex( + name: "modified_on", + table: "files_folder", + column: "modified_on"); + + migrationBuilder.CreateIndex( + name: "parent_id", + table: "files_folder", + columns: new[] { "tenant_id", "parent_id" }); + + migrationBuilder.CreateIndex( + name: "folder_id", + table: "files_folder_tree", + column: "folder_id"); + + migrationBuilder.CreateIndex( + name: "linked_for", + table: "files_link", + columns: new[] { "tenant_id", "source_id", "linked_id", "linked_for" }); + + migrationBuilder.CreateIndex( + name: "owner", + table: "files_security", + column: "owner"); + + migrationBuilder.CreateIndex( + name: "tenant_id", + table: "files_security", + columns: new[] { "tenant_id", "entry_type", "entry_id", "owner" }); + + migrationBuilder.CreateIndex( + name: "name", + table: "files_tag", + columns: new[] { "tenant_id", "owner", "name", "flag" }); + + migrationBuilder.CreateIndex( + name: "create_on", + table: "files_tag_link", + column: "create_on"); + + migrationBuilder.CreateIndex( + name: "entry_id", + table: "files_tag_link", + columns: new[] { "tenant_id", "entry_id", "entry_type" }); + + migrationBuilder.CreateIndex( + name: "tenant_id", + table: "files_thirdparty_account", + column: "tenant_id"); + + migrationBuilder.CreateIndex( + name: "index_1", + table: "files_thirdparty_id_mapping", + columns: new[] { "tenant_id", "hash_id" }); + + migrationBuilder.CreateIndex( + name: "tenant", + table: "tenants_tariff", + column: "tenant"); + + migrationBuilder.CreateIndex( + name: "alias", + table: "tenants_tenants", + column: "alias", + unique: true); + + 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"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "files_bunch_objects"); + + migrationBuilder.DropTable( + name: "files_converts"); + + migrationBuilder.DropTable( + name: "files_file"); + + migrationBuilder.DropTable( + name: "files_folder"); + + migrationBuilder.DropTable( + name: "files_folder_tree"); + + migrationBuilder.DropTable( + name: "files_link"); + + migrationBuilder.DropTable( + name: "files_properties"); + + migrationBuilder.DropTable( + name: "files_security"); + + migrationBuilder.DropTable( + name: "files_tag"); + + migrationBuilder.DropTable( + name: "files_tag_link"); + + migrationBuilder.DropTable( + name: "files_thirdparty_account"); + + migrationBuilder.DropTable( + name: "files_thirdparty_app"); + + migrationBuilder.DropTable( + name: "files_thirdparty_id_mapping"); + + migrationBuilder.DropTable( + name: "tenants_quota"); + + migrationBuilder.DropTable( + name: "tenants_tariff"); + + migrationBuilder.DropTable( + name: "tenants_tenants"); + } + } +} diff --git a/migrations/mysql/FilesDbContext/FilesDbContextModelSnapshot.cs b/migrations/mysql/FilesDbContext/FilesDbContextModelSnapshot.cs new file mode 100644 index 0000000000..8ffb3b6a51 --- /dev/null +++ b/migrations/mysql/FilesDbContext/FilesDbContextModelSnapshot.cs @@ -0,0 +1,2684 @@ +// +using System; +using ASC.Files.Core.EF; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations.FilesDb +{ + [DbContext(typeof(FilesDbContext))] + partial class FilesDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => + { + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.Property("ActiveUsers") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("active_users") + .HasDefaultValueSql("'0'"); + + b.Property("AvangateId") + .HasColumnType("varchar(128)") + .HasColumnName("avangate_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Description") + .HasColumnType("varchar(128)") + .HasColumnName("description") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Features") + .HasColumnType("text") + .HasColumnName("features"); + + b.Property("MaxFileSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_file_size") + .HasDefaultValueSql("'0'"); + + b.Property("MaxTotalSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_total_size") + .HasDefaultValueSql("'0'"); + + b.Property("Name") + .HasColumnType("varchar(128)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Price") + .ValueGeneratedOnAdd() + .HasColumnType("decimal(10,2)") + .HasColumnName("price") + .HasDefaultValueSql("'0.00'"); + + b.Property("Visible") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("visible") + .HasDefaultValueSql("'0'"); + + b.HasKey("Tenant") + .HasName("PRIMARY"); + + b.ToTable("tenants_quota", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Tenant = -1, + ActiveUsers = 10000, + AvangateId = "0", + Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", + MaxFileSize = 102400L, + MaxTotalSize = 10995116277760L, + Name = "default", + Price = 0.00m, + Visible = false + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Comment") + .HasColumnType("varchar(255)") + .HasColumnName("comment") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("timestamp") + .HasColumnName("create_on"); + + b.Property("Quantity") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("quantity") + .HasDefaultValueSql("'1'"); + + b.Property("Stamp") + .HasColumnType("datetime") + .HasColumnName("stamp"); + + b.Property("Tariff") + .HasColumnType("int") + .HasColumnName("tariff"); + + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant"); + + b.ToTable("tenants_tariff", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Alias") + .IsRequired() + .HasColumnType("varchar(100)") + .HasColumnName("alias") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("calls") + .HasDefaultValueSql("'1'"); + + b.Property("CreationDateTime") + .HasColumnType("datetime") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("industry") + .HasDefaultValueSql("'0'"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("char(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.Property("MappedDomain") + .HasColumnType("varchar(100)") + .HasColumnName("mappeddomain") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("OwnerId") + .HasColumnType("varchar(38)") + .HasColumnName("owner_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("PaymentId") + .HasColumnType("varchar(38)") + .HasColumnName("payment_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("spam") + .HasDefaultValueSql("'1'"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("status") + .HasDefaultValueSql("'0'"); + + b.Property("StatusChanged") + .HasColumnType("datetime") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .HasColumnType("varchar(50)") + .HasColumnName("timezone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("'1'"); + + b.Property("TrustedDomainsRaw") + .HasColumnType("varchar(1024)") + .HasColumnName("trusteddomains") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("version") + .HasDefaultValueSql("'2'"); + + b.Property("Version_Changed") + .HasColumnType("datetime") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.FilesConverts", b => + { + b.Property("Input") + .HasColumnType("varchar(50)") + .HasColumnName("input") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Output") + .HasColumnType("varchar(50)") + .HasColumnName("output") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Input", "Output") + .HasName("PRIMARY"); + + b.ToTable("files_converts", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Input = ".csv", + Output = ".ods" + }, + new + { + Input = ".csv", + Output = ".pdf" + }, + new + { + Input = ".csv", + Output = ".ots" + }, + new + { + Input = ".csv", + Output = ".xlsx" + }, + new + { + Input = ".csv", + Output = ".xlsm" + }, + new + { + Input = ".csv", + Output = ".xltm" + }, + new + { + Input = ".csv", + Output = ".xltx" + }, + new + { + Input = ".doc", + Output = ".docx" + }, + new + { + Input = ".doc", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".doc", + Output = ".odt" + }, + 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 = ".html" + }, + new + { + Input = ".docm", + Output = ".dotx" + }, + new + { + Input = ".docm", + Output = ".epub" + }, + new + { + Input = ".docm", + Output = ".fb2" + }, + new + { + Input = ".docm", + Output = ".ott" + }, + new + { + Input = ".docm", + Output = ".odt" + }, + new + { + Input = ".docm", + Output = ".pdf" + }, + new + { + Input = ".docm", + Output = ".rtf" + }, + new + { + Input = ".docm", + Output = ".txt" + }, + new + { + Input = ".doct", + Output = ".docx" + }, + new + { + Input = ".docx", + Output = ".odt" + }, + new + { + Input = ".docx", + Output = ".pdf" + }, + new + { + Input = ".docx", + Output = ".rtf" + }, + new + { + Input = ".docx", + Output = ".txt" + }, + new + { + Input = ".docx", + Output = ".html" + }, + new + { + Input = ".docx", + Output = ".dotm" + }, + new + { + Input = ".docx", + Output = ".dotx" + }, + new + { + Input = ".docx", + Output = ".epub" + }, + new + { + Input = ".docx", + Output = ".fb2" + }, + new + { + Input = ".docx", + Output = ".ott" + }, + new + { + Input = ".docx", + Output = ".docm" + }, + new + { + Input = ".docx", + Output = ".docxf" + }, + new + { + Input = ".docxf", + Output = ".docx" + }, + new + { + Input = ".docxf", + Output = ".odt" + }, + new + { + Input = ".docxf", + Output = ".oform" + }, + new + { + Input = ".docxf", + Output = ".pdf" + }, + new + { + Input = ".docxf", + Output = ".rtf" + }, + new + { + Input = ".docxf", + Output = ".txt" + }, + new + { + Input = ".docxf", + Output = ".dotx" + }, + new + { + Input = ".docxf", + Output = ".epub" + }, + new + { + Input = ".docxf", + Output = ".fb2" + }, + new + { + Input = ".docxf", + Output = ".html" + }, + new + { + Input = ".docxf", + Output = ".ott" + }, + new + { + Input = ".dot", + Output = ".docx" + }, + new + { + Input = ".dot", + Output = ".odt" + }, + new + { + Input = ".dot", + Output = ".pdf" + }, + new + { + Input = ".dot", + Output = ".rtf" + }, + new + { + Input = ".dot", + Output = ".txt" + }, + new + { + Input = ".dot", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".dotm", + Output = ".docx" + }, + new + { + Input = ".dotm", + Output = ".odt" + }, + new + { + Input = ".dotm", + Output = ".pdf" + }, + new + { + Input = ".dotm", + Output = ".rtf" + }, + new + { + Input = ".dotm", + Output = ".txt" + }, + new + { + Input = ".dotm", + Output = ".docm" + }, + new + { + Input = ".dotm", + Output = ".dotx" + }, + new + { + Input = ".dotm", + Output = ".epub" + }, + new + { + Input = ".dotm", + Output = ".fb2" + }, + new + { + Input = ".dotm", + Output = ".html" + }, + new + { + Input = ".dotm", + Output = ".ott" + }, + new + { + Input = ".dotx", + Output = ".docx" + }, + new + { + Input = ".dotx", + Output = ".odt" + }, + new + { + Input = ".dotx", + Output = ".pdf" + }, + new + { + Input = ".dotx", + Output = ".rtf" + }, + new + { + Input = ".dotx", + Output = ".txt" + }, + new + { + Input = ".dotx", + Output = ".docm" + }, + new + { + Input = ".dotx", + Output = ".dotm" + }, + new + { + Input = ".dotx", + Output = ".epub" + }, + new + { + Input = ".dotx", + Output = ".fb2" + }, + new + { + Input = ".dotx", + Output = ".html" + }, + new + { + Input = ".dotx", + Output = ".ott" + }, + new + { + Input = ".epub", + Output = ".docx" + }, + new + { + Input = ".epub", + Output = ".odt" + }, + new + { + Input = ".epub", + Output = ".pdf" + }, + new + { + Input = ".epub", + Output = ".rtf" + }, + new + { + Input = ".epub", + Output = ".txt" + }, + new + { + Input = ".epub", + Output = ".docm" + }, + new + { + Input = ".epub", + Output = ".dotm" + }, + new + { + Input = ".epub", + Output = ".dotx" + }, + new + { + Input = ".epub", + Output = ".fb2" + }, + new + { + Input = ".epub", + Output = ".html" + }, + new + { + Input = ".epub", + Output = ".ott" + }, + new + { + Input = ".fb2", + Output = ".docx" + }, + new + { + Input = ".fb2", + Output = ".odt" + }, + new + { + Input = ".fb2", + Output = ".pdf" + }, + new + { + Input = ".fb2", + Output = ".rtf" + }, + new + { + Input = ".fb2", + Output = ".txt" + }, + new + { + Input = ".fb2", + Output = ".docm" + }, + new + { + Input = ".fb2", + Output = ".dotm" + }, + new + { + Input = ".fb2", + Output = ".dotx" + }, + new + { + Input = ".fb2", + Output = ".epub" + }, + new + { + Input = ".fb2", + Output = ".html" + }, + new + { + Input = ".fb2", + Output = ".ott" + }, + new + { + Input = ".fodp", + Output = ".odp" + }, + new + { + Input = ".fodp", + Output = ".pdf" + }, + new + { + Input = ".fodp", + Output = ".pptx" + }, + new + { + Input = ".fodp", + Output = ".otp" + }, + new + { + Input = ".fodp", + Output = ".potm" + }, + new + { + Input = ".fodp", + Output = ".potx" + }, + new + { + Input = ".fodp", + Output = ".pptm" + }, + new + { + Input = ".fods", + Output = ".csv" + }, + new + { + Input = ".fods", + Output = ".ods" + }, + new + { + Input = ".fods", + Output = ".pdf" + }, + new + { + Input = ".fods", + Output = ".xlsx" + }, + new + { + Input = ".fods", + Output = ".xlsm" + }, + new + { + Input = ".fods", + Output = ".xltm" + }, + new + { + Input = ".fods", + Output = ".xltx" + }, + new + { + Input = ".fods", + Output = ".ots" + }, + new + { + Input = ".fodt", + Output = ".docx" + }, + new + { + Input = ".fodt", + Output = ".odt" + }, + new + { + Input = ".fodt", + Output = ".docm" + }, + new + { + Input = ".fodt", + Output = ".pdf" + }, + new + { + Input = ".fodt", + Output = ".rtf" + }, + new + { + Input = ".fodt", + Output = ".txt" + }, + 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 = ".ott" + }, + new + { + Input = ".html", + Output = ".docx" + }, + new + { + Input = ".html", + Output = ".odt" + }, + new + { + Input = ".html", + Output = ".pdf" + }, + new + { + Input = ".html", + Output = ".rtf" + }, + new + { + Input = ".html", + Output = ".txt" + }, + new + { + Input = ".html", + Output = ".docm" + }, + new + { + Input = ".html", + Output = ".dotm" + }, + new + { + Input = ".html", + Output = ".dotx" + }, + new + { + Input = ".html", + Output = ".epub" + }, + new + { + Input = ".html", + Output = ".fb2" + }, + new + { + Input = ".html", + Output = ".ott" + }, + new + { + Input = ".mht", + Output = ".docx" + }, + new + { + Input = ".mht", + Output = ".odt" + }, + new + { + Input = ".mht", + Output = ".pdf" + }, + new + { + Input = ".mht", + Output = ".rtf" + }, + new + { + Input = ".mht", + Output = ".txt" + }, + new + { + Input = ".mht", + Output = ".docm" + }, + new + { + Input = ".mht", + Output = ".dotm" + }, + new + { + Input = ".mht", + Output = ".dotx" + }, + new + { + Input = ".mht", + Output = ".epub" + }, + new + { + Input = ".mht", + Output = ".fb2" + }, + new + { + Input = ".mht", + Output = ".ott" + }, + new + { + Input = ".odp", + Output = ".pdf" + }, + new + { + Input = ".odp", + Output = ".pptx" + }, + new + { + Input = ".odp", + Output = ".otp" + }, + new + { + Input = ".odp", + Output = ".potm" + }, + new + { + Input = ".odp", + Output = ".potx" + }, + new + { + Input = ".odp", + Output = ".pptm" + }, + 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 = ".pdf" + }, + new + { + Input = ".ods", + Output = ".xlsx" + }, + new + { + Input = ".ods", + Output = ".ots" + }, + new + { + Input = ".ods", + Output = ".xlsm" + }, + 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 = ".xltm" + }, + new + { + Input = ".ots", + Output = ".xltx" + }, + new + { + Input = ".ots", + Output = ".xlsx" + }, + new + { + Input = ".oxps", + Output = ".pdf" + }, + new + { + Input = ".odt", + Output = ".docx" + }, + new + { + Input = ".odt", + Output = ".pdf" + }, + new + { + Input = ".odt", + Output = ".rtf" + }, + new + { + Input = ".odt", + Output = ".txt" + }, + new + { + Input = ".odt", + Output = ".docm" + }, + 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 = ".ott", + Output = ".docx" + }, + new + { + Input = ".ott", + Output = ".odt" + }, + new + { + Input = ".ott", + Output = ".pdf" + }, + new + { + Input = ".ott", + Output = ".rtf" + }, + new + { + Input = ".ott", + Output = ".txt" + }, + new + { + Input = ".ott", + Output = ".docm" + }, + 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 = ".pot", + Output = ".odp" + }, + new + { + Input = ".pot", + Output = ".pdf" + }, + new + { + Input = ".pot", + Output = ".pptx" + }, + new + { + Input = ".pot", + Output = ".otp" + }, + new + { + Input = ".pot", + Output = ".potm" + }, + new + { + Input = ".pot", + Output = ".potx" + }, + new + { + Input = ".pot", + Output = ".pptm" + }, + new + { + Input = ".potm", + Output = ".odp" + }, + new + { + Input = ".potm", + Output = ".pdf" + }, + new + { + Input = ".potm", + Output = ".pptx" + }, + new + { + Input = ".potm", + Output = ".otp" + }, + new + { + Input = ".potm", + Output = ".potx" + }, + new + { + Input = ".potm", + Output = ".pptm" + }, + new + { + Input = ".potx", + Output = ".odp" + }, + new + { + Input = ".potx", + Output = ".pdf" + }, + new + { + Input = ".potx", + Output = ".pptx" + }, + new + { + Input = ".potx", + Output = ".otp" + }, + new + { + Input = ".potx", + Output = ".potm" + }, + new + { + Input = ".potx", + Output = ".pptm" + }, + new + { + Input = ".pps", + Output = ".odp" + }, + new + { + Input = ".pps", + Output = ".pdf" + }, + new + { + Input = ".pps", + Output = ".pptx" + }, + new + { + Input = ".pps", + Output = ".otp" + }, + new + { + Input = ".pps", + Output = ".potm" + }, + new + { + Input = ".pps", + Output = ".potx" + }, + new + { + Input = ".pps", + Output = ".pptm" + }, + new + { + Input = ".ppsm", + Output = ".odp" + }, + new + { + Input = ".ppsm", + Output = ".pdf" + }, + new + { + Input = ".ppsm", + Output = ".pptx" + }, + new + { + Input = ".ppsm", + Output = ".otp" + }, + new + { + Input = ".ppsm", + Output = ".potm" + }, + new + { + Input = ".ppsm", + Output = ".potx" + }, + new + { + Input = ".ppsm", + Output = ".pptm" + }, + new + { + Input = ".ppsx", + Output = ".odp" + }, + new + { + Input = ".ppsx", + Output = ".pdf" + }, + new + { + Input = ".ppsx", + Output = ".pptx" + }, + new + { + Input = ".ppsx", + Output = ".otp" + }, + new + { + Input = ".ppsx", + Output = ".potm" + }, + new + { + Input = ".ppsx", + Output = ".potx" + }, + new + { + Input = ".ppsx", + Output = ".pptm" + }, + new + { + Input = ".ppt", + Output = ".odp" + }, + new + { + Input = ".ppt", + Output = ".pdf" + }, + new + { + Input = ".ppt", + Output = ".pptx" + }, + new + { + Input = ".ppt", + Output = ".otp" + }, + new + { + Input = ".ppt", + Output = ".potm" + }, + new + { + Input = ".ppt", + Output = ".potx" + }, + new + { + Input = ".ppt", + Output = ".pptm" + }, + new + { + Input = ".pptm", + Output = ".odp" + }, + new + { + Input = ".pptm", + Output = ".pdf" + }, + new + { + Input = ".pptm", + Output = ".pptx" + }, + new + { + Input = ".pptm", + Output = ".otp" + }, + new + { + Input = ".pptm", + Output = ".potm" + }, + new + { + Input = ".pptm", + Output = ".potx" + }, + new + { + Input = ".pptt", + Output = ".pptx" + }, + new + { + Input = ".pptx", + Output = ".odp" + }, + new + { + Input = ".pptx", + Output = ".pdf" + }, + new + { + Input = ".pptx", + Output = ".otp" + }, + new + { + Input = ".pptx", + Output = ".potm" + }, + new + { + Input = ".pptx", + Output = ".potx" + }, + new + { + Input = ".pptx", + Output = ".pptm" + }, + new + { + Input = ".rtf", + Output = ".odt" + }, + new + { + Input = ".rtf", + Output = ".pdf" + }, + new + { + Input = ".rtf", + Output = ".docx" + }, + new + { + Input = ".rtf", + Output = ".txt" + }, + new + { + Input = ".rtf", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".txt", + Output = ".pdf" + }, + new + { + Input = ".txt", + Output = ".docx" + }, + new + { + Input = ".txt", + Output = ".odt" + }, + new + { + Input = ".txt", + Output = ".rtf" + }, + new + { + Input = ".txt", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".xls", + Output = ".csv" + }, + new + { + Input = ".xls", + Output = ".ods" + }, + new + { + Input = ".xls", + Output = ".pdf" + }, + new + { + Input = ".xls", + Output = ".xlsx" + }, + new + { + Input = ".xls", + Output = ".ots" + }, + new + { + Input = ".xls", + Output = ".xlsm" + }, + new + { + Input = ".xls", + Output = ".xltm" + }, + new + { + Input = ".xls", + Output = ".xltx" + }, + new + { + Input = ".xlsm", + Output = ".csv" + }, + new + { + Input = ".xlsm", + Output = ".xltm" + }, + new + { + Input = ".xlsm", + Output = ".xltx" + }, + new + { + Input = ".xlsm", + Output = ".ots" + }, + new + { + Input = ".xlsm", + Output = ".pdf" + }, + new + { + Input = ".xlsm", + Output = ".ods" + }, + new + { + Input = ".xlsm", + 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 = ".xlst", + Output = ".xlsx" + }, + new + { + Input = ".xlt", + Output = ".csv" + }, + new + { + Input = ".xlt", + Output = ".ods" + }, + new + { + Input = ".xlt", + Output = ".pdf" + }, + new + { + Input = ".xlt", + Output = ".xlsx" + }, + new + { + Input = ".xlt", + Output = ".ots" + }, + new + { + Input = ".xlt", + Output = ".xlsm" + }, + new + { + Input = ".xlt", + Output = ".xltm" + }, + new + { + Input = ".xlt", + Output = ".xltx" + }, + new + { + Input = ".xltm", + Output = ".csv" + }, + new + { + Input = ".xltm", + Output = ".ods" + }, + new + { + Input = ".xltm", + Output = ".pdf" + }, + new + { + Input = ".xltm", + Output = ".ots" + }, + new + { + Input = ".xltm", + Output = ".xlsm" + }, + new + { + Input = ".xltm", + Output = ".xltx" + }, + new + { + Input = ".xltm", + Output = ".xlsx" + }, + new + { + Input = ".xltx", + Output = ".pdf" + }, + new + { + Input = ".xltx", + Output = ".csv" + }, + new + { + Input = ".xltx", + Output = ".ods" + }, + new + { + Input = ".xltx", + Output = ".ots" + }, + new + { + Input = ".xltx", + Output = ".xlsm" + }, + new + { + Input = ".xltx", + Output = ".xltm" + }, + new + { + Input = ".xltx", + Output = ".xlsx" + }, + new + { + Input = ".xps", + Output = ".pdf" + }, + 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" + }); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFile", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("Id") + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Version") + .HasColumnType("int") + .HasColumnName("version"); + + b.Property("Category") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("category") + .HasDefaultValueSql("'0'"); + + b.Property("Changes") + .HasColumnType("mediumtext") + .HasColumnName("changes") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Comment") + .HasColumnType("varchar(255)") + .HasColumnName("comment") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ContentLength") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("content_length") + .HasDefaultValueSql("'0'"); + + b.Property("ConvertedType") + .HasColumnType("varchar(10)") + .HasColumnName("converted_type") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateBy") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("create_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("datetime") + .HasColumnName("create_on"); + + b.Property("CurrentVersion") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("current_version") + .HasDefaultValueSql("'0'"); + + b.Property("Encrypted") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("encrypted") + .HasDefaultValueSql("'0'"); + + b.Property("FileStatus") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("file_status") + .HasDefaultValueSql("'0'"); + + b.Property("Forcesave") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("forcesave") + .HasDefaultValueSql("'0'"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("modified_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ModifiedOn") + .HasColumnType("datetime") + .HasColumnName("modified_on"); + + b.Property("ParentId") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("folder_id") + .HasDefaultValueSql("'0'"); + + b.Property("ThumbnailStatus") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("thumb") + .HasDefaultValueSql("'0'"); + + b.Property("Title") + .IsRequired() + .HasColumnType("varchar(400)") + .HasColumnName("title") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("VersionGroup") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("version_group") + .HasDefaultValueSql("'1'"); + + b.HasKey("TenantId", "Id", "Version") + .HasName("PRIMARY"); + + b.HasIndex("Id") + .HasDatabaseName("id"); + + b.HasIndex("ModifiedOn") + .HasDatabaseName("modified_on"); + + b.HasIndex("ParentId") + .HasDatabaseName("folder_id"); + + b.ToTable("files_file", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesBunchObjects", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("RightNode") + .HasColumnType("varchar(255)") + .HasColumnName("right_node") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LeftNode") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("left_node") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId", "RightNode") + .HasName("PRIMARY"); + + b.HasIndex("LeftNode") + .HasDatabaseName("left_node"); + + b.ToTable("files_bunch_objects", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesLink", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("SourceId") + .HasColumnType("varchar(32)") + .HasColumnName("source_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LinkedId") + .HasColumnType("varchar(32)") + .HasColumnName("linked_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LinkedFor") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("linked_for") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId", "SourceId", "LinkedId") + .HasName("PRIMARY"); + + b.HasIndex("TenantId", "SourceId", "LinkedId", "LinkedFor") + .HasDatabaseName("linked_for"); + + b.ToTable("files_link", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesProperties", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("EntryId") + .HasColumnType("varchar(32)") + .HasColumnName("entry_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Data") + .HasColumnType("mediumtext") + .HasColumnName("data") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId", "EntryId") + .HasName("PRIMARY"); + + b.ToTable("files_properties", (string)null); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("EntryId") + .HasColumnType("varchar(50)") + .HasColumnName("entry_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("EntryType") + .HasColumnType("int") + .HasColumnName("entry_type"); + + b.Property("Subject") + .HasColumnType("char(38)") + .HasColumnName("subject") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Owner") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("owner") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Share") + .HasColumnType("int") + .HasColumnName("security"); + + b.Property("TimeStamp") + .HasColumnType("timestamp") + .HasColumnName("timestamp"); + + b.HasKey("TenantId", "EntryId", "EntryType", "Subject") + .HasName("PRIMARY"); + + b.HasIndex("Owner") + .HasDatabaseName("owner"); + + b.HasIndex("TenantId", "EntryType", "EntryId", "Owner") + .HasDatabaseName("tenant_id"); + + b.ToTable("files_security", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Owner") + .IsRequired() + .HasColumnType("varchar(38)") + .HasColumnName("owner") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("Type") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("flag") + .HasDefaultValueSql("'0'"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Owner", "Name", "Type") + .HasDatabaseName("name"); + + b.ToTable("files_tag", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTagLink", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("TagId") + .HasColumnType("int") + .HasColumnName("tag_id"); + + b.Property("EntryId") + .HasColumnType("varchar(32)") + .HasColumnName("entry_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("EntryType") + .HasColumnType("int") + .HasColumnName("entry_type"); + + b.Property("Count") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("tag_count") + .HasDefaultValueSql("'0'"); + + b.Property("CreateBy") + .HasColumnType("char(38)") + .HasColumnName("create_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("datetime") + .HasColumnName("create_on"); + + b.HasKey("TenantId", "TagId", "EntryId", "EntryType") + .HasName("PRIMARY"); + + b.HasIndex("CreateOn") + .HasDatabaseName("create_on"); + + b.HasIndex("TenantId", "EntryId", "EntryType") + .HasDatabaseName("entry_id"); + + b.ToTable("files_tag_link", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CreateOn") + .HasColumnType("datetime") + .HasColumnName("create_on"); + + b.Property("FolderId") + .HasColumnType("text") + .HasColumnName("folder_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("FolderType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("folder_type") + .HasDefaultValueSql("'0'"); + + b.Property("Password") + .IsRequired() + .HasColumnType("varchar(512)") + .HasColumnName("password") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Provider") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("varchar(50)") + .HasColumnName("provider") + .HasDefaultValueSql("'0'") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("RoomType") + .HasColumnType("int") + .HasColumnName("room_type"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("Title") + .IsRequired() + .HasColumnType("varchar(400)") + .HasColumnName("customer_title") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Token") + .HasColumnType("text") + .HasColumnName("token") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Url") + .HasColumnType("text") + .HasColumnName("url") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("varchar(38)") + .HasColumnName("user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("varchar(100)") + .HasColumnName("user_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Id"); + + b.HasIndex("TenantId") + .HasDatabaseName("tenant_id"); + + b.ToTable("files_thirdparty_account", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyApp", b => + { + b.Property("UserId") + .HasColumnType("varchar(38)") + .HasColumnName("user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("App") + .HasColumnType("varchar(50)") + .HasColumnName("app") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ModifiedOn") + .HasColumnType("timestamp") + .HasColumnName("modified_on"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("Token") + .HasColumnType("text") + .HasColumnName("token") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("UserId", "App") + .HasName("PRIMARY"); + + b.ToTable("files_thirdparty_app", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyIdMapping", b => + { + b.Property("HashId") + .HasColumnType("char(32)") + .HasColumnName("hash_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Id") + .IsRequired() + .HasColumnType("text") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.HasKey("HashId") + .HasName("PRIMARY"); + + b.HasIndex("TenantId", "HashId") + .HasDatabaseName("index_1"); + + b.ToTable("files_thirdparty_id_mapping", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFolder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("CreateBy") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("create_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("datetime") + .HasColumnName("create_on"); + + b.Property("FilesCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("filesCount") + .HasDefaultValueSql("'0'"); + + b.Property("FolderType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("folder_type") + .HasDefaultValueSql("'0'"); + + b.Property("FoldersCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("foldersCount") + .HasDefaultValueSql("'0'"); + + b.Property("ModifiedBy") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("modified_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ModifiedOn") + .HasColumnType("datetime") + .HasColumnName("modified_on"); + + b.Property("ParentId") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("parent_id") + .HasDefaultValueSql("'0'"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("Title") + .IsRequired() + .HasColumnType("varchar(400)") + .HasColumnName("title") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Id"); + + b.HasIndex("ModifiedOn") + .HasDatabaseName("modified_on"); + + b.HasIndex("TenantId", "ParentId") + .HasDatabaseName("parent_id"); + + b.ToTable("files_folder", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFolderTree", b => + { + b.Property("ParentId") + .HasColumnType("int") + .HasColumnName("parent_id"); + + b.Property("FolderId") + .HasColumnType("int") + .HasColumnName("folder_id"); + + b.Property("Level") + .HasColumnType("int") + .HasColumnName("level"); + + b.HasKey("ParentId", "FolderId") + .HasName("PRIMARY"); + + b.HasIndex("FolderId") + .HasDatabaseName("folder_id"); + + b.ToTable("files_folder_tree", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/InstanceRegistrationContext/20220724114545_InstanceRegistrationContextMigrate.Designer.cs b/migrations/mysql/InstanceRegistrationContext/20220724114545_InstanceRegistrationContextMigrate.Designer.cs new file mode 100644 index 0000000000..6ade347076 --- /dev/null +++ b/migrations/mysql/InstanceRegistrationContext/20220724114545_InstanceRegistrationContextMigrate.Designer.cs @@ -0,0 +1,58 @@ +// +using System; +using ASC.Core.Common.Hosting; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(InstanceRegistrationContext))] + [Migration("20220724114545_InstanceRegistrationContextMigrate")] + partial class InstanceRegistrationContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.Hosting.InstanceRegistration", b => + { + b.Property("InstanceRegistrationId") + .HasColumnType("varchar(255)") + .HasColumnName("instance_registration_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("IsActive") + .HasColumnType("tinyint(4)") + .HasColumnName("is_active"); + + b.Property("LastUpdated") + .HasColumnType("datetime") + .HasColumnName("last_updated"); + + b.Property("WorkerTypeName") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("worker_type_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("InstanceRegistrationId") + .HasName("PRIMARY"); + + b.HasIndex("WorkerTypeName") + .HasDatabaseName("worker_type_name"); + + b.ToTable("hosting_instance_registration", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/InstanceRegistrationContext/20220724114545_InstanceRegistrationContextMigrate.cs b/migrations/mysql/InstanceRegistrationContext/20220724114545_InstanceRegistrationContextMigrate.cs new file mode 100644 index 0000000000..1f17d7ffd6 --- /dev/null +++ b/migrations/mysql/InstanceRegistrationContext/20220724114545_InstanceRegistrationContextMigrate.cs @@ -0,0 +1,44 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class InstanceRegistrationContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "hosting_instance_registration", + columns: table => new + { + instance_registration_id = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + last_updated = table.Column(type: "datetime", nullable: true), + worker_type_name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + is_active = table.Column(type: "tinyint(4)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.instance_registration_id); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "worker_type_name", + table: "hosting_instance_registration", + column: "worker_type_name"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "hosting_instance_registration"); + } + } +} diff --git a/migrations/mysql/InstanceRegistrationContext/InstanceRegistrationContextModelSnapshot.cs b/migrations/mysql/InstanceRegistrationContext/InstanceRegistrationContextModelSnapshot.cs new file mode 100644 index 0000000000..400cd41a12 --- /dev/null +++ b/migrations/mysql/InstanceRegistrationContext/InstanceRegistrationContextModelSnapshot.cs @@ -0,0 +1,56 @@ +// +using System; +using ASC.Core.Common.Hosting; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(InstanceRegistrationContext))] + partial class InstanceRegistrationContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.Hosting.InstanceRegistration", b => + { + b.Property("InstanceRegistrationId") + .HasColumnType("varchar(255)") + .HasColumnName("instance_registration_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("IsActive") + .HasColumnType("tinyint(4)") + .HasColumnName("is_active"); + + b.Property("LastUpdated") + .HasColumnType("datetime") + .HasColumnName("last_updated"); + + b.Property("WorkerTypeName") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("worker_type_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("InstanceRegistrationId") + .HasName("PRIMARY"); + + b.HasIndex("WorkerTypeName") + .HasDatabaseName("worker_type_name"); + + b.ToTable("hosting_instance_registration", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/IntegrationEventLogContext/20220724114541_IntegrationEventLogContextMigrate.Designer.cs b/migrations/mysql/IntegrationEventLogContext/20220724114541_IntegrationEventLogContextMigrate.Designer.cs new file mode 100644 index 0000000000..04f6553726 --- /dev/null +++ b/migrations/mysql/IntegrationEventLogContext/20220724114541_IntegrationEventLogContextMigrate.Designer.cs @@ -0,0 +1,86 @@ +// +using System; +using ASC.EventBus.Extensions.Logger; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(IntegrationEventLogContext))] + [Migration("20220724114541_IntegrationEventLogContextMigrate")] + partial class IntegrationEventLogContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.EventBus.Extensions.Logger.IntegrationEventLogEntry", b => + { + b.Property("EventId") + .ValueGeneratedOnAdd() + .HasColumnType("char(38)") + .HasColumnName("event_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Content") + .IsRequired() + .HasColumnType("text") + .HasColumnName("content") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateBy") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("create_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("datetime") + .HasColumnName("create_on"); + + b.Property("EventTypeName") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("event_type_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("State") + .HasColumnType("int(11)") + .HasColumnName("state"); + + b.Property("TenantId") + .HasColumnType("int(11)") + .HasColumnName("tenant_id"); + + b.Property("TimesSent") + .HasColumnType("int(11)") + .HasColumnName("times_sent"); + + b.Property("TransactionId") + .HasColumnType("longtext"); + + b.HasKey("EventId") + .HasName("PRIMARY"); + + b.HasIndex("TenantId") + .HasDatabaseName("tenant_id"); + + b.ToTable("event_bus_integration_event_log", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/IntegrationEventLogContext/20220724114541_IntegrationEventLogContextMigrate.cs b/migrations/mysql/IntegrationEventLogContext/20220724114541_IntegrationEventLogContextMigrate.cs new file mode 100644 index 0000000000..5cd71cad9a --- /dev/null +++ b/migrations/mysql/IntegrationEventLogContext/20220724114541_IntegrationEventLogContextMigrate.cs @@ -0,0 +1,52 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class IntegrationEventLogContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "event_bus_integration_event_log", + columns: table => new + { + event_id = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + event_type_name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + state = table.Column(type: "int(11)", nullable: false), + times_sent = table.Column(type: "int(11)", nullable: false), + create_on = table.Column(type: "datetime", nullable: false), + create_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + content = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + TransactionId = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8"), + tenant_id = table.Column(type: "int(11)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.event_id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateIndex( + name: "tenant_id", + table: "event_bus_integration_event_log", + column: "tenant_id"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "event_bus_integration_event_log"); + } + } +} diff --git a/migrations/mysql/IntegrationEventLogContext/IntegrationEventLogContextModelSnapshot.cs b/migrations/mysql/IntegrationEventLogContext/IntegrationEventLogContextModelSnapshot.cs new file mode 100644 index 0000000000..da6e7f2738 --- /dev/null +++ b/migrations/mysql/IntegrationEventLogContext/IntegrationEventLogContextModelSnapshot.cs @@ -0,0 +1,84 @@ +// +using System; +using ASC.EventBus.Extensions.Logger; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(IntegrationEventLogContext))] + partial class IntegrationEventLogContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.EventBus.Extensions.Logger.IntegrationEventLogEntry", b => + { + b.Property("EventId") + .ValueGeneratedOnAdd() + .HasColumnType("char(38)") + .HasColumnName("event_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Content") + .IsRequired() + .HasColumnType("text") + .HasColumnName("content") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateBy") + .IsRequired() + .HasColumnType("char(38)") + .HasColumnName("create_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("datetime") + .HasColumnName("create_on"); + + b.Property("EventTypeName") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("event_type_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("State") + .HasColumnType("int(11)") + .HasColumnName("state"); + + b.Property("TenantId") + .HasColumnType("int(11)") + .HasColumnName("tenant_id"); + + b.Property("TimesSent") + .HasColumnType("int(11)") + .HasColumnName("times_sent"); + + b.Property("TransactionId") + .HasColumnType("longtext"); + + b.HasKey("EventId") + .HasName("PRIMARY"); + + b.HasIndex("TenantId") + .HasDatabaseName("tenant_id"); + + b.ToTable("event_bus_integration_event_log", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/TenantDbContextPostgreSql/20211012145343_TenantDbContextPostgreSql.Designer.cs b/migrations/mysql/MessagesContext/20220724114544_MessagesContextMigrate.Designer.cs similarity index 56% rename from common/ASC.Core.Common/Migrations/PostgreSql/TenantDbContextPostgreSql/20211012145343_TenantDbContextPostgreSql.Designer.cs rename to migrations/mysql/MessagesContext/20220724114544_MessagesContextMigrate.Designer.cs index c67cebbf2a..c0c991cdca 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/TenantDbContextPostgreSql/20211012145343_TenantDbContextPostgreSql.Designer.cs +++ b/migrations/mysql/MessagesContext/20220724114544_MessagesContextMigrate.Designer.cs @@ -1,608 +1,552 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlTenantDbContext))] - [Migration("20211012145343_TenantDbContextPostgreSql")] - partial class TenantDbContextPostgreSql - { - 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.DbCoreSettings", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Id") - .HasColumnType("varchar(128)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Value") - .IsRequired() - .HasColumnType("mediumblob") - .HasColumnName("value"); - - b.HasKey("Tenant", "Id") - .HasName("PRIMARY"); - - b.ToTable("core_settings"); - - b.HasData( - new - { - Tenant = -1, - Id = "CompanyWhiteLabelSettings", - LastModified = new DateTime(2021, 10, 12, 14, 53, 22, 50, DateTimeKind.Utc).AddTicks(4300), - 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 } - }, - new - { - Tenant = -1, - Id = "FullTextSearchSettings", - LastModified = new DateTime(2021, 10, 12, 14, 53, 22, 50, DateTimeKind.Utc).AddTicks(4317), - 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 } - }, - new - { - Tenant = -1, - Id = "SmtpSettings", - LastModified = new DateTime(2021, 10, 12, 14, 53, 22, 50, DateTimeKind.Utc).AddTicks(4321), - 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 } - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Alias") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("alias") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Calls") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("calls") - .HasDefaultValueSql("true"); - - b.Property("CreationDateTime") - .HasColumnType("datetime") - .HasColumnName("creationdatetime"); - - b.Property("Industry") - .HasColumnType("int") - .HasColumnName("industry"); - - b.Property("Language") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("char(10)") - .HasColumnName("language") - .HasDefaultValueSql("'en-US'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("MappedDomain") - .HasColumnType("varchar(100)") - .HasColumnName("mappeddomain") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("owner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PaymentId") - .HasColumnType("varchar(38)") - .HasColumnName("payment_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Spam") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("spam") - .HasDefaultValueSql("true"); - - b.Property("Status") - .HasColumnType("int") - .HasColumnName("status"); - - b.Property("StatusChanged") - .HasColumnType("datetime") - .HasColumnName("statuschanged"); - - b.Property("TimeZone") - .HasColumnType("varchar(50)") - .HasColumnName("timezone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomains") - .HasColumnType("varchar(1024)") - .HasColumnName("trusteddomains") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomainsEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("trusteddomainsenabled") - .HasDefaultValueSql("'1'"); - - b.Property("Version") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("version") - .HasDefaultValueSql("'2'"); - - b.Property("Version_Changed") - .HasColumnType("datetime") - .HasColumnName("version_changed"); - - b.HasKey("Id"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("MappedDomain") - .HasDatabaseName("mappeddomain"); - - b.HasIndex("Version") - .HasDatabaseName("version"); - - b.ToTable("tenants_tenants"); - - b.HasData( - new - { - Id = 1, - Alias = "localhost", - Calls = false, - CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - Name = "Web Office", - OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - Spam = false, - Status = 0, - TrustedDomainsEnabled = 0, - Version = 0 - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantForbiden", b => - { - b.Property("Address") - .HasColumnType("varchar(50)") - .HasColumnName("address") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Address") - .HasName("PRIMARY"); - - b.ToTable("tenants_forbiden"); - - b.HasData( - new - { - Address = "controlpanel" - }, - new - { - Address = "localhost" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantPartner", b => - { - b.Property("TenantId") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("AffiliateId") - .HasColumnType("varchar(50)") - .HasColumnName("affiliate_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Campaign") - .HasColumnType("varchar(50)") - .HasColumnName("campaign") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PartnerId") - .HasColumnType("varchar(36)") - .HasColumnName("partner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId") - .HasName("PRIMARY"); - - b.ToTable("tenants_partners"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DefaultVersion") - .HasColumnType("int") - .HasColumnName("default_version"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(64)") - .HasColumnName("url") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Version") - .IsRequired() - .HasColumnType("varchar(64)") - .HasColumnName("version") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Visible") - .HasColumnType("tinyint(1)") - .HasColumnName("visible"); - - b.HasKey("Id"); - - b.ToTable("tenants_version"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.TenantIpRestrictions", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Ip") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("ip") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("Tenant") - .HasDatabaseName("tenant"); - - b.ToTable("tenants_iprestrictions"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("varchar(38)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ActivationStatus") - .HasColumnType("int") - .HasColumnName("activation_status"); - - b.Property("Birthdate") - .HasColumnType("datetime") - .HasColumnName("bithdate"); - - b.Property("Contacts") - .HasColumnType("varchar(1024)") - .HasColumnName("contacts") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("create_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Culture") - .HasColumnType("varchar(20)") - .HasColumnName("culture") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Email") - .HasColumnType("varchar(255)") - .HasColumnName("email") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("varchar(64)") - .HasColumnName("firstname") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .HasColumnType("datetime") - .HasColumnName("last_modified"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("varchar(64)") - .HasColumnName("lastname") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Location") - .HasColumnType("varchar(255)") - .HasColumnName("location") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Notes") - .HasColumnType("varchar(512)") - .HasColumnName("notes") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Phone") - .HasColumnType("varchar(255)") - .HasColumnName("phone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PhoneActivation") - .HasColumnType("int") - .HasColumnName("phone_activation"); - - b.Property("Removed") - .HasColumnType("tinyint(1)") - .HasColumnName("removed"); - - b.Property("Sex") - .HasColumnType("tinyint(1)") - .HasColumnName("sex"); - - b.Property("Sid") - .HasColumnType("varchar(512)") - .HasColumnName("sid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("SsoNameId") - .HasColumnType("varchar(512)") - .HasColumnName("sso_name_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("SsoSessionId") - .HasColumnType("varchar(512)") - .HasColumnName("sso_session_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Status") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("status") - .HasDefaultValueSql("'1'"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("TerminatedDate") - .HasColumnType("datetime") - .HasColumnName("terminateddate"); - - b.Property("Title") - .HasColumnType("varchar(64)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("username") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("WorkFromDate") - .HasColumnType("datetime") - .HasColumnName("workfromdate"); - - b.HasKey("Id"); - - b.HasIndex("Email") - .HasDatabaseName("email"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("Tenant", "UserName") - .HasDatabaseName("username"); - - b.ToTable("core_user"); - - b.HasData( - new - { - Id = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - ActivationStatus = 0, - CreateOn = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - Email = "", - FirstName = "Administrator", - LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), - LastName = "", - PhoneActivation = 0, - Removed = false, - Status = 1, - Tenant = 1, - UserName = "administrator", - WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("userid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("GroupId") - .HasColumnType("varchar(38)") - .HasColumnName("groupid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("RefType") - .HasColumnType("int") - .HasColumnName("ref_type"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Removed") - .HasColumnType("tinyint(1)") - .HasColumnName("removed"); - - b.HasKey("Tenant", "UserId", "GroupId", "RefType") - .HasName("PRIMARY"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("UserId"); - - b.ToTable("core_usergroup"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserSecurity", b => - { - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("userid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("PwdHash") - .HasColumnType("varchar(512)") - .HasColumnName("pwdhash") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("UserId") - .HasName("PRIMARY"); - - b.HasIndex("PwdHash") - .HasDatabaseName("pwdhash"); - - b.HasIndex("Tenant") - .HasDatabaseName("tenant"); - - b.ToTable("core_usersecurity"); - - b.HasData( - new - { - UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - LastModified = new DateTime(2021, 10, 12, 14, 53, 22, 50, DateTimeKind.Utc).AddTicks(6123), - PwdHash = "vLFfghR5tNV3K9DKhmwArV+SbjWAcgZZzIDTnJ0JgCo=", - Tenant = 1 - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => - { - b.HasOne("ASC.Core.Common.EF.User", null) - .WithMany("Groups") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserSecurity", b => - { - b.HasOne("ASC.Core.Common.EF.User", null) - .WithOne("UserSecurity") - .HasForeignKey("ASC.Core.Common.EF.UserSecurity", "UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.User", b => - { - b.Navigation("Groups"); - - b.Navigation("UserSecurity"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.MessagingSystem.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(MessagesContext))] + [Migration("20220724114544_MessagesContextMigrate")] + partial class MessagesContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Alias") + .IsRequired() + .HasColumnType("varchar(100)") + .HasColumnName("alias") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("calls") + .HasDefaultValueSql("'1'"); + + b.Property("CreationDateTime") + .HasColumnType("datetime") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("industry") + .HasDefaultValueSql("'0'"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("char(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.Property("MappedDomain") + .HasColumnType("varchar(100)") + .HasColumnName("mappeddomain") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("OwnerId") + .HasColumnType("varchar(38)") + .HasColumnName("owner_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("PaymentId") + .HasColumnType("varchar(38)") + .HasColumnName("payment_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("spam") + .HasDefaultValueSql("'1'"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("status") + .HasDefaultValueSql("'0'"); + + b.Property("StatusChanged") + .HasColumnType("datetime") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .HasColumnType("varchar(50)") + .HasColumnName("timezone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("'1'"); + + b.Property("TrustedDomainsRaw") + .HasColumnType("varchar(1024)") + .HasColumnName("trusteddomains") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("version") + .HasDefaultValueSql("'2'"); + + b.Property("Version_Changed") + .HasColumnType("datetime") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("TenantID"); + + b.Property("Id") + .HasColumnType("varchar(64)") + .HasColumnName("ID") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserId") + .HasColumnType("varchar(64)") + .HasColumnName("UserID") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Data") + .IsRequired() + .HasColumnType("mediumtext") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId", "Id", "UserId") + .HasName("PRIMARY"); + + b.HasIndex("Id") + .HasDatabaseName("ID"); + + b.ToTable("webstudio_settings", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + TenantId = 1, + Id = "9a925891-1f92-4ed7-b277-d6f649739f06", + UserId = "00000000-0000-0000-0000-000000000000", + Data = "{\"Completed\":false}" + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("varchar(38)") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ActivationStatus") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("activation_status") + .HasDefaultValueSql("'0'"); + + b.Property("BirthDate") + .HasColumnType("datetime") + .HasColumnName("bithdate"); + + b.Property("Contacts") + .HasColumnType("varchar(1024)") + .HasColumnName("contacts") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateDate") + .HasColumnType("timestamp") + .HasColumnName("create_on"); + + b.Property("CultureName") + .HasColumnType("varchar(20)") + .HasColumnName("culture") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Email") + .HasColumnType("varchar(255)") + .HasColumnName("email") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("varchar(64)") + .HasColumnName("firstname") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("datetime") + .HasColumnName("last_modified"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("varchar(64)") + .HasColumnName("lastname") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Location") + .HasColumnType("varchar(255)") + .HasColumnName("location") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("MobilePhone") + .HasColumnType("varchar(255)") + .HasColumnName("phone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("MobilePhoneActivation") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("phone_activation") + .HasDefaultValueSql("'0'"); + + b.Property("Notes") + .HasColumnType("varchar(512)") + .HasColumnName("notes") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Removed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("removed") + .HasDefaultValueSql("'0'"); + + b.Property("Sex") + .HasColumnType("tinyint(1)") + .HasColumnName("sex"); + + b.Property("Sid") + .HasColumnType("varchar(512)") + .HasColumnName("sid") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("SsoNameId") + .HasColumnType("varchar(512)") + .HasColumnName("sso_name_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("SsoSessionId") + .HasColumnType("varchar(512)") + .HasColumnName("sso_session_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("status") + .HasDefaultValueSql("'1'"); + + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.Property("TerminatedDate") + .HasColumnType("datetime") + .HasColumnName("terminateddate"); + + b.Property("Title") + .HasColumnType("varchar(64)") + .HasColumnName("title") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("username") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("WorkFromDate") + .HasColumnType("datetime") + .HasColumnName("workfromdate"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.HasIndex("Email") + .HasDatabaseName("email"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("Tenant", "UserName") + .HasDatabaseName("username"); + + b.ToTable("core_user", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Id = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + ActivationStatus = 0, + CreateDate = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Email = "", + FirstName = "Administrator", + LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), + LastName = "", + MobilePhoneActivation = 0, + Removed = false, + Status = 1, + Tenant = 1, + UserName = "administrator", + WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) + }); + }); + + modelBuilder.Entity("ASC.MessagingSystem.EF.Model.AuditEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("Browser") + .HasColumnType("varchar(200)") + .HasColumnName("browser") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Date") + .HasColumnType("datetime") + .HasColumnName("date"); + + b.Property("DescriptionRaw") + .HasColumnType("varchar(20000)") + .HasColumnName("description") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Initiator") + .HasColumnType("varchar(200)") + .HasColumnName("initiator") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Ip") + .HasColumnType("varchar(50)") + .HasColumnName("ip") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Page") + .HasColumnType("varchar(300)") + .HasColumnName("page") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Platform") + .HasColumnType("varchar(200)") + .HasColumnName("platform") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Target") + .HasColumnType("text") + .HasColumnName("target") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .HasColumnType("char(38)") + .HasColumnName("user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Date") + .HasDatabaseName("date"); + + b.ToTable("audit_events", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.MessagingSystem.EF.Model.LoginEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("Active") + .HasColumnType("tinyint(1)") + .HasColumnName("active"); + + b.Property("Browser") + .HasColumnType("varchar(200)") + .HasColumnName("browser") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Date") + .HasColumnType("datetime") + .HasColumnName("date"); + + b.Property("DescriptionRaw") + .HasColumnType("varchar(500)") + .HasColumnName("description") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Ip") + .HasColumnType("varchar(50)") + .HasColumnName("ip") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Login") + .HasColumnType("varchar(200)") + .HasColumnName("login") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Page") + .HasColumnType("varchar(300)") + .HasColumnName("page") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Platform") + .HasColumnType("varchar(200)") + .HasColumnName("platform") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("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", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/MessagesContext/20220724114544_MessagesContextMigrate.cs b/migrations/mysql/MessagesContext/20220724114544_MessagesContextMigrate.cs new file mode 100644 index 0000000000..f57acedcbb --- /dev/null +++ b/migrations/mysql/MessagesContext/20220724114544_MessagesContextMigrate.cs @@ -0,0 +1,276 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class MessagesContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "audit_events", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + initiator = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + target = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + ip = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + browser = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + platform = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + date = table.Column(type: "datetime", nullable: false), + tenant_id = table.Column(type: "int", nullable: false), + user_id = table.Column(type: "char(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + page = table.Column(type: "varchar(300)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + action = table.Column(type: "int", nullable: true), + description = table.Column(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", "utf8"); + + migrationBuilder.CreateTable( + name: "core_user", + columns: table => new + { + id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + tenant = table.Column(type: "int", nullable: false), + username = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + firstname = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + lastname = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + sex = table.Column(type: "tinyint(1)", nullable: true), + bithdate = table.Column(type: "datetime", nullable: true), + status = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), + activation_status = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + email = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + workfromdate = table.Column(type: "datetime", nullable: true), + terminateddate = table.Column(type: "datetime", nullable: true), + title = table.Column(type: "varchar(64)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + culture = table.Column(type: "varchar(20)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + contacts = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + phone = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + phone_activation = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + location = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + notes = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + sid = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + sso_name_id = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + sso_session_id = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + removed = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"), + create_on = table.Column(type: "timestamp", nullable: false), + last_modified = table.Column(type: "datetime", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "login_events", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + login = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + active = table.Column(type: "tinyint(1)", nullable: false), + ip = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + browser = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + platform = table.Column(type: "varchar(200)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + date = table.Column(type: "datetime", nullable: false), + tenant_id = table.Column(type: "int", nullable: false), + user_id = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + page = table.Column(type: "varchar(300)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + action = table.Column(type: "int", nullable: true), + description = table.Column(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", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_tenants", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + alias = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + mappeddomain = table.Column(type: "varchar(100)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + version = table.Column(type: "int", nullable: false, defaultValueSql: "'2'"), + version_changed = table.Column(type: "datetime", nullable: true), + language = table.Column(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + timezone = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + trusteddomains = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + trusteddomainsenabled = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), + status = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + statuschanged = table.Column(type: "datetime", nullable: true), + creationdatetime = table.Column(type: "datetime", nullable: false), + owner_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + payment_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + industry = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + last_modified = table.Column(type: "timestamp", nullable: false), + spam = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"), + calls = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tenants", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "webstudio_settings", + columns: table => new + { + TenantID = table.Column(type: "int", nullable: false), + ID = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + UserID = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + Data = table.Column(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", "utf8"); + + migrationBuilder.InsertData( + table: "core_user", + columns: new[] { "id", "bithdate", "contacts", "create_on", "culture", "email", "firstname", "last_modified", "lastname", "location", "phone", "notes", "sex", "sid", "sso_name_id", "sso_session_id", "status", "tenant", "terminateddate", "title", "username", "workfromdate" }, + values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, null, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "", "Administrator", new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), "", null, null, null, null, null, null, null, 1, 1, null, null, "administrator", new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) }); + + migrationBuilder.InsertData( + table: "tenants_tenants", + columns: new[] { "id", "alias", "creationdatetime", "last_modified", "mappeddomain", "name", "owner_id", "payment_id", "statuschanged", "timezone", "trusteddomains", "version_changed" }, + values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "Web Office", "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, 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: "email", + table: "core_user", + column: "email"); + + migrationBuilder.CreateIndex( + name: "last_modified", + table: "core_user", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "username", + table: "core_user", + columns: new[] { "tenant", "username" }); + + 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: "alias", + table: "tenants_tenants", + column: "alias", + unique: true); + + 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: "core_user"); + + migrationBuilder.DropTable( + name: "login_events"); + + migrationBuilder.DropTable( + name: "tenants_tenants"); + + migrationBuilder.DropTable( + name: "webstudio_settings"); + } + } +} diff --git a/migrations/mysql/MessagesContext/MessagesContextModelSnapshot.cs b/migrations/mysql/MessagesContext/MessagesContextModelSnapshot.cs new file mode 100644 index 0000000000..497821e4b4 --- /dev/null +++ b/migrations/mysql/MessagesContext/MessagesContextModelSnapshot.cs @@ -0,0 +1,550 @@ +// +using System; +using ASC.MessagingSystem.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(MessagesContext))] + partial class MessagesContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Alias") + .IsRequired() + .HasColumnType("varchar(100)") + .HasColumnName("alias") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("calls") + .HasDefaultValueSql("'1'"); + + b.Property("CreationDateTime") + .HasColumnType("datetime") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("industry") + .HasDefaultValueSql("'0'"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("char(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.Property("MappedDomain") + .HasColumnType("varchar(100)") + .HasColumnName("mappeddomain") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("OwnerId") + .HasColumnType("varchar(38)") + .HasColumnName("owner_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("PaymentId") + .HasColumnType("varchar(38)") + .HasColumnName("payment_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("spam") + .HasDefaultValueSql("'1'"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("status") + .HasDefaultValueSql("'0'"); + + b.Property("StatusChanged") + .HasColumnType("datetime") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .HasColumnType("varchar(50)") + .HasColumnName("timezone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("'1'"); + + b.Property("TrustedDomainsRaw") + .HasColumnType("varchar(1024)") + .HasColumnName("trusteddomains") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("version") + .HasDefaultValueSql("'2'"); + + b.Property("Version_Changed") + .HasColumnType("datetime") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("TenantID"); + + b.Property("Id") + .HasColumnType("varchar(64)") + .HasColumnName("ID") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserId") + .HasColumnType("varchar(64)") + .HasColumnName("UserID") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Data") + .IsRequired() + .HasColumnType("mediumtext") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId", "Id", "UserId") + .HasName("PRIMARY"); + + b.HasIndex("Id") + .HasDatabaseName("ID"); + + b.ToTable("webstudio_settings", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + TenantId = 1, + Id = "9a925891-1f92-4ed7-b277-d6f649739f06", + UserId = "00000000-0000-0000-0000-000000000000", + Data = "{\"Completed\":false}" + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("varchar(38)") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ActivationStatus") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("activation_status") + .HasDefaultValueSql("'0'"); + + b.Property("BirthDate") + .HasColumnType("datetime") + .HasColumnName("bithdate"); + + b.Property("Contacts") + .HasColumnType("varchar(1024)") + .HasColumnName("contacts") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateDate") + .HasColumnType("timestamp") + .HasColumnName("create_on"); + + b.Property("CultureName") + .HasColumnType("varchar(20)") + .HasColumnName("culture") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Email") + .HasColumnType("varchar(255)") + .HasColumnName("email") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("varchar(64)") + .HasColumnName("firstname") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("datetime") + .HasColumnName("last_modified"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("varchar(64)") + .HasColumnName("lastname") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Location") + .HasColumnType("varchar(255)") + .HasColumnName("location") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("MobilePhone") + .HasColumnType("varchar(255)") + .HasColumnName("phone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("MobilePhoneActivation") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("phone_activation") + .HasDefaultValueSql("'0'"); + + b.Property("Notes") + .HasColumnType("varchar(512)") + .HasColumnName("notes") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Removed") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("removed") + .HasDefaultValueSql("'0'"); + + b.Property("Sex") + .HasColumnType("tinyint(1)") + .HasColumnName("sex"); + + b.Property("Sid") + .HasColumnType("varchar(512)") + .HasColumnName("sid") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("SsoNameId") + .HasColumnType("varchar(512)") + .HasColumnName("sso_name_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("SsoSessionId") + .HasColumnType("varchar(512)") + .HasColumnName("sso_session_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("status") + .HasDefaultValueSql("'1'"); + + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.Property("TerminatedDate") + .HasColumnType("datetime") + .HasColumnName("terminateddate"); + + b.Property("Title") + .HasColumnType("varchar(64)") + .HasColumnName("title") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserName") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("username") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("WorkFromDate") + .HasColumnType("datetime") + .HasColumnName("workfromdate"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.HasIndex("Email") + .HasDatabaseName("email"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("Tenant", "UserName") + .HasDatabaseName("username"); + + b.ToTable("core_user", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Id = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + ActivationStatus = 0, + CreateDate = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Email = "", + FirstName = "Administrator", + LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), + LastName = "", + MobilePhoneActivation = 0, + Removed = false, + Status = 1, + Tenant = 1, + UserName = "administrator", + WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) + }); + }); + + modelBuilder.Entity("ASC.MessagingSystem.EF.Model.AuditEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("Browser") + .HasColumnType("varchar(200)") + .HasColumnName("browser") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Date") + .HasColumnType("datetime") + .HasColumnName("date"); + + b.Property("DescriptionRaw") + .HasColumnType("varchar(20000)") + .HasColumnName("description") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Initiator") + .HasColumnType("varchar(200)") + .HasColumnName("initiator") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Ip") + .HasColumnType("varchar(50)") + .HasColumnName("ip") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Page") + .HasColumnType("varchar(300)") + .HasColumnName("page") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Platform") + .HasColumnType("varchar(200)") + .HasColumnName("platform") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Target") + .HasColumnType("text") + .HasColumnName("target") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .HasColumnType("char(38)") + .HasColumnName("user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Date") + .HasDatabaseName("date"); + + b.ToTable("audit_events", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.MessagingSystem.EF.Model.LoginEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Action") + .HasColumnType("int") + .HasColumnName("action"); + + b.Property("Active") + .HasColumnType("tinyint(1)") + .HasColumnName("active"); + + b.Property("Browser") + .HasColumnType("varchar(200)") + .HasColumnName("browser") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Date") + .HasColumnType("datetime") + .HasColumnName("date"); + + b.Property("DescriptionRaw") + .HasColumnType("varchar(500)") + .HasColumnName("description") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Ip") + .HasColumnType("varchar(50)") + .HasColumnName("ip") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Login") + .HasColumnType("varchar(200)") + .HasColumnName("login") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Page") + .HasColumnType("varchar(300)") + .HasColumnName("page") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Platform") + .HasColumnType("varchar(200)") + .HasColumnName("platform") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("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", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/NotifyDbContextPostgreSql/20211012145337_NotifyDbContextPostgreSql.Designer.cs b/migrations/mysql/NotifyDbContext/20220724114551_NotifyDbContextMigrate.Designer.cs similarity index 77% rename from common/ASC.Core.Common/Migrations/PostgreSql/NotifyDbContextPostgreSql/20211012145337_NotifyDbContextPostgreSql.Designer.cs rename to migrations/mysql/NotifyDbContext/20220724114551_NotifyDbContextMigrate.Designer.cs index 1e294a0391..47aaafd917 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/NotifyDbContextPostgreSql/20211012145337_NotifyDbContextPostgreSql.Designer.cs +++ b/migrations/mysql/NotifyDbContext/20220724114551_NotifyDbContextMigrate.Designer.cs @@ -1,125 +1,142 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.NotifyDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlNotifyDbContext))] - [Migration("20211012145337_NotifyDbContextPostgreSql")] - partial class NotifyDbContextPostgreSql - { - 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("NotifyId") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("notify_id"); - - b.Property("Attempts") - .HasColumnType("int") - .HasColumnName("attempts"); - - b.Property("ModifyDate") - .HasColumnType("datetime") - .HasColumnName("modify_date"); - - b.Property("Priority") - .HasColumnType("int") - .HasColumnName("priority"); - - b.Property("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("NotifyId") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("notify_id"); - - b.Property("Attachments") - .HasColumnType("text") - .HasColumnName("attachments") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AutoSubmitted") - .HasColumnType("varchar(64)") - .HasColumnName("auto_submitted") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Content") - .HasColumnType("text") - .HasColumnName("content") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ContentType") - .HasColumnType("varchar(64)") - .HasColumnName("content_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreationDate") - .HasColumnType("datetime") - .HasColumnName("creation_date"); - - b.Property("Reciever") - .HasColumnType("varchar(255)") - .HasColumnName("reciever") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ReplyTo") - .HasColumnType("varchar(1024)") - .HasColumnName("reply_to") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Sender") - .HasColumnType("varchar(255)") - .HasColumnName("sender") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("SenderType") - .HasColumnType("varchar(64)") - .HasColumnName("sender_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Subject") - .HasColumnType("varchar(1024)") - .HasColumnName("subject") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.HasKey("NotifyId") - .HasName("PRIMARY"); - - b.ToTable("notify_queue"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(NotifyDbContext))] + [Migration("20220724114551_NotifyDbContextMigrate")] + partial class NotifyDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.NotifyInfo", b => + { + b.Property("NotifyId") + .HasColumnType("int") + .HasColumnName("notify_id"); + + b.Property("Attempts") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("attempts") + .HasDefaultValueSql("'0'"); + + b.Property("ModifyDate") + .HasColumnType("datetime") + .HasColumnName("modify_date"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("priority") + .HasDefaultValueSql("'0'"); + + b.Property("State") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("state") + .HasDefaultValueSql("'0'"); + + b.HasKey("NotifyId") + .HasName("PRIMARY"); + + b.HasIndex("State") + .HasDatabaseName("state"); + + b.ToTable("notify_info", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.NotifyQueue", b => + { + b.Property("NotifyId") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("notify_id"); + + b.Property("Attachments") + .HasColumnType("text") + .HasColumnName("attachments") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("AutoSubmitted") + .HasColumnType("varchar(64)") + .HasColumnName("auto_submitted") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Content") + .HasColumnType("text") + .HasColumnName("content") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ContentType") + .HasColumnType("varchar(64)") + .HasColumnName("content_type") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreationDate") + .HasColumnType("datetime") + .HasColumnName("creation_date"); + + b.Property("Reciever") + .HasColumnType("varchar(255)") + .HasColumnName("reciever") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ReplyTo") + .HasColumnType("varchar(1024)") + .HasColumnName("reply_to") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Sender") + .HasColumnType("varchar(255)") + .HasColumnName("sender") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("SenderType") + .HasColumnType("varchar(64)") + .HasColumnName("sender_type") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Subject") + .HasColumnType("varchar(1024)") + .HasColumnName("subject") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.HasKey("NotifyId") + .HasName("PRIMARY"); + + b.ToTable("notify_queue", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/NotifyDbContext/20220724114551_NotifyDbContextMigrate.cs b/migrations/mysql/NotifyDbContext/20220724114551_NotifyDbContextMigrate.cs new file mode 100644 index 0000000000..08101f232c --- /dev/null +++ b/migrations/mysql/NotifyDbContext/20220724114551_NotifyDbContextMigrate.cs @@ -0,0 +1,80 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class NotifyDbContextMigrate : 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(type: "int", nullable: false), + state = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + attempts = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + modify_date = table.Column(type: "datetime", nullable: false), + priority = table.Column(type: "int", nullable: false, defaultValueSql: "'0'") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.notify_id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "notify_queue", + columns: table => new + { + notify_id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + tenant_id = table.Column(type: "int", nullable: false), + sender = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + reciever = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + subject = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + content_type = table.Column(type: "varchar(64)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + content = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + sender_type = table.Column(type: "varchar(64)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + reply_to = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + creation_date = table.Column(type: "datetime", nullable: false), + attachments = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + auto_submitted = table.Column(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", "utf8"); + + 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"); + } + } +} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/NotifyDbContextPostgreSql/PostgreSqlNotifyDbContextModelSnapshot.cs b/migrations/mysql/NotifyDbContext/NotifyDbContextModelSnapshot.cs similarity index 78% rename from common/ASC.Core.Common/Migrations/PostgreSql/NotifyDbContextPostgreSql/PostgreSqlNotifyDbContextModelSnapshot.cs rename to migrations/mysql/NotifyDbContext/NotifyDbContextModelSnapshot.cs index e43daa5d68..d3fbd7d47b 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/NotifyDbContextPostgreSql/PostgreSqlNotifyDbContextModelSnapshot.cs +++ b/migrations/mysql/NotifyDbContext/NotifyDbContextModelSnapshot.cs @@ -1,124 +1,140 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.NotifyDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlNotifyDbContext))] - partial class PostgreSqlNotifyDbContextModelSnapshot : 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("NotifyId") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("notify_id"); - - b.Property("Attempts") - .HasColumnType("int") - .HasColumnName("attempts"); - - b.Property("ModifyDate") - .HasColumnType("datetime") - .HasColumnName("modify_date"); - - b.Property("Priority") - .HasColumnType("int") - .HasColumnName("priority"); - - b.Property("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("NotifyId") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("notify_id"); - - b.Property("Attachments") - .HasColumnType("text") - .HasColumnName("attachments") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AutoSubmitted") - .HasColumnType("varchar(64)") - .HasColumnName("auto_submitted") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Content") - .HasColumnType("text") - .HasColumnName("content") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ContentType") - .HasColumnType("varchar(64)") - .HasColumnName("content_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreationDate") - .HasColumnType("datetime") - .HasColumnName("creation_date"); - - b.Property("Reciever") - .HasColumnType("varchar(255)") - .HasColumnName("reciever") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ReplyTo") - .HasColumnType("varchar(1024)") - .HasColumnName("reply_to") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Sender") - .HasColumnType("varchar(255)") - .HasColumnName("sender") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("SenderType") - .HasColumnType("varchar(64)") - .HasColumnName("sender_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Subject") - .HasColumnType("varchar(1024)") - .HasColumnName("subject") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.HasKey("NotifyId") - .HasName("PRIMARY"); - - b.ToTable("notify_queue"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(NotifyDbContext))] + partial class NotifyDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.NotifyInfo", b => + { + b.Property("NotifyId") + .HasColumnType("int") + .HasColumnName("notify_id"); + + b.Property("Attempts") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("attempts") + .HasDefaultValueSql("'0'"); + + b.Property("ModifyDate") + .HasColumnType("datetime") + .HasColumnName("modify_date"); + + b.Property("Priority") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("priority") + .HasDefaultValueSql("'0'"); + + b.Property("State") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("state") + .HasDefaultValueSql("'0'"); + + b.HasKey("NotifyId") + .HasName("PRIMARY"); + + b.HasIndex("State") + .HasDatabaseName("state"); + + b.ToTable("notify_info", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.NotifyQueue", b => + { + b.Property("NotifyId") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("notify_id"); + + b.Property("Attachments") + .HasColumnType("text") + .HasColumnName("attachments") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("AutoSubmitted") + .HasColumnType("varchar(64)") + .HasColumnName("auto_submitted") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Content") + .HasColumnType("text") + .HasColumnName("content") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ContentType") + .HasColumnType("varchar(64)") + .HasColumnName("content_type") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreationDate") + .HasColumnType("datetime") + .HasColumnName("creation_date"); + + b.Property("Reciever") + .HasColumnType("varchar(255)") + .HasColumnName("reciever") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("ReplyTo") + .HasColumnType("varchar(1024)") + .HasColumnName("reply_to") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Sender") + .HasColumnType("varchar(255)") + .HasColumnName("sender") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("SenderType") + .HasColumnType("varchar(64)") + .HasColumnName("sender_type") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Subject") + .HasColumnType("varchar(1024)") + .HasColumnName("subject") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.HasKey("NotifyId") + .HasName("PRIMARY"); + + b.ToTable("notify_queue", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/common/ASC.Core.Common/Migrations/MySql/TelegramDbContextMySql/20211012145340_TelegramDbContextMySql.Designer.cs b/migrations/mysql/TelegramDbContext/20220724114552_TelegramDbContextMigrate.Designer.cs similarity index 63% rename from common/ASC.Core.Common/Migrations/MySql/TelegramDbContextMySql/20211012145340_TelegramDbContextMySql.Designer.cs rename to migrations/mysql/TelegramDbContext/20220724114552_TelegramDbContextMigrate.Designer.cs index fb756351ab..61f0522b55 100644 --- a/common/ASC.Core.Common/Migrations/MySql/TelegramDbContextMySql/20211012145340_TelegramDbContextMySql.Designer.cs +++ b/migrations/mysql/TelegramDbContext/20220724114552_TelegramDbContextMigrate.Designer.cs @@ -1,43 +1,52 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.TelegramDbContextMySql -{ - [DbContext(typeof(MySqlTelegramDbContext))] - [Migration("20211012145340_TelegramDbContextMySql")] - partial class TelegramDbContextMySql - { - 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.TelegramUser", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("PortalUserId") - .HasColumnType("varchar(38)") - .HasColumnName("portal_user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TelegramUserId") - .HasColumnType("int") - .HasColumnName("telegram_user_id"); - - b.HasKey("TenantId", "PortalUserId") - .HasName("PRIMARY"); - - b.HasIndex("TelegramUserId") - .HasDatabaseName("tgId"); - - b.ToTable("telegram_users"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(TelegramDbContext))] + [Migration("20220724114552_TelegramDbContextMigrate")] + partial class TelegramDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.TelegramUser", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("PortalUserId") + .HasColumnType("varchar(38)") + .HasColumnName("portal_user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TelegramUserId") + .HasColumnType("int") + .HasColumnName("telegram_user_id"); + + b.HasKey("TenantId", "PortalUserId") + .HasName("PRIMARY"); + + b.HasIndex("TelegramUserId") + .HasDatabaseName("tgId"); + + b.ToTable("telegram_users", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/TelegramDbContext/20220724114552_TelegramDbContextMigrate.cs b/migrations/mysql/TelegramDbContext/20220724114552_TelegramDbContextMigrate.cs new file mode 100644 index 0000000000..7a91fdffa1 --- /dev/null +++ b/migrations/mysql/TelegramDbContext/20220724114552_TelegramDbContextMigrate.cs @@ -0,0 +1,41 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class TelegramDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "telegram_users", + columns: table => new + { + portal_user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + tenant_id = table.Column(type: "int", nullable: false), + telegram_user_id = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.portal_user_id }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateIndex( + name: "tgId", + table: "telegram_users", + column: "telegram_user_id"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "telegram_users"); + } + } +} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/TelegramDbContextPostgreSql/PostgreSqlTelegramDbContextModelSnapshot.cs b/migrations/mysql/TelegramDbContext/TelegramDbContextModelSnapshot.cs similarity index 66% rename from common/ASC.Core.Common/Migrations/PostgreSql/TelegramDbContextPostgreSql/PostgreSqlTelegramDbContextModelSnapshot.cs rename to migrations/mysql/TelegramDbContext/TelegramDbContextModelSnapshot.cs index b62de2a326..c90a32e9a3 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/TelegramDbContextPostgreSql/PostgreSqlTelegramDbContextModelSnapshot.cs +++ b/migrations/mysql/TelegramDbContext/TelegramDbContextModelSnapshot.cs @@ -1,42 +1,50 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.TelegramDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlTelegramDbContext))] - partial class PostgreSqlTelegramDbContextModelSnapshot : 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.TelegramUser", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("PortalUserId") - .HasColumnType("varchar(38)") - .HasColumnName("portal_user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TelegramUserId") - .HasColumnType("int") - .HasColumnName("telegram_user_id"); - - b.HasKey("TenantId", "PortalUserId") - .HasName("PRIMARY"); - - b.HasIndex("TelegramUserId") - .HasDatabaseName("tgId"); - - b.ToTable("telegram_users"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(TelegramDbContext))] + partial class TelegramDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.TelegramUser", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("PortalUserId") + .HasColumnType("varchar(38)") + .HasColumnName("portal_user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TelegramUserId") + .HasColumnType("int") + .HasColumnName("telegram_user_id"); + + b.HasKey("TenantId", "PortalUserId") + .HasName("PRIMARY"); + + b.HasIndex("TelegramUserId") + .HasDatabaseName("tgId"); + + b.ToTable("telegram_users", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/common/ASC.Core.Common/Migrations/MySql/TenantDbContextMySql/20211012145342_TenantDbContextMySql.Designer.cs b/migrations/mysql/TenantDbContext/20220724114553_TenantDbContextMigrate.Designer.cs similarity index 76% rename from common/ASC.Core.Common/Migrations/MySql/TenantDbContextMySql/20211012145342_TenantDbContextMySql.Designer.cs rename to migrations/mysql/TenantDbContext/20220724114553_TenantDbContextMigrate.Designer.cs index f8903ad622..6bfca698f6 100644 --- a/common/ASC.Core.Common/Migrations/MySql/TenantDbContextMySql/20211012145342_TenantDbContextMySql.Designer.cs +++ b/migrations/mysql/TenantDbContext/20220724114553_TenantDbContextMigrate.Designer.cs @@ -1,326 +1,352 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql -{ - [DbContext(typeof(MySqlTenantDbContext))] - [Migration("20211012145342_TenantDbContextMySql")] - partial class TenantDbContextMySql - { - 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.DbCoreSettings", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Id") - .HasColumnType("varchar(128)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Value") - .IsRequired() - .HasColumnType("mediumblob") - .HasColumnName("value"); - - b.HasKey("Tenant", "Id") - .HasName("PRIMARY"); - - b.ToTable("core_settings"); - - b.HasData( - new - { - Tenant = -1, - Id = "CompanyWhiteLabelSettings", - LastModified = new DateTime(2021, 10, 12, 14, 53, 21, 897, DateTimeKind.Utc).AddTicks(8351), - 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 } - }, - new - { - Tenant = -1, - Id = "FullTextSearchSettings", - LastModified = new DateTime(2021, 10, 12, 14, 53, 21, 897, DateTimeKind.Utc).AddTicks(8555), - 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 } - }, - new - { - Tenant = -1, - Id = "SmtpSettings", - LastModified = new DateTime(2021, 10, 12, 14, 53, 21, 897, DateTimeKind.Utc).AddTicks(8559), - 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 } - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Alias") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("alias") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Calls") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("calls") - .HasDefaultValueSql("true"); - - b.Property("CreationDateTime") - .HasColumnType("datetime") - .HasColumnName("creationdatetime"); - - b.Property("Industry") - .HasColumnType("int") - .HasColumnName("industry"); - - b.Property("Language") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("char(10)") - .HasColumnName("language") - .HasDefaultValueSql("'en-US'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("MappedDomain") - .HasColumnType("varchar(100)") - .HasColumnName("mappeddomain") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("owner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PaymentId") - .HasColumnType("varchar(38)") - .HasColumnName("payment_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Spam") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("spam") - .HasDefaultValueSql("true"); - - b.Property("Status") - .HasColumnType("int") - .HasColumnName("status"); - - b.Property("StatusChanged") - .HasColumnType("datetime") - .HasColumnName("statuschanged"); - - b.Property("TimeZone") - .HasColumnType("varchar(50)") - .HasColumnName("timezone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomains") - .HasColumnType("varchar(1024)") - .HasColumnName("trusteddomains") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomainsEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("trusteddomainsenabled") - .HasDefaultValueSql("'1'"); - - b.Property("Version") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("version") - .HasDefaultValueSql("'2'"); - - b.Property("Version_Changed") - .HasColumnType("datetime") - .HasColumnName("version_changed"); - - b.HasKey("Id"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("MappedDomain") - .HasDatabaseName("mappeddomain"); - - b.HasIndex("Version") - .HasDatabaseName("version"); - - b.ToTable("tenants_tenants"); - - b.HasData( - new - { - Id = 1, - Alias = "localhost", - Calls = false, - CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - Name = "Web Office", - OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - Spam = false, - Status = 0, - TrustedDomainsEnabled = 0, - Version = 0 - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantForbiden", b => - { - b.Property("Address") - .HasColumnType("varchar(50)") - .HasColumnName("address") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Address") - .HasName("PRIMARY"); - - b.ToTable("tenants_forbiden"); - - b.HasData( - new - { - Address = "controlpanel" - }, - new - { - Address = "localhost" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantPartner", b => - { - b.Property("TenantId") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("AffiliateId") - .HasColumnType("varchar(50)") - .HasColumnName("affiliate_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Campaign") - .HasColumnType("varchar(50)") - .HasColumnName("campaign") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PartnerId") - .HasColumnType("varchar(36)") - .HasColumnName("partner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId") - .HasName("PRIMARY"); - - b.ToTable("tenants_partners"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantVersion", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("DefaultVersion") - .HasColumnType("int") - .HasColumnName("default_version"); - - b.Property("Url") - .IsRequired() - .HasColumnType("varchar(64)") - .HasColumnName("url") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Version") - .IsRequired() - .HasColumnType("varchar(64)") - .HasColumnName("version") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Visible") - .HasColumnType("tinyint(1)") - .HasColumnName("visible"); - - b.HasKey("Id"); - - b.ToTable("tenants_version"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.TenantIpRestrictions", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Ip") - .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("ip") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("Tenant") - .HasDatabaseName("tenant"); - - b.ToTable("tenants_iprestrictions"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(TenantDbContext))] + [Migration("20220724114553_TenantDbContextMigrate")] + partial class TenantDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbCoreSettings", b => + { + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.Property("Id") + .HasColumnType("varchar(128)") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.Property("Value") + .IsRequired() + .HasColumnType("mediumblob") + .HasColumnName("value"); + + b.HasKey("Tenant", "Id") + .HasName("PRIMARY"); + + b.ToTable("core_settings", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Tenant = -1, + Id = "CompanyWhiteLabelSettings", + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + 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 } + }, + new + { + Tenant = -1, + Id = "FullTextSearchSettings", + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + 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 } + }, + new + { + Tenant = -1, + Id = "SmtpSettings", + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + 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 } + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Alias") + .IsRequired() + .HasColumnType("varchar(100)") + .HasColumnName("alias") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("calls") + .HasDefaultValueSql("'1'"); + + b.Property("CreationDateTime") + .HasColumnType("datetime") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("industry") + .HasDefaultValueSql("'0'"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("char(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.Property("MappedDomain") + .HasColumnType("varchar(100)") + .HasColumnName("mappeddomain") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("OwnerId") + .HasColumnType("varchar(38)") + .HasColumnName("owner_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("PaymentId") + .HasColumnType("varchar(38)") + .HasColumnName("payment_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("spam") + .HasDefaultValueSql("'1'"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("status") + .HasDefaultValueSql("'0'"); + + b.Property("StatusChanged") + .HasColumnType("datetime") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .HasColumnType("varchar(50)") + .HasColumnName("timezone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("'1'"); + + b.Property("TrustedDomainsRaw") + .HasColumnType("varchar(1024)") + .HasColumnName("trusteddomains") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("version") + .HasDefaultValueSql("'2'"); + + b.Property("Version_Changed") + .HasColumnType("datetime") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantForbiden", b => + { + b.Property("Address") + .HasColumnType("varchar(50)") + .HasColumnName("address") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Address") + .HasName("PRIMARY"); + + b.ToTable("tenants_forbiden", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Address = "controlpanel" + }, + new + { + Address = "localhost" + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantPartner", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("AffiliateId") + .HasColumnType("varchar(50)") + .HasColumnName("affiliate_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Campaign") + .HasColumnType("varchar(50)") + .HasColumnName("campaign") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("PartnerId") + .HasColumnType("varchar(36)") + .HasColumnName("partner_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId") + .HasName("PRIMARY"); + + b.ToTable("tenants_partners", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantVersion", b => + { + b.Property("Id") + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("DefaultVersion") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("default_version") + .HasDefaultValueSql("'0'"); + + b.Property("Url") + .IsRequired() + .HasColumnType("varchar(64)") + .HasColumnName("url") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Version") + .IsRequired() + .HasColumnType("varchar(64)") + .HasColumnName("version") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Visible") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("visible") + .HasDefaultValueSql("'0'"); + + b.HasKey("Id"); + + b.ToTable("tenants_version", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.TenantIpRestrictions", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Ip") + .IsRequired() + .HasColumnType("varchar(50)") + .HasColumnName("ip") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Tenant") + .HasColumnType("int") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant"); + + b.ToTable("tenants_iprestrictions", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/TenantDbContext/20220724114553_TenantDbContextMigrate.cs b/migrations/mysql/TenantDbContext/20220724114553_TenantDbContextMigrate.cs new file mode 100644 index 0000000000..69d0d5b59c --- /dev/null +++ b/migrations/mysql/TenantDbContext/20220724114553_TenantDbContextMigrate.cs @@ -0,0 +1,208 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class TenantDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "core_settings", + columns: table => new + { + tenant = table.Column(type: "int", nullable: false), + id = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + value = table.Column(type: "mediumblob", nullable: false), + last_modified = table.Column(type: "timestamp", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant, x.id }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_forbiden", + columns: table => new + { + address = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.address); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_iprestrictions", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + tenant = table.Column(type: "int", nullable: false), + ip = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_iprestrictions", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_partners", + columns: table => new + { + tenant_id = table.Column(type: "int", nullable: false), + partner_id = table.Column(type: "varchar(36)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + affiliate_id = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + campaign = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.tenant_id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_tenants", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + alias = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + mappeddomain = table.Column(type: "varchar(100)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + version = table.Column(type: "int", nullable: false, defaultValueSql: "'2'"), + version_changed = table.Column(type: "datetime", nullable: true), + language = table.Column(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + timezone = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + trusteddomains = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + trusteddomainsenabled = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), + status = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + statuschanged = table.Column(type: "datetime", nullable: true), + creationdatetime = table.Column(type: "datetime", nullable: false), + owner_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + payment_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + industry = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + last_modified = table.Column(type: "timestamp", nullable: false), + spam = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"), + calls = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tenants", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "tenants_version", + columns: table => new + { + id = table.Column(type: "int", nullable: false), + version = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + url = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + default_version = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + visible = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_version", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.InsertData( + table: "core_settings", + columns: new[] { "id", "tenant", "last_modified", "value" }, + values: new object[,] + { + { "CompanyWhiteLabelSettings", -1, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), 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 } }, + { "FullTextSearchSettings", -1, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), 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 } }, + { "SmtpSettings", -1, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), 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 } } + }); + + migrationBuilder.InsertData( + table: "tenants_forbiden", + column: "address", + values: new object[] + { + "controlpanel", + "localhost" + }); + + migrationBuilder.InsertData( + table: "tenants_tenants", + columns: new[] { "id", "alias", "creationdatetime", "last_modified", "mappeddomain", "name", "owner_id", "payment_id", "statuschanged", "timezone", "trusteddomains", "version_changed" }, + values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "Web Office", "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, null, null, null, null }); + + migrationBuilder.CreateIndex( + name: "tenant", + table: "tenants_iprestrictions", + column: "tenant"); + + migrationBuilder.CreateIndex( + name: "alias", + table: "tenants_tenants", + column: "alias", + unique: true); + + 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"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "core_settings"); + + migrationBuilder.DropTable( + name: "tenants_forbiden"); + + migrationBuilder.DropTable( + name: "tenants_iprestrictions"); + + migrationBuilder.DropTable( + name: "tenants_partners"); + + migrationBuilder.DropTable( + name: "tenants_tenants"); + + migrationBuilder.DropTable( + name: "tenants_version"); + } + } +} diff --git a/common/ASC.Core.Common/Migrations/MySql/TenantDbContextMySql/MySqlTenantDbContextModelSnapshot.cs b/migrations/mysql/TenantDbContext/TenantDbContextModelSnapshot.cs similarity index 77% rename from common/ASC.Core.Common/Migrations/MySql/TenantDbContextMySql/MySqlTenantDbContextModelSnapshot.cs rename to migrations/mysql/TenantDbContext/TenantDbContextModelSnapshot.cs index 31da52108a..9ba21301bd 100644 --- a/common/ASC.Core.Common/Migrations/MySql/TenantDbContextMySql/MySqlTenantDbContextModelSnapshot.cs +++ b/migrations/mysql/TenantDbContext/TenantDbContextModelSnapshot.cs @@ -1,16 +1,23 @@ // +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql +#nullable disable + +namespace ASC.Migrations.MySql.Migrations { - [DbContext(typeof(MySqlTenantDbContext))] - partial class MySqlTenantDbContextModelSnapshot : ModelSnapshot + [DbContext(typeof(TenantDbContext))] + partial class TenantDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.10"); + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("ASC.Core.Common.EF.Model.DbCoreSettings", b => { @@ -25,10 +32,8 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnName("last_modified"); b.Property("Value") .IsRequired() @@ -38,28 +43,30 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql b.HasKey("Tenant", "Id") .HasName("PRIMARY"); - b.ToTable("core_settings"); + b.ToTable("core_settings", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new { Tenant = -1, Id = "CompanyWhiteLabelSettings", - LastModified = new DateTime(2021, 10, 26, 12, 11, 31, 504, DateTimeKind.Utc).AddTicks(1420), - 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 = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + 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 } }, new { Tenant = -1, Id = "FullTextSearchSettings", - LastModified = new DateTime(2021, 10, 26, 12, 11, 31, 504, DateTimeKind.Utc).AddTicks(1630), + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), 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 } }, new { Tenant = -1, Id = "SmtpSettings", - LastModified = new DateTime(2021, 10, 26, 12, 11, 31, 504, DateTimeKind.Utc).AddTicks(1635), + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), 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 } }); }); @@ -82,15 +89,17 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql .ValueGeneratedOnAdd() .HasColumnType("tinyint(1)") .HasColumnName("calls") - .HasDefaultValueSql("true"); + .HasDefaultValueSql("'1'"); b.Property("CreationDateTime") .HasColumnType("datetime") .HasColumnName("creationdatetime"); - b.Property("Industry") + b.Property("Industry") + .ValueGeneratedOnAdd() .HasColumnType("int") - .HasColumnName("industry"); + .HasColumnName("industry") + .HasDefaultValueSql("'0'"); b.Property("Language") .IsRequired() @@ -102,10 +111,8 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("LastModified") - .ValueGeneratedOnAdd() .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnName("last_modified"); b.Property("MappedDomain") .HasColumnType("varchar(100)") @@ -121,7 +128,6 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("OwnerId") - .IsRequired() .HasColumnType("varchar(38)") .HasColumnName("owner_id") .UseCollation("utf8_general_ci") @@ -137,11 +143,13 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql .ValueGeneratedOnAdd() .HasColumnType("tinyint(1)") .HasColumnName("spam") - .HasDefaultValueSql("true"); + .HasDefaultValueSql("'1'"); b.Property("Status") + .ValueGeneratedOnAdd() .HasColumnType("int") - .HasColumnName("status"); + .HasColumnName("status") + .HasDefaultValueSql("'0'"); b.Property("StatusChanged") .HasColumnType("datetime") @@ -153,18 +161,18 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql .UseCollation("utf8_general_ci") .HasAnnotation("MySql:CharSet", "utf8"); - b.Property("TrustedDomains") - .HasColumnType("varchar(1024)") - .HasColumnName("trusteddomains") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - b.Property("TrustedDomainsEnabled") .ValueGeneratedOnAdd() .HasColumnType("int") .HasColumnName("trusteddomainsenabled") .HasDefaultValueSql("'1'"); + b.Property("TrustedDomainsRaw") + .HasColumnType("varchar(1024)") + .HasColumnName("trusteddomains") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + b.Property("Version") .ValueGeneratedOnAdd() .HasColumnType("int") @@ -177,6 +185,10 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql b.HasKey("Id"); + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + b.HasIndex("LastModified") .HasDatabaseName("last_modified"); @@ -186,7 +198,9 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql b.HasIndex("Version") .HasDatabaseName("version"); - b.ToTable("tenants_tenants"); + b.ToTable("tenants_tenants", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new @@ -195,7 +209,8 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql Alias = "localhost", Calls = false, CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), Name = "Web Office", OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", Spam = false, @@ -216,7 +231,9 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql b.HasKey("Address") .HasName("PRIMARY"); - b.ToTable("tenants_forbiden"); + b.ToTable("tenants_forbiden", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new @@ -232,7 +249,6 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantPartner", b => { b.Property("TenantId") - .ValueGeneratedOnAdd() .HasColumnType("int") .HasColumnName("tenant_id"); @@ -257,19 +273,22 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql b.HasKey("TenantId") .HasName("PRIMARY"); - b.ToTable("tenants_partners"); + b.ToTable("tenants_partners", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); }); modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantVersion", b => { b.Property("Id") - .ValueGeneratedOnAdd() .HasColumnType("int") .HasColumnName("id"); b.Property("DefaultVersion") + .ValueGeneratedOnAdd() .HasColumnType("int") - .HasColumnName("default_version"); + .HasColumnName("default_version") + .HasDefaultValueSql("'0'"); b.Property("Url") .IsRequired() @@ -286,12 +305,16 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("Visible") + .ValueGeneratedOnAdd() .HasColumnType("tinyint(1)") - .HasColumnName("visible"); + .HasColumnName("visible") + .HasDefaultValueSql("'0'"); b.HasKey("Id"); - b.ToTable("tenants_version"); + b.ToTable("tenants_version", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); }); modelBuilder.Entity("ASC.Core.Common.EF.Model.TenantIpRestrictions", b => @@ -317,7 +340,9 @@ namespace ASC.Core.Common.Migrations.MySql.TenantDbContextMySql b.HasIndex("Tenant") .HasDatabaseName("tenant"); - b.ToTable("tenants_iprestrictions"); + b.ToTable("tenants_iprestrictions", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); }); #pragma warning restore 612, 618 } diff --git a/migrations/mysql/UrlShortenerFakeDbContext/20220724114554_UrlShortenerFakeDbContextMigrate.Designer.cs b/migrations/mysql/UrlShortenerFakeDbContext/20220724114554_UrlShortenerFakeDbContextMigrate.Designer.cs new file mode 100644 index 0000000000..f233d9b15a --- /dev/null +++ b/migrations/mysql/UrlShortenerFakeDbContext/20220724114554_UrlShortenerFakeDbContextMigrate.Designer.cs @@ -0,0 +1,56 @@ +// +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(UrlShortenerFakeDbContext))] + [Migration("20220724114554_UrlShortenerFakeDbContextMigrate")] + partial class UrlShortenerFakeDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.ShortLinks", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int(10)") + .HasColumnName("id"); + + b.Property("Link") + .HasColumnType("text") + .HasColumnName("link") + .UseCollation("utf8_bin"); + + b.Property("Short") + .HasColumnType("varchar(12)") + .HasColumnName("short") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.HasIndex("Short") + .IsUnique(); + + b.ToTable("short_links", (string)null); + + b + .HasAnnotation("MySql:CharSet", "utf8") + .HasAnnotation("Relational:Collation", "utf8_general_ci"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/UrlShortenerFakeDbContext/20220724114554_UrlShortenerFakeDbContextMigrate.cs b/migrations/mysql/UrlShortenerFakeDbContext/20220724114554_UrlShortenerFakeDbContextMigrate.cs new file mode 100644 index 0000000000..ddc838c0b1 --- /dev/null +++ b/migrations/mysql/UrlShortenerFakeDbContext/20220724114554_UrlShortenerFakeDbContextMigrate.cs @@ -0,0 +1,46 @@ +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class UrlShortenerFakeDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "short_links", + columns: table => new + { + id = table.Column(type: "int(10)", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + @short = table.Column(name: "short", type: "varchar(12)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + link = table.Column(type: "text", nullable: true, collation: "utf8_bin") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8") + .Annotation("Relational:Collation", "utf8_general_ci"); + + migrationBuilder.CreateIndex( + name: "IX_short_links_short", + table: "short_links", + column: "short", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "short_links"); + } + } +} diff --git a/migrations/mysql/UrlShortenerFakeDbContext/UrlShortenerFakeDbContextModelSnapshot.cs b/migrations/mysql/UrlShortenerFakeDbContext/UrlShortenerFakeDbContextModelSnapshot.cs new file mode 100644 index 0000000000..a6d741eea7 --- /dev/null +++ b/migrations/mysql/UrlShortenerFakeDbContext/UrlShortenerFakeDbContextModelSnapshot.cs @@ -0,0 +1,54 @@ +// +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(UrlShortenerFakeDbContext))] + partial class UrlShortenerFakeDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.ShortLinks", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int(10)") + .HasColumnName("id"); + + b.Property("Link") + .HasColumnType("text") + .HasColumnName("link") + .UseCollation("utf8_bin"); + + b.Property("Short") + .HasColumnType("varchar(12)") + .HasColumnName("short") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.HasIndex("Short") + .IsUnique(); + + b.ToTable("short_links", (string)null); + + b + .HasAnnotation("MySql:CharSet", "utf8") + .HasAnnotation("Relational:Collation", "utf8_general_ci"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/UserDbContextPostgreSql/PostgreSqlUserDbContextModelSnapshot.cs b/migrations/mysql/UserDbContext/20220725161614_UserDbContextMigrate.Designer.cs similarity index 91% rename from common/ASC.Core.Common/Migrations/PostgreSql/UserDbContextPostgreSql/PostgreSqlUserDbContextModelSnapshot.cs rename to migrations/mysql/UserDbContext/20220725161614_UserDbContextMigrate.Designer.cs index c5447c589f..46163502e3 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/UserDbContextPostgreSql/PostgreSqlUserDbContextModelSnapshot.cs +++ b/migrations/mysql/UserDbContext/20220725161614_UserDbContextMigrate.Designer.cs @@ -1,16 +1,25 @@ // +using System; +using ASC.Core.Common.EF; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql +#nullable disable + +namespace ASC.Migrations.MySql.Migrations { - [DbContext(typeof(PostgreSqlUserDbContext))] - partial class PostgreSqlUserDbContextModelSnapshot : ModelSnapshot + [DbContext(typeof(UserDbContext))] + [Migration("20220725161614_UserDbContextMigrate")] + partial class UserDbContextMigrate { - protected override void BuildModel(ModelBuilder modelBuilder) + protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.10"); + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("ASC.Core.Common.EF.Acl", b => { @@ -45,7 +54,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql b.HasKey("Tenant", "Subject", "Action", "Object") .HasName("PRIMARY"); - b.ToTable("core_acl"); + b.ToTable("core_acl", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new @@ -494,7 +505,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Action = "77777777-32ae-425f-99b5-83176061d1ae", Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", - AceType = AceType.Deny + AceType = 1 }, new { @@ -534,7 +545,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Action = "77777777-32ae-425f-99b5-83176061d1ae", Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", - AceType = AceType.Deny + AceType = 1 }, new { @@ -542,7 +553,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Action = "77777777-32ae-425f-99b5-83176061d1ae", Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", - AceType = AceType.Deny + AceType = 1 }, new { @@ -550,7 +561,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Action = "77777777-32ae-425f-99b5-83176061d1ae", Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", - AceType = AceType.Deny + AceType = 1 }, new { @@ -558,7 +569,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Action = "77777777-32ae-425f-99b5-83176061d1ae", Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", - AceType = AceType.Deny + AceType = 1 }, new { @@ -566,7 +577,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Action = "77777777-32ae-425f-99b5-83176061d1ae", Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", - AceType = AceType.Deny + AceType = 1 }, new { @@ -602,10 +613,8 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("LastModified") - .ValueGeneratedOnAdd() .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnName("last_modified"); b.Property("Name") .IsRequired() @@ -621,8 +630,10 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("Removed") + .ValueGeneratedOnAdd() .HasColumnType("tinyint(1)") - .HasColumnName("removed"); + .HasColumnName("removed") + .HasDefaultValueSql("'0'"); b.Property("Sid") .HasColumnType("varchar(512)") @@ -642,7 +653,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql b.HasIndex("Tenant", "ParentId") .HasDatabaseName("parentid"); - b.ToTable("core_group"); + b.ToTable("core_group", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); }); modelBuilder.Entity("ASC.Core.Common.EF.DbSubscriptionMethod", b => @@ -679,7 +692,9 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql b.HasKey("Tenant", "Source", "Action", "Recipient") .HasName("PRIMARY"); - b.ToTable("core_subscriptionmethod"); + b.ToTable("core_subscriptionmethod", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new @@ -920,7 +935,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "CreateNewContact", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender" + Sender = "email.sender|messanger.sender" }, new { @@ -971,13 +986,17 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("Unsubscribed") + .ValueGeneratedOnAdd() .HasColumnType("tinyint(1)") - .HasColumnName("unsubscribed"); + .HasColumnName("unsubscribed") + .HasDefaultValueSql("'0'"); b.HasKey("Tenant", "Source", "Action", "Recipient", "Object") .HasName("PRIMARY"); - b.ToTable("core_subscription"); + b.ToTable("core_subscription", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new @@ -1019,7 +1038,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql new { Tenant = -1, - Source = "9d51954f-db9b-4aed-94e3-ed70b914e10", + Source = "9d51954f-db9b-4aed-94e3-ed70b914e101", Action = "new photo uploaded", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", @@ -1047,7 +1066,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql { Tenant = -1, Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", - Action = "BirthdayReminderd", + Action = "BirthdayReminder", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Object = "", Unsubscribed = false @@ -1172,10 +1191,12 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("ActivationStatus") + .ValueGeneratedOnAdd() .HasColumnType("int") - .HasColumnName("activation_status"); + .HasColumnName("activation_status") + .HasDefaultValueSql("'0'"); - b.Property("Birthdate") + b.Property("BirthDate") .HasColumnType("datetime") .HasColumnName("bithdate"); @@ -1185,13 +1206,11 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql .UseCollation("utf8_general_ci") .HasAnnotation("MySql:CharSet", "utf8"); - b.Property("CreateOn") - .ValueGeneratedOnAdd() + b.Property("CreateDate") .HasColumnType("timestamp") - .HasColumnName("create_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnName("create_on"); - b.Property("Culture") + b.Property("CultureName") .HasColumnType("varchar(20)") .HasColumnName("culture") .UseCollation("utf8_general_ci") @@ -1227,25 +1246,29 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql .UseCollation("utf8_general_ci") .HasAnnotation("MySql:CharSet", "utf8"); + b.Property("MobilePhone") + .HasColumnType("varchar(255)") + .HasColumnName("phone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("MobilePhoneActivation") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("phone_activation") + .HasDefaultValueSql("'0'"); + b.Property("Notes") .HasColumnType("varchar(512)") .HasColumnName("notes") .UseCollation("utf8_general_ci") .HasAnnotation("MySql:CharSet", "utf8"); - b.Property("Phone") - .HasColumnType("varchar(255)") - .HasColumnName("phone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PhoneActivation") - .HasColumnType("int") - .HasColumnName("phone_activation"); - b.Property("Removed") + .ValueGeneratedOnAdd() .HasColumnType("tinyint(1)") - .HasColumnName("removed"); + .HasColumnName("removed") + .HasDefaultValueSql("'0'"); b.Property("Sex") .HasColumnType("tinyint(1)") @@ -1300,7 +1323,8 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql .HasColumnType("datetime") .HasColumnName("workfromdate"); - b.HasKey("Id"); + b.HasKey("Id") + .HasName("PRIMARY"); b.HasIndex("Email") .HasDatabaseName("email"); @@ -1311,19 +1335,21 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql b.HasIndex("Tenant", "UserName") .HasDatabaseName("username"); - b.ToTable("core_user"); + b.ToTable("core_user", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new { Id = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", ActivationStatus = 0, - CreateOn = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreateDate = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), Email = "", FirstName = "Administrator", LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), LastName = "", - PhoneActivation = 0, + MobilePhoneActivation = 0, Removed = false, Status = 1, Tenant = 1, @@ -1332,19 +1358,37 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql }); }); + modelBuilder.Entity("ASC.Core.Common.EF.UserDav", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .HasColumnType("varchar(38)") + .HasColumnName("user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId", "UserId") + .HasName("PRIMARY"); + + b.ToTable("core_userdav", (string)null); + }); + modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => { b.Property("Tenant") .HasColumnType("int") .HasColumnName("tenant"); - b.Property("UserId") + b.Property("Userid") .HasColumnType("varchar(38)") .HasColumnName("userid") .UseCollation("utf8_general_ci") .HasAnnotation("MySql:CharSet", "utf8"); - b.Property("GroupId") + b.Property("UserGroupId") .HasColumnType("varchar(38)") .HasColumnName("groupid") .UseCollation("utf8_general_ci") @@ -1355,33 +1399,33 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql .HasColumnName("ref_type"); b.Property("LastModified") - .ValueGeneratedOnAdd() .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnName("last_modified"); b.Property("Removed") + .ValueGeneratedOnAdd() .HasColumnType("tinyint(1)") - .HasColumnName("removed"); + .HasColumnName("removed") + .HasDefaultValueSql("'0'"); - b.HasKey("Tenant", "UserId", "GroupId", "RefType") + b.HasKey("Tenant", "Userid", "UserGroupId", "RefType") .HasName("PRIMARY"); b.HasIndex("LastModified") .HasDatabaseName("last_modified"); - b.HasIndex("UserId"); + b.ToTable("core_usergroup", (string)null); - b.ToTable("core_usergroup"); + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new { Tenant = 1, - UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - GroupId = "cd84e66b-b803-40fc-99f9-b2969a54a1de", + Userid = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + UserGroupId = "cd84e66b-b803-40fc-99f9-b2969a54a1de", RefType = 0, - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), Removed = false }); }); @@ -1410,21 +1454,23 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql b.HasIndex("Tenant") .HasDatabaseName("tenant"); - b.ToTable("core_userphoto"); + b.ToTable("core_userphoto", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); }); modelBuilder.Entity("ASC.Core.Common.EF.UserSecurity", b => { b.Property("UserId") + .ValueGeneratedOnAdd() .HasColumnType("varchar(38)") .HasColumnName("userid") .UseCollation("utf8_general_ci") .HasAnnotation("MySql:CharSet", "utf8"); b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .IsRequired() + .HasColumnType("timestamp"); b.Property("PwdHash") .HasColumnType("varchar(512)") @@ -1445,42 +1491,19 @@ namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql b.HasIndex("Tenant") .HasDatabaseName("tenant"); - b.ToTable("core_usersecurity"); + b.ToTable("core_usersecurity", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new { UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - LastModified = new DateTime(2021, 10, 26, 12, 3, 16, 815, DateTimeKind.Utc).AddTicks(4486), + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), PwdHash = "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=", Tenant = 1 }); }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => - { - b.HasOne("ASC.Core.Common.EF.User", null) - .WithMany("Groups") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserSecurity", b => - { - b.HasOne("ASC.Core.Common.EF.User", null) - .WithOne("UserSecurity") - .HasForeignKey("ASC.Core.Common.EF.UserSecurity", "UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.User", b => - { - b.Navigation("Groups"); - - b.Navigation("UserSecurity"); - }); #pragma warning restore 612, 618 } } diff --git a/migrations/mysql/UserDbContext/20220725161614_UserDbContextMigrate.cs b/migrations/mysql/UserDbContext/20220725161614_UserDbContextMigrate.cs new file mode 100644 index 0000000000..a41c0e5a79 --- /dev/null +++ b/migrations/mysql/UserDbContext/20220725161614_UserDbContextMigrate.cs @@ -0,0 +1,445 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class UserDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "core_acl", + columns: table => new + { + tenant = table.Column(type: "int", nullable: false), + subject = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + action = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + @object = table.Column(name: "object", type: "varchar(255)", nullable: false, defaultValueSql: "''", collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + acetype = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant, x.subject, x.action, x.@object }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "core_group", + columns: table => new + { + id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + tenant = table.Column(type: "int", nullable: false), + name = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + categoryid = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + parentid = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + sid = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + removed = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"), + last_modified = table.Column(type: "timestamp", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_core_group", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "core_subscription", + columns: table => new + { + tenant = table.Column(type: "int", nullable: false), + source = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + action = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + recipient = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + @object = table.Column(name: "object", type: "varchar(128)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + unsubscribed = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant, x.source, x.action, x.recipient, x.@object }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "core_subscriptionmethod", + columns: table => new + { + tenant = table.Column(type: "int", nullable: false), + source = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + action = table.Column(type: "varchar(128)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + recipient = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + sender = table.Column(type: "varchar(1024)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant, x.source, x.action, x.recipient }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "core_user", + columns: table => new + { + id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + tenant = table.Column(type: "int", nullable: false), + username = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + firstname = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + lastname = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + sex = table.Column(type: "tinyint(1)", nullable: true), + bithdate = table.Column(type: "datetime", nullable: true), + status = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), + activation_status = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + email = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + workfromdate = table.Column(type: "datetime", nullable: true), + terminateddate = table.Column(type: "datetime", nullable: true), + title = table.Column(type: "varchar(64)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + culture = table.Column(type: "varchar(20)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + contacts = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + phone = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + phone_activation = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + location = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + notes = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + sid = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + sso_name_id = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + sso_session_id = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + removed = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"), + create_on = table.Column(type: "timestamp", nullable: false), + last_modified = table.Column(type: "datetime", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "core_userdav", + columns: table => new + { + tenant_id = table.Column(type: "int", nullable: false), + user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.user_id }); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "core_usergroup", + columns: table => new + { + tenant = table.Column(type: "int", nullable: false), + userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + groupid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + ref_type = table.Column(type: "int", nullable: false), + removed = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"), + last_modified = table.Column(type: "timestamp", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenant, x.userid, x.groupid, x.ref_type }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "core_userphoto", + columns: table => new + { + userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + tenant = table.Column(type: "int", nullable: false), + photo = table.Column(type: "mediumblob", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.userid); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "core_usersecurity", + columns: table => new + { + userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + tenant = table.Column(type: "int", nullable: false), + pwdhash = table.Column(type: "varchar(512)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + LastModified = table.Column(type: "timestamp", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.userid); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.InsertData( + table: "core_acl", + columns: new[] { "action", "object", "subject", "tenant", "acetype" }, + values: new object[,] + { + { "ef5e6790-f346-4b6e-b662-722bc28cb0db", "", "5d5b7260-f7f7-49f1-a1c9-95fbb6a12604", -1, 0 }, + { "f11e8f3f-46e6-4e55-90e3-09c22ec565bd", "", "5d5b7260-f7f7-49f1-a1c9-95fbb6a12604", -1, 0 }, + { "e0759a42-47f0-4763-a26a-d5aa665bec35", "", "712d9ec3-5d2b-4b13-824f-71f00191dcca", -1, 0 }, + { "08d75c97-cf3f-494b-90d1-751c941fe2dd", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, + { "0d1f72a8-63da-47ea-ae42-0900e4ac72a9", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, + { "13e30b51-5b4d-40a5-8575-cb561899eeb1", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, + { "19f658ae-722b-4cd8-8236-3ad150801d96", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, + { "2c6552b3-b2e0-4a00-b8fd-13c161e337b1", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, + { "40bf31f4-3132-4e76-8d5c-9828a89501a3", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, + { "49ae8915-2b30-4348-ab74-b152279364fb", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, + { "948ad738-434b-4a88-8e38-7569d332910a", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, + { "9d75a568-52aa-49d8-ad43-473756cd8903", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, + { "d49f4e30-da10-4b39-bc6d-b41ef6e039d3", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, + { "d852b66f-6719-45e1-8657-18f0bb791690", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", -1, 0 }, + { "13e30b51-5b4d-40a5-8575-cb561899eeb1", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, + { "49ae8915-2b30-4348-ab74-b152279364fb", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, + { "63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, + { "9018c001-24c2-44bf-a1db-d1121a570e74", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, + { "d1f3b53d-d9e2-4259-80e7-d24380978395", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, + { "e0759a42-47f0-4763-a26a-d5aa665bec35", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, + { "e37239bd-c5b5-4f1e-a9f8-3ceeac209615", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, + { "f11e88d7-f185-4372-927c-d88008d2c483", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, + { "f11e8f3f-46e6-4e55-90e3-09c22ec565bd", "", "ba74ca02-873f-43dc-8470-8620c156bc67", -1, 0 }, + { "00e7dfc5-ac49-4fd3-a1d6-98d84e877ac4", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "0d68b142-e20a-446e-a832-0d6b0b65a164", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "14be970f-7af5-4590-8e81-ea32b5f7866d", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "18ecc94d-6afa-4994-8406-aee9dff12ce2", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "298530eb-435e-4dc6-a776-9abcd95c70e9", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "430eaf70-1886-483c-a746-1a18e3e6bb63", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "557d6503-633b-4490-a14c-6473147ce2b3", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "662f3db7-9bc8-42cf-84da-2765f563e9b0", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "724cbb75-d1c9-451e-bae0-4de0db96b1f7", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "7cb5c0d1-d254-433f-abe3-ff23373ec631", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "91b29dcd-9430-4403-b17a-27d09189be88", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "a18480a4-6d18-4c71-84fa-789888791f45", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "b630d29b-1844-4bda-bbbe-cf5542df3559", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "c62a9e8d-b24c-4513-90aa-7ff0f8ba38eb", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "d7cdb020-288b-41e5-a857-597347618533", "", "bba32183-a14d-48ed-9d39-c6b4d8925fbf", -1, 0 }, + { "088d5940-a80f-4403-9741-d610718ce95c", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "08d66144-e1c9-4065-9aa1-aa4bba0a7bc8", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "388c29d3-c662-4a61-bf47-fc2f7094224a", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "6f05c382-8bca-4469-9424-c807a98c40d7", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 1 }, + { "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|f4d98afdd336433287783c6945c81ea0", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "9018c001-24c2-44bf-a1db-d1121a570e74", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "a362fe79-684e-4d43-a599-65bc1f4e167f", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "c426c349-9ad4-47cd-9b8f-99fc30675951", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "d11ebcb9-0e6e-45e6-a6d0-99c41d687598", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "d1f3b53d-d9e2-4259-80e7-d24380978395", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "e0759a42-47f0-4763-a26a-d5aa665bec35", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "e37239bd-c5b5-4f1e-a9f8-3ceeac209615", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "fbc37705-a04c-40ad-a68c-ce2f0423f397", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 }, + { "fcac42b8-9386-48eb-a938-d19b3c576912", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", -1, 0 } + }); + + migrationBuilder.InsertData( + table: "core_subscription", + columns: new[] { "action", "object", "recipient", "source", "tenant" }, + values: new object[,] + { + { "AddRelationshipEvent", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1 }, + { "CreateNewContact", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1 }, + { "ExportCompleted", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1 }, + { "ResponsibleForOpportunity", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1 }, + { "ResponsibleForTask", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1 }, + { "SetAccess", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1 }, + { "new bookmark created", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "28b10049-dd20-4f54-b986-873bc14ccfc7", -1 }, + { "BirthdayReminder", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "37620ae5-c40b-45ce-855a-39dd7d76a1fa", -1 }, + { "calendar_sharing", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1 }, + { "event_alert", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1 }, + { "new feed", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6504977c-75af-4691-9099-084d3ddeea04", -1 }, + { "new post", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6a598c74-91ae-437d-a5f4-ad339bd11bb2", -1 }, + { "sharedocument", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1 }, + { "sharefolder", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1 }, + { "new wiki page", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "742cf945-cbbc-4a57-82d6-1600a12cf8ca", -1 }, + { "new topic in forum", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "853b6eb9-73ee-438d-9b09-8ffeedf36234", -1 }, + { "new photo uploaded", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "9d51954f-db9b-4aed-94e3-ed70b914e101", -1 }, + { "admin_notify", "", "cd84e66b-b803-40fc-99f9-b2969a54a1de", "asc.web.studio", -1 }, + { "periodic_notify", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1 }, + { "send_whats_new", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1 } + }); + + migrationBuilder.InsertData( + table: "core_subscriptionmethod", + columns: new[] { "action", "recipient", "source", "tenant", "sender" }, + values: new object[,] + { + { "AddRelationshipEvent", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, + { "CreateNewContact", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, + { "ExportCompleted", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, + { "ResponsibleForOpportunity", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, + { "ResponsibleForTask", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, + { "SetAccess", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, + { "new bookmark created", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "28b10049-dd20-4f54-b986-873bc14ccfc7", -1, "email.sender|messanger.sender" }, + { "BirthdayReminder", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "37620ae5-c40b-45ce-855a-39dd7d76a1fa", -1, "email.sender|messanger.sender" }, + { "calendar_sharing", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, "email.sender|messanger.sender" }, + { "event_alert", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, "email.sender|messanger.sender" }, + { "invitetoproject", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "milestonedeadline", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "newcommentformessage", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "newcommentformilestone", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "newcommentfortask", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "projectcreaterequest", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "projecteditrequest", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "removefromproject", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "responsibleforproject", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "responsiblefortask", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "taskclosed", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "new feed", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6504977c-75af-4691-9099-084d3ddeea04", -1, "email.sender|messanger.sender" }, + { "new post", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6a598c74-91ae-437d-a5f4-ad339bd11bb2", -1, "email.sender|messanger.sender" }, + { "sharedocument", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, "email.sender|messanger.sender" }, + { "sharefolder", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, "email.sender|messanger.sender" }, + { "updatedocument", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, "email.sender|messanger.sender" }, + { "new wiki page", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "742cf945-cbbc-4a57-82d6-1600a12cf8ca", -1, "email.sender|messanger.sender" }, + { "new topic in forum", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "853b6eb9-73ee-438d-9b09-8ffeedf36234", -1, "email.sender|messanger.sender" }, + { "new photo uploaded", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "9d51954f-db9b-4aed-94e3-ed70b914e101", -1, "email.sender|messanger.sender" }, + { "admin_notify", "cd84e66b-b803-40fc-99f9-b2969a54a1de", "asc.web.studio", -1, "email.sender" }, + { "periodic_notify", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, "email.sender" }, + { "send_whats_new", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, "email.sender" } + }); + + migrationBuilder.InsertData( + table: "core_user", + columns: new[] { "id", "bithdate", "contacts", "create_on", "culture", "email", "firstname", "last_modified", "lastname", "location", "phone", "notes", "sex", "sid", "sso_name_id", "sso_session_id", "status", "tenant", "terminateddate", "title", "username", "workfromdate" }, + values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, null, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "", "Administrator", new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), "", null, null, null, null, null, null, null, 1, 1, null, null, "administrator", new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) }); + + migrationBuilder.InsertData( + table: "core_usergroup", + columns: new[] { "ref_type", "tenant", "groupid", "userid", "last_modified" }, + values: new object[] { 0, 1, "cd84e66b-b803-40fc-99f9-b2969a54a1de", "66faa6e4-f133-11ea-b126-00ffeec8b4ef", new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified) }); + + migrationBuilder.InsertData( + table: "core_usersecurity", + columns: new[] { "userid", "LastModified", "pwdhash", "tenant" }, + values: new object[] { "66faa6e4-f133-11ea-b126-00ffeec8b4ef", new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=", 1 }); + + migrationBuilder.CreateIndex( + name: "last_modified", + table: "core_group", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "parentid", + table: "core_group", + columns: new[] { "tenant", "parentid" }); + + migrationBuilder.CreateIndex( + name: "email", + table: "core_user", + column: "email"); + + migrationBuilder.CreateIndex( + name: "last_modified", + table: "core_user", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "username", + table: "core_user", + columns: new[] { "tenant", "username" }); + + migrationBuilder.CreateIndex( + name: "last_modified", + table: "core_usergroup", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "tenant", + table: "core_userphoto", + column: "tenant"); + + migrationBuilder.CreateIndex( + name: "pwdhash", + table: "core_usersecurity", + column: "pwdhash"); + + migrationBuilder.CreateIndex( + name: "tenant", + table: "core_usersecurity", + column: "tenant"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "core_acl"); + + migrationBuilder.DropTable( + name: "core_group"); + + migrationBuilder.DropTable( + name: "core_subscription"); + + migrationBuilder.DropTable( + name: "core_subscriptionmethod"); + + migrationBuilder.DropTable( + name: "core_user"); + + migrationBuilder.DropTable( + name: "core_userdav"); + + migrationBuilder.DropTable( + name: "core_usergroup"); + + migrationBuilder.DropTable( + name: "core_userphoto"); + + migrationBuilder.DropTable( + name: "core_usersecurity"); + } + } +} diff --git a/common/ASC.Core.Common/Migrations/MySql/UserDbContextMySql/MySqlUserDbContextModelSnapshot.cs b/migrations/mysql/UserDbContext/UserDbContextModelSnapshot.cs similarity index 91% rename from common/ASC.Core.Common/Migrations/MySql/UserDbContextMySql/MySqlUserDbContextModelSnapshot.cs rename to migrations/mysql/UserDbContext/UserDbContextModelSnapshot.cs index a7638f1bac..1cb463e731 100644 --- a/common/ASC.Core.Common/Migrations/MySql/UserDbContextMySql/MySqlUserDbContextModelSnapshot.cs +++ b/migrations/mysql/UserDbContext/UserDbContextModelSnapshot.cs @@ -1,16 +1,23 @@ // +using System; +using ASC.Core.Common.EF; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql +#nullable disable + +namespace ASC.Migrations.MySql.Migrations { - [DbContext(typeof(MySqlUserDbContext))] - partial class MySqlUserDbContextModelSnapshot : ModelSnapshot + [DbContext(typeof(UserDbContext))] + partial class UserDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.10"); + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("ASC.Core.Common.EF.Acl", b => { @@ -45,7 +52,9 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql b.HasKey("Tenant", "Subject", "Action", "Object") .HasName("PRIMARY"); - b.ToTable("core_acl"); + b.ToTable("core_acl", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new @@ -494,7 +503,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Action = "77777777-32ae-425f-99b5-83176061d1ae", Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", - AceType = AceType.Deny + AceType = 1 }, new { @@ -534,7 +543,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Action = "77777777-32ae-425f-99b5-83176061d1ae", Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", - AceType = AceType.Deny + AceType = 1 }, new { @@ -542,7 +551,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Action = "77777777-32ae-425f-99b5-83176061d1ae", Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", - AceType = AceType.Deny + AceType = 1 }, new { @@ -550,7 +559,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Action = "77777777-32ae-425f-99b5-83176061d1ae", Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", - AceType = AceType.Deny + AceType = 1 }, new { @@ -558,7 +567,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Action = "77777777-32ae-425f-99b5-83176061d1ae", Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", - AceType = AceType.Deny + AceType = 1 }, new { @@ -566,7 +575,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Action = "77777777-32ae-425f-99b5-83176061d1ae", Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", - AceType = AceType.Deny + AceType = 1 }, new { @@ -602,10 +611,8 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("LastModified") - .ValueGeneratedOnAdd() .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnName("last_modified"); b.Property("Name") .IsRequired() @@ -621,8 +628,10 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("Removed") + .ValueGeneratedOnAdd() .HasColumnType("tinyint(1)") - .HasColumnName("removed"); + .HasColumnName("removed") + .HasDefaultValueSql("'0'"); b.Property("Sid") .HasColumnType("varchar(512)") @@ -642,7 +651,9 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql b.HasIndex("Tenant", "ParentId") .HasDatabaseName("parentid"); - b.ToTable("core_group"); + b.ToTable("core_group", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); }); modelBuilder.Entity("ASC.Core.Common.EF.DbSubscriptionMethod", b => @@ -679,7 +690,9 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql b.HasKey("Tenant", "Source", "Action", "Recipient") .HasName("PRIMARY"); - b.ToTable("core_subscriptionmethod"); + b.ToTable("core_subscriptionmethod", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new @@ -920,7 +933,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", Action = "CreateNewContact", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender" + Sender = "email.sender|messanger.sender" }, new { @@ -971,13 +984,17 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("Unsubscribed") + .ValueGeneratedOnAdd() .HasColumnType("tinyint(1)") - .HasColumnName("unsubscribed"); + .HasColumnName("unsubscribed") + .HasDefaultValueSql("'0'"); b.HasKey("Tenant", "Source", "Action", "Recipient", "Object") .HasName("PRIMARY"); - b.ToTable("core_subscription"); + b.ToTable("core_subscription", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new @@ -1019,7 +1036,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql new { Tenant = -1, - Source = "9d51954f-db9b-4aed-94e3-ed70b914e10", + Source = "9d51954f-db9b-4aed-94e3-ed70b914e101", Action = "new photo uploaded", Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", Object = "", @@ -1047,7 +1064,7 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql { Tenant = -1, Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", - Action = "BirthdayReminderd", + Action = "BirthdayReminder", Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", Object = "", Unsubscribed = false @@ -1172,10 +1189,12 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql .HasAnnotation("MySql:CharSet", "utf8"); b.Property("ActivationStatus") + .ValueGeneratedOnAdd() .HasColumnType("int") - .HasColumnName("activation_status"); + .HasColumnName("activation_status") + .HasDefaultValueSql("'0'"); - b.Property("Birthdate") + b.Property("BirthDate") .HasColumnType("datetime") .HasColumnName("bithdate"); @@ -1185,13 +1204,11 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql .UseCollation("utf8_general_ci") .HasAnnotation("MySql:CharSet", "utf8"); - b.Property("CreateOn") - .ValueGeneratedOnAdd() + b.Property("CreateDate") .HasColumnType("timestamp") - .HasColumnName("create_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnName("create_on"); - b.Property("Culture") + b.Property("CultureName") .HasColumnType("varchar(20)") .HasColumnName("culture") .UseCollation("utf8_general_ci") @@ -1227,25 +1244,29 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql .UseCollation("utf8_general_ci") .HasAnnotation("MySql:CharSet", "utf8"); + b.Property("MobilePhone") + .HasColumnType("varchar(255)") + .HasColumnName("phone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("MobilePhoneActivation") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("phone_activation") + .HasDefaultValueSql("'0'"); + b.Property("Notes") .HasColumnType("varchar(512)") .HasColumnName("notes") .UseCollation("utf8_general_ci") .HasAnnotation("MySql:CharSet", "utf8"); - b.Property("Phone") - .HasColumnType("varchar(255)") - .HasColumnName("phone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PhoneActivation") - .HasColumnType("int") - .HasColumnName("phone_activation"); - b.Property("Removed") + .ValueGeneratedOnAdd() .HasColumnType("tinyint(1)") - .HasColumnName("removed"); + .HasColumnName("removed") + .HasDefaultValueSql("'0'"); b.Property("Sex") .HasColumnType("tinyint(1)") @@ -1300,7 +1321,8 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql .HasColumnType("datetime") .HasColumnName("workfromdate"); - b.HasKey("Id"); + b.HasKey("Id") + .HasName("PRIMARY"); b.HasIndex("Email") .HasDatabaseName("email"); @@ -1311,19 +1333,21 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql b.HasIndex("Tenant", "UserName") .HasDatabaseName("username"); - b.ToTable("core_user"); + b.ToTable("core_user", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new { Id = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", ActivationStatus = 0, - CreateOn = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + CreateDate = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), Email = "", FirstName = "Administrator", LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), LastName = "", - PhoneActivation = 0, + MobilePhoneActivation = 0, Removed = false, Status = 1, Tenant = 1, @@ -1332,19 +1356,37 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql }); }); + modelBuilder.Entity("ASC.Core.Common.EF.UserDav", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .HasColumnType("varchar(38)") + .HasColumnName("user_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId", "UserId") + .HasName("PRIMARY"); + + b.ToTable("core_userdav", (string)null); + }); + modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => { b.Property("Tenant") .HasColumnType("int") .HasColumnName("tenant"); - b.Property("UserId") + b.Property("Userid") .HasColumnType("varchar(38)") .HasColumnName("userid") .UseCollation("utf8_general_ci") .HasAnnotation("MySql:CharSet", "utf8"); - b.Property("GroupId") + b.Property("UserGroupId") .HasColumnType("varchar(38)") .HasColumnName("groupid") .UseCollation("utf8_general_ci") @@ -1355,33 +1397,33 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql .HasColumnName("ref_type"); b.Property("LastModified") - .ValueGeneratedOnAdd() .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .HasColumnName("last_modified"); b.Property("Removed") + .ValueGeneratedOnAdd() .HasColumnType("tinyint(1)") - .HasColumnName("removed"); + .HasColumnName("removed") + .HasDefaultValueSql("'0'"); - b.HasKey("Tenant", "UserId", "GroupId", "RefType") + b.HasKey("Tenant", "Userid", "UserGroupId", "RefType") .HasName("PRIMARY"); b.HasIndex("LastModified") .HasDatabaseName("last_modified"); - b.HasIndex("UserId"); + b.ToTable("core_usergroup", (string)null); - b.ToTable("core_usergroup"); + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new { Tenant = 1, - UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - GroupId = "cd84e66b-b803-40fc-99f9-b2969a54a1de", + Userid = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + UserGroupId = "cd84e66b-b803-40fc-99f9-b2969a54a1de", RefType = 0, - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), Removed = false }); }); @@ -1410,21 +1452,23 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql b.HasIndex("Tenant") .HasDatabaseName("tenant"); - b.ToTable("core_userphoto"); + b.ToTable("core_userphoto", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); }); modelBuilder.Entity("ASC.Core.Common.EF.UserSecurity", b => { b.Property("UserId") + .ValueGeneratedOnAdd() .HasColumnType("varchar(38)") .HasColumnName("userid") .UseCollation("utf8_general_ci") .HasAnnotation("MySql:CharSet", "utf8"); b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); + .IsRequired() + .HasColumnType("timestamp"); b.Property("PwdHash") .HasColumnType("varchar(512)") @@ -1445,42 +1489,19 @@ namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql b.HasIndex("Tenant") .HasDatabaseName("tenant"); - b.ToTable("core_usersecurity"); + b.ToTable("core_usersecurity", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); b.HasData( new { UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - LastModified = new DateTime(2021, 10, 26, 12, 3, 16, 438, DateTimeKind.Utc).AddTicks(1451), + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), PwdHash = "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=", Tenant = 1 }); }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => - { - b.HasOne("ASC.Core.Common.EF.User", null) - .WithMany("Groups") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserSecurity", b => - { - b.HasOne("ASC.Core.Common.EF.User", null) - .WithOne("UserSecurity") - .HasForeignKey("ASC.Core.Common.EF.UserSecurity", "UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.User", b => - { - b.Navigation("Groups"); - - b.Navigation("UserSecurity"); - }); #pragma warning restore 612, 618 } } diff --git a/common/ASC.Webhooks.Core/Migrations/20210902223117_WebhooksDbContextMySql.Designer.cs b/migrations/mysql/WebhooksDbContext/20220724114542_WebhooksDbContextMigrate.Designer.cs similarity index 80% rename from common/ASC.Webhooks.Core/Migrations/20210902223117_WebhooksDbContextMySql.Designer.cs rename to migrations/mysql/WebhooksDbContext/20220724114542_WebhooksDbContextMigrate.Designer.cs index 739227713f..5b97e6a5d2 100644 --- a/common/ASC.Webhooks.Core/Migrations/20210902223117_WebhooksDbContextMySql.Designer.cs +++ b/migrations/mysql/WebhooksDbContext/20220724114542_WebhooksDbContextMigrate.Designer.cs @@ -1,113 +1,119 @@ -// -using System; -using ASC.Webhooks.Core.Dao; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -namespace ASC.Webhooks.Core.Migrations -{ - [DbContext(typeof(MySqlWebhooksDbContext))] - [Migration("20210902223117_WebhooksDbContextMySql")] - partial class WebhooksDbContextMySql - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.5"); - - modelBuilder.Entity("ASC.Webhooks.Core.Dao.Models.WebhooksConfig", b => - { - b.Property("ConfigId") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("config_id"); - - b.Property("SecretKey") - .ValueGeneratedOnAdd() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("secret_key") - .HasDefaultValueSql("''"); - - b.Property("TenantId") - .HasColumnType("int unsigned") - .HasColumnName("tenant_id"); - - b.Property("Uri") - .ValueGeneratedOnAdd() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("uri") - .HasDefaultValueSql("''"); - - b.HasKey("ConfigId") - .HasName("PRIMARY"); - - b.ToTable("webhooks_config"); - }); - - modelBuilder.Entity("ASC.Webhooks.Core.Dao.Models.WebhooksLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ConfigId") - .HasColumnType("int") - .HasColumnName("config_id"); - - b.Property("CreationTime") - .HasColumnType("datetime") - .HasColumnName("creation_time"); - - b.Property("Event") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("event"); - - b.Property("RequestHeaders") - .HasColumnType("json") - .HasColumnName("request_headers"); - - b.Property("RequestPayload") - .IsRequired() - .HasColumnType("json") - .HasColumnName("request_payload"); - - b.Property("ResponseHeaders") - .HasColumnType("json") - .HasColumnName("response_headers"); - - b.Property("ResponsePayload") - .HasColumnType("json") - .HasColumnName("response_payload"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("status"); - - b.Property("TenantId") - .HasColumnType("int unsigned") - .HasColumnName("tenant_id"); - - b.Property("Uid") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("uid"); - - b.HasKey("Id") - .HasName("PRIMARY"); - - b.ToTable("webhooks_logs"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Webhooks.Core.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(WebhooksDbContext))] + [Migration("20220724114542_WebhooksDbContextMigrate")] + partial class WebhooksDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Webhooks.Core.EF.Model.WebhooksConfig", b => + { + b.Property("ConfigId") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("config_id"); + + b.Property("SecretKey") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("secret_key") + .HasDefaultValueSql("''"); + + b.Property("TenantId") + .HasColumnType("int unsigned") + .HasColumnName("tenant_id"); + + b.Property("Uri") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("uri") + .HasDefaultValueSql("''"); + + b.HasKey("ConfigId") + .HasName("PRIMARY"); + + b.ToTable("webhooks_config", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Webhooks.Core.EF.Model.WebhooksLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ConfigId") + .HasColumnType("int") + .HasColumnName("config_id"); + + b.Property("CreationTime") + .HasColumnType("datetime") + .HasColumnName("creation_time"); + + b.Property("Event") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("event"); + + b.Property("RequestHeaders") + .HasColumnType("json") + .HasColumnName("request_headers"); + + b.Property("RequestPayload") + .IsRequired() + .HasColumnType("json") + .HasColumnName("request_payload"); + + b.Property("ResponseHeaders") + .HasColumnType("json") + .HasColumnName("response_headers"); + + b.Property("ResponsePayload") + .HasColumnType("json") + .HasColumnName("response_payload"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("status"); + + b.Property("TenantId") + .HasColumnType("int unsigned") + .HasColumnName("tenant_id"); + + b.Property("Uid") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("uid"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.ToTable("webhooks_logs", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/WebhooksDbContext/20220724114542_WebhooksDbContextMigrate.cs b/migrations/mysql/WebhooksDbContext/20220724114542_WebhooksDbContextMigrate.cs new file mode 100644 index 0000000000..2122a3924f --- /dev/null +++ b/migrations/mysql/WebhooksDbContext/20220724114542_WebhooksDbContextMigrate.cs @@ -0,0 +1,74 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class WebhooksDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "webhooks_config", + columns: table => new + { + config_id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + secret_key = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, defaultValueSql: "''") + .Annotation("MySql:CharSet", "utf8"), + tenant_id = table.Column(type: "int unsigned", nullable: false), + uri = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, defaultValueSql: "''") + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.config_id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "webhooks_logs", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + config_id = table.Column(type: "int", nullable: false), + creation_time = table.Column(type: "datetime", nullable: false), + @event = table.Column(name: "event", type: "varchar(100)", maxLength: 100, nullable: true) + .Annotation("MySql:CharSet", "utf8"), + request_headers = table.Column(type: "json", nullable: true) + .Annotation("MySql:CharSet", "utf8"), + request_payload = table.Column(type: "json", nullable: false) + .Annotation("MySql:CharSet", "utf8"), + response_headers = table.Column(type: "json", nullable: true) + .Annotation("MySql:CharSet", "utf8"), + response_payload = table.Column(type: "json", nullable: true) + .Annotation("MySql:CharSet", "utf8"), + status = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) + .Annotation("MySql:CharSet", "utf8"), + tenant_id = table.Column(type: "int unsigned", nullable: false), + uid = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) + .Annotation("MySql:CharSet", "utf8") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "webhooks_config"); + + migrationBuilder.DropTable( + name: "webhooks_logs"); + } + } +} diff --git a/common/ASC.Webhooks.Core/Migrations/WebhooksDbContextModelSnapshot.cs b/migrations/mysql/WebhooksDbContext/WebhooksDbContextModelSnapshot.cs similarity index 79% rename from common/ASC.Webhooks.Core/Migrations/WebhooksDbContextModelSnapshot.cs rename to migrations/mysql/WebhooksDbContext/WebhooksDbContextModelSnapshot.cs index e2b9bb46cf..53e7ba2bfd 100644 --- a/common/ASC.Webhooks.Core/Migrations/WebhooksDbContextModelSnapshot.cs +++ b/migrations/mysql/WebhooksDbContext/WebhooksDbContextModelSnapshot.cs @@ -1,106 +1,117 @@ -// - -namespace ASC.Webhooks.Core.Migrations -{ - [DbContext(typeof(MySqlWebhooksDbContext))] - partial class WebhooksDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.5"); - - modelBuilder.Entity("ASC.Webhooks.Core.Dao.Models.WebhooksConfig", b => - { - b.Property("ConfigId") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("config_id"); - - b.Property("SecretKey") - .ValueGeneratedOnAdd() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("secret_key") - .HasDefaultValueSql("''"); - - b.Property("TenantId") - .HasColumnType("int unsigned") - .HasColumnName("tenant_id"); - - b.Property("Uri") - .ValueGeneratedOnAdd() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("uri") - .HasDefaultValueSql("''"); - - b.HasKey("ConfigId") - .HasName("PRIMARY"); - - b.ToTable("webhooks_config"); - }); - - modelBuilder.Entity("ASC.Webhooks.Core.Dao.Models.WebhooksLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("ConfigId") - .HasColumnType("int") - .HasColumnName("config_id"); - - b.Property("CreationTime") - .HasColumnType("datetime") - .HasColumnName("creation_time"); - - b.Property("Event") - .HasMaxLength(100) - .HasColumnType("varchar(100)") - .HasColumnName("event"); - - b.Property("RequestHeaders") - .HasColumnType("json") - .HasColumnName("request_headers"); - - b.Property("RequestPayload") - .IsRequired() - .HasColumnType("json") - .HasColumnName("request_payload"); - - b.Property("ResponseHeaders") - .HasColumnType("json") - .HasColumnName("response_headers"); - - b.Property("ResponsePayload") - .HasColumnType("json") - .HasColumnName("response_payload"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("status"); - - b.Property("TenantId") - .HasColumnType("int unsigned") - .HasColumnName("tenant_id"); - - b.Property("Uid") - .HasMaxLength(50) - .HasColumnType("varchar(50)") - .HasColumnName("uid"); - - b.HasKey("Id") - .HasName("PRIMARY"); - - b.ToTable("webhooks_logs"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Webhooks.Core.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(WebhooksDbContext))] + partial class WebhooksDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Webhooks.Core.EF.Model.WebhooksConfig", b => + { + b.Property("ConfigId") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("config_id"); + + b.Property("SecretKey") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("secret_key") + .HasDefaultValueSql("''"); + + b.Property("TenantId") + .HasColumnType("int unsigned") + .HasColumnName("tenant_id"); + + b.Property("Uri") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("uri") + .HasDefaultValueSql("''"); + + b.HasKey("ConfigId") + .HasName("PRIMARY"); + + b.ToTable("webhooks_config", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Webhooks.Core.EF.Model.WebhooksLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("ConfigId") + .HasColumnType("int") + .HasColumnName("config_id"); + + b.Property("CreationTime") + .HasColumnType("datetime") + .HasColumnName("creation_time"); + + b.Property("Event") + .HasMaxLength(100) + .HasColumnType("varchar(100)") + .HasColumnName("event"); + + b.Property("RequestHeaders") + .HasColumnType("json") + .HasColumnName("request_headers"); + + b.Property("RequestPayload") + .IsRequired() + .HasColumnType("json") + .HasColumnName("request_payload"); + + b.Property("ResponseHeaders") + .HasColumnType("json") + .HasColumnName("response_headers"); + + b.Property("ResponsePayload") + .HasColumnType("json") + .HasColumnName("response_payload"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("status"); + + b.Property("TenantId") + .HasColumnType("int unsigned") + .HasColumnName("tenant_id"); + + b.Property("Uid") + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasColumnName("uid"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.ToTable("webhooks_logs", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/common/ASC.Core.Common/Migrations/MySql/MessagesContextMySql/20211012145334_MessagesContextMySql.Designer.cs b/migrations/mysql/WebstudioDbContext/20220724114555_WebstudioDbContextMigrate.Designer.cs similarity index 56% rename from common/ASC.Core.Common/Migrations/MySql/MessagesContextMySql/20211012145334_MessagesContextMySql.Designer.cs rename to migrations/mysql/WebstudioDbContext/20220724114555_WebstudioDbContextMigrate.Designer.cs index 1c479698c1..f2345ca139 100644 --- a/common/ASC.Core.Common/Migrations/MySql/MessagesContextMySql/20211012145334_MessagesContextMySql.Designer.cs +++ b/migrations/mysql/WebstudioDbContext/20220724114555_WebstudioDbContextMigrate.Designer.cs @@ -1,354 +1,290 @@ -// - -namespace ASC.MessagingSystem.Migrations.MySql.MessagesContextMySql -{ - [DbContext(typeof(MySqlMessagesContext))] - [Migration("20211012145334_MessagesContextMySql")] - partial class MessagesContextMySql - { - 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.AuditEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("Browser") - .HasColumnType("varchar(200)") - .HasColumnName("browser") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Date") - .HasColumnType("datetime") - .HasColumnName("date"); - - b.Property("Description") - .HasColumnType("varchar(20000)") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Initiator") - .HasColumnType("varchar(200)") - .HasColumnName("initiator") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Ip") - .HasColumnType("varchar(50)") - .HasColumnName("ip") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Page") - .HasColumnType("varchar(300)") - .HasColumnName("page") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Platform") - .HasColumnType("varchar(200)") - .HasColumnName("platform") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Date") - .HasDatabaseName("date"); - - b.ToTable("audit_events"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Alias") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("alias") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Calls") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("calls") - .HasDefaultValueSql("true"); - - b.Property("CreationDateTime") - .HasColumnType("datetime") - .HasColumnName("creationdatetime"); - - b.Property("Industry") - .HasColumnType("int") - .HasColumnName("industry"); - - b.Property("Language") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("char(10)") - .HasColumnName("language") - .HasDefaultValueSql("'en-US'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("MappedDomain") - .HasColumnType("varchar(100)") - .HasColumnName("mappeddomain") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("owner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PaymentId") - .HasColumnType("varchar(38)") - .HasColumnName("payment_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Spam") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("spam") - .HasDefaultValueSql("true"); - - b.Property("Status") - .HasColumnType("int") - .HasColumnName("status"); - - b.Property("StatusChanged") - .HasColumnType("datetime") - .HasColumnName("statuschanged"); - - b.Property("TimeZone") - .HasColumnType("varchar(50)") - .HasColumnName("timezone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomains") - .HasColumnType("varchar(1024)") - .HasColumnName("trusteddomains") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomainsEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("trusteddomainsenabled") - .HasDefaultValueSql("'1'"); - - b.Property("Version") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("version") - .HasDefaultValueSql("'2'"); - - b.Property("Version_Changed") - .HasColumnType("datetime") - .HasColumnName("version_changed"); - - b.HasKey("Id"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("MappedDomain") - .HasDatabaseName("mappeddomain"); - - b.HasIndex("Version") - .HasDatabaseName("version"); - - b.ToTable("tenants_tenants"); - - b.HasData( - new - { - Id = 1, - Alias = "localhost", - Calls = false, - CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - Name = "Web Office", - OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - Spam = false, - Status = 0, - TrustedDomainsEnabled = 0, - Version = 0 - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("TenantID"); - - b.Property("Id") - .HasColumnType("varchar(64)") - .HasColumnName("ID") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("varchar(64)") - .HasColumnName("UserID") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Data") - .IsRequired() - .HasColumnType("mediumtext") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "Id", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("Id") - .HasDatabaseName("ID"); - - b.ToTable("webstudio_settings"); - - b.HasData( - new - { - TenantId = 1, - Id = "9a925891-1f92-4ed7-b277-d6f649739f06", - UserId = "00000000-0000-0000-0000-000000000000", - Data = "{'Completed':false}" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.LoginEvents", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("Browser") - .HasColumnType("varchar(200)") - .HasColumnName("browser") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Date") - .HasColumnType("datetime") - .HasColumnName("date"); - - b.Property("Description") - .HasColumnType("varchar(500)") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Ip") - .HasColumnType("varchar(50)") - .HasColumnName("ip") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Login") - .HasColumnType("varchar(200)") - .HasColumnName("login") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Page") - .HasColumnType("varchar(300)") - .HasColumnName("page") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Platform") - .HasColumnType("varchar(200)") - .HasColumnName("platform") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Active") - .HasColumnType("int") - .HasColumnName("active"); - - b.Property("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 - } - } -} +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(WebstudioDbContext))] + [Migration("20220724114555_WebstudioDbContextMigrate")] + partial class WebstudioDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Alias") + .IsRequired() + .HasColumnType("varchar(100)") + .HasColumnName("alias") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("calls") + .HasDefaultValueSql("'1'"); + + b.Property("CreationDateTime") + .HasColumnType("datetime") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("industry") + .HasDefaultValueSql("'0'"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("char(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.Property("MappedDomain") + .HasColumnType("varchar(100)") + .HasColumnName("mappeddomain") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("OwnerId") + .HasColumnType("varchar(38)") + .HasColumnName("owner_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("PaymentId") + .HasColumnType("varchar(38)") + .HasColumnName("payment_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("spam") + .HasDefaultValueSql("'1'"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("status") + .HasDefaultValueSql("'0'"); + + b.Property("StatusChanged") + .HasColumnType("datetime") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .HasColumnType("varchar(50)") + .HasColumnName("timezone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("'1'"); + + b.Property("TrustedDomainsRaw") + .HasColumnType("varchar(1024)") + .HasColumnName("trusteddomains") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("version") + .HasDefaultValueSql("'2'"); + + b.Property("Version_Changed") + .HasColumnType("datetime") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioIndex", b => + { + b.Property("IndexName") + .HasColumnType("varchar(50)") + .HasColumnName("index_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.HasKey("IndexName") + .HasName("PRIMARY"); + + b.ToTable("webstudio_index", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("TenantID"); + + b.Property("Id") + .HasColumnType("varchar(64)") + .HasColumnName("ID") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserId") + .HasColumnType("varchar(64)") + .HasColumnName("UserID") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Data") + .IsRequired() + .HasColumnType("mediumtext") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId", "Id", "UserId") + .HasName("PRIMARY"); + + b.HasIndex("Id") + .HasDatabaseName("ID"); + + b.ToTable("webstudio_settings", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + TenantId = 1, + Id = "9a925891-1f92-4ed7-b277-d6f649739f06", + UserId = "00000000-0000-0000-0000-000000000000", + Data = "{\"Completed\":false}" + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioUserVisit", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenantid"); + + b.Property("VisitDate") + .HasColumnType("datetime") + .HasColumnName("visitdate"); + + b.Property("ProductId") + .HasColumnType("varchar(38)") + .HasColumnName("productid") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserId") + .HasColumnType("varchar(38)") + .HasColumnName("userid") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("FirstVisitTime") + .ValueGeneratedOnAdd() + .HasColumnType("datetime") + .HasColumnName("firstvisittime") + .HasDefaultValueSql("NULL"); + + b.Property("LastVisitTime") + .ValueGeneratedOnAdd() + .HasColumnType("datetime") + .HasColumnName("lastvisittime") + .HasDefaultValueSql("NULL"); + + b.Property("VisitCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("visitcount") + .HasDefaultValueSql("'0'"); + + b.HasKey("TenantId", "VisitDate", "ProductId", "UserId") + .HasName("PRIMARY"); + + b.HasIndex("VisitDate") + .HasDatabaseName("visitdate"); + + b.ToTable("webstudio_uservisit", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/mysql/WebstudioDbContext/20220724114555_WebstudioDbContextMigrate.cs b/migrations/mysql/WebstudioDbContext/20220724114555_WebstudioDbContextMigrate.cs new file mode 100644 index 0000000000..35049a9dd9 --- /dev/null +++ b/migrations/mysql/WebstudioDbContext/20220724114555_WebstudioDbContextMigrate.cs @@ -0,0 +1,164 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + public partial class WebstudioDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterDatabase() + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "tenants_tenants", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + alias = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + mappeddomain = table.Column(type: "varchar(100)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + version = table.Column(type: "int", nullable: false, defaultValueSql: "'2'"), + version_changed = table.Column(type: "datetime", nullable: true), + language = table.Column(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + timezone = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + trusteddomains = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + trusteddomainsenabled = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), + status = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + statuschanged = table.Column(type: "datetime", nullable: true), + creationdatetime = table.Column(type: "datetime", nullable: false), + owner_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + payment_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + industry = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + last_modified = table.Column(type: "timestamp", nullable: false), + spam = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"), + calls = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tenants", x => x.id); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "webstudio_index", + columns: table => new + { + index_name = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + last_modified = table.Column(type: "timestamp", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.index_name); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.CreateTable( + name: "webstudio_settings", + columns: table => new + { + TenantID = table.Column(type: "int", nullable: false), + ID = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + UserID = table.Column(type: "varchar(64)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + Data = table.Column(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", "utf8"); + + migrationBuilder.CreateTable( + name: "webstudio_uservisit", + columns: table => new + { + tenantid = table.Column(type: "int", nullable: false), + visitdate = table.Column(type: "datetime", nullable: false), + productid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + userid = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") + .Annotation("MySql:CharSet", "utf8"), + visitcount = table.Column(type: "int", nullable: false, defaultValueSql: "'0'"), + firstvisittime = table.Column(type: "datetime", nullable: true, defaultValueSql: "NULL"), + lastvisittime = table.Column(type: "datetime", nullable: true, defaultValueSql: "NULL") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.visitdate, x.productid, x.userid }); + }) + .Annotation("MySql:CharSet", "utf8"); + + migrationBuilder.InsertData( + table: "tenants_tenants", + columns: new[] { "id", "alias", "creationdatetime", "last_modified", "mappeddomain", "name", "owner_id", "payment_id", "statuschanged", "timezone", "trusteddomains", "version_changed" }, + values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "Web Office", "66faa6e4-f133-11ea-b126-00ffeec8b4ef", null, 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: "alias", + table: "tenants_tenants", + column: "alias", + unique: true); + + 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"); + + migrationBuilder.CreateIndex( + name: "visitdate", + table: "webstudio_uservisit", + column: "visitdate"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "tenants_tenants"); + + migrationBuilder.DropTable( + name: "webstudio_index"); + + migrationBuilder.DropTable( + name: "webstudio_settings"); + + migrationBuilder.DropTable( + name: "webstudio_uservisit"); + } + } +} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/MessagesContextPostgreSql/20211012145335_MessagesContextPostgreSql.Designer.cs b/migrations/mysql/WebstudioDbContext/WebstudioDbContextModelSnapshot.cs similarity index 55% rename from common/ASC.Core.Common/Migrations/PostgreSql/MessagesContextPostgreSql/20211012145335_MessagesContextPostgreSql.Designer.cs rename to migrations/mysql/WebstudioDbContext/WebstudioDbContextModelSnapshot.cs index c26cbcab82..a77527f8d4 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/MessagesContextPostgreSql/20211012145335_MessagesContextPostgreSql.Designer.cs +++ b/migrations/mysql/WebstudioDbContext/WebstudioDbContextModelSnapshot.cs @@ -1,354 +1,288 @@ -// - -namespace ASC.MessagingSystem.Migrations.PostgreSql.MessagesContextPostgreSql -{ - [DbContext(typeof(PostgreSqlMessagesContext))] - [Migration("20211012145335_MessagesContextPostgreSql")] - partial class MessagesContextPostgreSql - { - 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.AuditEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("Browser") - .HasColumnType("varchar(200)") - .HasColumnName("browser") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Date") - .HasColumnType("datetime") - .HasColumnName("date"); - - b.Property("Description") - .HasColumnType("varchar(20000)") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Initiator") - .HasColumnType("varchar(200)") - .HasColumnName("initiator") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Ip") - .HasColumnType("varchar(50)") - .HasColumnName("ip") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Page") - .HasColumnType("varchar(300)") - .HasColumnName("page") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Platform") - .HasColumnType("varchar(200)") - .HasColumnName("platform") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Target") - .HasColumnType("text") - .HasColumnName("target") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Date") - .HasDatabaseName("date"); - - b.ToTable("audit_events"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Alias") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("alias") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Calls") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("calls") - .HasDefaultValueSql("true"); - - b.Property("CreationDateTime") - .HasColumnType("datetime") - .HasColumnName("creationdatetime"); - - b.Property("Industry") - .HasColumnType("int") - .HasColumnName("industry"); - - b.Property("Language") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("char(10)") - .HasColumnName("language") - .HasDefaultValueSql("'en-US'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("MappedDomain") - .HasColumnType("varchar(100)") - .HasColumnName("mappeddomain") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("owner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PaymentId") - .HasColumnType("varchar(38)") - .HasColumnName("payment_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Spam") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("spam") - .HasDefaultValueSql("true"); - - b.Property("Status") - .HasColumnType("int") - .HasColumnName("status"); - - b.Property("StatusChanged") - .HasColumnType("datetime") - .HasColumnName("statuschanged"); - - b.Property("TimeZone") - .HasColumnType("varchar(50)") - .HasColumnName("timezone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomains") - .HasColumnType("varchar(1024)") - .HasColumnName("trusteddomains") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomainsEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("trusteddomainsenabled") - .HasDefaultValueSql("'1'"); - - b.Property("Version") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("version") - .HasDefaultValueSql("'2'"); - - b.Property("Version_Changed") - .HasColumnType("datetime") - .HasColumnName("version_changed"); - - b.HasKey("Id"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("MappedDomain") - .HasDatabaseName("mappeddomain"); - - b.HasIndex("Version") - .HasDatabaseName("version"); - - b.ToTable("tenants_tenants"); - - b.HasData( - new - { - Id = 1, - Alias = "localhost", - Calls = false, - CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - Name = "Web Office", - OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - Spam = false, - Status = 0, - TrustedDomainsEnabled = 0, - Version = 0 - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("TenantID"); - - b.Property("Id") - .HasColumnType("varchar(64)") - .HasColumnName("ID") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .HasColumnType("varchar(64)") - .HasColumnName("UserID") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Data") - .IsRequired() - .HasColumnType("mediumtext") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "Id", "UserId") - .HasName("PRIMARY"); - - b.HasIndex("Id") - .HasDatabaseName("ID"); - - b.ToTable("webstudio_settings"); - - b.HasData( - new - { - TenantId = 1, - Id = "9a925891-1f92-4ed7-b277-d6f649739f06", - UserId = "00000000-0000-0000-0000-000000000000", - Data = "{'Completed':false}" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.LoginEvents", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Action") - .HasColumnType("int") - .HasColumnName("action"); - - b.Property("Browser") - .HasColumnType("varchar(200)") - .HasColumnName("browser") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Date") - .HasColumnType("datetime") - .HasColumnName("date"); - - b.Property("Description") - .HasColumnType("varchar(500)") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Ip") - .HasColumnType("varchar(50)") - .HasColumnName("ip") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Login") - .HasColumnType("varchar(200)") - .HasColumnName("login") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Page") - .HasColumnType("varchar(300)") - .HasColumnName("page") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Platform") - .HasColumnType("varchar(200)") - .HasColumnName("platform") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Active") - .HasColumnType("int") - .HasColumnName("active"); - - b.Property("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 - } - } -} +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace ASC.Migrations.MySql.Migrations +{ + [DbContext(typeof(WebstudioDbContext))] + partial class WebstudioDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id"); + + b.Property("Alias") + .IsRequired() + .HasColumnType("varchar(100)") + .HasColumnName("alias") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("calls") + .HasDefaultValueSql("'1'"); + + b.Property("CreationDateTime") + .HasColumnType("datetime") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("industry") + .HasDefaultValueSql("'0'"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasColumnType("char(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.Property("MappedDomain") + .HasColumnType("varchar(100)") + .HasColumnName("mappeddomain") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("OwnerId") + .HasColumnType("varchar(38)") + .HasColumnName("owner_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("PaymentId") + .HasColumnType("varchar(38)") + .HasColumnName("payment_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasColumnName("spam") + .HasDefaultValueSql("'1'"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("status") + .HasDefaultValueSql("'0'"); + + b.Property("StatusChanged") + .HasColumnType("datetime") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .HasColumnType("varchar(50)") + .HasColumnName("timezone") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("'1'"); + + b.Property("TrustedDomainsRaw") + .HasColumnType("varchar(1024)") + .HasColumnName("trusteddomains") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("version") + .HasDefaultValueSql("'2'"); + + b.Property("Version_Changed") + .HasColumnType("datetime") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioIndex", b => + { + b.Property("IndexName") + .HasColumnType("varchar(50)") + .HasColumnName("index_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastModified") + .HasColumnType("timestamp") + .HasColumnName("last_modified"); + + b.HasKey("IndexName") + .HasName("PRIMARY"); + + b.ToTable("webstudio_index", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("TenantID"); + + b.Property("Id") + .HasColumnType("varchar(64)") + .HasColumnName("ID") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserId") + .HasColumnType("varchar(64)") + .HasColumnName("UserID") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Data") + .IsRequired() + .HasColumnType("mediumtext") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("TenantId", "Id", "UserId") + .HasName("PRIMARY"); + + b.HasIndex("Id") + .HasDatabaseName("ID"); + + b.ToTable("webstudio_settings", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + + b.HasData( + new + { + TenantId = 1, + Id = "9a925891-1f92-4ed7-b277-d6f649739f06", + UserId = "00000000-0000-0000-0000-000000000000", + Data = "{\"Completed\":false}" + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioUserVisit", b => + { + b.Property("TenantId") + .HasColumnType("int") + .HasColumnName("tenantid"); + + b.Property("VisitDate") + .HasColumnType("datetime") + .HasColumnName("visitdate"); + + b.Property("ProductId") + .HasColumnType("varchar(38)") + .HasColumnName("productid") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("UserId") + .HasColumnType("varchar(38)") + .HasColumnName("userid") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("FirstVisitTime") + .ValueGeneratedOnAdd() + .HasColumnType("datetime") + .HasColumnName("firstvisittime") + .HasDefaultValueSql("NULL"); + + b.Property("LastVisitTime") + .ValueGeneratedOnAdd() + .HasColumnType("datetime") + .HasColumnName("lastvisittime") + .HasDefaultValueSql("NULL"); + + b.Property("VisitCount") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("visitcount") + .HasDefaultValueSql("'0'"); + + b.HasKey("TenantId", "VisitDate", "ProductId", "UserId") + .HasName("PRIMARY"); + + b.HasIndex("VisitDate") + .HasDatabaseName("visitdate"); + + b.ToTable("webstudio_uservisit", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/ASC.Migrations.PostgreSql.csproj b/migrations/postgre/ASC.Migrations.PostgreSql.csproj new file mode 100644 index 0000000000..60fa70809f --- /dev/null +++ b/migrations/postgre/ASC.Migrations.PostgreSql.csproj @@ -0,0 +1,13 @@ + + + + net6.0 + enable + enable + + + + + + + diff --git a/migrations/postgre/AccountLinkContext/20220724114548_AccountLinkContextMigrate.Designer.cs b/migrations/postgre/AccountLinkContext/20220724114548_AccountLinkContextMigrate.Designer.cs new file mode 100644 index 0000000000..7ca0801c5b --- /dev/null +++ b/migrations/postgre/AccountLinkContext/20220724114548_AccountLinkContextMigrate.Designer.cs @@ -0,0 +1,66 @@ +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(AccountLinkContext))] + [Migration("20220724114548_AccountLinkContextMigrate")] + partial class AccountLinkContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.AccountLinks", b => + { + b.Property("Id") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("id"); + + b.Property("UId") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("uid"); + + b.Property("Linked") + .HasColumnType("timestamp with time zone") + .HasColumnName("linked"); + + b.Property("Profile") + .IsRequired() + .HasColumnType("text") + .HasColumnName("profile"); + + b.Property("Provider") + .ValueGeneratedOnAdd() + .HasMaxLength(60) + .HasColumnType("character(60)") + .HasColumnName("provider") + .HasDefaultValueSql("NULL") + .IsFixedLength(); + + b.HasKey("Id", "UId") + .HasName("account_links_pkey"); + + b.HasIndex("UId") + .HasDatabaseName("uid"); + + b.ToTable("account_links", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/AccountLinkContext/20220724114548_AccountLinkContextMigrate.cs b/migrations/postgre/AccountLinkContext/20220724114548_AccountLinkContextMigrate.cs new file mode 100644 index 0000000000..67b6745116 --- /dev/null +++ b/migrations/postgre/AccountLinkContext/20220724114548_AccountLinkContextMigrate.cs @@ -0,0 +1,45 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class AccountLinkContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "onlyoffice"); + + migrationBuilder.CreateTable( + name: "account_links", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + uid = table.Column(type: "character varying(200)", maxLength: 200, nullable: false), + provider = table.Column(type: "character(60)", fixedLength: true, maxLength: 60, nullable: true, defaultValueSql: "NULL"), + profile = table.Column(type: "text", nullable: false), + linked = table.Column(type: "timestamp with time zone", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("account_links_pkey", x => new { x.id, x.uid }); + }); + + migrationBuilder.CreateIndex( + name: "uid", + schema: "onlyoffice", + table: "account_links", + column: "uid"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "account_links", + schema: "onlyoffice"); + } + } +} diff --git a/migrations/postgre/AccountLinkContext/AccountLinkContextModelSnapshot.cs b/migrations/postgre/AccountLinkContext/AccountLinkContextModelSnapshot.cs new file mode 100644 index 0000000000..97196edae0 --- /dev/null +++ b/migrations/postgre/AccountLinkContext/AccountLinkContextModelSnapshot.cs @@ -0,0 +1,64 @@ +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(AccountLinkContext))] + partial class AccountLinkContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.AccountLinks", b => + { + b.Property("Id") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("id"); + + b.Property("UId") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("uid"); + + b.Property("Linked") + .HasColumnType("timestamp with time zone") + .HasColumnName("linked"); + + b.Property("Profile") + .IsRequired() + .HasColumnType("text") + .HasColumnName("profile"); + + b.Property("Provider") + .ValueGeneratedOnAdd() + .HasMaxLength(60) + .HasColumnType("character(60)") + .HasColumnName("provider") + .HasDefaultValueSql("NULL") + .IsFixedLength(); + + b.HasKey("Id", "UId") + .HasName("account_links_pkey"); + + b.HasIndex("UId") + .HasDatabaseName("uid"); + + b.ToTable("account_links", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/BackupsContext/20220724114539_BackupsContextMigrate.Designer.cs b/migrations/postgre/BackupsContext/20220724114539_BackupsContextMigrate.Designer.cs new file mode 100644 index 0000000000..f984ebc655 --- /dev/null +++ b/migrations/postgre/BackupsContext/20220724114539_BackupsContextMigrate.Designer.cs @@ -0,0 +1,329 @@ +// +using System; +using ASC.Data.Backup.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(BackupsContext))] + [Migration("20220724114539_BackupsContextMigrate")] + partial class BackupsContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Alias") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("alias"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("calls") + .HasDefaultValueSql("true"); + + b.Property("CreationDateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .HasColumnType("integer") + .HasColumnName("industry"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .IsFixedLength(); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("MappedDomain") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("mappeddomain") + .HasDefaultValueSql("NULL"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("OwnerId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner_id") + .HasDefaultValueSql("NULL"); + + b.Property("PaymentId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("payment_id") + .HasDefaultValueSql("NULL"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("spam") + .HasDefaultValueSql("true"); + + b.Property("Status") + .HasColumnType("integer") + .HasColumnName("status"); + + b.Property("StatusChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("timezone") + .HasDefaultValueSql("NULL"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("1"); + + b.Property("TrustedDomainsRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("trusteddomains") + .HasDefaultValueSql("NULL"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("version") + .HasDefaultValueSql("2"); + + b.Property("Version_Changed") + .HasColumnType("timestamp with time zone") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_tenants_tenants"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", "onlyoffice"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("char") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreatedOn") + .HasColumnType("datetime") + .HasColumnName("created_on"); + + b.Property("ExpiresOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime") + .HasColumnName("expires_on") + .HasDefaultValueSql("'0001-01-01 00:00:00'"); + + b.Property("Hash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("hash") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("IsScheduled") + .HasMaxLength(10) + .HasColumnType("int") + .HasColumnName("is_scheduled"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageBasePath") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("storage_base_path") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageParams") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasColumnName("storage_params") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StoragePath") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("storage_path") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageType") + .HasMaxLength(10) + .HasColumnType("int") + .HasColumnName("storage_type"); + + b.Property("TenantId") + .HasMaxLength(10) + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.HasIndex("ExpiresOn") + .HasDatabaseName("expires_on"); + + b.HasIndex("IsScheduled") + .HasDatabaseName("is_scheduled"); + + b.HasIndex("TenantId") + .HasDatabaseName("tenant_id"); + + b.ToTable("backup_backup", (string)null); + }); + + modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupSchedule", b => + { + b.Property("TenantId") + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("integer") + .HasColumnName("tenant_id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("BackupMail") + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("boolean") + .HasColumnName("backup_mail") + .HasDefaultValueSql("'0'"); + + b.Property("BackupsStored") + .HasMaxLength(10) + .HasColumnType("integer") + .HasColumnName("backups_stored"); + + b.Property("Cron") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("cron") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastBackupTime") + .HasColumnType("datetime") + .HasColumnName("last_backup_time"); + + b.Property("StorageBasePath") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("storage_base_path") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageParams") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasColumnName("storage_params") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageType") + .HasMaxLength(10) + .HasColumnType("integer") + .HasColumnName("storage_type"); + + b.HasKey("TenantId") + .HasName("PRIMARY"); + + b.ToTable("backup_schedule", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/BackupsContext/20220724114539_BackupsContextMigrate.cs b/migrations/postgre/BackupsContext/20220724114539_BackupsContextMigrate.cs new file mode 100644 index 0000000000..ec2cf43ad4 --- /dev/null +++ b/migrations/postgre/BackupsContext/20220724114539_BackupsContextMigrate.cs @@ -0,0 +1,147 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class BackupsContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "onlyoffice"); + + migrationBuilder.CreateTable( + name: "backup_backup", + columns: table => new + { + id = table.Column(type: "char", maxLength: 38, nullable: false, collation: "utf8_general_ci"), + tenant_id = table.Column(type: "int", maxLength: 10, nullable: false), + is_scheduled = table.Column(type: "int", maxLength: 10, nullable: false), + name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false, collation: "utf8_general_ci"), + hash = table.Column(type: "character varying(64)", maxLength: 64, nullable: false, collation: "utf8_general_ci"), + storage_type = table.Column(type: "int", maxLength: 10, nullable: false), + storage_base_path = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci"), + storage_path = table.Column(type: "character varying(255)", maxLength: 255, nullable: false, collation: "utf8_general_ci"), + created_on = table.Column(type: "datetime", nullable: false), + expires_on = table.Column(type: "datetime", nullable: false, defaultValueSql: "'0001-01-01 00:00:00'"), + storage_params = table.Column(type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "backup_schedule", + columns: table => new + { + tenant_id = table.Column(type: "integer", maxLength: 10, nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + backup_mail = table.Column(type: "boolean", maxLength: 10, nullable: false, defaultValueSql: "'0'"), + cron = table.Column(type: "character varying(255)", maxLength: 255, nullable: false, collation: "utf8_general_ci"), + backups_stored = table.Column(type: "integer", maxLength: 10, nullable: false), + storage_type = table.Column(type: "integer", maxLength: 10, nullable: false), + storage_base_path = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci"), + last_backup_time = table.Column(type: "datetime", nullable: false), + storage_params = table.Column(type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.tenant_id); + }); + + migrationBuilder.CreateTable( + name: "tenants_tenants", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + alias = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), + mappeddomain = table.Column(type: "character varying(100)", maxLength: 100, nullable: true, defaultValueSql: "NULL"), + version = table.Column(type: "integer", nullable: false, defaultValueSql: "2"), + version_changed = table.Column(type: "timestamp with time zone", nullable: true), + language = table.Column(type: "character(10)", fixedLength: true, maxLength: 10, nullable: false, defaultValueSql: "'en-US'"), + timezone = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL"), + trusteddomains = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"), + trusteddomainsenabled = table.Column(type: "integer", nullable: false, defaultValueSql: "1"), + status = table.Column(type: "integer", nullable: false), + statuschanged = table.Column(type: "timestamp with time zone", nullable: true), + creationdatetime = table.Column(type: "timestamp with time zone", nullable: false), + owner_id = table.Column(type: "uuid", maxLength: 38, nullable: true, defaultValueSql: "NULL"), + payment_id = table.Column(type: "character varying(38)", maxLength: 38, nullable: true, defaultValueSql: "NULL"), + industry = table.Column(type: "integer", nullable: false), + last_modified = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), + spam = table.Column(type: "boolean", nullable: false, defaultValueSql: "true"), + calls = table.Column(type: "boolean", nullable: false, defaultValueSql: "true") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tenants", x => x.id); + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "tenants_tenants", + columns: new[] { "id", "alias", "creationdatetime", "industry", "last_modified", "name", "owner_id", "status", "statuschanged", "version_changed" }, + values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), 0, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "Web Office", new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), 0, null, null }); + + migrationBuilder.CreateIndex( + name: "expires_on", + table: "backup_backup", + column: "expires_on"); + + migrationBuilder.CreateIndex( + name: "is_scheduled", + table: "backup_backup", + column: "is_scheduled"); + + migrationBuilder.CreateIndex( + name: "tenant_id", + table: "backup_backup", + column: "tenant_id"); + + migrationBuilder.CreateIndex( + name: "alias", + schema: "onlyoffice", + table: "tenants_tenants", + column: "alias", + unique: true); + + migrationBuilder.CreateIndex( + name: "last_modified_tenants_tenants", + schema: "onlyoffice", + table: "tenants_tenants", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "mappeddomain", + schema: "onlyoffice", + table: "tenants_tenants", + column: "mappeddomain"); + + migrationBuilder.CreateIndex( + name: "version", + schema: "onlyoffice", + table: "tenants_tenants", + column: "version"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "backup_backup"); + + migrationBuilder.DropTable( + name: "backup_schedule"); + + migrationBuilder.DropTable( + name: "tenants_tenants", + schema: "onlyoffice"); + } + } +} diff --git a/migrations/postgre/BackupsContext/BackupsContextModelSnapshot.cs b/migrations/postgre/BackupsContext/BackupsContextModelSnapshot.cs new file mode 100644 index 0000000000..00c1ff05af --- /dev/null +++ b/migrations/postgre/BackupsContext/BackupsContextModelSnapshot.cs @@ -0,0 +1,327 @@ +// +using System; +using ASC.Data.Backup.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(BackupsContext))] + partial class BackupsContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Alias") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("alias"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("calls") + .HasDefaultValueSql("true"); + + b.Property("CreationDateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .HasColumnType("integer") + .HasColumnName("industry"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .IsFixedLength(); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("MappedDomain") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("mappeddomain") + .HasDefaultValueSql("NULL"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("OwnerId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner_id") + .HasDefaultValueSql("NULL"); + + b.Property("PaymentId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("payment_id") + .HasDefaultValueSql("NULL"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("spam") + .HasDefaultValueSql("true"); + + b.Property("Status") + .HasColumnType("integer") + .HasColumnName("status"); + + b.Property("StatusChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("timezone") + .HasDefaultValueSql("NULL"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("1"); + + b.Property("TrustedDomainsRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("trusteddomains") + .HasDefaultValueSql("NULL"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("version") + .HasDefaultValueSql("2"); + + b.Property("Version_Changed") + .HasColumnType("timestamp with time zone") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_tenants_tenants"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", "onlyoffice"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("char") + .HasColumnName("id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreatedOn") + .HasColumnType("datetime") + .HasColumnName("created_on"); + + b.Property("ExpiresOn") + .ValueGeneratedOnAdd() + .HasColumnType("datetime") + .HasColumnName("expires_on") + .HasDefaultValueSql("'0001-01-01 00:00:00'"); + + b.Property("Hash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("hash") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("IsScheduled") + .HasMaxLength(10) + .HasColumnType("int") + .HasColumnName("is_scheduled"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageBasePath") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("storage_base_path") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageParams") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasColumnName("storage_params") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StoragePath") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("storage_path") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageType") + .HasMaxLength(10) + .HasColumnType("int") + .HasColumnName("storage_type"); + + b.Property("TenantId") + .HasMaxLength(10) + .HasColumnType("int") + .HasColumnName("tenant_id"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.HasIndex("ExpiresOn") + .HasDatabaseName("expires_on"); + + b.HasIndex("IsScheduled") + .HasDatabaseName("is_scheduled"); + + b.HasIndex("TenantId") + .HasDatabaseName("tenant_id"); + + b.ToTable("backup_backup", (string)null); + }); + + modelBuilder.Entity("ASC.Data.Backup.EF.Model.BackupSchedule", b => + { + b.Property("TenantId") + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("integer") + .HasColumnName("tenant_id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("BackupMail") + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("boolean") + .HasColumnName("backup_mail") + .HasDefaultValueSql("'0'"); + + b.Property("BackupsStored") + .HasMaxLength(10) + .HasColumnType("integer") + .HasColumnName("backups_stored"); + + b.Property("Cron") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("cron") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("LastBackupTime") + .HasColumnType("datetime") + .HasColumnName("last_backup_time"); + + b.Property("StorageBasePath") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("storage_base_path") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageParams") + .ValueGeneratedOnAdd() + .HasColumnType("text") + .HasColumnName("storage_params") + .HasDefaultValueSql("NULL") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("StorageType") + .HasMaxLength(10) + .HasColumnType("integer") + .HasColumnName("storage_type"); + + b.HasKey("TenantId") + .HasName("PRIMARY"); + + b.ToTable("backup_schedule", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/CoreDbContext/20220724114546_CoreDbContextMigrate.Designer.cs b/migrations/postgre/CoreDbContext/20220724114546_CoreDbContextMigrate.Designer.cs new file mode 100644 index 0000000000..bdd18f31fa --- /dev/null +++ b/migrations/postgre/CoreDbContext/20220724114546_CoreDbContextMigrate.Designer.cs @@ -0,0 +1,205 @@ +// +using System; +using ASC.Core.Common.EF; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(CoreDbContext))] + [Migration("20220724114546_CoreDbContextMigrate")] + partial class CoreDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.DbButton", b => + { + b.Property("TariffId") + .HasColumnType("integer") + .HasColumnName("tariff_id"); + + b.Property("PartnerId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("partner_id"); + + b.Property("ButtonUrl") + .IsRequired() + .HasColumnType("text") + .HasColumnName("button_url"); + + b.HasKey("TariffId", "PartnerId") + .HasName("tenants_buttons_pkey"); + + b.ToTable("tenants_buttons", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("ActiveUsers") + .HasColumnType("integer") + .HasColumnName("active_users"); + + b.Property("AvangateId") + .ValueGeneratedOnAdd() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("avangate_id") + .HasDefaultValueSql("NULL"); + + b.Property("Description") + .HasColumnType("character varying") + .HasColumnName("description"); + + b.Property("Features") + .HasColumnType("text") + .HasColumnName("features"); + + b.Property("MaxFileSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_file_size") + .HasDefaultValueSql("'0'"); + + b.Property("MaxTotalSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_total_size") + .HasDefaultValueSql("'0'"); + + b.Property("Name") + .HasColumnType("character varying") + .HasColumnName("name"); + + b.Property("Price") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasDefaultValueSql("0.00"); + + b.Property("Visible") + .HasColumnType("boolean") + .HasColumnName("visible"); + + b.HasKey("Tenant") + .HasName("tenants_quota_pkey"); + + b.ToTable("tenants_quota", "onlyoffice"); + + b.HasData( + new + { + Tenant = -1, + ActiveUsers = 10000, + AvangateId = "0", + Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", + MaxFileSize = 102400L, + MaxTotalSize = 10995116277760L, + Name = "default", + Price = 0.00m, + Visible = false + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbQuotaRow", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("path"); + + b.Property("Counter") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("counter") + .HasDefaultValueSql("'0'"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Tag") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("tag") + .HasDefaultValueSql("'0'"); + + b.HasKey("Tenant", "Path") + .HasName("tenants_quotarow_pkey"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_tenants_quotarow"); + + b.ToTable("tenants_quotarow", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Comment") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("comment") + .HasDefaultValueSql("NULL"); + + b.Property("CreateOn") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Quantity") + .HasColumnType("integer") + .HasColumnName("quantity"); + + b.Property("Stamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("stamp"); + + b.Property("Tariff") + .HasColumnType("integer") + .HasColumnName("tariff"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant_tenants_tariff"); + + b.ToTable("tenants_tariff", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/CoreDbContext/20220724114546_CoreDbContextMigrate.cs b/migrations/postgre/CoreDbContext/20220724114546_CoreDbContextMigrate.cs new file mode 100644 index 0000000000..c0f9e11007 --- /dev/null +++ b/migrations/postgre/CoreDbContext/20220724114546_CoreDbContextMigrate.cs @@ -0,0 +1,124 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class CoreDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "onlyoffice"); + + migrationBuilder.CreateTable( + name: "tenants_buttons", + schema: "onlyoffice", + columns: table => new + { + tariff_id = table.Column(type: "integer", nullable: false), + partner_id = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + button_url = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("tenants_buttons_pkey", x => new { x.tariff_id, x.partner_id }); + }); + + migrationBuilder.CreateTable( + name: "tenants_quota", + schema: "onlyoffice", + columns: table => new + { + tenant = table.Column(type: "integer", nullable: false), + name = table.Column(type: "character varying", nullable: true), + description = table.Column(type: "character varying", nullable: true), + max_file_size = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"), + max_total_size = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"), + active_users = table.Column(type: "integer", nullable: false), + features = table.Column(type: "text", nullable: true), + price = table.Column(type: "numeric(10,2)", nullable: false, defaultValueSql: "0.00"), + avangate_id = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, defaultValueSql: "NULL"), + visible = table.Column(type: "boolean", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("tenants_quota_pkey", x => x.tenant); + }); + + migrationBuilder.CreateTable( + name: "tenants_quotarow", + schema: "onlyoffice", + columns: table => new + { + tenant = table.Column(type: "integer", nullable: false), + path = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + counter = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"), + tag = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "'0'"), + last_modified = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("tenants_quotarow_pkey", x => new { x.tenant, x.path }); + }); + + migrationBuilder.CreateTable( + name: "tenants_tariff", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + tenant = table.Column(type: "integer", nullable: false), + tariff = table.Column(type: "integer", nullable: false), + stamp = table.Column(type: "timestamp with time zone", nullable: false), + quantity = table.Column(type: "integer", nullable: false), + comment = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + create_on = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tariff", x => x.id); + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "tenants_quota", + columns: new[] { "tenant", "active_users", "avangate_id", "description", "features", "max_file_size", "max_total_size", "name", "visible" }, + values: new object[] { -1, 10000, "0", null, "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", 102400L, 10995116277760L, "default", false }); + + migrationBuilder.CreateIndex( + name: "last_modified_tenants_quotarow", + schema: "onlyoffice", + table: "tenants_quotarow", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "tenant_tenants_tariff", + schema: "onlyoffice", + table: "tenants_tariff", + column: "tenant"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "tenants_buttons", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "tenants_quota", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "tenants_quotarow", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "tenants_tariff", + schema: "onlyoffice"); + } + } +} diff --git a/migrations/postgre/CoreDbContext/CoreDbContextModelSnapshot.cs b/migrations/postgre/CoreDbContext/CoreDbContextModelSnapshot.cs new file mode 100644 index 0000000000..340fb21b63 --- /dev/null +++ b/migrations/postgre/CoreDbContext/CoreDbContextModelSnapshot.cs @@ -0,0 +1,203 @@ +// +using System; +using ASC.Core.Common.EF; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(CoreDbContext))] + partial class CoreDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.DbButton", b => + { + b.Property("TariffId") + .HasColumnType("integer") + .HasColumnName("tariff_id"); + + b.Property("PartnerId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("partner_id"); + + b.Property("ButtonUrl") + .IsRequired() + .HasColumnType("text") + .HasColumnName("button_url"); + + b.HasKey("TariffId", "PartnerId") + .HasName("tenants_buttons_pkey"); + + b.ToTable("tenants_buttons", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("ActiveUsers") + .HasColumnType("integer") + .HasColumnName("active_users"); + + b.Property("AvangateId") + .ValueGeneratedOnAdd() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("avangate_id") + .HasDefaultValueSql("NULL"); + + b.Property("Description") + .HasColumnType("character varying") + .HasColumnName("description"); + + b.Property("Features") + .HasColumnType("text") + .HasColumnName("features"); + + b.Property("MaxFileSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_file_size") + .HasDefaultValueSql("'0'"); + + b.Property("MaxTotalSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_total_size") + .HasDefaultValueSql("'0'"); + + b.Property("Name") + .HasColumnType("character varying") + .HasColumnName("name"); + + b.Property("Price") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasDefaultValueSql("0.00"); + + b.Property("Visible") + .HasColumnType("boolean") + .HasColumnName("visible"); + + b.HasKey("Tenant") + .HasName("tenants_quota_pkey"); + + b.ToTable("tenants_quota", "onlyoffice"); + + b.HasData( + new + { + Tenant = -1, + ActiveUsers = 10000, + AvangateId = "0", + Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", + MaxFileSize = 102400L, + MaxTotalSize = 10995116277760L, + Name = "default", + Price = 0.00m, + Visible = false + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbQuotaRow", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Path") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("path"); + + b.Property("Counter") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("counter") + .HasDefaultValueSql("'0'"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Tag") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("tag") + .HasDefaultValueSql("'0'"); + + b.HasKey("Tenant", "Path") + .HasName("tenants_quotarow_pkey"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_tenants_quotarow"); + + b.ToTable("tenants_quotarow", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Comment") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("comment") + .HasDefaultValueSql("NULL"); + + b.Property("CreateOn") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Quantity") + .HasColumnType("integer") + .HasColumnName("quantity"); + + b.Property("Stamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("stamp"); + + b.Property("Tariff") + .HasColumnType("integer") + .HasColumnName("tariff"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant_tenants_tariff"); + + b.ToTable("tenants_tariff", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/CustomDbContext/20220724114549_CustomDbContextMigrate.Designer.cs b/migrations/postgre/CustomDbContext/20220724114549_CustomDbContextMigrate.Designer.cs new file mode 100644 index 0000000000..d8c84ff467 --- /dev/null +++ b/migrations/postgre/CustomDbContext/20220724114549_CustomDbContextMigrate.Designer.cs @@ -0,0 +1,162 @@ +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(CustomDbContext))] + [Migration("20220724114549_CustomDbContextMigrate")] + partial class CustomDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:Enum:onlyoffice.enum_dbip_location", "ipv4,ipv6") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbipLocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("AddrType") + .HasColumnType("text"); + + b.Property("City") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("city"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("country"); + + b.Property("District") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("district") + .HasDefaultValueSql("NULL"); + + b.Property("GeonameId") + .HasColumnType("integer") + .HasColumnName("geoname_id"); + + b.Property("IPEnd") + .IsRequired() + .HasMaxLength(39) + .HasColumnType("character varying(39)") + .HasColumnName("ip_end"); + + b.Property("IPStart") + .IsRequired() + .HasMaxLength(39) + .HasColumnType("character varying(39)") + .HasColumnName("ip_start"); + + b.Property("Latitude") + .HasColumnType("bigint") + .HasColumnName("latitude"); + + b.Property("Longitude") + .HasColumnType("bigint") + .HasColumnName("longitude"); + + b.Property("Processed") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("processed") + .HasDefaultValueSql("1"); + + b.Property("StateProv") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("stateprov"); + + b.Property("TimezoneName") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("timezone_name") + .HasDefaultValueSql("NULL"); + + b.Property("TimezoneOffset") + .HasColumnType("double precision") + .HasColumnName("timezone_offset"); + + b.Property("ZipCode") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("zipcode") + .HasDefaultValueSql("NULL"); + + b.HasKey("Id"); + + b.HasIndex("IPStart") + .HasDatabaseName("ip_start"); + + b.ToTable("dbip_location", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.MobileAppInstall", b => + { + b.Property("UserEmail") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("user_email"); + + b.Property("AppType") + .HasColumnType("integer") + .HasColumnName("app_type"); + + b.Property("LastSign") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_sign"); + + b.Property("RegisteredOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("registered_on"); + + b.HasKey("UserEmail", "AppType") + .HasName("mobile_app_install_pkey"); + + b.ToTable("mobile_app_install", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.Regions", b => + { + b.Property("Region") + .HasColumnType("text"); + + b.Property("ConnectionString") + .HasColumnType("text"); + + b.Property("Provider") + .HasColumnType("text"); + + b.HasKey("Region"); + + b.ToTable("Regions"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/CustomDbContext/20220724114549_CustomDbContextMigrate.cs b/migrations/postgre/CustomDbContext/20220724114549_CustomDbContextMigrate.cs new file mode 100644 index 0000000000..4c2515e8c3 --- /dev/null +++ b/migrations/postgre/CustomDbContext/20220724114549_CustomDbContextMigrate.cs @@ -0,0 +1,95 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class CustomDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "onlyoffice"); + + migrationBuilder.AlterDatabase() + .Annotation("Npgsql:Enum:onlyoffice.enum_dbip_location", "ipv4,ipv6"); + + migrationBuilder.CreateTable( + name: "dbip_location", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + AddrType = table.Column(type: "text", nullable: true), + ip_start = table.Column(type: "character varying(39)", maxLength: 39, nullable: false), + ip_end = table.Column(type: "character varying(39)", maxLength: 39, nullable: false), + country = table.Column(type: "character varying(2)", maxLength: 2, nullable: false), + stateprov = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + district = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + city = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + zipcode = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + latitude = table.Column(type: "bigint", nullable: true), + longitude = table.Column(type: "bigint", nullable: true), + geoname_id = table.Column(type: "integer", nullable: true), + timezone_offset = table.Column(type: "double precision", nullable: true), + timezone_name = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + processed = table.Column(type: "integer", nullable: false, defaultValueSql: "1") + }, + constraints: table => + { + table.PrimaryKey("PK_dbip_location", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "mobile_app_install", + schema: "onlyoffice", + columns: table => new + { + user_email = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + app_type = table.Column(type: "integer", nullable: false), + registered_on = table.Column(type: "timestamp with time zone", nullable: false), + last_sign = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("mobile_app_install_pkey", x => new { x.user_email, x.app_type }); + }); + + migrationBuilder.CreateTable( + name: "Regions", + columns: table => new + { + Region = table.Column(type: "text", nullable: false), + Provider = table.Column(type: "text", nullable: true), + ConnectionString = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Regions", x => x.Region); + }); + + migrationBuilder.CreateIndex( + name: "ip_start", + schema: "onlyoffice", + table: "dbip_location", + column: "ip_start"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "dbip_location", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "mobile_app_install", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "Regions"); + } + } +} diff --git a/migrations/postgre/CustomDbContext/CustomDbContextModelSnapshot.cs b/migrations/postgre/CustomDbContext/CustomDbContextModelSnapshot.cs new file mode 100644 index 0000000000..bb95489ad2 --- /dev/null +++ b/migrations/postgre/CustomDbContext/CustomDbContextModelSnapshot.cs @@ -0,0 +1,160 @@ +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(CustomDbContext))] + partial class CustomDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:Enum:onlyoffice.enum_dbip_location", "ipv4,ipv6") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbipLocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("AddrType") + .HasColumnType("text"); + + b.Property("City") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("city"); + + b.Property("Country") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("character varying(2)") + .HasColumnName("country"); + + b.Property("District") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("district") + .HasDefaultValueSql("NULL"); + + b.Property("GeonameId") + .HasColumnType("integer") + .HasColumnName("geoname_id"); + + b.Property("IPEnd") + .IsRequired() + .HasMaxLength(39) + .HasColumnType("character varying(39)") + .HasColumnName("ip_end"); + + b.Property("IPStart") + .IsRequired() + .HasMaxLength(39) + .HasColumnType("character varying(39)") + .HasColumnName("ip_start"); + + b.Property("Latitude") + .HasColumnType("bigint") + .HasColumnName("latitude"); + + b.Property("Longitude") + .HasColumnType("bigint") + .HasColumnName("longitude"); + + b.Property("Processed") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("processed") + .HasDefaultValueSql("1"); + + b.Property("StateProv") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("stateprov"); + + b.Property("TimezoneName") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("timezone_name") + .HasDefaultValueSql("NULL"); + + b.Property("TimezoneOffset") + .HasColumnType("double precision") + .HasColumnName("timezone_offset"); + + b.Property("ZipCode") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("zipcode") + .HasDefaultValueSql("NULL"); + + b.HasKey("Id"); + + b.HasIndex("IPStart") + .HasDatabaseName("ip_start"); + + b.ToTable("dbip_location", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.MobileAppInstall", b => + { + b.Property("UserEmail") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("user_email"); + + b.Property("AppType") + .HasColumnType("integer") + .HasColumnName("app_type"); + + b.Property("LastSign") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_sign"); + + b.Property("RegisteredOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("registered_on"); + + b.HasKey("UserEmail", "AppType") + .HasName("mobile_app_install_pkey"); + + b.ToTable("mobile_app_install", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.Regions", b => + { + b.Property("Region") + .HasColumnType("text"); + + b.Property("ConnectionString") + .HasColumnType("text"); + + b.Property("Provider") + .HasColumnType("text"); + + b.HasKey("Region"); + + b.ToTable("Regions"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/FeedDbContext/20220724114543_FeedDbContextMigrate.Designer.cs b/migrations/postgre/FeedDbContext/20220724114543_FeedDbContextMigrate.Designer.cs new file mode 100644 index 0000000000..c8069ddede --- /dev/null +++ b/migrations/postgre/FeedDbContext/20220724114543_FeedDbContextMigrate.Designer.cs @@ -0,0 +1,170 @@ +// +using System; +using ASC.Feed.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(FeedDbContext))] + [Migration("20220724114543_FeedDbContextMigrate")] + partial class FeedDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Feed.Model.FeedAggregate", b => + { + b.Property("Id") + .HasMaxLength(88) + .HasColumnType("character varying(88)") + .HasColumnName("id"); + + b.Property("AggregateDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("aggregated_date"); + + b.Property("Author") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("author") + .IsFixedLength(); + + b.Property("CreatedDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_date"); + + b.Property("GroupId") + .ValueGeneratedOnAdd() + .HasMaxLength(70) + .HasColumnType("character varying(70)") + .HasColumnName("group_id") + .HasDefaultValueSql("NULL"); + + b.Property("Json") + .IsRequired() + .HasColumnType("text") + .HasColumnName("json"); + + b.Property("Keywords") + .HasColumnType("text") + .HasColumnName("keywords"); + + b.Property("ModifiedBy") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("modified_by") + .IsFixedLength(); + + b.Property("ModifiedDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("modified_date"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("module"); + + b.Property("Product") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("product"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant", "AggregateDate") + .HasDatabaseName("aggregated_date"); + + b.HasIndex("Tenant", "ModifiedDate") + .HasDatabaseName("modified_date"); + + b.HasIndex("Tenant", "Product") + .HasDatabaseName("product"); + + b.ToTable("feed_aggregate", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Feed.Model.FeedLast", b => + { + b.Property("LastKey") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("last_key"); + + b.Property("LastDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_date"); + + b.HasKey("LastKey") + .HasName("feed_last_pkey"); + + b.ToTable("feed_last", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Feed.Model.FeedReaded", b => + { + b.Property("UserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("Module") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("module"); + + b.Property("TimeStamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("timestamp"); + + b.HasKey("UserId", "Tenant", "Module") + .HasName("feed_readed_pkey"); + + b.ToTable("feed_readed", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Feed.Model.FeedUsers", b => + { + b.Property("FeedId") + .HasMaxLength(88) + .HasColumnType("character varying(88)") + .HasColumnName("feed_id"); + + b.Property("UserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id") + .IsFixedLength(); + + b.HasKey("FeedId", "UserId") + .HasName("feed_users_pkey"); + + b.HasIndex("UserId") + .HasDatabaseName("user_id_feed_users"); + + b.ToTable("feed_users", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/FeedDbContext/20220724114543_FeedDbContextMigrate.cs b/migrations/postgre/FeedDbContext/20220724114543_FeedDbContextMigrate.cs new file mode 100644 index 0000000000..0856e7cb3c --- /dev/null +++ b/migrations/postgre/FeedDbContext/20220724114543_FeedDbContextMigrate.cs @@ -0,0 +1,123 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class FeedDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "onlyoffice"); + + migrationBuilder.CreateTable( + name: "feed_aggregate", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "character varying(88)", maxLength: 88, nullable: false), + tenant = table.Column(type: "integer", nullable: false), + product = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + module = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + author = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: false), + modified_by = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: false), + created_date = table.Column(type: "timestamp with time zone", nullable: false), + modified_date = table.Column(type: "timestamp with time zone", nullable: false), + group_id = table.Column(type: "character varying(70)", maxLength: 70, nullable: true, defaultValueSql: "NULL"), + aggregated_date = table.Column(type: "timestamp with time zone", nullable: false), + json = table.Column(type: "text", nullable: false), + keywords = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_feed_aggregate", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "feed_last", + schema: "onlyoffice", + columns: table => new + { + last_key = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + last_date = table.Column(type: "timestamp with time zone", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("feed_last_pkey", x => x.last_key); + }); + + migrationBuilder.CreateTable( + name: "feed_readed", + schema: "onlyoffice", + columns: table => new + { + user_id = table.Column(type: "uuid", maxLength: 38, nullable: false), + module = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + tenant_id = table.Column(type: "integer", nullable: false), + timestamp = table.Column(type: "timestamp with time zone", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("feed_readed_pkey", x => new { x.user_id, x.tenant_id, x.module }); + }); + + migrationBuilder.CreateTable( + name: "feed_users", + schema: "onlyoffice", + columns: table => new + { + feed_id = table.Column(type: "character varying(88)", maxLength: 88, nullable: false), + user_id = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("feed_users_pkey", x => new { x.feed_id, x.user_id }); + }); + + migrationBuilder.CreateIndex( + name: "aggregated_date", + schema: "onlyoffice", + table: "feed_aggregate", + columns: new[] { "tenant", "aggregated_date" }); + + migrationBuilder.CreateIndex( + name: "modified_date", + schema: "onlyoffice", + table: "feed_aggregate", + columns: new[] { "tenant", "modified_date" }); + + migrationBuilder.CreateIndex( + name: "product", + schema: "onlyoffice", + table: "feed_aggregate", + columns: new[] { "tenant", "product" }); + + migrationBuilder.CreateIndex( + name: "user_id_feed_users", + schema: "onlyoffice", + table: "feed_users", + column: "user_id"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "feed_aggregate", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "feed_last", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "feed_readed", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "feed_users", + schema: "onlyoffice"); + } + } +} diff --git a/migrations/postgre/FeedDbContext/FeedDbContextModelSnapshot.cs b/migrations/postgre/FeedDbContext/FeedDbContextModelSnapshot.cs new file mode 100644 index 0000000000..22b48b9899 --- /dev/null +++ b/migrations/postgre/FeedDbContext/FeedDbContextModelSnapshot.cs @@ -0,0 +1,168 @@ +// +using System; +using ASC.Feed.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(FeedDbContext))] + partial class FeedDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Feed.Model.FeedAggregate", b => + { + b.Property("Id") + .HasMaxLength(88) + .HasColumnType("character varying(88)") + .HasColumnName("id"); + + b.Property("AggregateDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("aggregated_date"); + + b.Property("Author") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("author") + .IsFixedLength(); + + b.Property("CreatedDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_date"); + + b.Property("GroupId") + .ValueGeneratedOnAdd() + .HasMaxLength(70) + .HasColumnType("character varying(70)") + .HasColumnName("group_id") + .HasDefaultValueSql("NULL"); + + b.Property("Json") + .IsRequired() + .HasColumnType("text") + .HasColumnName("json"); + + b.Property("Keywords") + .HasColumnType("text") + .HasColumnName("keywords"); + + b.Property("ModifiedBy") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("modified_by") + .IsFixedLength(); + + b.Property("ModifiedDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("modified_date"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("module"); + + b.Property("Product") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("product"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant", "AggregateDate") + .HasDatabaseName("aggregated_date"); + + b.HasIndex("Tenant", "ModifiedDate") + .HasDatabaseName("modified_date"); + + b.HasIndex("Tenant", "Product") + .HasDatabaseName("product"); + + b.ToTable("feed_aggregate", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Feed.Model.FeedLast", b => + { + b.Property("LastKey") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("last_key"); + + b.Property("LastDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_date"); + + b.HasKey("LastKey") + .HasName("feed_last_pkey"); + + b.ToTable("feed_last", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Feed.Model.FeedReaded", b => + { + b.Property("UserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("Module") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("module"); + + b.Property("TimeStamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("timestamp"); + + b.HasKey("UserId", "Tenant", "Module") + .HasName("feed_readed_pkey"); + + b.ToTable("feed_readed", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Feed.Model.FeedUsers", b => + { + b.Property("FeedId") + .HasMaxLength(88) + .HasColumnType("character varying(88)") + .HasColumnName("feed_id"); + + b.Property("UserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id") + .IsFixedLength(); + + b.HasKey("FeedId", "UserId") + .HasName("feed_users_pkey"); + + b.HasIndex("UserId") + .HasDatabaseName("user_id_feed_users"); + + b.ToTable("feed_users", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/FilesDbContext/20220725110945_FilesDbContextMigrate.Designer.cs b/migrations/postgre/FilesDbContext/20220725110945_FilesDbContextMigrate.Designer.cs new file mode 100644 index 0000000000..26608e15c0 --- /dev/null +++ b/migrations/postgre/FilesDbContext/20220725110945_FilesDbContextMigrate.Designer.cs @@ -0,0 +1,2598 @@ +// +using System; +using ASC.Files.Core.EF; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(FilesDbContext))] + [Migration("20220725110945_FilesDbContextMigrate")] + partial class FilesDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("ActiveUsers") + .HasColumnType("integer") + .HasColumnName("active_users"); + + b.Property("AvangateId") + .ValueGeneratedOnAdd() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("avangate_id") + .HasDefaultValueSql("NULL"); + + b.Property("Description") + .HasColumnType("character varying") + .HasColumnName("description"); + + b.Property("Features") + .HasColumnType("text") + .HasColumnName("features"); + + b.Property("MaxFileSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_file_size") + .HasDefaultValueSql("'0'"); + + b.Property("MaxTotalSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_total_size") + .HasDefaultValueSql("'0'"); + + b.Property("Name") + .HasColumnType("character varying") + .HasColumnName("name"); + + b.Property("Price") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasDefaultValueSql("0.00"); + + b.Property("Visible") + .HasColumnType("boolean") + .HasColumnName("visible"); + + b.HasKey("Tenant") + .HasName("tenants_quota_pkey"); + + b.ToTable("tenants_quota", "onlyoffice"); + + b.HasData( + new + { + Tenant = -1, + ActiveUsers = 10000, + AvangateId = "0", + Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", + MaxFileSize = 102400L, + MaxTotalSize = 10995116277760L, + Name = "default", + Price = 0.00m, + Visible = false + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Comment") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("comment") + .HasDefaultValueSql("NULL"); + + b.Property("CreateOn") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Quantity") + .HasColumnType("integer") + .HasColumnName("quantity"); + + b.Property("Stamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("stamp"); + + b.Property("Tariff") + .HasColumnType("integer") + .HasColumnName("tariff"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant_tenants_tariff"); + + b.ToTable("tenants_tariff", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Alias") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("alias"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("calls") + .HasDefaultValueSql("true"); + + b.Property("CreationDateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .HasColumnType("integer") + .HasColumnName("industry"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .IsFixedLength(); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("MappedDomain") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("mappeddomain") + .HasDefaultValueSql("NULL"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("OwnerId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner_id") + .HasDefaultValueSql("NULL"); + + b.Property("PaymentId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("payment_id") + .HasDefaultValueSql("NULL"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("spam") + .HasDefaultValueSql("true"); + + b.Property("Status") + .HasColumnType("integer") + .HasColumnName("status"); + + b.Property("StatusChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("timezone") + .HasDefaultValueSql("NULL"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("1"); + + b.Property("TrustedDomainsRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("trusteddomains") + .HasDefaultValueSql("NULL"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("version") + .HasDefaultValueSql("2"); + + b.Property("Version_Changed") + .HasColumnType("timestamp with time zone") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_tenants_tenants"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", "onlyoffice"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.FilesConverts", b => + { + b.Property("Input") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("input"); + + b.Property("Output") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("output"); + + b.HasKey("Input", "Output") + .HasName("files_converts_pkey"); + + b.ToTable("files_converts", "onlyoffice"); + + b.HasData( + new + { + Input = ".csv", + Output = ".ods" + }, + new + { + Input = ".csv", + Output = ".pdf" + }, + new + { + Input = ".csv", + Output = ".ots" + }, + new + { + Input = ".csv", + Output = ".xlsx" + }, + new + { + Input = ".csv", + Output = ".xlsm" + }, + new + { + Input = ".csv", + Output = ".xltm" + }, + new + { + Input = ".csv", + Output = ".xltx" + }, + new + { + Input = ".doc", + Output = ".docx" + }, + new + { + Input = ".doc", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".doc", + Output = ".odt" + }, + 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 = ".html" + }, + new + { + Input = ".docm", + Output = ".dotx" + }, + new + { + Input = ".docm", + Output = ".epub" + }, + new + { + Input = ".docm", + Output = ".fb2" + }, + new + { + Input = ".docm", + Output = ".ott" + }, + new + { + Input = ".docm", + Output = ".odt" + }, + new + { + Input = ".docm", + Output = ".pdf" + }, + new + { + Input = ".docm", + Output = ".rtf" + }, + new + { + Input = ".docm", + Output = ".txt" + }, + new + { + Input = ".doct", + Output = ".docx" + }, + new + { + Input = ".docx", + Output = ".odt" + }, + new + { + Input = ".docx", + Output = ".pdf" + }, + new + { + Input = ".docx", + Output = ".rtf" + }, + new + { + Input = ".docx", + Output = ".txt" + }, + new + { + Input = ".docx", + Output = ".html" + }, + new + { + Input = ".docx", + Output = ".dotm" + }, + new + { + Input = ".docx", + Output = ".dotx" + }, + new + { + Input = ".docx", + Output = ".epub" + }, + new + { + Input = ".docx", + Output = ".fb2" + }, + new + { + Input = ".docx", + Output = ".ott" + }, + new + { + Input = ".docx", + Output = ".docm" + }, + new + { + Input = ".docx", + Output = ".docxf" + }, + new + { + Input = ".docxf", + Output = ".docx" + }, + new + { + Input = ".docxf", + Output = ".odt" + }, + new + { + Input = ".docxf", + Output = ".oform" + }, + new + { + Input = ".docxf", + Output = ".pdf" + }, + new + { + Input = ".docxf", + Output = ".rtf" + }, + new + { + Input = ".docxf", + Output = ".txt" + }, + new + { + Input = ".docxf", + Output = ".dotx" + }, + new + { + Input = ".docxf", + Output = ".epub" + }, + new + { + Input = ".docxf", + Output = ".fb2" + }, + new + { + Input = ".docxf", + Output = ".html" + }, + new + { + Input = ".docxf", + Output = ".ott" + }, + new + { + Input = ".dot", + Output = ".docx" + }, + new + { + Input = ".dot", + Output = ".odt" + }, + new + { + Input = ".dot", + Output = ".pdf" + }, + new + { + Input = ".dot", + Output = ".rtf" + }, + new + { + Input = ".dot", + Output = ".txt" + }, + new + { + Input = ".dot", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".dotm", + Output = ".docx" + }, + new + { + Input = ".dotm", + Output = ".odt" + }, + new + { + Input = ".dotm", + Output = ".pdf" + }, + new + { + Input = ".dotm", + Output = ".rtf" + }, + new + { + Input = ".dotm", + Output = ".txt" + }, + new + { + Input = ".dotm", + Output = ".docm" + }, + new + { + Input = ".dotm", + Output = ".dotx" + }, + new + { + Input = ".dotm", + Output = ".epub" + }, + new + { + Input = ".dotm", + Output = ".fb2" + }, + new + { + Input = ".dotm", + Output = ".html" + }, + new + { + Input = ".dotm", + Output = ".ott" + }, + new + { + Input = ".dotx", + Output = ".docx" + }, + new + { + Input = ".dotx", + Output = ".odt" + }, + new + { + Input = ".dotx", + Output = ".pdf" + }, + new + { + Input = ".dotx", + Output = ".rtf" + }, + new + { + Input = ".dotx", + Output = ".txt" + }, + new + { + Input = ".dotx", + Output = ".docm" + }, + new + { + Input = ".dotx", + Output = ".dotm" + }, + new + { + Input = ".dotx", + Output = ".epub" + }, + new + { + Input = ".dotx", + Output = ".fb2" + }, + new + { + Input = ".dotx", + Output = ".html" + }, + new + { + Input = ".dotx", + Output = ".ott" + }, + new + { + Input = ".epub", + Output = ".docx" + }, + new + { + Input = ".epub", + Output = ".odt" + }, + new + { + Input = ".epub", + Output = ".pdf" + }, + new + { + Input = ".epub", + Output = ".rtf" + }, + new + { + Input = ".epub", + Output = ".txt" + }, + new + { + Input = ".epub", + Output = ".docm" + }, + new + { + Input = ".epub", + Output = ".dotm" + }, + new + { + Input = ".epub", + Output = ".dotx" + }, + new + { + Input = ".epub", + Output = ".fb2" + }, + new + { + Input = ".epub", + Output = ".html" + }, + new + { + Input = ".epub", + Output = ".ott" + }, + new + { + Input = ".fb2", + Output = ".docx" + }, + new + { + Input = ".fb2", + Output = ".odt" + }, + new + { + Input = ".fb2", + Output = ".pdf" + }, + new + { + Input = ".fb2", + Output = ".rtf" + }, + new + { + Input = ".fb2", + Output = ".txt" + }, + new + { + Input = ".fb2", + Output = ".docm" + }, + new + { + Input = ".fb2", + Output = ".dotm" + }, + new + { + Input = ".fb2", + Output = ".dotx" + }, + new + { + Input = ".fb2", + Output = ".epub" + }, + new + { + Input = ".fb2", + Output = ".html" + }, + new + { + Input = ".fb2", + Output = ".ott" + }, + new + { + Input = ".fodp", + Output = ".odp" + }, + new + { + Input = ".fodp", + Output = ".pdf" + }, + new + { + Input = ".fodp", + Output = ".pptx" + }, + new + { + Input = ".fodp", + Output = ".otp" + }, + new + { + Input = ".fodp", + Output = ".potm" + }, + new + { + Input = ".fodp", + Output = ".potx" + }, + new + { + Input = ".fodp", + Output = ".pptm" + }, + new + { + Input = ".fods", + Output = ".csv" + }, + new + { + Input = ".fods", + Output = ".ods" + }, + new + { + Input = ".fods", + Output = ".pdf" + }, + new + { + Input = ".fods", + Output = ".xlsx" + }, + new + { + Input = ".fods", + Output = ".xlsm" + }, + new + { + Input = ".fods", + Output = ".xltm" + }, + new + { + Input = ".fods", + Output = ".xltx" + }, + new + { + Input = ".fods", + Output = ".ots" + }, + new + { + Input = ".fodt", + Output = ".docx" + }, + new + { + Input = ".fodt", + Output = ".odt" + }, + new + { + Input = ".fodt", + Output = ".docm" + }, + new + { + Input = ".fodt", + Output = ".pdf" + }, + new + { + Input = ".fodt", + Output = ".rtf" + }, + new + { + Input = ".fodt", + Output = ".txt" + }, + 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 = ".ott" + }, + new + { + Input = ".html", + Output = ".docx" + }, + new + { + Input = ".html", + Output = ".odt" + }, + new + { + Input = ".html", + Output = ".pdf" + }, + new + { + Input = ".html", + Output = ".rtf" + }, + new + { + Input = ".html", + Output = ".txt" + }, + new + { + Input = ".html", + Output = ".docm" + }, + new + { + Input = ".html", + Output = ".dotm" + }, + new + { + Input = ".html", + Output = ".dotx" + }, + new + { + Input = ".html", + Output = ".epub" + }, + new + { + Input = ".html", + Output = ".fb2" + }, + new + { + Input = ".html", + Output = ".ott" + }, + new + { + Input = ".mht", + Output = ".docx" + }, + new + { + Input = ".mht", + Output = ".odt" + }, + new + { + Input = ".mht", + Output = ".pdf" + }, + new + { + Input = ".mht", + Output = ".rtf" + }, + new + { + Input = ".mht", + Output = ".txt" + }, + new + { + Input = ".mht", + Output = ".docm" + }, + new + { + Input = ".mht", + Output = ".dotm" + }, + new + { + Input = ".mht", + Output = ".dotx" + }, + new + { + Input = ".mht", + Output = ".epub" + }, + new + { + Input = ".mht", + Output = ".fb2" + }, + new + { + Input = ".mht", + Output = ".ott" + }, + new + { + Input = ".odp", + Output = ".pdf" + }, + new + { + Input = ".odp", + Output = ".pptx" + }, + new + { + Input = ".odp", + Output = ".otp" + }, + new + { + Input = ".odp", + Output = ".potm" + }, + new + { + Input = ".odp", + Output = ".potx" + }, + new + { + Input = ".odp", + Output = ".pptm" + }, + 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 = ".pdf" + }, + new + { + Input = ".ods", + Output = ".xlsx" + }, + new + { + Input = ".ods", + Output = ".ots" + }, + new + { + Input = ".ods", + Output = ".xlsm" + }, + 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 = ".xltm" + }, + new + { + Input = ".ots", + Output = ".xltx" + }, + new + { + Input = ".ots", + Output = ".xlsx" + }, + new + { + Input = ".oxps", + Output = ".pdf" + }, + new + { + Input = ".odt", + Output = ".docx" + }, + new + { + Input = ".odt", + Output = ".pdf" + }, + new + { + Input = ".odt", + Output = ".rtf" + }, + new + { + Input = ".odt", + Output = ".txt" + }, + new + { + Input = ".odt", + Output = ".docm" + }, + 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 = ".ott", + Output = ".docx" + }, + new + { + Input = ".ott", + Output = ".odt" + }, + new + { + Input = ".ott", + Output = ".pdf" + }, + new + { + Input = ".ott", + Output = ".rtf" + }, + new + { + Input = ".ott", + Output = ".txt" + }, + new + { + Input = ".ott", + Output = ".docm" + }, + 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 = ".pot", + Output = ".odp" + }, + new + { + Input = ".pot", + Output = ".pdf" + }, + new + { + Input = ".pot", + Output = ".pptx" + }, + new + { + Input = ".pot", + Output = ".otp" + }, + new + { + Input = ".pot", + Output = ".potm" + }, + new + { + Input = ".pot", + Output = ".potx" + }, + new + { + Input = ".pot", + Output = ".pptm" + }, + new + { + Input = ".potm", + Output = ".odp" + }, + new + { + Input = ".potm", + Output = ".pdf" + }, + new + { + Input = ".potm", + Output = ".pptx" + }, + new + { + Input = ".potm", + Output = ".otp" + }, + new + { + Input = ".potm", + Output = ".potx" + }, + new + { + Input = ".potm", + Output = ".pptm" + }, + new + { + Input = ".potx", + Output = ".odp" + }, + new + { + Input = ".potx", + Output = ".pdf" + }, + new + { + Input = ".potx", + Output = ".pptx" + }, + new + { + Input = ".potx", + Output = ".otp" + }, + new + { + Input = ".potx", + Output = ".potm" + }, + new + { + Input = ".potx", + Output = ".pptm" + }, + new + { + Input = ".pps", + Output = ".odp" + }, + new + { + Input = ".pps", + Output = ".pdf" + }, + new + { + Input = ".pps", + Output = ".pptx" + }, + new + { + Input = ".pps", + Output = ".otp" + }, + new + { + Input = ".pps", + Output = ".potm" + }, + new + { + Input = ".pps", + Output = ".potx" + }, + new + { + Input = ".pps", + Output = ".pptm" + }, + new + { + Input = ".ppsm", + Output = ".odp" + }, + new + { + Input = ".ppsm", + Output = ".pdf" + }, + new + { + Input = ".ppsm", + Output = ".pptx" + }, + new + { + Input = ".ppsm", + Output = ".otp" + }, + new + { + Input = ".ppsm", + Output = ".potm" + }, + new + { + Input = ".ppsm", + Output = ".potx" + }, + new + { + Input = ".ppsm", + Output = ".pptm" + }, + new + { + Input = ".ppsx", + Output = ".odp" + }, + new + { + Input = ".ppsx", + Output = ".pdf" + }, + new + { + Input = ".ppsx", + Output = ".pptx" + }, + new + { + Input = ".ppsx", + Output = ".otp" + }, + new + { + Input = ".ppsx", + Output = ".potm" + }, + new + { + Input = ".ppsx", + Output = ".potx" + }, + new + { + Input = ".ppsx", + Output = ".pptm" + }, + new + { + Input = ".ppt", + Output = ".odp" + }, + new + { + Input = ".ppt", + Output = ".pdf" + }, + new + { + Input = ".ppt", + Output = ".pptx" + }, + new + { + Input = ".ppt", + Output = ".otp" + }, + new + { + Input = ".ppt", + Output = ".potm" + }, + new + { + Input = ".ppt", + Output = ".potx" + }, + new + { + Input = ".ppt", + Output = ".pptm" + }, + new + { + Input = ".pptm", + Output = ".odp" + }, + new + { + Input = ".pptm", + Output = ".pdf" + }, + new + { + Input = ".pptm", + Output = ".pptx" + }, + new + { + Input = ".pptm", + Output = ".otp" + }, + new + { + Input = ".pptm", + Output = ".potm" + }, + new + { + Input = ".pptm", + Output = ".potx" + }, + new + { + Input = ".pptt", + Output = ".pptx" + }, + new + { + Input = ".pptx", + Output = ".odp" + }, + new + { + Input = ".pptx", + Output = ".pdf" + }, + new + { + Input = ".pptx", + Output = ".otp" + }, + new + { + Input = ".pptx", + Output = ".potm" + }, + new + { + Input = ".pptx", + Output = ".potx" + }, + new + { + Input = ".pptx", + Output = ".pptm" + }, + new + { + Input = ".rtf", + Output = ".odt" + }, + new + { + Input = ".rtf", + Output = ".pdf" + }, + new + { + Input = ".rtf", + Output = ".docx" + }, + new + { + Input = ".rtf", + Output = ".txt" + }, + new + { + Input = ".rtf", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".txt", + Output = ".pdf" + }, + new + { + Input = ".txt", + Output = ".docx" + }, + new + { + Input = ".txt", + Output = ".odt" + }, + new + { + Input = ".txt", + Output = ".rtf" + }, + new + { + Input = ".txt", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".xls", + Output = ".csv" + }, + new + { + Input = ".xls", + Output = ".ods" + }, + new + { + Input = ".xls", + Output = ".pdf" + }, + new + { + Input = ".xls", + Output = ".xlsx" + }, + new + { + Input = ".xls", + Output = ".ots" + }, + new + { + Input = ".xls", + Output = ".xlsm" + }, + new + { + Input = ".xls", + Output = ".xltm" + }, + new + { + Input = ".xls", + Output = ".xltx" + }, + new + { + Input = ".xlsm", + Output = ".csv" + }, + new + { + Input = ".xlsm", + Output = ".xltm" + }, + new + { + Input = ".xlsm", + Output = ".xltx" + }, + new + { + Input = ".xlsm", + Output = ".ots" + }, + new + { + Input = ".xlsm", + Output = ".pdf" + }, + new + { + Input = ".xlsm", + Output = ".ods" + }, + new + { + Input = ".xlsm", + 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 = ".xlst", + Output = ".xlsx" + }, + new + { + Input = ".xlt", + Output = ".csv" + }, + new + { + Input = ".xlt", + Output = ".ods" + }, + new + { + Input = ".xlt", + Output = ".pdf" + }, + new + { + Input = ".xlt", + Output = ".xlsx" + }, + new + { + Input = ".xlt", + Output = ".ots" + }, + new + { + Input = ".xlt", + Output = ".xlsm" + }, + new + { + Input = ".xlt", + Output = ".xltm" + }, + new + { + Input = ".xlt", + Output = ".xltx" + }, + new + { + Input = ".xltm", + Output = ".csv" + }, + new + { + Input = ".xltm", + Output = ".ods" + }, + new + { + Input = ".xltm", + Output = ".pdf" + }, + new + { + Input = ".xltm", + Output = ".ots" + }, + new + { + Input = ".xltm", + Output = ".xlsm" + }, + new + { + Input = ".xltm", + Output = ".xltx" + }, + new + { + Input = ".xltm", + Output = ".xlsx" + }, + new + { + Input = ".xltx", + Output = ".pdf" + }, + new + { + Input = ".xltx", + Output = ".csv" + }, + new + { + Input = ".xltx", + Output = ".ods" + }, + new + { + Input = ".xltx", + Output = ".ots" + }, + new + { + Input = ".xltx", + Output = ".xlsm" + }, + new + { + Input = ".xltx", + Output = ".xltm" + }, + new + { + Input = ".xltx", + Output = ".xlsx" + }, + new + { + Input = ".xps", + Output = ".pdf" + }, + 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" + }); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFile", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("Version") + .HasColumnType("integer") + .HasColumnName("version"); + + b.Property("Category") + .HasColumnType("integer") + .HasColumnName("category"); + + b.Property("Changes") + .HasColumnType("text") + .HasColumnName("changes"); + + b.Property("Comment") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("comment") + .HasDefaultValueSql("NULL::character varying"); + + b.Property("ContentLength") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("content_length") + .HasDefaultValueSql("'0'::bigint"); + + b.Property("ConvertedType") + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("converted_type") + .HasDefaultValueSql("NULL::character varying"); + + b.Property("CreateBy") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("create_by") + .IsFixedLength(); + + b.Property("CreateOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on"); + + b.Property("CurrentVersion") + .HasColumnType("boolean") + .HasColumnName("current_version"); + + b.Property("Encrypted") + .HasColumnType("boolean") + .HasColumnName("encrypted"); + + b.Property("FileStatus") + .HasColumnType("integer") + .HasColumnName("file_status"); + + b.Property("Forcesave") + .HasColumnType("integer") + .HasColumnName("forcesave"); + + b.Property("ModifiedBy") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("modified_by") + .IsFixedLength(); + + b.Property("ModifiedOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("modified_on"); + + b.Property("ParentId") + .HasColumnType("integer") + .HasColumnName("folder_id"); + + b.Property("ThumbnailStatus") + .HasColumnType("integer") + .HasColumnName("thumb"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("character varying(400)") + .HasColumnName("title"); + + b.Property("VersionGroup") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("version_group") + .HasDefaultValueSql("1"); + + b.HasKey("Id", "TenantId", "Version") + .HasName("files_file_pkey"); + + b.HasIndex("Id") + .HasDatabaseName("id"); + + b.HasIndex("ModifiedOn") + .HasDatabaseName("modified_on_files_file"); + + b.HasIndex("ParentId") + .HasDatabaseName("folder_id"); + + b.ToTable("files_file", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesBunchObjects", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("RightNode") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("right_node"); + + b.Property("LeftNode") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("left_node"); + + b.HasKey("TenantId", "RightNode") + .HasName("files_bunch_objects_pkey"); + + b.HasIndex("LeftNode") + .HasDatabaseName("left_node"); + + b.ToTable("files_bunch_objects", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesLink", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("SourceId") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("source_id"); + + b.Property("LinkedId") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("linked_id"); + + b.Property("LinkedFor") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("linked_for") + .HasDefaultValueSql("NULL::bpchar") + .IsFixedLength(); + + b.HasKey("TenantId", "SourceId", "LinkedId") + .HasName("files_link_pkey"); + + b.HasIndex("TenantId", "SourceId", "LinkedId", "LinkedFor") + .HasDatabaseName("linked_for_files_link"); + + b.ToTable("files_link", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesProperties", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("EntryId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("entry_id"); + + b.Property("Data") + .IsRequired() + .HasColumnType("text") + .HasColumnName("data"); + + b.HasKey("TenantId", "EntryId") + .HasName("files_properties_pkey"); + + b.ToTable("files_properties", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("EntryId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("entry_id"); + + b.Property("EntryType") + .HasColumnType("integer") + .HasColumnName("entry_type"); + + b.Property("Subject") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("subject") + .IsFixedLength(); + + b.Property("Owner") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner") + .IsFixedLength(); + + b.Property("Share") + .HasColumnType("integer") + .HasColumnName("security"); + + b.Property("TimeStamp") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.HasKey("TenantId", "EntryId", "EntryType", "Subject") + .HasName("files_security_pkey"); + + b.HasIndex("Owner") + .HasDatabaseName("owner"); + + b.HasIndex("EntryId", "TenantId", "EntryType", "Owner") + .HasDatabaseName("tenant_id_files_security"); + + b.ToTable("files_security", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("Owner") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("flag"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Owner", "Name", "Type") + .HasDatabaseName("name_files_tag"); + + b.ToTable("files_tag", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTagLink", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("TagId") + .HasColumnType("integer") + .HasColumnName("tag_id"); + + b.Property("EntryType") + .HasColumnType("integer") + .HasColumnName("entry_type"); + + b.Property("EntryId") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("entry_id"); + + b.Property("Count") + .HasColumnType("integer") + .HasColumnName("tag_count"); + + b.Property("CreateBy") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("create_by") + .HasDefaultValueSql("NULL::bpchar") + .IsFixedLength(); + + b.Property("CreateOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on"); + + b.HasKey("TenantId", "TagId", "EntryType", "EntryId") + .HasName("files_tag_link_pkey"); + + b.HasIndex("CreateOn") + .HasDatabaseName("create_on_files_tag_link"); + + b.HasIndex("TenantId", "EntryType", "EntryId") + .HasDatabaseName("entry_id"); + + b.ToTable("files_tag_link", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("CreateOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on"); + + b.Property("FolderId") + .HasColumnType("text"); + + b.Property("FolderType") + .HasColumnType("integer") + .HasColumnName("folder_type"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("password"); + + b.Property("Provider") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("provider") + .HasDefaultValueSql("'0'::character varying"); + + b.Property("RoomType") + .HasColumnType("integer") + .HasColumnName("room_type"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("character varying(400)") + .HasColumnName("customer_title"); + + b.Property("Token") + .HasColumnType("text") + .HasColumnName("token"); + + b.Property("Url") + .HasColumnType("text") + .HasColumnName("url"); + + b.Property("UserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("user_name"); + + b.HasKey("Id"); + + b.HasIndex("TenantId") + .HasDatabaseName("tenant_id"); + + b.ToTable("files_thirdparty_account", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyApp", b => + { + b.Property("UserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("App") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("app"); + + b.Property("ModifiedOn") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("modified_on") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("Token") + .HasColumnType("text") + .HasColumnName("token"); + + b.HasKey("UserId", "App") + .HasName("files_thirdparty_app_pkey"); + + b.ToTable("files_thirdparty_app", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyIdMapping", b => + { + b.Property("HashId") + .HasMaxLength(32) + .HasColumnType("character(32)") + .HasColumnName("hash_id") + .IsFixedLength(); + + b.Property("Id") + .IsRequired() + .HasColumnType("text") + .HasColumnName("id"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.HasKey("HashId") + .HasName("files_thirdparty_id_mapping_pkey"); + + b.HasIndex("TenantId", "HashId") + .HasDatabaseName("index_1"); + + b.ToTable("files_thirdparty_id_mapping", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFolder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("CreateBy") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("create_by") + .IsFixedLength(); + + b.Property("CreateOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on"); + + b.Property("FilesCount") + .HasColumnType("integer") + .HasColumnName("filesCount"); + + b.Property("FolderType") + .HasColumnType("integer") + .HasColumnName("folder_type"); + + b.Property("FoldersCount") + .HasColumnType("integer") + .HasColumnName("foldersCount"); + + b.Property("ModifiedBy") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("modified_by") + .IsFixedLength(); + + b.Property("ModifiedOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("modified_on"); + + b.Property("ParentId") + .HasColumnType("integer") + .HasColumnName("parent_id"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("character varying(400)") + .HasColumnName("title"); + + b.HasKey("Id"); + + b.HasIndex("ModifiedOn") + .HasDatabaseName("modified_on_files_folder"); + + b.HasIndex("TenantId", "ParentId") + .HasDatabaseName("parent_id"); + + b.ToTable("files_folder", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFolderTree", b => + { + b.Property("ParentId") + .HasColumnType("integer") + .HasColumnName("parent_id"); + + b.Property("FolderId") + .HasColumnType("integer") + .HasColumnName("folder_id"); + + b.Property("Level") + .HasColumnType("integer") + .HasColumnName("level"); + + b.HasKey("ParentId", "FolderId") + .HasName("files_folder_tree_pkey"); + + b.HasIndex("FolderId") + .HasDatabaseName("folder_id_files_folder_tree"); + + b.ToTable("files_folder_tree", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/FilesDbContext/20220725110945_FilesDbContextMigrate.cs b/migrations/postgre/FilesDbContext/20220725110945_FilesDbContextMigrate.cs new file mode 100644 index 0000000000..d9789bdf42 --- /dev/null +++ b/migrations/postgre/FilesDbContext/20220725110945_FilesDbContextMigrate.cs @@ -0,0 +1,876 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class FilesDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "onlyoffice"); + + migrationBuilder.CreateTable( + name: "files_bunch_objects", + schema: "onlyoffice", + columns: table => new + { + tenant_id = table.Column(type: "integer", nullable: false), + right_node = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + left_node = table.Column(type: "character varying(255)", maxLength: 255, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("files_bunch_objects_pkey", x => new { x.tenant_id, x.right_node }); + }); + + migrationBuilder.CreateTable( + name: "files_converts", + schema: "onlyoffice", + columns: table => new + { + input = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + output = table.Column(type: "character varying(50)", maxLength: 50, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("files_converts_pkey", x => new { x.input, x.output }); + }); + + migrationBuilder.CreateTable( + name: "files_file", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false), + version = table.Column(type: "integer", nullable: false), + tenant_id = table.Column(type: "integer", nullable: false), + version_group = table.Column(type: "integer", nullable: false, defaultValueSql: "1"), + current_version = table.Column(type: "boolean", nullable: false), + folder_id = table.Column(type: "integer", nullable: false), + title = table.Column(type: "character varying(400)", maxLength: 400, nullable: false), + content_length = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'::bigint"), + file_status = table.Column(type: "integer", nullable: false), + category = table.Column(type: "integer", nullable: false), + create_by = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: false), + create_on = table.Column(type: "timestamp with time zone", nullable: false), + modified_by = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: false), + modified_on = table.Column(type: "timestamp with time zone", nullable: false), + converted_type = table.Column(type: "character varying(10)", maxLength: 10, nullable: true, defaultValueSql: "NULL::character varying"), + comment = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL::character varying"), + changes = table.Column(type: "text", nullable: true), + encrypted = table.Column(type: "boolean", nullable: false), + forcesave = table.Column(type: "integer", nullable: false), + thumb = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("files_file_pkey", x => new { x.id, x.tenant_id, x.version }); + }); + + migrationBuilder.CreateTable( + name: "files_folder", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + parent_id = table.Column(type: "integer", nullable: false), + title = table.Column(type: "character varying(400)", maxLength: 400, nullable: false), + folder_type = table.Column(type: "integer", nullable: false), + create_by = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: false), + create_on = table.Column(type: "timestamp with time zone", nullable: false), + modified_by = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: false), + modified_on = table.Column(type: "timestamp with time zone", nullable: false), + tenant_id = table.Column(type: "integer", nullable: false), + foldersCount = table.Column(type: "integer", nullable: false), + filesCount = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_files_folder", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "files_folder_tree", + schema: "onlyoffice", + columns: table => new + { + folder_id = table.Column(type: "integer", nullable: false), + parent_id = table.Column(type: "integer", nullable: false), + level = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("files_folder_tree_pkey", x => new { x.parent_id, x.folder_id }); + }); + + migrationBuilder.CreateTable( + name: "files_link", + schema: "onlyoffice", + columns: table => new + { + tenant_id = table.Column(type: "integer", nullable: false), + source_id = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + linked_id = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + linked_for = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: false, defaultValueSql: "NULL::bpchar") + }, + constraints: table => + { + table.PrimaryKey("files_link_pkey", x => new { x.tenant_id, x.source_id, x.linked_id }); + }); + + migrationBuilder.CreateTable( + name: "files_properties", + schema: "onlyoffice", + columns: table => new + { + tenant_id = table.Column(type: "integer", nullable: false), + entry_id = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + data = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("files_properties_pkey", x => new { x.tenant_id, x.entry_id }); + }); + + migrationBuilder.CreateTable( + name: "files_security", + schema: "onlyoffice", + columns: table => new + { + tenant_id = table.Column(type: "integer", nullable: false), + entry_id = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + entry_type = table.Column(type: "integer", nullable: false), + subject = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: false), + owner = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: false), + security = table.Column(type: "integer", nullable: false), + timestamp = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("files_security_pkey", x => new { x.tenant_id, x.entry_id, x.entry_type, x.subject }); + }); + + migrationBuilder.CreateTable( + name: "files_tag", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + tenant_id = table.Column(type: "integer", nullable: false), + name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + owner = table.Column(type: "uuid", maxLength: 38, nullable: false), + flag = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_files_tag", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "files_tag_link", + schema: "onlyoffice", + columns: table => new + { + tenant_id = table.Column(type: "integer", nullable: false), + tag_id = table.Column(type: "integer", nullable: false), + entry_type = table.Column(type: "integer", nullable: false), + entry_id = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + create_by = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: true, defaultValueSql: "NULL::bpchar"), + create_on = table.Column(type: "timestamp with time zone", nullable: true), + tag_count = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("files_tag_link_pkey", x => new { x.tenant_id, x.tag_id, x.entry_type, x.entry_id }); + }); + + migrationBuilder.CreateTable( + name: "files_thirdparty_account", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + provider = table.Column(type: "character varying(50)", maxLength: 50, nullable: false, defaultValueSql: "'0'::character varying"), + customer_title = table.Column(type: "character varying(400)", maxLength: 400, nullable: false), + user_name = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), + password = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), + token = table.Column(type: "text", nullable: true), + user_id = table.Column(type: "uuid", maxLength: 38, nullable: false), + folder_type = table.Column(type: "integer", nullable: false), + room_type = table.Column(type: "integer", nullable: false), + create_on = table.Column(type: "timestamp with time zone", nullable: false), + url = table.Column(type: "text", nullable: true), + tenant_id = table.Column(type: "integer", nullable: false), + FolderId = table.Column(type: "text", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_files_thirdparty_account", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "files_thirdparty_app", + schema: "onlyoffice", + columns: table => new + { + user_id = table.Column(type: "uuid", maxLength: 38, nullable: false), + app = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + token = table.Column(type: "text", nullable: true), + tenant_id = table.Column(type: "integer", nullable: false), + modified_on = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("files_thirdparty_app_pkey", x => new { x.user_id, x.app }); + }); + + migrationBuilder.CreateTable( + name: "files_thirdparty_id_mapping", + schema: "onlyoffice", + columns: table => new + { + hash_id = table.Column(type: "character(32)", fixedLength: true, maxLength: 32, nullable: false), + tenant_id = table.Column(type: "integer", nullable: false), + id = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("files_thirdparty_id_mapping_pkey", x => x.hash_id); + }); + + migrationBuilder.CreateTable( + name: "tenants_quota", + schema: "onlyoffice", + columns: table => new + { + tenant = table.Column(type: "integer", nullable: false), + name = table.Column(type: "character varying", nullable: true), + description = table.Column(type: "character varying", nullable: true), + max_file_size = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"), + max_total_size = table.Column(type: "bigint", nullable: false, defaultValueSql: "'0'"), + active_users = table.Column(type: "integer", nullable: false), + features = table.Column(type: "text", nullable: true), + price = table.Column(type: "numeric(10,2)", nullable: false, defaultValueSql: "0.00"), + avangate_id = table.Column(type: "character varying(128)", maxLength: 128, nullable: true, defaultValueSql: "NULL"), + visible = table.Column(type: "boolean", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("tenants_quota_pkey", x => x.tenant); + }); + + migrationBuilder.CreateTable( + name: "tenants_tariff", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + tenant = table.Column(type: "integer", nullable: false), + tariff = table.Column(type: "integer", nullable: false), + stamp = table.Column(type: "timestamp with time zone", nullable: false), + quantity = table.Column(type: "integer", nullable: false), + comment = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + create_on = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tariff", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "tenants_tenants", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + alias = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), + mappeddomain = table.Column(type: "character varying(100)", maxLength: 100, nullable: true, defaultValueSql: "NULL"), + version = table.Column(type: "integer", nullable: false, defaultValueSql: "2"), + version_changed = table.Column(type: "timestamp with time zone", nullable: true), + language = table.Column(type: "character(10)", fixedLength: true, maxLength: 10, nullable: false, defaultValueSql: "'en-US'"), + timezone = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL"), + trusteddomains = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"), + trusteddomainsenabled = table.Column(type: "integer", nullable: false, defaultValueSql: "1"), + status = table.Column(type: "integer", nullable: false), + statuschanged = table.Column(type: "timestamp with time zone", nullable: true), + creationdatetime = table.Column(type: "timestamp with time zone", nullable: false), + owner_id = table.Column(type: "uuid", maxLength: 38, nullable: true, defaultValueSql: "NULL"), + payment_id = table.Column(type: "character varying(38)", maxLength: 38, nullable: true, defaultValueSql: "NULL"), + industry = table.Column(type: "integer", nullable: false), + last_modified = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), + spam = table.Column(type: "boolean", nullable: false, defaultValueSql: "true"), + calls = table.Column(type: "boolean", nullable: false, defaultValueSql: "true") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tenants", x => x.id); + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + 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" }, + { ".ods", ".csv" }, + { ".ods", ".ots" }, + { ".ods", ".pdf" }, + { ".ods", ".xlsm" }, + { ".ods", ".xlsx" }, + { ".ods", ".xltm" }, + { ".ods", ".xltx" }, + { ".odt", ".docm" }, + { ".odt", ".docx" }, + { ".odt", ".dotm" }, + { ".odt", ".dotx" }, + { ".odt", ".epub" }, + { ".odt", ".fb2" }, + { ".odt", ".html" }, + { ".odt", ".ott" }, + { ".odt", ".pdf" }, + { ".odt", ".rtf" }, + { ".odt", ".txt" }, + { ".otp", ".odp" }, + { ".otp", ".pdf" }, + { ".otp", ".potm" }, + { ".otp", ".potx" }, + { ".otp", ".pptm" }, + { ".otp", ".pptx" }, + { ".ots", ".csv" }, + { ".ots", ".ods" }, + { ".ots", ".pdf" }, + { ".ots", ".xlsm" }, + { ".ots", ".xlsx" }, + { ".ots", ".xltm" }, + { ".ots", ".xltx" }, + { ".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", ".potm" }, + { ".pot", ".potx" }, + { ".pot", ".pptm" }, + { ".pot", ".pptx" }, + { ".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" } + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "tenants_quota", + columns: new[] { "tenant", "active_users", "avangate_id", "description", "features", "max_file_size", "max_total_size", "name", "visible" }, + values: new object[] { -1, 10000, "0", null, "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", 102400L, 10995116277760L, "default", false }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "tenants_tenants", + columns: new[] { "id", "alias", "creationdatetime", "industry", "last_modified", "name", "owner_id", "status", "statuschanged", "version_changed" }, + values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), 0, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "Web Office", new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), 0, null, null }); + + migrationBuilder.CreateIndex( + name: "left_node", + schema: "onlyoffice", + table: "files_bunch_objects", + column: "left_node"); + + migrationBuilder.CreateIndex( + name: "folder_id", + schema: "onlyoffice", + table: "files_file", + column: "folder_id"); + + migrationBuilder.CreateIndex( + name: "id", + schema: "onlyoffice", + table: "files_file", + column: "id"); + + migrationBuilder.CreateIndex( + name: "modified_on_files_file", + schema: "onlyoffice", + table: "files_file", + column: "modified_on"); + + migrationBuilder.CreateIndex( + name: "modified_on_files_folder", + schema: "onlyoffice", + table: "files_folder", + column: "modified_on"); + + migrationBuilder.CreateIndex( + name: "parent_id", + schema: "onlyoffice", + table: "files_folder", + columns: new[] { "tenant_id", "parent_id" }); + + migrationBuilder.CreateIndex( + name: "folder_id_files_folder_tree", + schema: "onlyoffice", + table: "files_folder_tree", + column: "folder_id"); + + migrationBuilder.CreateIndex( + name: "linked_for_files_link", + schema: "onlyoffice", + table: "files_link", + columns: new[] { "tenant_id", "source_id", "linked_id", "linked_for" }); + + migrationBuilder.CreateIndex( + name: "owner", + schema: "onlyoffice", + table: "files_security", + column: "owner"); + + migrationBuilder.CreateIndex( + name: "tenant_id_files_security", + schema: "onlyoffice", + table: "files_security", + columns: new[] { "entry_id", "tenant_id", "entry_type", "owner" }); + + migrationBuilder.CreateIndex( + name: "name_files_tag", + schema: "onlyoffice", + table: "files_tag", + columns: new[] { "tenant_id", "owner", "name", "flag" }); + + migrationBuilder.CreateIndex( + name: "create_on_files_tag_link", + schema: "onlyoffice", + table: "files_tag_link", + column: "create_on"); + + migrationBuilder.CreateIndex( + name: "entry_id", + schema: "onlyoffice", + table: "files_tag_link", + columns: new[] { "tenant_id", "entry_type", "entry_id" }); + + migrationBuilder.CreateIndex( + name: "tenant_id", + schema: "onlyoffice", + table: "files_thirdparty_account", + column: "tenant_id"); + + migrationBuilder.CreateIndex( + name: "index_1", + schema: "onlyoffice", + table: "files_thirdparty_id_mapping", + columns: new[] { "tenant_id", "hash_id" }); + + migrationBuilder.CreateIndex( + name: "tenant_tenants_tariff", + schema: "onlyoffice", + table: "tenants_tariff", + column: "tenant"); + + migrationBuilder.CreateIndex( + name: "alias", + schema: "onlyoffice", + table: "tenants_tenants", + column: "alias", + unique: true); + + migrationBuilder.CreateIndex( + name: "last_modified_tenants_tenants", + schema: "onlyoffice", + table: "tenants_tenants", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "mappeddomain", + schema: "onlyoffice", + table: "tenants_tenants", + column: "mappeddomain"); + + migrationBuilder.CreateIndex( + name: "version", + schema: "onlyoffice", + table: "tenants_tenants", + column: "version"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "files_bunch_objects", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "files_converts", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "files_file", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "files_folder", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "files_folder_tree", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "files_link", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "files_properties", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "files_security", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "files_tag", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "files_tag_link", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "files_thirdparty_account", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "files_thirdparty_app", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "files_thirdparty_id_mapping", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "tenants_quota", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "tenants_tariff", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "tenants_tenants", + schema: "onlyoffice"); + } + } +} diff --git a/migrations/postgre/FilesDbContext/FilesDbContextModelSnapshot.cs b/migrations/postgre/FilesDbContext/FilesDbContextModelSnapshot.cs new file mode 100644 index 0000000000..eb88b49917 --- /dev/null +++ b/migrations/postgre/FilesDbContext/FilesDbContextModelSnapshot.cs @@ -0,0 +1,2596 @@ +// +using System; +using ASC.Files.Core.EF; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(FilesDbContext))] + partial class FilesDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("ActiveUsers") + .HasColumnType("integer") + .HasColumnName("active_users"); + + b.Property("AvangateId") + .ValueGeneratedOnAdd() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("avangate_id") + .HasDefaultValueSql("NULL"); + + b.Property("Description") + .HasColumnType("character varying") + .HasColumnName("description"); + + b.Property("Features") + .HasColumnType("text") + .HasColumnName("features"); + + b.Property("MaxFileSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_file_size") + .HasDefaultValueSql("'0'"); + + b.Property("MaxTotalSize") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("max_total_size") + .HasDefaultValueSql("'0'"); + + b.Property("Name") + .HasColumnType("character varying") + .HasColumnName("name"); + + b.Property("Price") + .ValueGeneratedOnAdd() + .HasColumnType("numeric(10,2)") + .HasColumnName("price") + .HasDefaultValueSql("0.00"); + + b.Property("Visible") + .HasColumnType("boolean") + .HasColumnName("visible"); + + b.HasKey("Tenant") + .HasName("tenants_quota_pkey"); + + b.ToTable("tenants_quota", "onlyoffice"); + + b.HasData( + new + { + Tenant = -1, + ActiveUsers = 10000, + AvangateId = "0", + Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", + MaxFileSize = 102400L, + MaxTotalSize = 10995116277760L, + Name = "default", + Price = 0.00m, + Visible = false + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Comment") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("comment") + .HasDefaultValueSql("NULL"); + + b.Property("CreateOn") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Quantity") + .HasColumnType("integer") + .HasColumnName("quantity"); + + b.Property("Stamp") + .HasColumnType("timestamp with time zone") + .HasColumnName("stamp"); + + b.Property("Tariff") + .HasColumnType("integer") + .HasColumnName("tariff"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant_tenants_tariff"); + + b.ToTable("tenants_tariff", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Alias") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("alias"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("calls") + .HasDefaultValueSql("true"); + + b.Property("CreationDateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .HasColumnType("integer") + .HasColumnName("industry"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .IsFixedLength(); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("MappedDomain") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("mappeddomain") + .HasDefaultValueSql("NULL"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("OwnerId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner_id") + .HasDefaultValueSql("NULL"); + + b.Property("PaymentId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("payment_id") + .HasDefaultValueSql("NULL"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("spam") + .HasDefaultValueSql("true"); + + b.Property("Status") + .HasColumnType("integer") + .HasColumnName("status"); + + b.Property("StatusChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("timezone") + .HasDefaultValueSql("NULL"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("1"); + + b.Property("TrustedDomainsRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("trusteddomains") + .HasDefaultValueSql("NULL"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("version") + .HasDefaultValueSql("2"); + + b.Property("Version_Changed") + .HasColumnType("timestamp with time zone") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_tenants_tenants"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", "onlyoffice"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.FilesConverts", b => + { + b.Property("Input") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("input"); + + b.Property("Output") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("output"); + + b.HasKey("Input", "Output") + .HasName("files_converts_pkey"); + + b.ToTable("files_converts", "onlyoffice"); + + b.HasData( + new + { + Input = ".csv", + Output = ".ods" + }, + new + { + Input = ".csv", + Output = ".pdf" + }, + new + { + Input = ".csv", + Output = ".ots" + }, + new + { + Input = ".csv", + Output = ".xlsx" + }, + new + { + Input = ".csv", + Output = ".xlsm" + }, + new + { + Input = ".csv", + Output = ".xltm" + }, + new + { + Input = ".csv", + Output = ".xltx" + }, + new + { + Input = ".doc", + Output = ".docx" + }, + new + { + Input = ".doc", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".doc", + Output = ".odt" + }, + 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 = ".html" + }, + new + { + Input = ".docm", + Output = ".dotx" + }, + new + { + Input = ".docm", + Output = ".epub" + }, + new + { + Input = ".docm", + Output = ".fb2" + }, + new + { + Input = ".docm", + Output = ".ott" + }, + new + { + Input = ".docm", + Output = ".odt" + }, + new + { + Input = ".docm", + Output = ".pdf" + }, + new + { + Input = ".docm", + Output = ".rtf" + }, + new + { + Input = ".docm", + Output = ".txt" + }, + new + { + Input = ".doct", + Output = ".docx" + }, + new + { + Input = ".docx", + Output = ".odt" + }, + new + { + Input = ".docx", + Output = ".pdf" + }, + new + { + Input = ".docx", + Output = ".rtf" + }, + new + { + Input = ".docx", + Output = ".txt" + }, + new + { + Input = ".docx", + Output = ".html" + }, + new + { + Input = ".docx", + Output = ".dotm" + }, + new + { + Input = ".docx", + Output = ".dotx" + }, + new + { + Input = ".docx", + Output = ".epub" + }, + new + { + Input = ".docx", + Output = ".fb2" + }, + new + { + Input = ".docx", + Output = ".ott" + }, + new + { + Input = ".docx", + Output = ".docm" + }, + new + { + Input = ".docx", + Output = ".docxf" + }, + new + { + Input = ".docxf", + Output = ".docx" + }, + new + { + Input = ".docxf", + Output = ".odt" + }, + new + { + Input = ".docxf", + Output = ".oform" + }, + new + { + Input = ".docxf", + Output = ".pdf" + }, + new + { + Input = ".docxf", + Output = ".rtf" + }, + new + { + Input = ".docxf", + Output = ".txt" + }, + new + { + Input = ".docxf", + Output = ".dotx" + }, + new + { + Input = ".docxf", + Output = ".epub" + }, + new + { + Input = ".docxf", + Output = ".fb2" + }, + new + { + Input = ".docxf", + Output = ".html" + }, + new + { + Input = ".docxf", + Output = ".ott" + }, + new + { + Input = ".dot", + Output = ".docx" + }, + new + { + Input = ".dot", + Output = ".odt" + }, + new + { + Input = ".dot", + Output = ".pdf" + }, + new + { + Input = ".dot", + Output = ".rtf" + }, + new + { + Input = ".dot", + Output = ".txt" + }, + new + { + Input = ".dot", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".dotm", + Output = ".docx" + }, + new + { + Input = ".dotm", + Output = ".odt" + }, + new + { + Input = ".dotm", + Output = ".pdf" + }, + new + { + Input = ".dotm", + Output = ".rtf" + }, + new + { + Input = ".dotm", + Output = ".txt" + }, + new + { + Input = ".dotm", + Output = ".docm" + }, + new + { + Input = ".dotm", + Output = ".dotx" + }, + new + { + Input = ".dotm", + Output = ".epub" + }, + new + { + Input = ".dotm", + Output = ".fb2" + }, + new + { + Input = ".dotm", + Output = ".html" + }, + new + { + Input = ".dotm", + Output = ".ott" + }, + new + { + Input = ".dotx", + Output = ".docx" + }, + new + { + Input = ".dotx", + Output = ".odt" + }, + new + { + Input = ".dotx", + Output = ".pdf" + }, + new + { + Input = ".dotx", + Output = ".rtf" + }, + new + { + Input = ".dotx", + Output = ".txt" + }, + new + { + Input = ".dotx", + Output = ".docm" + }, + new + { + Input = ".dotx", + Output = ".dotm" + }, + new + { + Input = ".dotx", + Output = ".epub" + }, + new + { + Input = ".dotx", + Output = ".fb2" + }, + new + { + Input = ".dotx", + Output = ".html" + }, + new + { + Input = ".dotx", + Output = ".ott" + }, + new + { + Input = ".epub", + Output = ".docx" + }, + new + { + Input = ".epub", + Output = ".odt" + }, + new + { + Input = ".epub", + Output = ".pdf" + }, + new + { + Input = ".epub", + Output = ".rtf" + }, + new + { + Input = ".epub", + Output = ".txt" + }, + new + { + Input = ".epub", + Output = ".docm" + }, + new + { + Input = ".epub", + Output = ".dotm" + }, + new + { + Input = ".epub", + Output = ".dotx" + }, + new + { + Input = ".epub", + Output = ".fb2" + }, + new + { + Input = ".epub", + Output = ".html" + }, + new + { + Input = ".epub", + Output = ".ott" + }, + new + { + Input = ".fb2", + Output = ".docx" + }, + new + { + Input = ".fb2", + Output = ".odt" + }, + new + { + Input = ".fb2", + Output = ".pdf" + }, + new + { + Input = ".fb2", + Output = ".rtf" + }, + new + { + Input = ".fb2", + Output = ".txt" + }, + new + { + Input = ".fb2", + Output = ".docm" + }, + new + { + Input = ".fb2", + Output = ".dotm" + }, + new + { + Input = ".fb2", + Output = ".dotx" + }, + new + { + Input = ".fb2", + Output = ".epub" + }, + new + { + Input = ".fb2", + Output = ".html" + }, + new + { + Input = ".fb2", + Output = ".ott" + }, + new + { + Input = ".fodp", + Output = ".odp" + }, + new + { + Input = ".fodp", + Output = ".pdf" + }, + new + { + Input = ".fodp", + Output = ".pptx" + }, + new + { + Input = ".fodp", + Output = ".otp" + }, + new + { + Input = ".fodp", + Output = ".potm" + }, + new + { + Input = ".fodp", + Output = ".potx" + }, + new + { + Input = ".fodp", + Output = ".pptm" + }, + new + { + Input = ".fods", + Output = ".csv" + }, + new + { + Input = ".fods", + Output = ".ods" + }, + new + { + Input = ".fods", + Output = ".pdf" + }, + new + { + Input = ".fods", + Output = ".xlsx" + }, + new + { + Input = ".fods", + Output = ".xlsm" + }, + new + { + Input = ".fods", + Output = ".xltm" + }, + new + { + Input = ".fods", + Output = ".xltx" + }, + new + { + Input = ".fods", + Output = ".ots" + }, + new + { + Input = ".fodt", + Output = ".docx" + }, + new + { + Input = ".fodt", + Output = ".odt" + }, + new + { + Input = ".fodt", + Output = ".docm" + }, + new + { + Input = ".fodt", + Output = ".pdf" + }, + new + { + Input = ".fodt", + Output = ".rtf" + }, + new + { + Input = ".fodt", + Output = ".txt" + }, + 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 = ".ott" + }, + new + { + Input = ".html", + Output = ".docx" + }, + new + { + Input = ".html", + Output = ".odt" + }, + new + { + Input = ".html", + Output = ".pdf" + }, + new + { + Input = ".html", + Output = ".rtf" + }, + new + { + Input = ".html", + Output = ".txt" + }, + new + { + Input = ".html", + Output = ".docm" + }, + new + { + Input = ".html", + Output = ".dotm" + }, + new + { + Input = ".html", + Output = ".dotx" + }, + new + { + Input = ".html", + Output = ".epub" + }, + new + { + Input = ".html", + Output = ".fb2" + }, + new + { + Input = ".html", + Output = ".ott" + }, + new + { + Input = ".mht", + Output = ".docx" + }, + new + { + Input = ".mht", + Output = ".odt" + }, + new + { + Input = ".mht", + Output = ".pdf" + }, + new + { + Input = ".mht", + Output = ".rtf" + }, + new + { + Input = ".mht", + Output = ".txt" + }, + new + { + Input = ".mht", + Output = ".docm" + }, + new + { + Input = ".mht", + Output = ".dotm" + }, + new + { + Input = ".mht", + Output = ".dotx" + }, + new + { + Input = ".mht", + Output = ".epub" + }, + new + { + Input = ".mht", + Output = ".fb2" + }, + new + { + Input = ".mht", + Output = ".ott" + }, + new + { + Input = ".odp", + Output = ".pdf" + }, + new + { + Input = ".odp", + Output = ".pptx" + }, + new + { + Input = ".odp", + Output = ".otp" + }, + new + { + Input = ".odp", + Output = ".potm" + }, + new + { + Input = ".odp", + Output = ".potx" + }, + new + { + Input = ".odp", + Output = ".pptm" + }, + 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 = ".pdf" + }, + new + { + Input = ".ods", + Output = ".xlsx" + }, + new + { + Input = ".ods", + Output = ".ots" + }, + new + { + Input = ".ods", + Output = ".xlsm" + }, + 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 = ".xltm" + }, + new + { + Input = ".ots", + Output = ".xltx" + }, + new + { + Input = ".ots", + Output = ".xlsx" + }, + new + { + Input = ".oxps", + Output = ".pdf" + }, + new + { + Input = ".odt", + Output = ".docx" + }, + new + { + Input = ".odt", + Output = ".pdf" + }, + new + { + Input = ".odt", + Output = ".rtf" + }, + new + { + Input = ".odt", + Output = ".txt" + }, + new + { + Input = ".odt", + Output = ".docm" + }, + 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 = ".ott", + Output = ".docx" + }, + new + { + Input = ".ott", + Output = ".odt" + }, + new + { + Input = ".ott", + Output = ".pdf" + }, + new + { + Input = ".ott", + Output = ".rtf" + }, + new + { + Input = ".ott", + Output = ".txt" + }, + new + { + Input = ".ott", + Output = ".docm" + }, + 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 = ".pot", + Output = ".odp" + }, + new + { + Input = ".pot", + Output = ".pdf" + }, + new + { + Input = ".pot", + Output = ".pptx" + }, + new + { + Input = ".pot", + Output = ".otp" + }, + new + { + Input = ".pot", + Output = ".potm" + }, + new + { + Input = ".pot", + Output = ".potx" + }, + new + { + Input = ".pot", + Output = ".pptm" + }, + new + { + Input = ".potm", + Output = ".odp" + }, + new + { + Input = ".potm", + Output = ".pdf" + }, + new + { + Input = ".potm", + Output = ".pptx" + }, + new + { + Input = ".potm", + Output = ".otp" + }, + new + { + Input = ".potm", + Output = ".potx" + }, + new + { + Input = ".potm", + Output = ".pptm" + }, + new + { + Input = ".potx", + Output = ".odp" + }, + new + { + Input = ".potx", + Output = ".pdf" + }, + new + { + Input = ".potx", + Output = ".pptx" + }, + new + { + Input = ".potx", + Output = ".otp" + }, + new + { + Input = ".potx", + Output = ".potm" + }, + new + { + Input = ".potx", + Output = ".pptm" + }, + new + { + Input = ".pps", + Output = ".odp" + }, + new + { + Input = ".pps", + Output = ".pdf" + }, + new + { + Input = ".pps", + Output = ".pptx" + }, + new + { + Input = ".pps", + Output = ".otp" + }, + new + { + Input = ".pps", + Output = ".potm" + }, + new + { + Input = ".pps", + Output = ".potx" + }, + new + { + Input = ".pps", + Output = ".pptm" + }, + new + { + Input = ".ppsm", + Output = ".odp" + }, + new + { + Input = ".ppsm", + Output = ".pdf" + }, + new + { + Input = ".ppsm", + Output = ".pptx" + }, + new + { + Input = ".ppsm", + Output = ".otp" + }, + new + { + Input = ".ppsm", + Output = ".potm" + }, + new + { + Input = ".ppsm", + Output = ".potx" + }, + new + { + Input = ".ppsm", + Output = ".pptm" + }, + new + { + Input = ".ppsx", + Output = ".odp" + }, + new + { + Input = ".ppsx", + Output = ".pdf" + }, + new + { + Input = ".ppsx", + Output = ".pptx" + }, + new + { + Input = ".ppsx", + Output = ".otp" + }, + new + { + Input = ".ppsx", + Output = ".potm" + }, + new + { + Input = ".ppsx", + Output = ".potx" + }, + new + { + Input = ".ppsx", + Output = ".pptm" + }, + new + { + Input = ".ppt", + Output = ".odp" + }, + new + { + Input = ".ppt", + Output = ".pdf" + }, + new + { + Input = ".ppt", + Output = ".pptx" + }, + new + { + Input = ".ppt", + Output = ".otp" + }, + new + { + Input = ".ppt", + Output = ".potm" + }, + new + { + Input = ".ppt", + Output = ".potx" + }, + new + { + Input = ".ppt", + Output = ".pptm" + }, + new + { + Input = ".pptm", + Output = ".odp" + }, + new + { + Input = ".pptm", + Output = ".pdf" + }, + new + { + Input = ".pptm", + Output = ".pptx" + }, + new + { + Input = ".pptm", + Output = ".otp" + }, + new + { + Input = ".pptm", + Output = ".potm" + }, + new + { + Input = ".pptm", + Output = ".potx" + }, + new + { + Input = ".pptt", + Output = ".pptx" + }, + new + { + Input = ".pptx", + Output = ".odp" + }, + new + { + Input = ".pptx", + Output = ".pdf" + }, + new + { + Input = ".pptx", + Output = ".otp" + }, + new + { + Input = ".pptx", + Output = ".potm" + }, + new + { + Input = ".pptx", + Output = ".potx" + }, + new + { + Input = ".pptx", + Output = ".pptm" + }, + new + { + Input = ".rtf", + Output = ".odt" + }, + new + { + Input = ".rtf", + Output = ".pdf" + }, + new + { + Input = ".rtf", + Output = ".docx" + }, + new + { + Input = ".rtf", + Output = ".txt" + }, + new + { + Input = ".rtf", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".txt", + Output = ".pdf" + }, + new + { + Input = ".txt", + Output = ".docx" + }, + new + { + Input = ".txt", + Output = ".odt" + }, + new + { + Input = ".txt", + Output = ".rtf" + }, + new + { + Input = ".txt", + Output = ".docm" + }, + 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 = ".ott" + }, + new + { + Input = ".xls", + Output = ".csv" + }, + new + { + Input = ".xls", + Output = ".ods" + }, + new + { + Input = ".xls", + Output = ".pdf" + }, + new + { + Input = ".xls", + Output = ".xlsx" + }, + new + { + Input = ".xls", + Output = ".ots" + }, + new + { + Input = ".xls", + Output = ".xlsm" + }, + new + { + Input = ".xls", + Output = ".xltm" + }, + new + { + Input = ".xls", + Output = ".xltx" + }, + new + { + Input = ".xlsm", + Output = ".csv" + }, + new + { + Input = ".xlsm", + Output = ".xltm" + }, + new + { + Input = ".xlsm", + Output = ".xltx" + }, + new + { + Input = ".xlsm", + Output = ".ots" + }, + new + { + Input = ".xlsm", + Output = ".pdf" + }, + new + { + Input = ".xlsm", + Output = ".ods" + }, + new + { + Input = ".xlsm", + 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 = ".xlst", + Output = ".xlsx" + }, + new + { + Input = ".xlt", + Output = ".csv" + }, + new + { + Input = ".xlt", + Output = ".ods" + }, + new + { + Input = ".xlt", + Output = ".pdf" + }, + new + { + Input = ".xlt", + Output = ".xlsx" + }, + new + { + Input = ".xlt", + Output = ".ots" + }, + new + { + Input = ".xlt", + Output = ".xlsm" + }, + new + { + Input = ".xlt", + Output = ".xltm" + }, + new + { + Input = ".xlt", + Output = ".xltx" + }, + new + { + Input = ".xltm", + Output = ".csv" + }, + new + { + Input = ".xltm", + Output = ".ods" + }, + new + { + Input = ".xltm", + Output = ".pdf" + }, + new + { + Input = ".xltm", + Output = ".ots" + }, + new + { + Input = ".xltm", + Output = ".xlsm" + }, + new + { + Input = ".xltm", + Output = ".xltx" + }, + new + { + Input = ".xltm", + Output = ".xlsx" + }, + new + { + Input = ".xltx", + Output = ".pdf" + }, + new + { + Input = ".xltx", + Output = ".csv" + }, + new + { + Input = ".xltx", + Output = ".ods" + }, + new + { + Input = ".xltx", + Output = ".ots" + }, + new + { + Input = ".xltx", + Output = ".xlsm" + }, + new + { + Input = ".xltx", + Output = ".xltm" + }, + new + { + Input = ".xltx", + Output = ".xlsx" + }, + new + { + Input = ".xps", + Output = ".pdf" + }, + 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" + }); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFile", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("Version") + .HasColumnType("integer") + .HasColumnName("version"); + + b.Property("Category") + .HasColumnType("integer") + .HasColumnName("category"); + + b.Property("Changes") + .HasColumnType("text") + .HasColumnName("changes"); + + b.Property("Comment") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("comment") + .HasDefaultValueSql("NULL::character varying"); + + b.Property("ContentLength") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasColumnName("content_length") + .HasDefaultValueSql("'0'::bigint"); + + b.Property("ConvertedType") + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("converted_type") + .HasDefaultValueSql("NULL::character varying"); + + b.Property("CreateBy") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("create_by") + .IsFixedLength(); + + b.Property("CreateOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on"); + + b.Property("CurrentVersion") + .HasColumnType("boolean") + .HasColumnName("current_version"); + + b.Property("Encrypted") + .HasColumnType("boolean") + .HasColumnName("encrypted"); + + b.Property("FileStatus") + .HasColumnType("integer") + .HasColumnName("file_status"); + + b.Property("Forcesave") + .HasColumnType("integer") + .HasColumnName("forcesave"); + + b.Property("ModifiedBy") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("modified_by") + .IsFixedLength(); + + b.Property("ModifiedOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("modified_on"); + + b.Property("ParentId") + .HasColumnType("integer") + .HasColumnName("folder_id"); + + b.Property("ThumbnailStatus") + .HasColumnType("integer") + .HasColumnName("thumb"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("character varying(400)") + .HasColumnName("title"); + + b.Property("VersionGroup") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("version_group") + .HasDefaultValueSql("1"); + + b.HasKey("Id", "TenantId", "Version") + .HasName("files_file_pkey"); + + b.HasIndex("Id") + .HasDatabaseName("id"); + + b.HasIndex("ModifiedOn") + .HasDatabaseName("modified_on_files_file"); + + b.HasIndex("ParentId") + .HasDatabaseName("folder_id"); + + b.ToTable("files_file", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesBunchObjects", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("RightNode") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("right_node"); + + b.Property("LeftNode") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("left_node"); + + b.HasKey("TenantId", "RightNode") + .HasName("files_bunch_objects_pkey"); + + b.HasIndex("LeftNode") + .HasDatabaseName("left_node"); + + b.ToTable("files_bunch_objects", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesLink", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("SourceId") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("source_id"); + + b.Property("LinkedId") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("linked_id"); + + b.Property("LinkedFor") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("linked_for") + .HasDefaultValueSql("NULL::bpchar") + .IsFixedLength(); + + b.HasKey("TenantId", "SourceId", "LinkedId") + .HasName("files_link_pkey"); + + b.HasIndex("TenantId", "SourceId", "LinkedId", "LinkedFor") + .HasDatabaseName("linked_for_files_link"); + + b.ToTable("files_link", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesProperties", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("EntryId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("entry_id"); + + b.Property("Data") + .IsRequired() + .HasColumnType("text") + .HasColumnName("data"); + + b.HasKey("TenantId", "EntryId") + .HasName("files_properties_pkey"); + + b.ToTable("files_properties", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("EntryId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("entry_id"); + + b.Property("EntryType") + .HasColumnType("integer") + .HasColumnName("entry_type"); + + b.Property("Subject") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("subject") + .IsFixedLength(); + + b.Property("Owner") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner") + .IsFixedLength(); + + b.Property("Share") + .HasColumnType("integer") + .HasColumnName("security"); + + b.Property("TimeStamp") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.HasKey("TenantId", "EntryId", "EntryType", "Subject") + .HasName("files_security_pkey"); + + b.HasIndex("Owner") + .HasDatabaseName("owner"); + + b.HasIndex("EntryId", "TenantId", "EntryType", "Owner") + .HasDatabaseName("tenant_id_files_security"); + + b.ToTable("files_security", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("Owner") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("Type") + .HasColumnType("integer") + .HasColumnName("flag"); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Owner", "Name", "Type") + .HasDatabaseName("name_files_tag"); + + b.ToTable("files_tag", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTagLink", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("TagId") + .HasColumnType("integer") + .HasColumnName("tag_id"); + + b.Property("EntryType") + .HasColumnType("integer") + .HasColumnName("entry_type"); + + b.Property("EntryId") + .HasMaxLength(32) + .HasColumnType("character varying(32)") + .HasColumnName("entry_id"); + + b.Property("Count") + .HasColumnType("integer") + .HasColumnName("tag_count"); + + b.Property("CreateBy") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("create_by") + .HasDefaultValueSql("NULL::bpchar") + .IsFixedLength(); + + b.Property("CreateOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on"); + + b.HasKey("TenantId", "TagId", "EntryType", "EntryId") + .HasName("files_tag_link_pkey"); + + b.HasIndex("CreateOn") + .HasDatabaseName("create_on_files_tag_link"); + + b.HasIndex("TenantId", "EntryType", "EntryId") + .HasDatabaseName("entry_id"); + + b.ToTable("files_tag_link", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("CreateOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on"); + + b.Property("FolderId") + .HasColumnType("text"); + + b.Property("FolderType") + .HasColumnType("integer") + .HasColumnName("folder_type"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("password"); + + b.Property("Provider") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("provider") + .HasDefaultValueSql("'0'::character varying"); + + b.Property("RoomType") + .HasColumnType("integer") + .HasColumnName("room_type"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("character varying(400)") + .HasColumnName("customer_title"); + + b.Property("Token") + .HasColumnType("text") + .HasColumnName("token"); + + b.Property("Url") + .HasColumnType("text") + .HasColumnName("url"); + + b.Property("UserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("user_name"); + + b.HasKey("Id"); + + b.HasIndex("TenantId") + .HasDatabaseName("tenant_id"); + + b.ToTable("files_thirdparty_account", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyApp", b => + { + b.Property("UserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.Property("App") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("app"); + + b.Property("ModifiedOn") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("modified_on") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("Token") + .HasColumnType("text") + .HasColumnName("token"); + + b.HasKey("UserId", "App") + .HasName("files_thirdparty_app_pkey"); + + b.ToTable("files_thirdparty_app", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyIdMapping", b => + { + b.Property("HashId") + .HasMaxLength(32) + .HasColumnType("character(32)") + .HasColumnName("hash_id") + .IsFixedLength(); + + b.Property("Id") + .IsRequired() + .HasColumnType("text") + .HasColumnName("id"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.HasKey("HashId") + .HasName("files_thirdparty_id_mapping_pkey"); + + b.HasIndex("TenantId", "HashId") + .HasDatabaseName("index_1"); + + b.ToTable("files_thirdparty_id_mapping", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFolder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("CreateBy") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("create_by") + .IsFixedLength(); + + b.Property("CreateOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on"); + + b.Property("FilesCount") + .HasColumnType("integer") + .HasColumnName("filesCount"); + + b.Property("FolderType") + .HasColumnType("integer") + .HasColumnName("folder_type"); + + b.Property("FoldersCount") + .HasColumnType("integer") + .HasColumnName("foldersCount"); + + b.Property("ModifiedBy") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("modified_by") + .IsFixedLength(); + + b.Property("ModifiedOn") + .HasColumnType("timestamp with time zone") + .HasColumnName("modified_on"); + + b.Property("ParentId") + .HasColumnType("integer") + .HasColumnName("parent_id"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(400) + .HasColumnType("character varying(400)") + .HasColumnName("title"); + + b.HasKey("Id"); + + b.HasIndex("ModifiedOn") + .HasDatabaseName("modified_on_files_folder"); + + b.HasIndex("TenantId", "ParentId") + .HasDatabaseName("parent_id"); + + b.ToTable("files_folder", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Files.Core.EF.DbFolderTree", b => + { + b.Property("ParentId") + .HasColumnType("integer") + .HasColumnName("parent_id"); + + b.Property("FolderId") + .HasColumnType("integer") + .HasColumnName("folder_id"); + + b.Property("Level") + .HasColumnType("integer") + .HasColumnName("level"); + + b.HasKey("ParentId", "FolderId") + .HasName("files_folder_tree_pkey"); + + b.HasIndex("FolderId") + .HasDatabaseName("folder_id_files_folder_tree"); + + b.ToTable("files_folder_tree", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/InstanceRegistrationContext/20220724114545_InstanceRegistrationContextMigrate.Designer.cs b/migrations/postgre/InstanceRegistrationContext/20220724114545_InstanceRegistrationContextMigrate.Designer.cs new file mode 100644 index 0000000000..cb380ad82c --- /dev/null +++ b/migrations/postgre/InstanceRegistrationContext/20220724114545_InstanceRegistrationContextMigrate.Designer.cs @@ -0,0 +1,60 @@ +// +using System; +using ASC.Core.Common.Hosting; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(InstanceRegistrationContext))] + [Migration("20220724114545_InstanceRegistrationContextMigrate")] + partial class InstanceRegistrationContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.Hosting.InstanceRegistration", b => + { + b.Property("InstanceRegistrationId") + .HasColumnType("varchar(255)") + .HasColumnName("instance_registration_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("IsActive") + .HasColumnType("tinyint(4)") + .HasColumnName("is_active"); + + b.Property("LastUpdated") + .HasColumnType("datetime") + .HasColumnName("last_updated"); + + b.Property("WorkerTypeName") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("worker_type_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("InstanceRegistrationId") + .HasName("PRIMARY"); + + b.HasIndex("WorkerTypeName") + .HasDatabaseName("worker_type_name"); + + b.ToTable("hosting_instance_registration", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/InstanceRegistrationContext/20220724114545_InstanceRegistrationContextMigrate.cs b/migrations/postgre/InstanceRegistrationContext/20220724114545_InstanceRegistrationContextMigrate.cs new file mode 100644 index 0000000000..2fa5551211 --- /dev/null +++ b/migrations/postgre/InstanceRegistrationContext/20220724114545_InstanceRegistrationContextMigrate.cs @@ -0,0 +1,38 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class InstanceRegistrationContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "hosting_instance_registration", + columns: table => new + { + instance_registration_id = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci"), + last_updated = table.Column(type: "datetime", nullable: true), + worker_type_name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci"), + is_active = table.Column(type: "tinyint(4)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.instance_registration_id); + }); + + migrationBuilder.CreateIndex( + name: "worker_type_name", + table: "hosting_instance_registration", + column: "worker_type_name"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "hosting_instance_registration"); + } + } +} diff --git a/migrations/postgre/InstanceRegistrationContext/InstanceRegistrationContextModelSnapshot.cs b/migrations/postgre/InstanceRegistrationContext/InstanceRegistrationContextModelSnapshot.cs new file mode 100644 index 0000000000..71511f1c1e --- /dev/null +++ b/migrations/postgre/InstanceRegistrationContext/InstanceRegistrationContextModelSnapshot.cs @@ -0,0 +1,58 @@ +// +using System; +using ASC.Core.Common.Hosting; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(InstanceRegistrationContext))] + partial class InstanceRegistrationContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.Hosting.InstanceRegistration", b => + { + b.Property("InstanceRegistrationId") + .HasColumnType("varchar(255)") + .HasColumnName("instance_registration_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("IsActive") + .HasColumnType("tinyint(4)") + .HasColumnName("is_active"); + + b.Property("LastUpdated") + .HasColumnType("datetime") + .HasColumnName("last_updated"); + + b.Property("WorkerTypeName") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("worker_type_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("InstanceRegistrationId") + .HasName("PRIMARY"); + + b.HasIndex("WorkerTypeName") + .HasDatabaseName("worker_type_name"); + + b.ToTable("hosting_instance_registration", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/IntegrationEventLogContext/20220724114541_IntegrationEventLogContextMigrate.Designer.cs b/migrations/postgre/IntegrationEventLogContext/20220724114541_IntegrationEventLogContextMigrate.Designer.cs new file mode 100644 index 0000000000..c05a0f4e24 --- /dev/null +++ b/migrations/postgre/IntegrationEventLogContext/20220724114541_IntegrationEventLogContextMigrate.Designer.cs @@ -0,0 +1,87 @@ +// +using System; +using ASC.EventBus.Extensions.Logger; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(IntegrationEventLogContext))] + [Migration("20220724114541_IntegrationEventLogContextMigrate")] + partial class IntegrationEventLogContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.EventBus.Extensions.Logger.IntegrationEventLogEntry", b => + { + b.Property("EventId") + .ValueGeneratedOnAdd() + .HasColumnType("char(38)") + .HasColumnName("event_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Content") + .IsRequired() + .HasColumnType("text") + .HasColumnName("content") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateBy") + .HasColumnType("char(38)") + .HasColumnName("create_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("datetime") + .HasColumnName("create_on"); + + b.Property("EventTypeName") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("event_type_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("State") + .HasColumnType("int(11)") + .HasColumnName("state"); + + b.Property("TenantId") + .HasColumnType("int(11)") + .HasColumnName("tenant_id"); + + b.Property("TimesSent") + .HasColumnType("int(11)") + .HasColumnName("times_sent"); + + b.Property("TransactionId") + .HasColumnType("text"); + + b.HasKey("EventId") + .HasName("PRIMARY"); + + b.HasIndex("TenantId") + .HasDatabaseName("tenant_id"); + + b.ToTable("event_bus_integration_event_log", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/IntegrationEventLogContext/20220724114541_IntegrationEventLogContextMigrate.cs b/migrations/postgre/IntegrationEventLogContext/20220724114541_IntegrationEventLogContextMigrate.cs new file mode 100644 index 0000000000..fe4c7d1890 --- /dev/null +++ b/migrations/postgre/IntegrationEventLogContext/20220724114541_IntegrationEventLogContextMigrate.cs @@ -0,0 +1,43 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class IntegrationEventLogContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "event_bus_integration_event_log", + columns: table => new + { + event_id = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci"), + event_type_name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci"), + state = table.Column(type: "int(11)", nullable: false), + times_sent = table.Column(type: "int(11)", nullable: false), + create_on = table.Column(type: "datetime", nullable: false), + create_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci"), + content = table.Column(type: "text", nullable: false, collation: "utf8_general_ci"), + TransactionId = table.Column(type: "text", nullable: true), + tenant_id = table.Column(type: "int(11)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.event_id); + }); + + migrationBuilder.CreateIndex( + name: "tenant_id", + table: "event_bus_integration_event_log", + column: "tenant_id"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "event_bus_integration_event_log"); + } + } +} diff --git a/migrations/postgre/IntegrationEventLogContext/IntegrationEventLogContextModelSnapshot.cs b/migrations/postgre/IntegrationEventLogContext/IntegrationEventLogContextModelSnapshot.cs new file mode 100644 index 0000000000..3e79ade3dc --- /dev/null +++ b/migrations/postgre/IntegrationEventLogContext/IntegrationEventLogContextModelSnapshot.cs @@ -0,0 +1,85 @@ +// +using System; +using ASC.EventBus.Extensions.Logger; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(IntegrationEventLogContext))] + partial class IntegrationEventLogContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.EventBus.Extensions.Logger.IntegrationEventLogEntry", b => + { + b.Property("EventId") + .ValueGeneratedOnAdd() + .HasColumnType("char(38)") + .HasColumnName("event_id") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("Content") + .IsRequired() + .HasColumnType("text") + .HasColumnName("content") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateBy") + .HasColumnType("char(38)") + .HasColumnName("create_by") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("CreateOn") + .HasColumnType("datetime") + .HasColumnName("create_on"); + + b.Property("EventTypeName") + .IsRequired() + .HasColumnType("varchar(255)") + .HasColumnName("event_type_name") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.Property("State") + .HasColumnType("int(11)") + .HasColumnName("state"); + + b.Property("TenantId") + .HasColumnType("int(11)") + .HasColumnName("tenant_id"); + + b.Property("TimesSent") + .HasColumnType("int(11)") + .HasColumnName("times_sent"); + + b.Property("TransactionId") + .HasColumnType("text"); + + b.HasKey("EventId") + .HasName("PRIMARY"); + + b.HasIndex("TenantId") + .HasDatabaseName("tenant_id"); + + b.ToTable("event_bus_integration_event_log", (string)null); + + b.HasAnnotation("MySql:CharSet", "utf8"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/MessagesContext/20220724114544_MessagesContextMigrate.Designer.cs b/migrations/postgre/MessagesContext/20220724114544_MessagesContextMigrate.Designer.cs new file mode 100644 index 0000000000..04f36d3ed2 --- /dev/null +++ b/migrations/postgre/MessagesContext/20220724114544_MessagesContextMigrate.Designer.cs @@ -0,0 +1,596 @@ +// +using System; +using ASC.MessagingSystem.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(MessagesContext))] + [Migration("20220724114544_MessagesContextMigrate")] + partial class MessagesContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Alias") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("alias"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("calls") + .HasDefaultValueSql("true"); + + b.Property("CreationDateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .HasColumnType("integer") + .HasColumnName("industry"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .IsFixedLength(); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("MappedDomain") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("mappeddomain") + .HasDefaultValueSql("NULL"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("OwnerId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner_id") + .HasDefaultValueSql("NULL"); + + b.Property("PaymentId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("payment_id") + .HasDefaultValueSql("NULL"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("spam") + .HasDefaultValueSql("true"); + + b.Property("Status") + .HasColumnType("integer") + .HasColumnName("status"); + + b.Property("StatusChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("timezone") + .HasDefaultValueSql("NULL"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("1"); + + b.Property("TrustedDomainsRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("trusteddomains") + .HasDefaultValueSql("NULL"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("version") + .HasDefaultValueSql("2"); + + b.Property("Version_Changed") + .HasColumnType("timestamp with time zone") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_tenants_tenants"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", "onlyoffice"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("TenantID"); + + b.Property("Id") + .HasMaxLength(64) + .HasColumnType("uuid") + .HasColumnName("ID"); + + b.Property("UserId") + .HasMaxLength(64) + .HasColumnType("uuid") + .HasColumnName("UserID"); + + b.Property("Data") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("TenantId", "Id", "UserId") + .HasName("webstudio_settings_pkey"); + + b.HasIndex("Id") + .HasDatabaseName("ID"); + + b.ToTable("webstudio_settings", "onlyoffice"); + + b.HasData( + new + { + TenantId = 1, + Id = new Guid("9a925891-1f92-4ed7-b277-d6f649739f06"), + UserId = new Guid("00000000-0000-0000-0000-000000000000"), + Data = "{\"Completed\":false}" + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ActivationStatus") + .HasColumnType("integer") + .HasColumnName("activation_status"); + + b.Property("BirthDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("bithdate"); + + b.Property("Contacts") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("contacts") + .HasDefaultValueSql("NULL"); + + b.Property("CreateDate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("CultureName") + .ValueGeneratedOnAdd() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("culture") + .HasDefaultValueSql("NULL"); + + b.Property("Email") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("email") + .HasDefaultValueSql("NULL"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("firstname"); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("lastname"); + + b.Property("Location") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("location") + .HasDefaultValueSql("NULL"); + + b.Property("MobilePhone") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("phone") + .HasDefaultValueSql("NULL"); + + b.Property("MobilePhoneActivation") + .HasColumnType("integer") + .HasColumnName("phone_activation"); + + b.Property("Notes") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("notes") + .HasDefaultValueSql("NULL"); + + b.Property("Removed") + .HasColumnType("boolean") + .HasColumnName("removed"); + + b.Property("Sex") + .HasColumnType("boolean") + .HasColumnName("sex"); + + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sid") + .HasDefaultValueSql("NULL"); + + b.Property("SsoNameId") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sso_name_id") + .HasDefaultValueSql("NULL"); + + b.Property("SsoSessionId") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sso_session_id") + .HasDefaultValueSql("NULL"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("status") + .HasDefaultValueSql("1"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("TerminatedDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("terminateddate"); + + b.Property("Title") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("title") + .HasDefaultValueSql("NULL"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("username"); + + b.Property("WorkFromDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("workfromdate"); + + b.HasKey("Id"); + + b.HasIndex("Email") + .HasDatabaseName("email"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_core_user"); + + b.HasIndex("UserName", "Tenant") + .HasDatabaseName("username"); + + b.ToTable("core_user", "onlyoffice"); + + b.HasData( + new + { + Id = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + ActivationStatus = 0, + CreateDate = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Email = "", + FirstName = "Administrator", + LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), + LastName = "", + MobilePhoneActivation = 0, + Removed = false, + Status = 1, + Tenant = 1, + UserName = "administrator", + WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Userid") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("userid"); + + b.Property("UserGroupId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("groupid"); + + b.Property("RefType") + .HasColumnType("integer") + .HasColumnName("ref_type"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Removed") + .HasColumnType("boolean") + .HasColumnName("removed"); + + b.HasKey("Tenant", "Userid", "UserGroupId", "RefType") + .HasName("core_usergroup_pkey"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_core_usergroup"); + + b.ToTable("core_usergroup", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.MessagingSystem.EF.Model.AuditEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); + + b.Property("Browser") + .ValueGeneratedOnAdd() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("browser") + .HasDefaultValueSql("NULL"); + + b.Property("Date") + .HasColumnType("timestamp with time zone") + .HasColumnName("date"); + + b.Property("DescriptionRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(20000) + .HasColumnType("character varying(20000)") + .HasColumnName("description") + .HasDefaultValueSql("NULL"); + + b.Property("Initiator") + .ValueGeneratedOnAdd() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("initiator") + .HasDefaultValueSql("NULL"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("ip") + .HasDefaultValueSql("NULL"); + + b.Property("Page") + .ValueGeneratedOnAdd() + .HasMaxLength(300) + .HasColumnType("character varying(300)") + .HasColumnName("page") + .HasDefaultValueSql("NULL"); + + b.Property("Platform") + .ValueGeneratedOnAdd() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("platform") + .HasDefaultValueSql("NULL"); + + b.Property("Target") + .HasColumnType("text") + .HasColumnName("target"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id") + .HasDefaultValueSql("NULL") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Date") + .HasDatabaseName("date"); + + b.ToTable("audit_events", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.MessagingSystem.EF.Model.LoginEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); + + b.Property("Active") + .HasColumnType("boolean") + .HasColumnName("active"); + + b.Property("Browser") + .ValueGeneratedOnAdd() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("browser") + .HasDefaultValueSql("NULL::character varying"); + + b.Property("Date") + .HasColumnType("timestamp with time zone") + .HasColumnName("date"); + + b.Property("DescriptionRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("description") + .HasDefaultValueSql("NULL"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("ip") + .HasDefaultValueSql("NULL"); + + b.Property("Login") + .ValueGeneratedOnAdd() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("login") + .HasDefaultValueSql("NULL"); + + b.Property("Page") + .ValueGeneratedOnAdd() + .HasMaxLength(300) + .HasColumnType("character varying(300)") + .HasColumnName("page") + .HasDefaultValueSql("NULL"); + + b.Property("Platform") + .ValueGeneratedOnAdd() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("platform") + .HasDefaultValueSql("NULL"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .IsRequired() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("Date") + .HasDatabaseName("date_login_events"); + + b.HasIndex("UserId", "TenantId") + .HasDatabaseName("tenant_id_login_events"); + + b.ToTable("login_events", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/MessagesContext/20220724114544_MessagesContextMigrate.cs b/migrations/postgre/MessagesContext/20220724114544_MessagesContextMigrate.cs new file mode 100644 index 0000000000..4b68e7024f --- /dev/null +++ b/migrations/postgre/MessagesContext/20220724114544_MessagesContextMigrate.cs @@ -0,0 +1,282 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class MessagesContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "onlyoffice"); + + migrationBuilder.CreateTable( + name: "audit_events", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + initiator = table.Column(type: "character varying(200)", maxLength: 200, nullable: true, defaultValueSql: "NULL"), + target = table.Column(type: "text", nullable: true), + ip = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL"), + browser = table.Column(type: "character varying(200)", maxLength: 200, nullable: true, defaultValueSql: "NULL"), + platform = table.Column(type: "character varying(200)", maxLength: 200, nullable: true, defaultValueSql: "NULL"), + date = table.Column(type: "timestamp with time zone", nullable: false), + tenant_id = table.Column(type: "integer", nullable: false), + user_id = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: true, defaultValueSql: "NULL"), + page = table.Column(type: "character varying(300)", maxLength: 300, nullable: true, defaultValueSql: "NULL"), + action = table.Column(type: "integer", nullable: true), + description = table.Column(type: "character varying(20000)", maxLength: 20000, nullable: true, defaultValueSql: "NULL") + }, + constraints: table => + { + table.PrimaryKey("PK_audit_events", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "core_user", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "uuid", maxLength: 38, nullable: false), + tenant = table.Column(type: "integer", nullable: false), + username = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + firstname = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + lastname = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + sex = table.Column(type: "boolean", nullable: true), + bithdate = table.Column(type: "timestamp with time zone", nullable: true), + status = table.Column(type: "integer", nullable: false, defaultValueSql: "1"), + activation_status = table.Column(type: "integer", nullable: false), + email = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + workfromdate = table.Column(type: "timestamp with time zone", nullable: true), + terminateddate = table.Column(type: "timestamp with time zone", nullable: true), + title = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, defaultValueSql: "NULL"), + culture = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, defaultValueSql: "NULL"), + contacts = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"), + phone = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + phone_activation = table.Column(type: "integer", nullable: false), + location = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + notes = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"), + sid = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"), + sso_name_id = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"), + sso_session_id = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"), + removed = table.Column(type: "boolean", nullable: false), + create_on = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), + last_modified = table.Column(type: "timestamp with time zone", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_core_user", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "core_usergroup", + schema: "onlyoffice", + columns: table => new + { + tenant = table.Column(type: "integer", nullable: false), + userid = table.Column(type: "uuid", maxLength: 38, nullable: false), + groupid = table.Column(type: "uuid", maxLength: 38, nullable: false), + ref_type = table.Column(type: "integer", nullable: false), + removed = table.Column(type: "boolean", nullable: false), + last_modified = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("core_usergroup_pkey", x => new { x.tenant, x.userid, x.groupid, x.ref_type }); + }); + + migrationBuilder.CreateTable( + name: "login_events", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + login = table.Column(type: "character varying(200)", maxLength: 200, nullable: true, defaultValueSql: "NULL"), + active = table.Column(type: "boolean", nullable: false), + ip = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL"), + browser = table.Column(type: "character varying(200)", maxLength: 200, nullable: true, defaultValueSql: "NULL::character varying"), + platform = table.Column(type: "character varying(200)", maxLength: 200, nullable: true, defaultValueSql: "NULL"), + date = table.Column(type: "timestamp with time zone", nullable: false), + tenant_id = table.Column(type: "integer", nullable: false), + user_id = table.Column(type: "uuid", fixedLength: true, maxLength: 38, nullable: false), + page = table.Column(type: "character varying(300)", maxLength: 300, nullable: true, defaultValueSql: "NULL"), + action = table.Column(type: "integer", nullable: true), + description = table.Column(type: "character varying(500)", maxLength: 500, nullable: true, defaultValueSql: "NULL") + }, + constraints: table => + { + table.PrimaryKey("PK_login_events", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "tenants_tenants", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + alias = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), + mappeddomain = table.Column(type: "character varying(100)", maxLength: 100, nullable: true, defaultValueSql: "NULL"), + version = table.Column(type: "integer", nullable: false, defaultValueSql: "2"), + version_changed = table.Column(type: "timestamp with time zone", nullable: true), + language = table.Column(type: "character(10)", fixedLength: true, maxLength: 10, nullable: false, defaultValueSql: "'en-US'"), + timezone = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL"), + trusteddomains = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"), + trusteddomainsenabled = table.Column(type: "integer", nullable: false, defaultValueSql: "1"), + status = table.Column(type: "integer", nullable: false), + statuschanged = table.Column(type: "timestamp with time zone", nullable: true), + creationdatetime = table.Column(type: "timestamp with time zone", nullable: false), + owner_id = table.Column(type: "uuid", maxLength: 38, nullable: true, defaultValueSql: "NULL"), + payment_id = table.Column(type: "character varying(38)", maxLength: 38, nullable: true, defaultValueSql: "NULL"), + industry = table.Column(type: "integer", nullable: false), + last_modified = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), + spam = table.Column(type: "boolean", nullable: false, defaultValueSql: "true"), + calls = table.Column(type: "boolean", nullable: false, defaultValueSql: "true") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tenants", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "webstudio_settings", + schema: "onlyoffice", + columns: table => new + { + TenantID = table.Column(type: "integer", nullable: false), + ID = table.Column(type: "uuid", maxLength: 64, nullable: false), + UserID = table.Column(type: "uuid", maxLength: 64, nullable: false), + Data = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("webstudio_settings_pkey", x => new { x.TenantID, x.ID, x.UserID }); + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "core_user", + columns: new[] { "id", "activation_status", "bithdate", "create_on", "email", "firstname", "last_modified", "lastname", "phone_activation", "removed", "sex", "status", "tenant", "terminateddate", "username", "workfromdate" }, + values: new object[] { new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), 0, null, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "", "Administrator", new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), "", 0, false, null, 1, 1, null, "administrator", new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "tenants_tenants", + columns: new[] { "id", "alias", "creationdatetime", "industry", "last_modified", "name", "owner_id", "status", "statuschanged", "version_changed" }, + values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), 0, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "Web Office", new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), 0, null, null }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "webstudio_settings", + columns: new[] { "ID", "TenantID", "UserID", "Data" }, + values: new object[] { new Guid("9a925891-1f92-4ed7-b277-d6f649739f06"), 1, new Guid("00000000-0000-0000-0000-000000000000"), "{\"Completed\":false}" }); + + migrationBuilder.CreateIndex( + name: "date", + schema: "onlyoffice", + table: "audit_events", + columns: new[] { "tenant_id", "date" }); + + migrationBuilder.CreateIndex( + name: "email", + schema: "onlyoffice", + table: "core_user", + column: "email"); + + migrationBuilder.CreateIndex( + name: "last_modified_core_user", + schema: "onlyoffice", + table: "core_user", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "username", + schema: "onlyoffice", + table: "core_user", + columns: new[] { "username", "tenant" }); + + migrationBuilder.CreateIndex( + name: "last_modified_core_usergroup", + schema: "onlyoffice", + table: "core_usergroup", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "date_login_events", + schema: "onlyoffice", + table: "login_events", + column: "date"); + + migrationBuilder.CreateIndex( + name: "tenant_id_login_events", + schema: "onlyoffice", + table: "login_events", + columns: new[] { "user_id", "tenant_id" }); + + migrationBuilder.CreateIndex( + name: "alias", + schema: "onlyoffice", + table: "tenants_tenants", + column: "alias", + unique: true); + + migrationBuilder.CreateIndex( + name: "last_modified_tenants_tenants", + schema: "onlyoffice", + table: "tenants_tenants", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "mappeddomain", + schema: "onlyoffice", + table: "tenants_tenants", + column: "mappeddomain"); + + migrationBuilder.CreateIndex( + name: "version", + schema: "onlyoffice", + table: "tenants_tenants", + column: "version"); + + migrationBuilder.CreateIndex( + name: "ID", + schema: "onlyoffice", + table: "webstudio_settings", + column: "ID"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "audit_events", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "core_user", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "core_usergroup", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "login_events", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "tenants_tenants", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "webstudio_settings", + schema: "onlyoffice"); + } + } +} diff --git a/migrations/postgre/MessagesContext/MessagesContextModelSnapshot.cs b/migrations/postgre/MessagesContext/MessagesContextModelSnapshot.cs new file mode 100644 index 0000000000..ad6f15912c --- /dev/null +++ b/migrations/postgre/MessagesContext/MessagesContextModelSnapshot.cs @@ -0,0 +1,594 @@ +// +using System; +using ASC.MessagingSystem.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(MessagesContext))] + partial class MessagesContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Alias") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("alias"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("calls") + .HasDefaultValueSql("true"); + + b.Property("CreationDateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .HasColumnType("integer") + .HasColumnName("industry"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .IsFixedLength(); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("MappedDomain") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("mappeddomain") + .HasDefaultValueSql("NULL"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("OwnerId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner_id") + .HasDefaultValueSql("NULL"); + + b.Property("PaymentId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("payment_id") + .HasDefaultValueSql("NULL"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("spam") + .HasDefaultValueSql("true"); + + b.Property("Status") + .HasColumnType("integer") + .HasColumnName("status"); + + b.Property("StatusChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("timezone") + .HasDefaultValueSql("NULL"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("1"); + + b.Property("TrustedDomainsRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("trusteddomains") + .HasDefaultValueSql("NULL"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("version") + .HasDefaultValueSql("2"); + + b.Property("Version_Changed") + .HasColumnType("timestamp with time zone") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_tenants_tenants"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", "onlyoffice"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("TenantID"); + + b.Property("Id") + .HasMaxLength(64) + .HasColumnType("uuid") + .HasColumnName("ID"); + + b.Property("UserId") + .HasMaxLength(64) + .HasColumnType("uuid") + .HasColumnName("UserID"); + + b.Property("Data") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("TenantId", "Id", "UserId") + .HasName("webstudio_settings_pkey"); + + b.HasIndex("Id") + .HasDatabaseName("ID"); + + b.ToTable("webstudio_settings", "onlyoffice"); + + b.HasData( + new + { + TenantId = 1, + Id = new Guid("9a925891-1f92-4ed7-b277-d6f649739f06"), + UserId = new Guid("00000000-0000-0000-0000-000000000000"), + Data = "{\"Completed\":false}" + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ActivationStatus") + .HasColumnType("integer") + .HasColumnName("activation_status"); + + b.Property("BirthDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("bithdate"); + + b.Property("Contacts") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("contacts") + .HasDefaultValueSql("NULL"); + + b.Property("CreateDate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("CultureName") + .ValueGeneratedOnAdd() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("culture") + .HasDefaultValueSql("NULL"); + + b.Property("Email") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("email") + .HasDefaultValueSql("NULL"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("firstname"); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("lastname"); + + b.Property("Location") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("location") + .HasDefaultValueSql("NULL"); + + b.Property("MobilePhone") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("phone") + .HasDefaultValueSql("NULL"); + + b.Property("MobilePhoneActivation") + .HasColumnType("integer") + .HasColumnName("phone_activation"); + + b.Property("Notes") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("notes") + .HasDefaultValueSql("NULL"); + + b.Property("Removed") + .HasColumnType("boolean") + .HasColumnName("removed"); + + b.Property("Sex") + .HasColumnType("boolean") + .HasColumnName("sex"); + + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sid") + .HasDefaultValueSql("NULL"); + + b.Property("SsoNameId") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sso_name_id") + .HasDefaultValueSql("NULL"); + + b.Property("SsoSessionId") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sso_session_id") + .HasDefaultValueSql("NULL"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("status") + .HasDefaultValueSql("1"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("TerminatedDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("terminateddate"); + + b.Property("Title") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("title") + .HasDefaultValueSql("NULL"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("username"); + + b.Property("WorkFromDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("workfromdate"); + + b.HasKey("Id"); + + b.HasIndex("Email") + .HasDatabaseName("email"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_core_user"); + + b.HasIndex("UserName", "Tenant") + .HasDatabaseName("username"); + + b.ToTable("core_user", "onlyoffice"); + + b.HasData( + new + { + Id = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + ActivationStatus = 0, + CreateDate = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Email = "", + FirstName = "Administrator", + LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), + LastName = "", + MobilePhoneActivation = 0, + Removed = false, + Status = 1, + Tenant = 1, + UserName = "administrator", + WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Userid") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("userid"); + + b.Property("UserGroupId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("groupid"); + + b.Property("RefType") + .HasColumnType("integer") + .HasColumnName("ref_type"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Removed") + .HasColumnType("boolean") + .HasColumnName("removed"); + + b.HasKey("Tenant", "Userid", "UserGroupId", "RefType") + .HasName("core_usergroup_pkey"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_core_usergroup"); + + b.ToTable("core_usergroup", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.MessagingSystem.EF.Model.AuditEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); + + b.Property("Browser") + .ValueGeneratedOnAdd() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("browser") + .HasDefaultValueSql("NULL"); + + b.Property("Date") + .HasColumnType("timestamp with time zone") + .HasColumnName("date"); + + b.Property("DescriptionRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(20000) + .HasColumnType("character varying(20000)") + .HasColumnName("description") + .HasDefaultValueSql("NULL"); + + b.Property("Initiator") + .ValueGeneratedOnAdd() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("initiator") + .HasDefaultValueSql("NULL"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("ip") + .HasDefaultValueSql("NULL"); + + b.Property("Page") + .ValueGeneratedOnAdd() + .HasMaxLength(300) + .HasColumnType("character varying(300)") + .HasColumnName("page") + .HasDefaultValueSql("NULL"); + + b.Property("Platform") + .ValueGeneratedOnAdd() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("platform") + .HasDefaultValueSql("NULL"); + + b.Property("Target") + .HasColumnType("text") + .HasColumnName("target"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id") + .HasDefaultValueSql("NULL") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("TenantId", "Date") + .HasDatabaseName("date"); + + b.ToTable("audit_events", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.MessagingSystem.EF.Model.LoginEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Action") + .HasColumnType("integer") + .HasColumnName("action"); + + b.Property("Active") + .HasColumnType("boolean") + .HasColumnName("active"); + + b.Property("Browser") + .ValueGeneratedOnAdd() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("browser") + .HasDefaultValueSql("NULL::character varying"); + + b.Property("Date") + .HasColumnType("timestamp with time zone") + .HasColumnName("date"); + + b.Property("DescriptionRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("description") + .HasDefaultValueSql("NULL"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("ip") + .HasDefaultValueSql("NULL"); + + b.Property("Login") + .ValueGeneratedOnAdd() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("login") + .HasDefaultValueSql("NULL"); + + b.Property("Page") + .ValueGeneratedOnAdd() + .HasMaxLength(300) + .HasColumnType("character varying(300)") + .HasColumnName("page") + .HasDefaultValueSql("NULL"); + + b.Property("Platform") + .ValueGeneratedOnAdd() + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("platform") + .HasDefaultValueSql("NULL"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .IsRequired() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("Date") + .HasDatabaseName("date_login_events"); + + b.HasIndex("UserId", "TenantId") + .HasDatabaseName("tenant_id_login_events"); + + b.ToTable("login_events", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/NotifyDbContext/20220724114551_NotifyDbContextMigrate.Designer.cs b/migrations/postgre/NotifyDbContext/20220724114551_NotifyDbContextMigrate.Designer.cs new file mode 100644 index 0000000000..0ac155036f --- /dev/null +++ b/migrations/postgre/NotifyDbContext/20220724114551_NotifyDbContextMigrate.Designer.cs @@ -0,0 +1,138 @@ +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(NotifyDbContext))] + [Migration("20220724114551_NotifyDbContextMigrate")] + partial class NotifyDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.NotifyInfo", b => + { + b.Property("NotifyId") + .HasColumnType("integer") + .HasColumnName("notify_id"); + + b.Property("Attempts") + .HasColumnType("integer") + .HasColumnName("attempts"); + + b.Property("ModifyDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("modify_date"); + + b.Property("Priority") + .HasColumnType("integer") + .HasColumnName("priority"); + + b.Property("State") + .HasColumnType("integer") + .HasColumnName("state"); + + b.HasKey("NotifyId") + .HasName("notify_info_pkey"); + + b.HasIndex("State") + .HasDatabaseName("state"); + + b.ToTable("notify_info", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.NotifyQueue", b => + { + b.Property("NotifyId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("notify_id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Attachments") + .HasColumnType("text") + .HasColumnName("attachments"); + + b.Property("AutoSubmitted") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("auto_submitted") + .HasDefaultValueSql("NULL"); + + b.Property("Content") + .HasColumnType("text") + .HasColumnName("content"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("content_type") + .HasDefaultValueSql("NULL"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_date"); + + b.Property("Reciever") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("reciever") + .HasDefaultValueSql("NULL"); + + b.Property("ReplyTo") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("reply_to") + .HasDefaultValueSql("NULL"); + + b.Property("Sender") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("sender") + .HasDefaultValueSql("NULL"); + + b.Property("SenderType") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("sender_type") + .HasDefaultValueSql("NULL"); + + b.Property("Subject") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("subject") + .HasDefaultValueSql("NULL"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.HasKey("NotifyId") + .HasName("notify_queue_pkey"); + + b.ToTable("notify_queue", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/NotifyDbContext/20220724114551_NotifyDbContextMigrate.cs b/migrations/postgre/NotifyDbContext/20220724114551_NotifyDbContextMigrate.cs new file mode 100644 index 0000000000..419b61879d --- /dev/null +++ b/migrations/postgre/NotifyDbContext/20220724114551_NotifyDbContextMigrate.cs @@ -0,0 +1,74 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class NotifyDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "onlyoffice"); + + migrationBuilder.CreateTable( + name: "notify_info", + schema: "onlyoffice", + columns: table => new + { + notify_id = table.Column(type: "integer", nullable: false), + state = table.Column(type: "integer", nullable: false), + attempts = table.Column(type: "integer", nullable: false), + modify_date = table.Column(type: "timestamp with time zone", nullable: false), + priority = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("notify_info_pkey", x => x.notify_id); + }); + + migrationBuilder.CreateTable( + name: "notify_queue", + schema: "onlyoffice", + columns: table => new + { + notify_id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + tenant_id = table.Column(type: "integer", nullable: false), + sender = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + reciever = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + subject = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"), + content_type = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, defaultValueSql: "NULL"), + content = table.Column(type: "text", nullable: true), + sender_type = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, defaultValueSql: "NULL"), + reply_to = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"), + creation_date = table.Column(type: "timestamp with time zone", nullable: false), + attachments = table.Column(type: "text", nullable: true), + auto_submitted = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, defaultValueSql: "NULL") + }, + constraints: table => + { + table.PrimaryKey("notify_queue_pkey", x => x.notify_id); + }); + + migrationBuilder.CreateIndex( + name: "state", + schema: "onlyoffice", + table: "notify_info", + column: "state"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "notify_info", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "notify_queue", + schema: "onlyoffice"); + } + } +} diff --git a/migrations/postgre/NotifyDbContext/NotifyDbContextModelSnapshot.cs b/migrations/postgre/NotifyDbContext/NotifyDbContextModelSnapshot.cs new file mode 100644 index 0000000000..a792a05c3a --- /dev/null +++ b/migrations/postgre/NotifyDbContext/NotifyDbContextModelSnapshot.cs @@ -0,0 +1,136 @@ +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(NotifyDbContext))] + partial class NotifyDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.NotifyInfo", b => + { + b.Property("NotifyId") + .HasColumnType("integer") + .HasColumnName("notify_id"); + + b.Property("Attempts") + .HasColumnType("integer") + .HasColumnName("attempts"); + + b.Property("ModifyDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("modify_date"); + + b.Property("Priority") + .HasColumnType("integer") + .HasColumnName("priority"); + + b.Property("State") + .HasColumnType("integer") + .HasColumnName("state"); + + b.HasKey("NotifyId") + .HasName("notify_info_pkey"); + + b.HasIndex("State") + .HasDatabaseName("state"); + + b.ToTable("notify_info", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.NotifyQueue", b => + { + b.Property("NotifyId") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("notify_id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Attachments") + .HasColumnType("text") + .HasColumnName("attachments"); + + b.Property("AutoSubmitted") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("auto_submitted") + .HasDefaultValueSql("NULL"); + + b.Property("Content") + .HasColumnType("text") + .HasColumnName("content"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("content_type") + .HasDefaultValueSql("NULL"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("creation_date"); + + b.Property("Reciever") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("reciever") + .HasDefaultValueSql("NULL"); + + b.Property("ReplyTo") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("reply_to") + .HasDefaultValueSql("NULL"); + + b.Property("Sender") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("sender") + .HasDefaultValueSql("NULL"); + + b.Property("SenderType") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("sender_type") + .HasDefaultValueSql("NULL"); + + b.Property("Subject") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("subject") + .HasDefaultValueSql("NULL"); + + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.HasKey("NotifyId") + .HasName("notify_queue_pkey"); + + b.ToTable("notify_queue", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/TelegramDbContext/20220724114552_TelegramDbContextMigrate.Designer.cs b/migrations/postgre/TelegramDbContext/20220724114552_TelegramDbContextMigrate.Designer.cs new file mode 100644 index 0000000000..2ec0535784 --- /dev/null +++ b/migrations/postgre/TelegramDbContext/20220724114552_TelegramDbContextMigrate.Designer.cs @@ -0,0 +1,52 @@ +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(TelegramDbContext))] + [Migration("20220724114552_TelegramDbContextMigrate")] + partial class TelegramDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.TelegramUser", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("PortalUserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("portal_user_id"); + + b.Property("TelegramUserId") + .HasColumnType("bigint") + .HasColumnName("telegram_user_id"); + + b.HasKey("TenantId", "PortalUserId") + .HasName("telegram_users_pkey"); + + b.HasIndex("TelegramUserId") + .HasDatabaseName("tgId"); + + b.ToTable("telegram_users", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/TelegramDbContext/20220724114552_TelegramDbContextMigrate.cs b/migrations/postgre/TelegramDbContext/20220724114552_TelegramDbContextMigrate.cs new file mode 100644 index 0000000000..abf159a669 --- /dev/null +++ b/migrations/postgre/TelegramDbContext/20220724114552_TelegramDbContextMigrate.cs @@ -0,0 +1,43 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class TelegramDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "onlyoffice"); + + migrationBuilder.CreateTable( + name: "telegram_users", + schema: "onlyoffice", + columns: table => new + { + portal_user_id = table.Column(type: "uuid", maxLength: 38, nullable: false), + tenant_id = table.Column(type: "integer", nullable: false), + telegram_user_id = table.Column(type: "bigint", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("telegram_users_pkey", x => new { x.tenant_id, x.portal_user_id }); + }); + + migrationBuilder.CreateIndex( + name: "tgId", + schema: "onlyoffice", + table: "telegram_users", + column: "telegram_user_id"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "telegram_users", + schema: "onlyoffice"); + } + } +} diff --git a/migrations/postgre/TelegramDbContext/TelegramDbContextModelSnapshot.cs b/migrations/postgre/TelegramDbContext/TelegramDbContextModelSnapshot.cs new file mode 100644 index 0000000000..894a85d8d2 --- /dev/null +++ b/migrations/postgre/TelegramDbContext/TelegramDbContextModelSnapshot.cs @@ -0,0 +1,50 @@ +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(TelegramDbContext))] + partial class TelegramDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.TelegramUser", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("PortalUserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("portal_user_id"); + + b.Property("TelegramUserId") + .HasColumnType("bigint") + .HasColumnName("telegram_user_id"); + + b.HasKey("TenantId", "PortalUserId") + .HasName("telegram_users_pkey"); + + b.HasIndex("TelegramUserId") + .HasDatabaseName("tgId"); + + b.ToTable("telegram_users", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/TenantDbContext/20220724114553_TenantDbContextMigrate.Designer.cs b/migrations/postgre/TenantDbContext/20220724114553_TenantDbContextMigrate.Designer.cs new file mode 100644 index 0000000000..8cd105149e --- /dev/null +++ b/migrations/postgre/TenantDbContext/20220724114553_TenantDbContextMigrate.Designer.cs @@ -0,0 +1,341 @@ +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(TenantDbContext))] + [Migration("20220724114553_TenantDbContextMigrate")] + partial class TenantDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbCoreSettings", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Id") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("id"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Value") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("value"); + + b.HasKey("Tenant", "Id") + .HasName("core_settings_pkey"); + + b.ToTable("core_settings", "onlyoffice"); + + b.HasData( + new + { + Tenant = -1, + Id = "CompanyWhiteLabelSettings", + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + 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 } + }, + new + { + Tenant = -1, + Id = "FullTextSearchSettings", + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + 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 } + }, + new + { + Tenant = -1, + Id = "SmtpSettings", + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + 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 } + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Alias") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("alias"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("calls") + .HasDefaultValueSql("true"); + + b.Property("CreationDateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .HasColumnType("integer") + .HasColumnName("industry"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .IsFixedLength(); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("MappedDomain") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("mappeddomain") + .HasDefaultValueSql("NULL"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("OwnerId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner_id") + .HasDefaultValueSql("NULL"); + + b.Property("PaymentId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("payment_id") + .HasDefaultValueSql("NULL"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("spam") + .HasDefaultValueSql("true"); + + b.Property("Status") + .HasColumnType("integer") + .HasColumnName("status"); + + b.Property("StatusChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("timezone") + .HasDefaultValueSql("NULL"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("1"); + + b.Property("TrustedDomainsRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("trusteddomains") + .HasDefaultValueSql("NULL"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("version") + .HasDefaultValueSql("2"); + + b.Property("Version_Changed") + .HasColumnType("timestamp with time zone") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_tenants_tenants"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", "onlyoffice"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantForbiden", b => + { + b.Property("Address") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address"); + + b.HasKey("Address") + .HasName("tenants_forbiden_pkey"); + + b.ToTable("tenants_forbiden", "onlyoffice"); + + b.HasData( + new + { + Address = "controlpanel" + }, + new + { + Address = "localhost" + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantPartner", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("AffiliateId") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("affiliate_id") + .HasDefaultValueSql("NULL"); + + b.Property("Campaign") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("campaign") + .HasDefaultValueSql("NULL"); + + b.Property("PartnerId") + .ValueGeneratedOnAdd() + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("partner_id") + .HasDefaultValueSql("NULL"); + + b.HasKey("TenantId") + .HasName("tenants_partners_pkey"); + + b.ToTable("tenants_partners", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantVersion", b => + { + b.Property("Id") + .HasColumnType("integer") + .HasColumnName("id"); + + b.Property("DefaultVersion") + .HasColumnType("integer") + .HasColumnName("default_version"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("url"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("version"); + + b.Property("Visible") + .HasColumnType("boolean") + .HasColumnName("visible"); + + b.HasKey("Id"); + + b.ToTable("tenants_version", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.TenantIpRestrictions", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Ip") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("ip"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant_tenants_iprestrictions"); + + b.ToTable("tenants_iprestrictions", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/TenantDbContext/20220724114553_TenantDbContextMigrate.cs b/migrations/postgre/TenantDbContext/20220724114553_TenantDbContextMigrate.cs new file mode 100644 index 0000000000..4894fd05f9 --- /dev/null +++ b/migrations/postgre/TenantDbContext/20220724114553_TenantDbContextMigrate.cs @@ -0,0 +1,206 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class TenantDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "onlyoffice"); + + migrationBuilder.CreateTable( + name: "core_settings", + schema: "onlyoffice", + columns: table => new + { + tenant = table.Column(type: "integer", nullable: false), + id = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + value = table.Column(type: "bytea", nullable: false), + last_modified = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("core_settings_pkey", x => new { x.tenant, x.id }); + }); + + migrationBuilder.CreateTable( + name: "tenants_forbiden", + schema: "onlyoffice", + columns: table => new + { + address = table.Column(type: "character varying(50)", maxLength: 50, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("tenants_forbiden_pkey", x => x.address); + }); + + migrationBuilder.CreateTable( + name: "tenants_iprestrictions", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + tenant = table.Column(type: "integer", nullable: false), + ip = table.Column(type: "character varying(50)", maxLength: 50, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_iprestrictions", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "tenants_partners", + schema: "onlyoffice", + columns: table => new + { + tenant_id = table.Column(type: "integer", nullable: false), + partner_id = table.Column(type: "character varying(36)", maxLength: 36, nullable: true, defaultValueSql: "NULL"), + affiliate_id = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL"), + campaign = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL") + }, + constraints: table => + { + table.PrimaryKey("tenants_partners_pkey", x => x.tenant_id); + }); + + migrationBuilder.CreateTable( + name: "tenants_tenants", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + alias = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), + mappeddomain = table.Column(type: "character varying(100)", maxLength: 100, nullable: true, defaultValueSql: "NULL"), + version = table.Column(type: "integer", nullable: false, defaultValueSql: "2"), + version_changed = table.Column(type: "timestamp with time zone", nullable: true), + language = table.Column(type: "character(10)", fixedLength: true, maxLength: 10, nullable: false, defaultValueSql: "'en-US'"), + timezone = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL"), + trusteddomains = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"), + trusteddomainsenabled = table.Column(type: "integer", nullable: false, defaultValueSql: "1"), + status = table.Column(type: "integer", nullable: false), + statuschanged = table.Column(type: "timestamp with time zone", nullable: true), + creationdatetime = table.Column(type: "timestamp with time zone", nullable: false), + owner_id = table.Column(type: "uuid", maxLength: 38, nullable: true, defaultValueSql: "NULL"), + payment_id = table.Column(type: "character varying(38)", maxLength: 38, nullable: true, defaultValueSql: "NULL"), + industry = table.Column(type: "integer", nullable: false), + last_modified = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), + spam = table.Column(type: "boolean", nullable: false, defaultValueSql: "true"), + calls = table.Column(type: "boolean", nullable: false, defaultValueSql: "true") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tenants", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "tenants_version", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false), + version = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + url = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + default_version = table.Column(type: "integer", nullable: false), + visible = table.Column(type: "boolean", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_version", x => x.id); + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "core_settings", + columns: new[] { "id", "tenant", "last_modified", "value" }, + values: new object[,] + { + { "CompanyWhiteLabelSettings", -1, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), 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 } }, + { "FullTextSearchSettings", -1, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), 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 } }, + { "SmtpSettings", -1, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), 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 } } + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "tenants_forbiden", + column: "address", + values: new object[] + { + "controlpanel", + "localhost" + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "tenants_tenants", + columns: new[] { "id", "alias", "creationdatetime", "industry", "last_modified", "name", "owner_id", "status", "statuschanged", "version_changed" }, + values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), 0, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "Web Office", new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), 0, null, null }); + + migrationBuilder.CreateIndex( + name: "tenant_tenants_iprestrictions", + schema: "onlyoffice", + table: "tenants_iprestrictions", + column: "tenant"); + + migrationBuilder.CreateIndex( + name: "alias", + schema: "onlyoffice", + table: "tenants_tenants", + column: "alias", + unique: true); + + migrationBuilder.CreateIndex( + name: "last_modified_tenants_tenants", + schema: "onlyoffice", + table: "tenants_tenants", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "mappeddomain", + schema: "onlyoffice", + table: "tenants_tenants", + column: "mappeddomain"); + + migrationBuilder.CreateIndex( + name: "version", + schema: "onlyoffice", + table: "tenants_tenants", + column: "version"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "core_settings", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "tenants_forbiden", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "tenants_iprestrictions", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "tenants_partners", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "tenants_tenants", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "tenants_version", + schema: "onlyoffice"); + } + } +} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/TenantDbContextPostgreSql/PostgreSqlTenantDbContextModelSnapshot.cs b/migrations/postgre/TenantDbContext/TenantDbContextModelSnapshot.cs similarity index 53% rename from common/ASC.Core.Common/Migrations/PostgreSql/TenantDbContextPostgreSql/PostgreSqlTenantDbContextModelSnapshot.cs rename to migrations/postgre/TenantDbContext/TenantDbContextModelSnapshot.cs index d5a10df82b..b2fa1a17d2 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/TenantDbContextPostgreSql/PostgreSqlTenantDbContextModelSnapshot.cs +++ b/migrations/postgre/TenantDbContext/TenantDbContextModelSnapshot.cs @@ -1,65 +1,73 @@ // +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations { - [DbContext(typeof(PostgreSqlTenantDbContext))] - partial class PostgreSqlTenantDbContextModelSnapshot : ModelSnapshot + [DbContext(typeof(TenantDbContext))] + partial class TenantDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("Relational:MaxIdentifierLength", 64) - .HasAnnotation("ProductVersion", "5.0.10"); + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); modelBuilder.Entity("ASC.Core.Common.EF.Model.DbCoreSettings", b => { b.Property("Tenant") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("tenant"); b.Property("Id") - .HasColumnType("varchar(128)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("id"); b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") .HasColumnName("last_modified") .HasDefaultValueSql("CURRENT_TIMESTAMP"); b.Property("Value") .IsRequired() - .HasColumnType("mediumblob") + .HasColumnType("bytea") .HasColumnName("value"); b.HasKey("Tenant", "Id") - .HasName("PRIMARY"); + .HasName("core_settings_pkey"); - b.ToTable("core_settings"); + b.ToTable("core_settings", "onlyoffice"); b.HasData( new { Tenant = -1, Id = "CompanyWhiteLabelSettings", - LastModified = new DateTime(2021, 10, 26, 12, 11, 31, 652, DateTimeKind.Utc).AddTicks(3019), - 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 = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + 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 } }, new { Tenant = -1, Id = "FullTextSearchSettings", - LastModified = new DateTime(2021, 10, 26, 12, 11, 31, 652, DateTimeKind.Utc).AddTicks(3037), + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), 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 } }, new { Tenant = -1, Id = "SmtpSettings", - LastModified = new DateTime(2021, 10, 26, 12, 11, 31, 652, DateTimeKind.Utc).AddTicks(3040), + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), 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 } }); }); @@ -68,117 +76,124 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); b.Property("Alias") .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("alias") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("alias"); b.Property("Calls") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasColumnName("calls") .HasDefaultValueSql("true"); b.Property("CreationDateTime") - .HasColumnType("datetime") + .HasColumnType("timestamp with time zone") .HasColumnName("creationdatetime"); - b.Property("Industry") - .HasColumnType("int") + b.Property("Industry") + .HasColumnType("integer") .HasColumnName("industry"); b.Property("Language") .IsRequired() .ValueGeneratedOnAdd() - .HasColumnType("char(10)") + .HasMaxLength(10) + .HasColumnType("character(10)") .HasColumnName("language") .HasDefaultValueSql("'en-US'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .IsFixedLength(); b.Property("LastModified") .ValueGeneratedOnAdd() - .HasColumnType("timestamp") + .HasColumnType("timestamp with time zone") .HasColumnName("last_modified") .HasDefaultValueSql("CURRENT_TIMESTAMP"); b.Property("MappedDomain") - .HasColumnType("varchar(100)") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") .HasColumnName("mappeddomain") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasDefaultValueSql("NULL"); b.Property("Name") .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); - b.Property("OwnerId") - .IsRequired() - .HasColumnType("varchar(38)") + b.Property("OwnerId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") .HasColumnName("owner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasDefaultValueSql("NULL"); b.Property("PaymentId") - .HasColumnType("varchar(38)") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("character varying(38)") .HasColumnName("payment_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasDefaultValueSql("NULL"); b.Property("Spam") .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasColumnName("spam") .HasDefaultValueSql("true"); b.Property("Status") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("status"); b.Property("StatusChanged") - .HasColumnType("datetime") + .HasColumnType("timestamp with time zone") .HasColumnName("statuschanged"); b.Property("TimeZone") - .HasColumnType("varchar(50)") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") .HasColumnName("timezone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomains") - .HasColumnType("varchar(1024)") - .HasColumnName("trusteddomains") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasDefaultValueSql("NULL"); b.Property("TrustedDomainsEnabled") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("trusteddomainsenabled") - .HasDefaultValueSql("'1'"); + .HasDefaultValueSql("1"); + + b.Property("TrustedDomainsRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("trusteddomains") + .HasDefaultValueSql("NULL"); b.Property("Version") .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("version") - .HasDefaultValueSql("'2'"); + .HasDefaultValueSql("2"); b.Property("Version_Changed") - .HasColumnType("datetime") + .HasColumnType("timestamp with time zone") .HasColumnName("version_changed"); b.HasKey("Id"); + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); + .HasDatabaseName("last_modified_tenants_tenants"); b.HasIndex("MappedDomain") .HasDatabaseName("mappeddomain"); @@ -186,7 +201,7 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql b.HasIndex("Version") .HasDatabaseName("version"); - b.ToTable("tenants_tenants"); + b.ToTable("tenants_tenants", "onlyoffice"); b.HasData( new @@ -195,9 +210,10 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql Alias = "localhost", Calls = false, CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), Name = "Web Office", - OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", + OwnerId = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), Spam = false, Status = 0, TrustedDomainsEnabled = 0, @@ -208,15 +224,14 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantForbiden", b => { b.Property("Address") - .HasColumnType("varchar(50)") - .HasColumnName("address") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("address"); b.HasKey("Address") - .HasName("PRIMARY"); + .HasName("tenants_forbiden_pkey"); - b.ToTable("tenants_forbiden"); + b.ToTable("tenants_forbiden", "onlyoffice"); b.HasData( new @@ -232,92 +247,91 @@ namespace ASC.Core.Common.Migrations.PostgreSql.TenantDbContextPostgreSql modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantPartner", b => { b.Property("TenantId") - .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("tenant_id"); b.Property("AffiliateId") - .HasColumnType("varchar(50)") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") .HasColumnName("affiliate_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasDefaultValueSql("NULL"); b.Property("Campaign") - .HasColumnType("varchar(50)") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") .HasColumnName("campaign") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasDefaultValueSql("NULL"); b.Property("PartnerId") - .HasColumnType("varchar(36)") + .ValueGeneratedOnAdd() + .HasMaxLength(36) + .HasColumnType("character varying(36)") .HasColumnName("partner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasDefaultValueSql("NULL"); b.HasKey("TenantId") - .HasName("PRIMARY"); + .HasName("tenants_partners_pkey"); - b.ToTable("tenants_partners"); + b.ToTable("tenants_partners", "onlyoffice"); }); modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenantVersion", b => { b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("id"); b.Property("DefaultVersion") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("default_version"); b.Property("Url") .IsRequired() - .HasColumnType("varchar(64)") - .HasColumnName("url") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("url"); b.Property("Version") .IsRequired() - .HasColumnType("varchar(64)") - .HasColumnName("version") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("version"); b.Property("Visible") - .HasColumnType("tinyint(1)") + .HasColumnType("boolean") .HasColumnName("visible"); b.HasKey("Id"); - b.ToTable("tenants_version"); + b.ToTable("tenants_version", "onlyoffice"); }); modelBuilder.Entity("ASC.Core.Common.EF.Model.TenantIpRestrictions", b => { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); b.Property("Ip") .IsRequired() - .HasColumnType("varchar(50)") - .HasColumnName("ip") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("ip"); b.Property("Tenant") - .HasColumnType("int") + .HasColumnType("integer") .HasColumnName("tenant"); b.HasKey("Id"); b.HasIndex("Tenant") - .HasDatabaseName("tenant"); + .HasDatabaseName("tenant_tenants_iprestrictions"); - b.ToTable("tenants_iprestrictions"); + b.ToTable("tenants_iprestrictions", "onlyoffice"); }); #pragma warning restore 612, 618 } diff --git a/migrations/postgre/UrlShortenerFakeDbContext/20220724114554_UrlShortenerFakeDbContextMigrate.Designer.cs b/migrations/postgre/UrlShortenerFakeDbContext/20220724114554_UrlShortenerFakeDbContextMigrate.Designer.cs new file mode 100644 index 0000000000..8d8bbaca4e --- /dev/null +++ b/migrations/postgre/UrlShortenerFakeDbContext/20220724114554_UrlShortenerFakeDbContextMigrate.Designer.cs @@ -0,0 +1,59 @@ +// +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(UrlShortenerFakeDbContext))] + [Migration("20220724114554_UrlShortenerFakeDbContextMigrate")] + partial class UrlShortenerFakeDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.ShortLinks", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int(10)") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Link") + .HasColumnType("text") + .HasColumnName("link") + .UseCollation("utf8_bin"); + + b.Property("Short") + .HasColumnType("varchar(12)") + .HasColumnName("short") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.HasIndex("Short") + .IsUnique(); + + b.ToTable("short_links", (string)null); + + b + .HasAnnotation("MySql:CharSet", "utf8") + .HasAnnotation("Relational:Collation", "utf8_general_ci"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/UrlShortenerFakeDbContext/20220724114554_UrlShortenerFakeDbContextMigrate.cs b/migrations/postgre/UrlShortenerFakeDbContext/20220724114554_UrlShortenerFakeDbContextMigrate.cs new file mode 100644 index 0000000000..ea71f75577 --- /dev/null +++ b/migrations/postgre/UrlShortenerFakeDbContext/20220724114554_UrlShortenerFakeDbContextMigrate.cs @@ -0,0 +1,39 @@ +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class UrlShortenerFakeDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "short_links", + columns: table => new + { + id = table.Column(type: "int(10)", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + @short = table.Column(name: "short", type: "varchar(12)", nullable: true, collation: "utf8_general_ci"), + link = table.Column(type: "text", nullable: true, collation: "utf8_bin") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.id); + }); + + migrationBuilder.CreateIndex( + name: "IX_short_links_short", + table: "short_links", + column: "short", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "short_links"); + } + } +} diff --git a/migrations/postgre/UrlShortenerFakeDbContext/UrlShortenerFakeDbContextModelSnapshot.cs b/migrations/postgre/UrlShortenerFakeDbContext/UrlShortenerFakeDbContextModelSnapshot.cs new file mode 100644 index 0000000000..1a9d8bb57d --- /dev/null +++ b/migrations/postgre/UrlShortenerFakeDbContext/UrlShortenerFakeDbContextModelSnapshot.cs @@ -0,0 +1,57 @@ +// +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(UrlShortenerFakeDbContext))] + partial class UrlShortenerFakeDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.ShortLinks", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int(10)") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Link") + .HasColumnType("text") + .HasColumnName("link") + .UseCollation("utf8_bin"); + + b.Property("Short") + .HasColumnType("varchar(12)") + .HasColumnName("short") + .UseCollation("utf8_general_ci") + .HasAnnotation("MySql:CharSet", "utf8"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.HasIndex("Short") + .IsUnique(); + + b.ToTable("short_links", (string)null); + + b + .HasAnnotation("MySql:CharSet", "utf8") + .HasAnnotation("Relational:Collation", "utf8_general_ci"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/common/ASC.Core.Common/Migrations/PostgreSql/UserDbContextPostgreSql/20211012145323_UserDbContextPostgreSql.Designer.cs b/migrations/postgre/UserDbContext/20220725161742_UserDbContextMigrate.Designer.cs similarity index 63% rename from common/ASC.Core.Common/Migrations/PostgreSql/UserDbContextPostgreSql/20211012145323_UserDbContextPostgreSql.Designer.cs rename to migrations/postgre/UserDbContext/20220725161742_UserDbContextMigrate.Designer.cs index 7d5aa55380..41e4d49f10 100644 --- a/common/ASC.Core.Common/Migrations/PostgreSql/UserDbContextPostgreSql/20211012145323_UserDbContextPostgreSql.Designer.cs +++ b/migrations/postgre/UserDbContext/20220725161742_UserDbContextMigrate.Designer.cs @@ -1,1488 +1,1482 @@ -// - -namespace ASC.Core.Common.Migrations.PostgreSql.UserDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlUserDbContext))] - [Migration("20211012145323_UserDbContextPostgreSql")] - partial class UserDbContextPostgreSql - { - 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.Acl", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Subject") - .HasColumnType("varchar(38)") - .HasColumnName("subject") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Action") - .HasColumnType("varchar(38)") - .HasColumnName("action") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Object") - .ValueGeneratedOnAdd() - .HasColumnType("varchar(255)") - .HasColumnName("object") - .HasDefaultValueSql("''") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AceType") - .HasColumnType("int") - .HasColumnName("acetype"); - - b.HasKey("Tenant", "Subject", "Action", "Object") - .HasName("PRIMARY"); - - b.ToTable("core_acl"); - - b.HasData( - new - { - Tenant = -1, - Subject = "5d5b7260-f7f7-49f1-a1c9-95fbb6a12604", - Action = "ef5e6790-f346-4b6e-b662-722bc28cb0db", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "5d5b7260-f7f7-49f1-a1c9-95fbb6a12604", - Action = "f11e8f3f-46e6-4e55-90e3-09c22ec565bd", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "088d5940-a80f-4403-9741-d610718ce95c", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "08d66144-e1c9-4065-9aa1-aa4bba0a7bc8", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "08d75c97-cf3f-494b-90d1-751c941fe2dd", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "0d1f72a8-63da-47ea-ae42-0900e4ac72a9", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "13e30b51-5b4d-40a5-8575-cb561899eeb1", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "19f658ae-722b-4cd8-8236-3ad150801d96", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "2c6552b3-b2e0-4a00-b8fd-13c161e337b1", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "388c29d3-c662-4a61-bf47-fc2f7094224a", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "40bf31f4-3132-4e76-8d5c-9828a89501a3", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "49ae8915-2b30-4348-ab74-b152279364fb", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "9018c001-24c2-44bf-a1db-d1121a570e74", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "948ad738-434b-4a88-8e38-7569d332910a", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "9d75a568-52aa-49d8-ad43-473756cd8903", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "a362fe79-684e-4d43-a599-65bc1f4e167f", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "c426c349-9ad4-47cd-9b8f-99fc30675951", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "d11ebcb9-0e6e-45e6-a6d0-99c41d687598", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "d1f3b53d-d9e2-4259-80e7-d24380978395", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "d49f4e30-da10-4b39-bc6d-b41ef6e039d3", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "d852b66f-6719-45e1-8657-18f0bb791690", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "e0759a42-47f0-4763-a26a-d5aa665bec35", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "e37239bd-c5b5-4f1e-a9f8-3ceeac209615", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "fbc37705-a04c-40ad-a68c-ce2f0423f397", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "fcac42b8-9386-48eb-a938-d19b3c576912", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "13e30b51-5b4d-40a5-8575-cb561899eeb1", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "49ae8915-2b30-4348-ab74-b152279364fb", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "9018c001-24c2-44bf-a1db-d1121a570e74", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "d1f3b53d-d9e2-4259-80e7-d24380978395", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "e0759a42-47f0-4763-a26a-d5aa665bec35", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "e37239bd-c5b5-4f1e-a9f8-3ceeac209615", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "f11e88d7-f185-4372-927c-d88008d2c483", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "f11e8f3f-46e6-4e55-90e3-09c22ec565bd", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "00e7dfc5-ac49-4fd3-a1d6-98d84e877ac4", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "14be970f-7af5-4590-8e81-ea32b5f7866d", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "18ecc94d-6afa-4994-8406-aee9dff12ce2", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "298530eb-435e-4dc6-a776-9abcd95c70e9", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "430eaf70-1886-483c-a746-1a18e3e6bb63", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "557d6503-633b-4490-a14c-6473147ce2b3", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "724cbb75-d1c9-451e-bae0-4de0db96b1f7", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "7cb5c0d1-d254-433f-abe3-ff23373ec631", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "91b29dcd-9430-4403-b17a-27d09189be88", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "a18480a4-6d18-4c71-84fa-789888791f45", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "b630d29b-1844-4bda-bbbe-cf5542df3559", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "c62a9e8d-b24c-4513-90aa-7ff0f8ba38eb", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "d7cdb020-288b-41e5-a857-597347618533", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "662f3db7-9bc8-42cf-84da-2765f563e9b0", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "712d9ec3-5d2b-4b13-824f-71f00191dcca", - Action = "e0759a42-47f0-4763-a26a-d5aa665bec35", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "0d68b142-e20a-446e-a832-0d6b0b65a164", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "6f05c382-8bca-4469-9424-c807a98c40d7", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", - AceType = AceType.Deny - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|f4d98afdd336433287783c6945c81ea0", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", - AceType = AceType.Deny - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", - AceType = AceType.Deny - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", - AceType = AceType.Deny - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", - AceType = AceType.Deny - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", - AceType = AceType.Deny - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", - AceType = 0 - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("varchar(38)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CategoryId") - .HasColumnType("varchar(38)") - .HasColumnName("categoryid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(128)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ParentId") - .HasColumnType("varchar(38)") - .HasColumnName("parentid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Removed") - .HasColumnType("tinyint(1)") - .HasColumnName("removed"); - - b.Property("Sid") - .HasColumnType("varchar(512)") - .HasColumnName("sid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("Tenant", "ParentId") - .HasDatabaseName("parentid"); - - b.ToTable("core_group"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbSubscriptionMethod", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Source") - .HasColumnType("varchar(38)") - .HasColumnName("source") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Action") - .HasColumnType("varchar(128)") - .HasColumnName("action") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Recipient") - .HasColumnType("varchar(38)") - .HasColumnName("recipient") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Sender") - .IsRequired() - .HasColumnType("varchar(1024)") - .HasColumnName("sender") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Tenant", "Source", "Action", "Recipient") - .HasName("PRIMARY"); - - b.ToTable("core_subscriptionmethod"); - - b.HasData( - new - { - Tenant = -1, - Source = "asc.web.studio", - Action = "send_whats_new", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender" - }, - new - { - Tenant = -1, - Source = "6504977c-75af-4691-9099-084d3ddeea04", - Action = "new feed", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6a598c74-91ae-437d-a5f4-ad339bd11bb2", - Action = "new post", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "853b6eb9-73ee-438d-9b09-8ffeedf36234", - Action = "new topic in forum", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "9d51954f-db9b-4aed-94e3-ed70b914e101", - Action = "new photo uploaded", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "28b10049-dd20-4f54-b986-873bc14ccfc7", - Action = "new bookmark created", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "742cf945-cbbc-4a57-82d6-1600a12cf8ca", - Action = "new wiki page", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", - Action = "BirthdayReminder", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", - Action = "sharedocument", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", - Action = "sharefolder", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", - Action = "updatedocument", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "invitetoproject", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "milestonedeadline", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "newcommentformessage", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "newcommentformilestone", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "newcommentfortask", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "projectcreaterequest", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "projecteditrequest", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "removefromproject", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "responsibleforproject", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "responsiblefortask", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "taskclosed", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "40650da3-f7c1-424c-8c89-b9c115472e08", - Action = "calendar_sharing", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "40650da3-f7c1-424c-8c89-b9c115472e08", - Action = "event_alert", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "asc.web.studio", - Action = "admin_notify", - Recipient = "cd84e66b-b803-40fc-99f9-b2969a54a1de", - Sender = "email.sender" - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "SetAccess", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "ResponsibleForTask", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "AddRelationshipEvent", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "ExportCompleted", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "CreateNewContact", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender" - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "ResponsibleForOpportunity", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "asc.web.studio", - Action = "periodic_notify", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Subscription", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Source") - .HasColumnType("varchar(38)") - .HasColumnName("source") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Action") - .HasColumnType("varchar(128)") - .HasColumnName("action") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Recipient") - .HasColumnType("varchar(38)") - .HasColumnName("recipient") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Object") - .HasColumnType("varchar(128)") - .HasColumnName("object") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Unsubscribed") - .HasColumnType("tinyint(1)") - .HasColumnName("unsubscribed"); - - b.HasKey("Tenant", "Source", "Action", "Recipient", "Object") - .HasName("PRIMARY"); - - b.ToTable("core_subscription"); - - b.HasData( - new - { - Tenant = -1, - Source = "asc.web.studio", - Action = "send_whats_new", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "6504977c-75af-4691-9099-084d3ddeea04", - Action = "new feed", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "6a598c74-91ae-437d-a5f4-ad339bd11bb2", - Action = "new post", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "853b6eb9-73ee-438d-9b09-8ffeedf36234", - Action = "new topic in forum", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "9d51954f-db9b-4aed-94e3-ed70b914e10", - Action = "new photo uploaded", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "28b10049-dd20-4f54-b986-873bc14ccfc7", - Action = "new bookmark created", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "742cf945-cbbc-4a57-82d6-1600a12cf8ca", - Action = "new wiki page", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", - Action = "BirthdayReminderd", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", - Action = "sharedocument", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", - Action = "sharefolder", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "40650da3-f7c1-424c-8c89-b9c115472e08", - Action = "calendar_sharing", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "40650da3-f7c1-424c-8c89-b9c115472e08", - Action = "event_alert", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "asc.web.studio", - Action = "admin_notify", - Recipient = "cd84e66b-b803-40fc-99f9-b2969a54a1de", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "SetAccess", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "ResponsibleForTask", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "AddRelationshipEvent", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "ExportCompleted", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "CreateNewContact", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "ResponsibleForOpportunity", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "asc.web.studio", - Action = "periodic_notify", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("varchar(38)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ActivationStatus") - .HasColumnType("int") - .HasColumnName("activation_status"); - - b.Property("Birthdate") - .HasColumnType("datetime") - .HasColumnName("bithdate"); - - b.Property("Contacts") - .HasColumnType("varchar(1024)") - .HasColumnName("contacts") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("create_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Culture") - .HasColumnType("varchar(20)") - .HasColumnName("culture") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Email") - .HasColumnType("varchar(255)") - .HasColumnName("email") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("varchar(64)") - .HasColumnName("firstname") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .HasColumnType("datetime") - .HasColumnName("last_modified"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("varchar(64)") - .HasColumnName("lastname") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Location") - .HasColumnType("varchar(255)") - .HasColumnName("location") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Notes") - .HasColumnType("varchar(512)") - .HasColumnName("notes") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Phone") - .HasColumnType("varchar(255)") - .HasColumnName("phone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PhoneActivation") - .HasColumnType("int") - .HasColumnName("phone_activation"); - - b.Property("Removed") - .HasColumnType("tinyint(1)") - .HasColumnName("removed"); - - b.Property("Sex") - .HasColumnType("tinyint(1)") - .HasColumnName("sex"); - - b.Property("Sid") - .HasColumnType("varchar(512)") - .HasColumnName("sid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("SsoNameId") - .HasColumnType("varchar(512)") - .HasColumnName("sso_name_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("SsoSessionId") - .HasColumnType("varchar(512)") - .HasColumnName("sso_session_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Status") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("status") - .HasDefaultValueSql("'1'"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("TerminatedDate") - .HasColumnType("datetime") - .HasColumnName("terminateddate"); - - b.Property("Title") - .HasColumnType("varchar(64)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("username") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("WorkFromDate") - .HasColumnType("datetime") - .HasColumnName("workfromdate"); - - b.HasKey("Id"); - - b.HasIndex("Email") - .HasDatabaseName("email"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("Tenant", "UserName") - .HasDatabaseName("username"); - - b.ToTable("core_user"); - - b.HasData( - new - { - Id = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - ActivationStatus = 0, - CreateOn = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - Email = "", - FirstName = "Administrator", - LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), - LastName = "", - PhoneActivation = 0, - Removed = false, - Status = 1, - Tenant = 1, - UserName = "administrator", - WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("userid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("GroupId") - .HasColumnType("varchar(38)") - .HasColumnName("groupid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("RefType") - .HasColumnType("int") - .HasColumnName("ref_type"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Removed") - .HasColumnType("tinyint(1)") - .HasColumnName("removed"); - - b.HasKey("Tenant", "UserId", "GroupId", "RefType") - .HasName("PRIMARY"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("UserId"); - - b.ToTable("core_usergroup"); - - b.HasData( - new - { - Tenant = 1, - UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - GroupId = "cd84e66b-b803-40fc-99f9-b2969a54a1de", - RefType = 0, - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - Removed = false - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserPhoto", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("varchar(38)") - .HasColumnName("userid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Photo") - .IsRequired() - .HasColumnType("mediumblob") - .HasColumnName("photo"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("UserId") - .HasName("PRIMARY"); - - b.HasIndex("Tenant") - .HasDatabaseName("tenant"); - - b.ToTable("core_userphoto"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserSecurity", b => - { - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("userid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("PwdHash") - .HasColumnType("varchar(512)") - .HasColumnName("pwdhash") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("UserId") - .HasName("PRIMARY"); - - b.HasIndex("PwdHash") - .HasDatabaseName("pwdhash"); - - b.HasIndex("Tenant") - .HasDatabaseName("tenant"); - - b.ToTable("core_usersecurity"); - - b.HasData( - new - { - UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - LastModified = new DateTime(2021, 10, 12, 14, 53, 21, 367, DateTimeKind.Utc).AddTicks(6524), - PwdHash = "vLFfghR5tNV3K9DKhmwArV+SbjWAcgZZzIDTnJ0JgCo=", - Tenant = 1 - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => - { - b.HasOne("ASC.Core.Common.EF.User", null) - .WithMany("Groups") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserSecurity", b => - { - b.HasOne("ASC.Core.Common.EF.User", null) - .WithOne("UserSecurity") - .HasForeignKey("ASC.Core.Common.EF.UserSecurity", "UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.User", b => - { - b.Navigation("Groups"); - - b.Navigation("UserSecurity"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Core.Common.EF; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(UserDbContext))] + [Migration("20220725161742_UserDbContextMigrate")] + partial class UserDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Acl", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Subject") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("subject"); + + b.Property("Action") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("action"); + + b.Property("Object") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("object") + .HasDefaultValueSql("''"); + + b.Property("AceType") + .HasColumnType("integer") + .HasColumnName("acetype"); + + b.HasKey("Tenant", "Subject", "Action", "Object") + .HasName("core_acl_pkey"); + + b.ToTable("core_acl", "onlyoffice"); + + b.HasData( + new + { + Tenant = -1, + Subject = new Guid("5d5b7260-f7f7-49f1-a1c9-95fbb6a12604"), + Action = new Guid("ef5e6790-f346-4b6e-b662-722bc28cb0db"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("5d5b7260-f7f7-49f1-a1c9-95fbb6a12604"), + Action = new Guid("f11e8f3f-46e6-4e55-90e3-09c22ec565bd"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("088d5940-a80f-4403-9741-d610718ce95c"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("08d66144-e1c9-4065-9aa1-aa4bba0a7bc8"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("08d75c97-cf3f-494b-90d1-751c941fe2dd"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("0d1f72a8-63da-47ea-ae42-0900e4ac72a9"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("13e30b51-5b4d-40a5-8575-cb561899eeb1"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("19f658ae-722b-4cd8-8236-3ad150801d96"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("2c6552b3-b2e0-4a00-b8fd-13c161e337b1"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("388c29d3-c662-4a61-bf47-fc2f7094224a"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("40bf31f4-3132-4e76-8d5c-9828a89501a3"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("49ae8915-2b30-4348-ab74-b152279364fb"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("9018c001-24c2-44bf-a1db-d1121a570e74"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("948ad738-434b-4a88-8e38-7569d332910a"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("9d75a568-52aa-49d8-ad43-473756cd8903"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("a362fe79-684e-4d43-a599-65bc1f4e167f"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("c426c349-9ad4-47cd-9b8f-99fc30675951"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("d11ebcb9-0e6e-45e6-a6d0-99c41d687598"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("d1f3b53d-d9e2-4259-80e7-d24380978395"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("d49f4e30-da10-4b39-bc6d-b41ef6e039d3"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("d852b66f-6719-45e1-8657-18f0bb791690"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("e0759a42-47f0-4763-a26a-d5aa665bec35"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("e37239bd-c5b5-4f1e-a9f8-3ceeac209615"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("fbc37705-a04c-40ad-a68c-ce2f0423f397"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("fcac42b8-9386-48eb-a938-d19b3c576912"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("13e30b51-5b4d-40a5-8575-cb561899eeb1"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("49ae8915-2b30-4348-ab74-b152279364fb"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("9018c001-24c2-44bf-a1db-d1121a570e74"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("d1f3b53d-d9e2-4259-80e7-d24380978395"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("e0759a42-47f0-4763-a26a-d5aa665bec35"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("e37239bd-c5b5-4f1e-a9f8-3ceeac209615"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("f11e88d7-f185-4372-927c-d88008d2c483"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("f11e8f3f-46e6-4e55-90e3-09c22ec565bd"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("00e7dfc5-ac49-4fd3-a1d6-98d84e877ac4"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("14be970f-7af5-4590-8e81-ea32b5f7866d"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("18ecc94d-6afa-4994-8406-aee9dff12ce2"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("298530eb-435e-4dc6-a776-9abcd95c70e9"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("430eaf70-1886-483c-a746-1a18e3e6bb63"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("557d6503-633b-4490-a14c-6473147ce2b3"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("724cbb75-d1c9-451e-bae0-4de0db96b1f7"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("7cb5c0d1-d254-433f-abe3-ff23373ec631"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("91b29dcd-9430-4403-b17a-27d09189be88"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("a18480a4-6d18-4c71-84fa-789888791f45"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("b630d29b-1844-4bda-bbbe-cf5542df3559"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("c62a9e8d-b24c-4513-90aa-7ff0f8ba38eb"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("d7cdb020-288b-41e5-a857-597347618533"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("662f3db7-9bc8-42cf-84da-2765f563e9b0"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("712d9ec3-5d2b-4b13-824f-71f00191dcca"), + Action = new Guid("e0759a42-47f0-4763-a26a-d5aa665bec35"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("0d68b142-e20a-446e-a832-0d6b0b65a164"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("6f05c382-8bca-4469-9424-c807a98c40d7"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", + AceType = 1 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|f4d98afdd336433287783c6945c81ea0", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", + AceType = 1 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", + AceType = 1 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", + AceType = 1 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", + AceType = 1 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", + AceType = 1 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", + AceType = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CategoryId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("categoryid") + .HasDefaultValueSql("NULL"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("name"); + + b.Property("ParentId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("parentid") + .HasDefaultValueSql("NULL"); + + b.Property("Removed") + .HasColumnType("boolean") + .HasColumnName("removed"); + + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sid") + .HasDefaultValueSql("NULL"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("Tenant", "ParentId") + .HasDatabaseName("parentid"); + + b.ToTable("core_group", (string)null); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbSubscriptionMethod", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Source") + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("source"); + + b.Property("Action") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("action"); + + b.Property("Recipient") + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("recipient"); + + b.Property("Sender") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("sender"); + + b.HasKey("Tenant", "Source", "Action", "Recipient") + .HasName("core_subscriptionmethod_pkey"); + + b.ToTable("core_subscriptionmethod", "onlyoffice"); + + b.HasData( + new + { + Tenant = -1, + Source = "asc.web.studio", + Action = "send_whats_new", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender" + }, + new + { + Tenant = -1, + Source = "6504977c-75af-4691-9099-084d3ddeea04", + Action = "new feed", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6a598c74-91ae-437d-a5f4-ad339bd11bb2", + Action = "new post", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "853b6eb9-73ee-438d-9b09-8ffeedf36234", + Action = "new topic in forum", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "9d51954f-db9b-4aed-94e3-ed70b914e101", + Action = "new photo uploaded", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "28b10049-dd20-4f54-b986-873bc14ccfc7", + Action = "new bookmark created", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "742cf945-cbbc-4a57-82d6-1600a12cf8ca", + Action = "new wiki page", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", + Action = "BirthdayReminder", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", + Action = "sharedocument", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", + Action = "sharefolder", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", + Action = "updatedocument", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "invitetoproject", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "milestonedeadline", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "newcommentformessage", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "newcommentformilestone", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "newcommentfortask", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "projectcreaterequest", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "projecteditrequest", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "removefromproject", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "responsibleforproject", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "responsiblefortask", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "taskclosed", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "40650da3-f7c1-424c-8c89-b9c115472e08", + Action = "calendar_sharing", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "40650da3-f7c1-424c-8c89-b9c115472e08", + Action = "event_alert", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "asc.web.studio", + Action = "admin_notify", + Recipient = "cd84e66b-b803-40fc-99f9-b2969a54a1de", + Sender = "email.sender" + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "SetAccess", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "ResponsibleForTask", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "AddRelationshipEvent", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "ExportCompleted", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "CreateNewContact", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "ResponsibleForOpportunity", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "asc.web.studio", + Action = "periodic_notify", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender" + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Subscription", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Source") + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("source"); + + b.Property("Action") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("action"); + + b.Property("Recipient") + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("recipient"); + + b.Property("Object") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("object"); + + b.Property("Unsubscribed") + .HasColumnType("boolean") + .HasColumnName("unsubscribed"); + + b.HasKey("Tenant", "Source", "Action", "Recipient", "Object") + .HasName("core_subscription_pkey"); + + b.ToTable("core_subscription", "onlyoffice"); + + b.HasData( + new + { + Tenant = -1, + Source = "asc.web.studio", + Action = "send_whats_new", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "6504977c-75af-4691-9099-084d3ddeea04", + Action = "new feed", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "6a598c74-91ae-437d-a5f4-ad339bd11bb2", + Action = "new post", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "853b6eb9-73ee-438d-9b09-8ffeedf36234", + Action = "new topic in forum", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "9d51954f-db9b-4aed-94e3-ed70b914e101", + Action = "new photo uploaded", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "28b10049-dd20-4f54-b986-873bc14ccfc7", + Action = "new bookmark created", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "742cf945-cbbc-4a57-82d6-1600a12cf8ca", + Action = "new wiki page", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", + Action = "BirthdayReminder", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", + Action = "sharedocument", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", + Action = "sharefolder", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "40650da3-f7c1-424c-8c89-b9c115472e08", + Action = "calendar_sharing", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "40650da3-f7c1-424c-8c89-b9c115472e08", + Action = "event_alert", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "asc.web.studio", + Action = "admin_notify", + Recipient = "cd84e66b-b803-40fc-99f9-b2969a54a1de", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "SetAccess", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "ResponsibleForTask", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "AddRelationshipEvent", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "ExportCompleted", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "CreateNewContact", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "ResponsibleForOpportunity", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "asc.web.studio", + Action = "periodic_notify", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ActivationStatus") + .HasColumnType("integer") + .HasColumnName("activation_status"); + + b.Property("BirthDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("bithdate"); + + b.Property("Contacts") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("contacts") + .HasDefaultValueSql("NULL"); + + b.Property("CreateDate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("CultureName") + .ValueGeneratedOnAdd() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("culture") + .HasDefaultValueSql("NULL"); + + b.Property("Email") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("email") + .HasDefaultValueSql("NULL"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("firstname"); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("lastname"); + + b.Property("Location") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("location") + .HasDefaultValueSql("NULL"); + + b.Property("MobilePhone") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("phone") + .HasDefaultValueSql("NULL"); + + b.Property("MobilePhoneActivation") + .HasColumnType("integer") + .HasColumnName("phone_activation"); + + b.Property("Notes") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("notes") + .HasDefaultValueSql("NULL"); + + b.Property("Removed") + .HasColumnType("boolean") + .HasColumnName("removed"); + + b.Property("Sex") + .HasColumnType("boolean") + .HasColumnName("sex"); + + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sid") + .HasDefaultValueSql("NULL"); + + b.Property("SsoNameId") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sso_name_id") + .HasDefaultValueSql("NULL"); + + b.Property("SsoSessionId") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sso_session_id") + .HasDefaultValueSql("NULL"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("status") + .HasDefaultValueSql("1"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("TerminatedDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("terminateddate"); + + b.Property("Title") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("title") + .HasDefaultValueSql("NULL"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("username"); + + b.Property("WorkFromDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("workfromdate"); + + b.HasKey("Id"); + + b.HasIndex("Email") + .HasDatabaseName("email"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_core_user"); + + b.HasIndex("UserName", "Tenant") + .HasDatabaseName("username"); + + b.ToTable("core_user", "onlyoffice"); + + b.HasData( + new + { + Id = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + ActivationStatus = 0, + CreateDate = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Email = "", + FirstName = "Administrator", + LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), + LastName = "", + MobilePhoneActivation = 0, + Removed = false, + Status = 1, + Tenant = 1, + UserName = "administrator", + WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.UserDav", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.HasKey("TenantId", "UserId") + .HasName("core_userdav_pkey"); + + b.ToTable("core_userdav", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Userid") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("userid"); + + b.Property("UserGroupId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("groupid"); + + b.Property("RefType") + .HasColumnType("integer") + .HasColumnName("ref_type"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Removed") + .HasColumnType("boolean") + .HasColumnName("removed"); + + b.HasKey("Tenant", "Userid", "UserGroupId", "RefType") + .HasName("core_usergroup_pkey"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_core_usergroup"); + + b.ToTable("core_usergroup", "onlyoffice"); + + b.HasData( + new + { + Tenant = 1, + Userid = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + UserGroupId = new Guid("cd84e66b-b803-40fc-99f9-b2969a54a1de"), + RefType = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Removed = false + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.UserPhoto", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("userid"); + + b.Property("Photo") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("photo"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("UserId") + .HasName("core_userphoto_pkey"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant_core_userphoto"); + + b.ToTable("core_userphoto", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.UserSecurity", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("userid"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("PwdHash") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("pwdhash") + .HasDefaultValueSql("NULL"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("UserId") + .HasName("core_usersecurity_pkey"); + + b.HasIndex("PwdHash") + .HasDatabaseName("pwdhash"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant_core_usersecurity"); + + b.ToTable("core_usersecurity", "onlyoffice"); + + b.HasData( + new + { + UserId = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + PwdHash = "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=", + Tenant = 1 + }); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/UserDbContext/20220725161742_UserDbContextMigrate.cs b/migrations/postgre/UserDbContext/20220725161742_UserDbContextMigrate.cs new file mode 100644 index 0000000000..532fa3734a --- /dev/null +++ b/migrations/postgre/UserDbContext/20220725161742_UserDbContextMigrate.cs @@ -0,0 +1,429 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class UserDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "onlyoffice"); + + migrationBuilder.CreateTable( + name: "core_acl", + schema: "onlyoffice", + columns: table => new + { + tenant = table.Column(type: "integer", nullable: false), + subject = table.Column(type: "uuid", maxLength: 38, nullable: false), + action = table.Column(type: "uuid", maxLength: 38, nullable: false), + @object = table.Column(name: "object", type: "character varying(255)", maxLength: 255, nullable: false, defaultValueSql: "''"), + acetype = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("core_acl_pkey", x => new { x.tenant, x.subject, x.action, x.@object }); + }); + + migrationBuilder.CreateTable( + name: "core_group", + columns: table => new + { + id = table.Column(type: "uuid", maxLength: 38, nullable: false), + tenant = table.Column(type: "integer", nullable: false), + name = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + categoryid = table.Column(type: "uuid", maxLength: 38, nullable: true, defaultValueSql: "NULL"), + parentid = table.Column(type: "uuid", maxLength: 38, nullable: true, defaultValueSql: "NULL"), + sid = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"), + removed = table.Column(type: "boolean", nullable: false), + last_modified = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("PK_core_group", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "core_subscription", + schema: "onlyoffice", + columns: table => new + { + tenant = table.Column(type: "integer", nullable: false), + source = table.Column(type: "character varying(38)", maxLength: 38, nullable: false), + action = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + recipient = table.Column(type: "character varying(38)", maxLength: 38, nullable: false), + @object = table.Column(name: "object", type: "character varying(128)", maxLength: 128, nullable: false), + unsubscribed = table.Column(type: "boolean", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("core_subscription_pkey", x => new { x.tenant, x.source, x.action, x.recipient, x.@object }); + }); + + migrationBuilder.CreateTable( + name: "core_subscriptionmethod", + schema: "onlyoffice", + columns: table => new + { + tenant = table.Column(type: "integer", nullable: false), + source = table.Column(type: "character varying(38)", maxLength: 38, nullable: false), + action = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + recipient = table.Column(type: "character varying(38)", maxLength: 38, nullable: false), + sender = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("core_subscriptionmethod_pkey", x => new { x.tenant, x.source, x.action, x.recipient }); + }); + + migrationBuilder.CreateTable( + name: "core_user", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "uuid", maxLength: 38, nullable: false), + tenant = table.Column(type: "integer", nullable: false), + username = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + firstname = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + lastname = table.Column(type: "character varying(64)", maxLength: 64, nullable: false), + sex = table.Column(type: "boolean", nullable: true), + bithdate = table.Column(type: "timestamp with time zone", nullable: true), + status = table.Column(type: "integer", nullable: false, defaultValueSql: "1"), + activation_status = table.Column(type: "integer", nullable: false), + email = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + workfromdate = table.Column(type: "timestamp with time zone", nullable: true), + terminateddate = table.Column(type: "timestamp with time zone", nullable: true), + title = table.Column(type: "character varying(64)", maxLength: 64, nullable: true, defaultValueSql: "NULL"), + culture = table.Column(type: "character varying(20)", maxLength: 20, nullable: true, defaultValueSql: "NULL"), + contacts = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"), + phone = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + phone_activation = table.Column(type: "integer", nullable: false), + location = table.Column(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"), + notes = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"), + sid = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"), + sso_name_id = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"), + sso_session_id = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"), + removed = table.Column(type: "boolean", nullable: false), + create_on = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), + last_modified = table.Column(type: "timestamp with time zone", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_core_user", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "core_userdav", + schema: "onlyoffice", + columns: table => new + { + tenant_id = table.Column(type: "integer", nullable: false), + user_id = table.Column(type: "uuid", maxLength: 38, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("core_userdav_pkey", x => new { x.tenant_id, x.user_id }); + }); + + migrationBuilder.CreateTable( + name: "core_usergroup", + schema: "onlyoffice", + columns: table => new + { + tenant = table.Column(type: "integer", nullable: false), + userid = table.Column(type: "uuid", maxLength: 38, nullable: false), + groupid = table.Column(type: "uuid", maxLength: 38, nullable: false), + ref_type = table.Column(type: "integer", nullable: false), + removed = table.Column(type: "boolean", nullable: false), + last_modified = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("core_usergroup_pkey", x => new { x.tenant, x.userid, x.groupid, x.ref_type }); + }); + + migrationBuilder.CreateTable( + name: "core_userphoto", + schema: "onlyoffice", + columns: table => new + { + userid = table.Column(type: "uuid", maxLength: 38, nullable: false), + tenant = table.Column(type: "integer", nullable: false), + photo = table.Column(type: "bytea", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("core_userphoto_pkey", x => x.userid); + }); + + migrationBuilder.CreateTable( + name: "core_usersecurity", + schema: "onlyoffice", + columns: table => new + { + userid = table.Column(type: "uuid", maxLength: 38, nullable: false), + tenant = table.Column(type: "integer", nullable: false), + pwdhash = table.Column(type: "character varying(512)", maxLength: 512, nullable: true, defaultValueSql: "NULL"), + LastModified = table.Column(type: "timestamp with time zone", nullable: true, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("core_usersecurity_pkey", x => x.userid); + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "core_acl", + columns: new[] { "action", "object", "subject", "tenant", "acetype" }, + values: new object[,] + { + { new Guid("ef5e6790-f346-4b6e-b662-722bc28cb0db"), "", new Guid("5d5b7260-f7f7-49f1-a1c9-95fbb6a12604"), -1, 0 }, + { new Guid("f11e8f3f-46e6-4e55-90e3-09c22ec565bd"), "", new Guid("5d5b7260-f7f7-49f1-a1c9-95fbb6a12604"), -1, 0 }, + { new Guid("e0759a42-47f0-4763-a26a-d5aa665bec35"), "", new Guid("712d9ec3-5d2b-4b13-824f-71f00191dcca"), -1, 0 }, + { new Guid("08d75c97-cf3f-494b-90d1-751c941fe2dd"), "", new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), -1, 0 }, + { new Guid("0d1f72a8-63da-47ea-ae42-0900e4ac72a9"), "", new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), -1, 0 }, + { new Guid("13e30b51-5b4d-40a5-8575-cb561899eeb1"), "", new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), -1, 0 }, + { new Guid("19f658ae-722b-4cd8-8236-3ad150801d96"), "", new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), -1, 0 }, + { new Guid("2c6552b3-b2e0-4a00-b8fd-13c161e337b1"), "", new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), -1, 0 }, + { new Guid("40bf31f4-3132-4e76-8d5c-9828a89501a3"), "", new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), -1, 0 }, + { new Guid("49ae8915-2b30-4348-ab74-b152279364fb"), "", new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), -1, 0 }, + { new Guid("948ad738-434b-4a88-8e38-7569d332910a"), "", new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), -1, 0 }, + { new Guid("9d75a568-52aa-49d8-ad43-473756cd8903"), "", new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), -1, 0 }, + { new Guid("d49f4e30-da10-4b39-bc6d-b41ef6e039d3"), "", new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), -1, 0 }, + { new Guid("d852b66f-6719-45e1-8657-18f0bb791690"), "", new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), -1, 0 }, + { new Guid("13e30b51-5b4d-40a5-8575-cb561899eeb1"), "", new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), -1, 0 }, + { new Guid("49ae8915-2b30-4348-ab74-b152279364fb"), "", new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), -1, 0 }, + { new Guid("63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd"), "", new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), -1, 0 }, + { new Guid("9018c001-24c2-44bf-a1db-d1121a570e74"), "", new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), -1, 0 }, + { new Guid("d1f3b53d-d9e2-4259-80e7-d24380978395"), "", new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), -1, 0 }, + { new Guid("e0759a42-47f0-4763-a26a-d5aa665bec35"), "", new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), -1, 0 }, + { new Guid("e37239bd-c5b5-4f1e-a9f8-3ceeac209615"), "", new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), -1, 0 }, + { new Guid("f11e88d7-f185-4372-927c-d88008d2c483"), "", new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), -1, 0 }, + { new Guid("f11e8f3f-46e6-4e55-90e3-09c22ec565bd"), "", new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), -1, 0 }, + { new Guid("00e7dfc5-ac49-4fd3-a1d6-98d84e877ac4"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("0d68b142-e20a-446e-a832-0d6b0b65a164"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("14be970f-7af5-4590-8e81-ea32b5f7866d"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("18ecc94d-6afa-4994-8406-aee9dff12ce2"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("298530eb-435e-4dc6-a776-9abcd95c70e9"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("430eaf70-1886-483c-a746-1a18e3e6bb63"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("557d6503-633b-4490-a14c-6473147ce2b3"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("662f3db7-9bc8-42cf-84da-2765f563e9b0"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("724cbb75-d1c9-451e-bae0-4de0db96b1f7"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("7cb5c0d1-d254-433f-abe3-ff23373ec631"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("91b29dcd-9430-4403-b17a-27d09189be88"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("a18480a4-6d18-4c71-84fa-789888791f45"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("b630d29b-1844-4bda-bbbe-cf5542df3559"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("c62a9e8d-b24c-4513-90aa-7ff0f8ba38eb"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("d7cdb020-288b-41e5-a857-597347618533"), "", new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), -1, 0 }, + { new Guid("088d5940-a80f-4403-9741-d610718ce95c"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("08d66144-e1c9-4065-9aa1-aa4bba0a7bc8"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("388c29d3-c662-4a61-bf47-fc2f7094224a"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("6f05c382-8bca-4469-9424-c807a98c40d7"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 1 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 1 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 1 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 1 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 1 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 1 }, + { new Guid("77777777-32ae-425f-99b5-83176061d1ae"), "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|f4d98afdd336433287783c6945c81ea0", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("9018c001-24c2-44bf-a1db-d1121a570e74"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("a362fe79-684e-4d43-a599-65bc1f4e167f"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("c426c349-9ad4-47cd-9b8f-99fc30675951"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("d11ebcb9-0e6e-45e6-a6d0-99c41d687598"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("d1f3b53d-d9e2-4259-80e7-d24380978395"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("e0759a42-47f0-4763-a26a-d5aa665bec35"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("e37239bd-c5b5-4f1e-a9f8-3ceeac209615"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("fbc37705-a04c-40ad-a68c-ce2f0423f397"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 }, + { new Guid("fcac42b8-9386-48eb-a938-d19b3c576912"), "", new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), -1, 0 } + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "core_subscription", + columns: new[] { "action", "object", "recipient", "source", "tenant", "unsubscribed" }, + values: new object[,] + { + { "AddRelationshipEvent", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, + { "CreateNewContact", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, + { "ExportCompleted", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, + { "ResponsibleForOpportunity", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, + { "ResponsibleForTask", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, + { "SetAccess", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, false }, + { "new bookmark created", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "28b10049-dd20-4f54-b986-873bc14ccfc7", -1, false }, + { "BirthdayReminder", "", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "37620ae5-c40b-45ce-855a-39dd7d76a1fa", -1, false }, + { "calendar_sharing", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, false }, + { "event_alert", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, false }, + { "new feed", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6504977c-75af-4691-9099-084d3ddeea04", -1, false }, + { "new post", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6a598c74-91ae-437d-a5f4-ad339bd11bb2", -1, false }, + { "sharedocument", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, false }, + { "sharefolder", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, false }, + { "new wiki page", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "742cf945-cbbc-4a57-82d6-1600a12cf8ca", -1, false }, + { "new topic in forum", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "853b6eb9-73ee-438d-9b09-8ffeedf36234", -1, false }, + { "new photo uploaded", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "9d51954f-db9b-4aed-94e3-ed70b914e101", -1, false }, + { "admin_notify", "", "cd84e66b-b803-40fc-99f9-b2969a54a1de", "asc.web.studio", -1, false }, + { "periodic_notify", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, false }, + { "send_whats_new", "", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, false } + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "core_subscriptionmethod", + columns: new[] { "action", "recipient", "source", "tenant", "sender" }, + values: new object[,] + { + { "AddRelationshipEvent", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, + { "CreateNewContact", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, + { "ExportCompleted", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, + { "ResponsibleForOpportunity", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, + { "ResponsibleForTask", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, + { "SetAccess", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "13ff36fb-0272-4887-b416-74f52b0d0b02", -1, "email.sender|messanger.sender" }, + { "new bookmark created", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "28b10049-dd20-4f54-b986-873bc14ccfc7", -1, "email.sender|messanger.sender" }, + { "BirthdayReminder", "abef62db-11a8-4673-9d32-ef1d8af19dc0", "37620ae5-c40b-45ce-855a-39dd7d76a1fa", -1, "email.sender|messanger.sender" }, + { "calendar_sharing", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, "email.sender|messanger.sender" }, + { "event_alert", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "40650da3-f7c1-424c-8c89-b9c115472e08", -1, "email.sender|messanger.sender" }, + { "invitetoproject", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "milestonedeadline", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "newcommentformessage", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "newcommentformilestone", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "newcommentfortask", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "projectcreaterequest", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "projecteditrequest", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "removefromproject", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "responsibleforproject", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "responsiblefortask", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "taskclosed", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6045b68c-2c2e-42db-9e53-c272e814c4ad", -1, "email.sender|messanger.sender" }, + { "new feed", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6504977c-75af-4691-9099-084d3ddeea04", -1, "email.sender|messanger.sender" }, + { "new post", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6a598c74-91ae-437d-a5f4-ad339bd11bb2", -1, "email.sender|messanger.sender" }, + { "sharedocument", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, "email.sender|messanger.sender" }, + { "sharefolder", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, "email.sender|messanger.sender" }, + { "updatedocument", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "6fe286a4-479e-4c25-a8d9-0156e332b0c0", -1, "email.sender|messanger.sender" }, + { "new wiki page", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "742cf945-cbbc-4a57-82d6-1600a12cf8ca", -1, "email.sender|messanger.sender" }, + { "new topic in forum", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "853b6eb9-73ee-438d-9b09-8ffeedf36234", -1, "email.sender|messanger.sender" }, + { "new photo uploaded", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "9d51954f-db9b-4aed-94e3-ed70b914e101", -1, "email.sender|messanger.sender" }, + { "admin_notify", "cd84e66b-b803-40fc-99f9-b2969a54a1de", "asc.web.studio", -1, "email.sender" }, + { "periodic_notify", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, "email.sender" }, + { "send_whats_new", "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "asc.web.studio", -1, "email.sender" } + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "core_user", + columns: new[] { "id", "activation_status", "bithdate", "create_on", "email", "firstname", "last_modified", "lastname", "phone_activation", "removed", "sex", "status", "tenant", "terminateddate", "username", "workfromdate" }, + values: new object[] { new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), 0, null, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "", "Administrator", new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), "", 0, false, null, 1, 1, null, "administrator", new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "core_usergroup", + columns: new[] { "ref_type", "tenant", "groupid", "userid", "last_modified", "removed" }, + values: new object[] { 0, 1, new Guid("cd84e66b-b803-40fc-99f9-b2969a54a1de"), new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), false }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "core_usersecurity", + columns: new[] { "userid", "LastModified", "pwdhash", "tenant" }, + values: new object[] { new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=", 1 }); + + migrationBuilder.CreateIndex( + name: "last_modified", + table: "core_group", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "parentid", + table: "core_group", + columns: new[] { "tenant", "parentid" }); + + migrationBuilder.CreateIndex( + name: "email", + schema: "onlyoffice", + table: "core_user", + column: "email"); + + migrationBuilder.CreateIndex( + name: "last_modified_core_user", + schema: "onlyoffice", + table: "core_user", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "username", + schema: "onlyoffice", + table: "core_user", + columns: new[] { "username", "tenant" }); + + migrationBuilder.CreateIndex( + name: "last_modified_core_usergroup", + schema: "onlyoffice", + table: "core_usergroup", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "tenant_core_userphoto", + schema: "onlyoffice", + table: "core_userphoto", + column: "tenant"); + + migrationBuilder.CreateIndex( + name: "pwdhash", + schema: "onlyoffice", + table: "core_usersecurity", + column: "pwdhash"); + + migrationBuilder.CreateIndex( + name: "tenant_core_usersecurity", + schema: "onlyoffice", + table: "core_usersecurity", + column: "tenant"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "core_acl", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "core_group"); + + migrationBuilder.DropTable( + name: "core_subscription", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "core_subscriptionmethod", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "core_user", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "core_userdav", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "core_usergroup", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "core_userphoto", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "core_usersecurity", + schema: "onlyoffice"); + } + } +} diff --git a/common/ASC.Core.Common/Migrations/MySql/UserDbContextMySql/20211012145322_UserDbContextMySql.Designer.cs b/migrations/postgre/UserDbContext/UserDbContextModelSnapshot.cs similarity index 63% rename from common/ASC.Core.Common/Migrations/MySql/UserDbContextMySql/20211012145322_UserDbContextMySql.Designer.cs rename to migrations/postgre/UserDbContext/UserDbContextModelSnapshot.cs index c6b7eb9652..531b0a9fd7 100644 --- a/common/ASC.Core.Common/Migrations/MySql/UserDbContextMySql/20211012145322_UserDbContextMySql.Designer.cs +++ b/migrations/postgre/UserDbContext/UserDbContextModelSnapshot.cs @@ -1,1488 +1,1480 @@ -// - -namespace ASC.Core.Common.Migrations.MySql.UserDbContextMySql -{ - [DbContext(typeof(MySqlUserDbContext))] - [Migration("20211012145322_UserDbContextMySql")] - partial class UserDbContextMySql - { - 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.Acl", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Subject") - .HasColumnType("varchar(38)") - .HasColumnName("subject") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Action") - .HasColumnType("varchar(38)") - .HasColumnName("action") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Object") - .ValueGeneratedOnAdd() - .HasColumnType("varchar(255)") - .HasColumnName("object") - .HasDefaultValueSql("''") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("AceType") - .HasColumnType("int") - .HasColumnName("acetype"); - - b.HasKey("Tenant", "Subject", "Action", "Object") - .HasName("PRIMARY"); - - b.ToTable("core_acl"); - - b.HasData( - new - { - Tenant = -1, - Subject = "5d5b7260-f7f7-49f1-a1c9-95fbb6a12604", - Action = "ef5e6790-f346-4b6e-b662-722bc28cb0db", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "5d5b7260-f7f7-49f1-a1c9-95fbb6a12604", - Action = "f11e8f3f-46e6-4e55-90e3-09c22ec565bd", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "088d5940-a80f-4403-9741-d610718ce95c", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "08d66144-e1c9-4065-9aa1-aa4bba0a7bc8", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "08d75c97-cf3f-494b-90d1-751c941fe2dd", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "0d1f72a8-63da-47ea-ae42-0900e4ac72a9", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "13e30b51-5b4d-40a5-8575-cb561899eeb1", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "19f658ae-722b-4cd8-8236-3ad150801d96", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "2c6552b3-b2e0-4a00-b8fd-13c161e337b1", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "388c29d3-c662-4a61-bf47-fc2f7094224a", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "40bf31f4-3132-4e76-8d5c-9828a89501a3", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "49ae8915-2b30-4348-ab74-b152279364fb", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "9018c001-24c2-44bf-a1db-d1121a570e74", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "948ad738-434b-4a88-8e38-7569d332910a", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "9d75a568-52aa-49d8-ad43-473756cd8903", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "a362fe79-684e-4d43-a599-65bc1f4e167f", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "c426c349-9ad4-47cd-9b8f-99fc30675951", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "d11ebcb9-0e6e-45e6-a6d0-99c41d687598", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "d1f3b53d-d9e2-4259-80e7-d24380978395", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "d49f4e30-da10-4b39-bc6d-b41ef6e039d3", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Action = "d852b66f-6719-45e1-8657-18f0bb791690", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "e0759a42-47f0-4763-a26a-d5aa665bec35", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "e37239bd-c5b5-4f1e-a9f8-3ceeac209615", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "fbc37705-a04c-40ad-a68c-ce2f0423f397", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "fcac42b8-9386-48eb-a938-d19b3c576912", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "13e30b51-5b4d-40a5-8575-cb561899eeb1", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "49ae8915-2b30-4348-ab74-b152279364fb", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "9018c001-24c2-44bf-a1db-d1121a570e74", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "d1f3b53d-d9e2-4259-80e7-d24380978395", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "e0759a42-47f0-4763-a26a-d5aa665bec35", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "e37239bd-c5b5-4f1e-a9f8-3ceeac209615", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "f11e88d7-f185-4372-927c-d88008d2c483", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "ba74ca02-873f-43dc-8470-8620c156bc67", - Action = "f11e8f3f-46e6-4e55-90e3-09c22ec565bd", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "00e7dfc5-ac49-4fd3-a1d6-98d84e877ac4", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "14be970f-7af5-4590-8e81-ea32b5f7866d", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "18ecc94d-6afa-4994-8406-aee9dff12ce2", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "298530eb-435e-4dc6-a776-9abcd95c70e9", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "430eaf70-1886-483c-a746-1a18e3e6bb63", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "557d6503-633b-4490-a14c-6473147ce2b3", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "724cbb75-d1c9-451e-bae0-4de0db96b1f7", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "7cb5c0d1-d254-433f-abe3-ff23373ec631", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "91b29dcd-9430-4403-b17a-27d09189be88", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "a18480a4-6d18-4c71-84fa-789888791f45", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "b630d29b-1844-4bda-bbbe-cf5542df3559", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "c62a9e8d-b24c-4513-90aa-7ff0f8ba38eb", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "d7cdb020-288b-41e5-a857-597347618533", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "662f3db7-9bc8-42cf-84da-2765f563e9b0", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "712d9ec3-5d2b-4b13-824f-71f00191dcca", - Action = "e0759a42-47f0-4763-a26a-d5aa665bec35", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "bba32183-a14d-48ed-9d39-c6b4d8925fbf", - Action = "0d68b142-e20a-446e-a832-0d6b0b65a164", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "6f05c382-8bca-4469-9424-c807a98c40d7", - Object = "", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", - AceType = AceType.Deny - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|f4d98afdd336433287783c6945c81ea0", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", - AceType = AceType.Deny - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", - AceType = AceType.Deny - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", - AceType = AceType.Deny - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", - AceType = AceType.Deny - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", - AceType = AceType.Deny - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", - AceType = 0 - }, - new - { - Tenant = -1, - Subject = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Action = "77777777-32ae-425f-99b5-83176061d1ae", - Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", - AceType = 0 - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("varchar(38)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CategoryId") - .HasColumnType("varchar(38)") - .HasColumnName("categoryid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(128)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ParentId") - .HasColumnType("varchar(38)") - .HasColumnName("parentid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Removed") - .HasColumnType("tinyint(1)") - .HasColumnName("removed"); - - b.Property("Sid") - .HasColumnType("varchar(512)") - .HasColumnName("sid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("Tenant", "ParentId") - .HasDatabaseName("parentid"); - - b.ToTable("core_group"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbSubscriptionMethod", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Source") - .HasColumnType("varchar(38)") - .HasColumnName("source") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Action") - .HasColumnType("varchar(128)") - .HasColumnName("action") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Recipient") - .HasColumnType("varchar(38)") - .HasColumnName("recipient") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Sender") - .IsRequired() - .HasColumnType("varchar(1024)") - .HasColumnName("sender") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Tenant", "Source", "Action", "Recipient") - .HasName("PRIMARY"); - - b.ToTable("core_subscriptionmethod"); - - b.HasData( - new - { - Tenant = -1, - Source = "asc.web.studio", - Action = "send_whats_new", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender" - }, - new - { - Tenant = -1, - Source = "6504977c-75af-4691-9099-084d3ddeea04", - Action = "new feed", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6a598c74-91ae-437d-a5f4-ad339bd11bb2", - Action = "new post", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "853b6eb9-73ee-438d-9b09-8ffeedf36234", - Action = "new topic in forum", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "9d51954f-db9b-4aed-94e3-ed70b914e101", - Action = "new photo uploaded", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "28b10049-dd20-4f54-b986-873bc14ccfc7", - Action = "new bookmark created", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "742cf945-cbbc-4a57-82d6-1600a12cf8ca", - Action = "new wiki page", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", - Action = "BirthdayReminder", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", - Action = "sharedocument", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", - Action = "sharefolder", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", - Action = "updatedocument", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "invitetoproject", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "milestonedeadline", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "newcommentformessage", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "newcommentformilestone", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "newcommentfortask", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "projectcreaterequest", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "projecteditrequest", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "removefromproject", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "responsibleforproject", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "responsiblefortask", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", - Action = "taskclosed", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "40650da3-f7c1-424c-8c89-b9c115472e08", - Action = "calendar_sharing", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "40650da3-f7c1-424c-8c89-b9c115472e08", - Action = "event_alert", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "asc.web.studio", - Action = "admin_notify", - Recipient = "cd84e66b-b803-40fc-99f9-b2969a54a1de", - Sender = "email.sender" - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "SetAccess", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "ResponsibleForTask", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "AddRelationshipEvent", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "ExportCompleted", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "CreateNewContact", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender" - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "ResponsibleForOpportunity", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Sender = "email.sender|messanger.sender" - }, - new - { - Tenant = -1, - Source = "asc.web.studio", - Action = "periodic_notify", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Sender = "email.sender" - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Subscription", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("Source") - .HasColumnType("varchar(38)") - .HasColumnName("source") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Action") - .HasColumnType("varchar(128)") - .HasColumnName("action") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Recipient") - .HasColumnType("varchar(38)") - .HasColumnName("recipient") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Object") - .HasColumnType("varchar(128)") - .HasColumnName("object") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Unsubscribed") - .HasColumnType("tinyint(1)") - .HasColumnName("unsubscribed"); - - b.HasKey("Tenant", "Source", "Action", "Recipient", "Object") - .HasName("PRIMARY"); - - b.ToTable("core_subscription"); - - b.HasData( - new - { - Tenant = -1, - Source = "asc.web.studio", - Action = "send_whats_new", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "6504977c-75af-4691-9099-084d3ddeea04", - Action = "new feed", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "6a598c74-91ae-437d-a5f4-ad339bd11bb2", - Action = "new post", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "853b6eb9-73ee-438d-9b09-8ffeedf36234", - Action = "new topic in forum", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "9d51954f-db9b-4aed-94e3-ed70b914e10", - Action = "new photo uploaded", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "28b10049-dd20-4f54-b986-873bc14ccfc7", - Action = "new bookmark created", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "742cf945-cbbc-4a57-82d6-1600a12cf8ca", - Action = "new wiki page", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", - Action = "BirthdayReminderd", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", - Action = "sharedocument", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", - Action = "sharefolder", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "40650da3-f7c1-424c-8c89-b9c115472e08", - Action = "calendar_sharing", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "40650da3-f7c1-424c-8c89-b9c115472e08", - Action = "event_alert", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "asc.web.studio", - Action = "admin_notify", - Recipient = "cd84e66b-b803-40fc-99f9-b2969a54a1de", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "SetAccess", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "ResponsibleForTask", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "AddRelationshipEvent", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "ExportCompleted", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "CreateNewContact", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", - Action = "ResponsibleForOpportunity", - Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", - Object = "", - Unsubscribed = false - }, - new - { - Tenant = -1, - Source = "asc.web.studio", - Action = "periodic_notify", - Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", - Object = "", - Unsubscribed = false - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.User", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("varchar(38)") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ActivationStatus") - .HasColumnType("int") - .HasColumnName("activation_status"); - - b.Property("Birthdate") - .HasColumnType("datetime") - .HasColumnName("bithdate"); - - b.Property("Contacts") - .HasColumnType("varchar(1024)") - .HasColumnName("contacts") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("create_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Culture") - .HasColumnType("varchar(20)") - .HasColumnName("culture") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Email") - .HasColumnType("varchar(255)") - .HasColumnName("email") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("varchar(64)") - .HasColumnName("firstname") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .HasColumnType("datetime") - .HasColumnName("last_modified"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("varchar(64)") - .HasColumnName("lastname") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Location") - .HasColumnType("varchar(255)") - .HasColumnName("location") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Notes") - .HasColumnType("varchar(512)") - .HasColumnName("notes") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Phone") - .HasColumnType("varchar(255)") - .HasColumnName("phone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PhoneActivation") - .HasColumnType("int") - .HasColumnName("phone_activation"); - - b.Property("Removed") - .HasColumnType("tinyint(1)") - .HasColumnName("removed"); - - b.Property("Sex") - .HasColumnType("tinyint(1)") - .HasColumnName("sex"); - - b.Property("Sid") - .HasColumnType("varchar(512)") - .HasColumnName("sid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("SsoNameId") - .HasColumnType("varchar(512)") - .HasColumnName("sso_name_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("SsoSessionId") - .HasColumnType("varchar(512)") - .HasColumnName("sso_session_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Status") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("status") - .HasDefaultValueSql("'1'"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("TerminatedDate") - .HasColumnType("datetime") - .HasColumnName("terminateddate"); - - b.Property("Title") - .HasColumnType("varchar(64)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("username") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("WorkFromDate") - .HasColumnType("datetime") - .HasColumnName("workfromdate"); - - b.HasKey("Id"); - - b.HasIndex("Email") - .HasDatabaseName("email"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("Tenant", "UserName") - .HasDatabaseName("username"); - - b.ToTable("core_user"); - - b.HasData( - new - { - Id = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - ActivationStatus = 0, - CreateOn = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - Email = "", - FirstName = "Administrator", - LastModified = new DateTime(2021, 8, 3, 21, 35, 0, 522, DateTimeKind.Utc).AddTicks(6893), - LastName = "", - PhoneActivation = 0, - Removed = false, - Status = 1, - Tenant = 1, - UserName = "administrator", - WorkFromDate = new DateTime(2021, 8, 3, 21, 35, 0, 522, DateTimeKind.Utc).AddTicks(5587) - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => - { - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("userid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("GroupId") - .HasColumnType("varchar(38)") - .HasColumnName("groupid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("RefType") - .HasColumnType("int") - .HasColumnName("ref_type"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Removed") - .HasColumnType("tinyint(1)") - .HasColumnName("removed"); - - b.HasKey("Tenant", "UserId", "GroupId", "RefType") - .HasName("PRIMARY"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("UserId"); - - b.ToTable("core_usergroup"); - - b.HasData( - new - { - Tenant = 1, - UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - GroupId = "cd84e66b-b803-40fc-99f9-b2969a54a1de", - RefType = 0, - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - Removed = false - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserPhoto", b => - { - b.Property("UserId") - .ValueGeneratedOnAdd() - .HasColumnType("varchar(38)") - .HasColumnName("userid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Photo") - .IsRequired() - .HasColumnType("mediumblob") - .HasColumnName("photo"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("UserId") - .HasName("PRIMARY"); - - b.HasIndex("Tenant") - .HasDatabaseName("tenant"); - - b.ToTable("core_userphoto"); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserSecurity", b => - { - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("userid") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("PwdHash") - .HasColumnType("varchar(512)") - .HasColumnName("pwdhash") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("UserId") - .HasName("PRIMARY"); - - b.HasIndex("PwdHash") - .HasDatabaseName("pwdhash"); - - b.HasIndex("Tenant") - .HasDatabaseName("tenant"); - - b.ToTable("core_usersecurity"); - - b.HasData( - new - { - UserId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - LastModified = new DateTime(2021, 8, 3, 21, 35, 0, 555, DateTimeKind.Utc).AddTicks(4764), - PwdHash = "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=", - Tenant = 1 - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => - { - b.HasOne("ASC.Core.Common.EF.User", null) - .WithMany("Groups") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.UserSecurity", b => - { - b.HasOne("ASC.Core.Common.EF.User", null) - .WithOne("UserSecurity") - .HasForeignKey("ASC.Core.Common.EF.UserSecurity", "UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.User", b => - { - b.Navigation("Groups"); - - b.Navigation("UserSecurity"); - }); -#pragma warning restore 612, 618 - } - } -} +// +using System; +using ASC.Core.Common.EF; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(UserDbContext))] + partial class UserDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Acl", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Subject") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("subject"); + + b.Property("Action") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("action"); + + b.Property("Object") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("object") + .HasDefaultValueSql("''"); + + b.Property("AceType") + .HasColumnType("integer") + .HasColumnName("acetype"); + + b.HasKey("Tenant", "Subject", "Action", "Object") + .HasName("core_acl_pkey"); + + b.ToTable("core_acl", "onlyoffice"); + + b.HasData( + new + { + Tenant = -1, + Subject = new Guid("5d5b7260-f7f7-49f1-a1c9-95fbb6a12604"), + Action = new Guid("ef5e6790-f346-4b6e-b662-722bc28cb0db"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("5d5b7260-f7f7-49f1-a1c9-95fbb6a12604"), + Action = new Guid("f11e8f3f-46e6-4e55-90e3-09c22ec565bd"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("088d5940-a80f-4403-9741-d610718ce95c"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("08d66144-e1c9-4065-9aa1-aa4bba0a7bc8"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("08d75c97-cf3f-494b-90d1-751c941fe2dd"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("0d1f72a8-63da-47ea-ae42-0900e4ac72a9"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("13e30b51-5b4d-40a5-8575-cb561899eeb1"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("19f658ae-722b-4cd8-8236-3ad150801d96"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("2c6552b3-b2e0-4a00-b8fd-13c161e337b1"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("388c29d3-c662-4a61-bf47-fc2f7094224a"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("40bf31f4-3132-4e76-8d5c-9828a89501a3"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("49ae8915-2b30-4348-ab74-b152279364fb"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("9018c001-24c2-44bf-a1db-d1121a570e74"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("948ad738-434b-4a88-8e38-7569d332910a"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("9d75a568-52aa-49d8-ad43-473756cd8903"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("a362fe79-684e-4d43-a599-65bc1f4e167f"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("c426c349-9ad4-47cd-9b8f-99fc30675951"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("d11ebcb9-0e6e-45e6-a6d0-99c41d687598"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("d1f3b53d-d9e2-4259-80e7-d24380978395"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("d49f4e30-da10-4b39-bc6d-b41ef6e039d3"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("abef62db-11a8-4673-9d32-ef1d8af19dc0"), + Action = new Guid("d852b66f-6719-45e1-8657-18f0bb791690"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("e0759a42-47f0-4763-a26a-d5aa665bec35"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("e37239bd-c5b5-4f1e-a9f8-3ceeac209615"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("fbc37705-a04c-40ad-a68c-ce2f0423f397"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("fcac42b8-9386-48eb-a938-d19b3c576912"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("13e30b51-5b4d-40a5-8575-cb561899eeb1"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("49ae8915-2b30-4348-ab74-b152279364fb"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("9018c001-24c2-44bf-a1db-d1121a570e74"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("d1f3b53d-d9e2-4259-80e7-d24380978395"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("e0759a42-47f0-4763-a26a-d5aa665bec35"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("e37239bd-c5b5-4f1e-a9f8-3ceeac209615"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("f11e88d7-f185-4372-927c-d88008d2c483"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("ba74ca02-873f-43dc-8470-8620c156bc67"), + Action = new Guid("f11e8f3f-46e6-4e55-90e3-09c22ec565bd"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("00e7dfc5-ac49-4fd3-a1d6-98d84e877ac4"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("14be970f-7af5-4590-8e81-ea32b5f7866d"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("18ecc94d-6afa-4994-8406-aee9dff12ce2"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("298530eb-435e-4dc6-a776-9abcd95c70e9"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("430eaf70-1886-483c-a746-1a18e3e6bb63"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("557d6503-633b-4490-a14c-6473147ce2b3"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("724cbb75-d1c9-451e-bae0-4de0db96b1f7"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("7cb5c0d1-d254-433f-abe3-ff23373ec631"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("91b29dcd-9430-4403-b17a-27d09189be88"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("a18480a4-6d18-4c71-84fa-789888791f45"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("b630d29b-1844-4bda-bbbe-cf5542df3559"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("c62a9e8d-b24c-4513-90aa-7ff0f8ba38eb"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("d7cdb020-288b-41e5-a857-597347618533"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("662f3db7-9bc8-42cf-84da-2765f563e9b0"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("712d9ec3-5d2b-4b13-824f-71f00191dcca"), + Action = new Guid("e0759a42-47f0-4763-a26a-d5aa665bec35"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("bba32183-a14d-48ed-9d39-c6b4d8925fbf"), + Action = new Guid("0d68b142-e20a-446e-a832-0d6b0b65a164"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("6f05c382-8bca-4469-9424-c807a98c40d7"), + Object = "", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8", + AceType = 1 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|f4d98afdd336433287783c6945c81ea0", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7", + AceType = 1 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c", + AceType = 1 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2", + AceType = 1 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca", + AceType = 1 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234", + AceType = 1 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", + AceType = 0 + }, + new + { + Tenant = -1, + Subject = new Guid("c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e"), + Action = new Guid("77777777-32ae-425f-99b5-83176061d1ae"), + Object = "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|37620ae5c40b45ce855a39dd7d76a1fa", + AceType = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("CategoryId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("categoryid") + .HasDefaultValueSql("NULL"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("name"); + + b.Property("ParentId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("parentid") + .HasDefaultValueSql("NULL"); + + b.Property("Removed") + .HasColumnType("boolean") + .HasColumnName("removed"); + + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sid") + .HasDefaultValueSql("NULL"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("Id"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified"); + + b.HasIndex("Tenant", "ParentId") + .HasDatabaseName("parentid"); + + b.ToTable("core_group", (string)null); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.DbSubscriptionMethod", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Source") + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("source"); + + b.Property("Action") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("action"); + + b.Property("Recipient") + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("recipient"); + + b.Property("Sender") + .IsRequired() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("sender"); + + b.HasKey("Tenant", "Source", "Action", "Recipient") + .HasName("core_subscriptionmethod_pkey"); + + b.ToTable("core_subscriptionmethod", "onlyoffice"); + + b.HasData( + new + { + Tenant = -1, + Source = "asc.web.studio", + Action = "send_whats_new", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender" + }, + new + { + Tenant = -1, + Source = "6504977c-75af-4691-9099-084d3ddeea04", + Action = "new feed", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6a598c74-91ae-437d-a5f4-ad339bd11bb2", + Action = "new post", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "853b6eb9-73ee-438d-9b09-8ffeedf36234", + Action = "new topic in forum", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "9d51954f-db9b-4aed-94e3-ed70b914e101", + Action = "new photo uploaded", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "28b10049-dd20-4f54-b986-873bc14ccfc7", + Action = "new bookmark created", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "742cf945-cbbc-4a57-82d6-1600a12cf8ca", + Action = "new wiki page", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", + Action = "BirthdayReminder", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", + Action = "sharedocument", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", + Action = "sharefolder", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", + Action = "updatedocument", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "invitetoproject", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "milestonedeadline", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "newcommentformessage", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "newcommentformilestone", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "newcommentfortask", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "projectcreaterequest", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "projecteditrequest", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "removefromproject", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "responsibleforproject", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "responsiblefortask", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "6045b68c-2c2e-42db-9e53-c272e814c4ad", + Action = "taskclosed", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "40650da3-f7c1-424c-8c89-b9c115472e08", + Action = "calendar_sharing", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "40650da3-f7c1-424c-8c89-b9c115472e08", + Action = "event_alert", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "asc.web.studio", + Action = "admin_notify", + Recipient = "cd84e66b-b803-40fc-99f9-b2969a54a1de", + Sender = "email.sender" + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "SetAccess", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "ResponsibleForTask", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "AddRelationshipEvent", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "ExportCompleted", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "CreateNewContact", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "ResponsibleForOpportunity", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Sender = "email.sender|messanger.sender" + }, + new + { + Tenant = -1, + Source = "asc.web.studio", + Action = "periodic_notify", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Sender = "email.sender" + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Subscription", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Source") + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("source"); + + b.Property("Action") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("action"); + + b.Property("Recipient") + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("recipient"); + + b.Property("Object") + .HasMaxLength(128) + .HasColumnType("character varying(128)") + .HasColumnName("object"); + + b.Property("Unsubscribed") + .HasColumnType("boolean") + .HasColumnName("unsubscribed"); + + b.HasKey("Tenant", "Source", "Action", "Recipient", "Object") + .HasName("core_subscription_pkey"); + + b.ToTable("core_subscription", "onlyoffice"); + + b.HasData( + new + { + Tenant = -1, + Source = "asc.web.studio", + Action = "send_whats_new", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "6504977c-75af-4691-9099-084d3ddeea04", + Action = "new feed", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "6a598c74-91ae-437d-a5f4-ad339bd11bb2", + Action = "new post", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "853b6eb9-73ee-438d-9b09-8ffeedf36234", + Action = "new topic in forum", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "9d51954f-db9b-4aed-94e3-ed70b914e101", + Action = "new photo uploaded", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "28b10049-dd20-4f54-b986-873bc14ccfc7", + Action = "new bookmark created", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "742cf945-cbbc-4a57-82d6-1600a12cf8ca", + Action = "new wiki page", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "37620ae5-c40b-45ce-855a-39dd7d76a1fa", + Action = "BirthdayReminder", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", + Action = "sharedocument", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "6fe286a4-479e-4c25-a8d9-0156e332b0c0", + Action = "sharefolder", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "40650da3-f7c1-424c-8c89-b9c115472e08", + Action = "calendar_sharing", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "40650da3-f7c1-424c-8c89-b9c115472e08", + Action = "event_alert", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "asc.web.studio", + Action = "admin_notify", + Recipient = "cd84e66b-b803-40fc-99f9-b2969a54a1de", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "SetAccess", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "ResponsibleForTask", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "AddRelationshipEvent", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "ExportCompleted", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "CreateNewContact", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "13ff36fb-0272-4887-b416-74f52b0d0b02", + Action = "ResponsibleForOpportunity", + Recipient = "abef62db-11a8-4673-9d32-ef1d8af19dc0", + Object = "", + Unsubscribed = false + }, + new + { + Tenant = -1, + Source = "asc.web.studio", + Action = "periodic_notify", + Recipient = "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", + Object = "", + Unsubscribed = false + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ActivationStatus") + .HasColumnType("integer") + .HasColumnName("activation_status"); + + b.Property("BirthDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("bithdate"); + + b.Property("Contacts") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("contacts") + .HasDefaultValueSql("NULL"); + + b.Property("CreateDate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("create_on") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("CultureName") + .ValueGeneratedOnAdd() + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("culture") + .HasDefaultValueSql("NULL"); + + b.Property("Email") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("email") + .HasDefaultValueSql("NULL"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("firstname"); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("lastname"); + + b.Property("Location") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("location") + .HasDefaultValueSql("NULL"); + + b.Property("MobilePhone") + .ValueGeneratedOnAdd() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("phone") + .HasDefaultValueSql("NULL"); + + b.Property("MobilePhoneActivation") + .HasColumnType("integer") + .HasColumnName("phone_activation"); + + b.Property("Notes") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("notes") + .HasDefaultValueSql("NULL"); + + b.Property("Removed") + .HasColumnType("boolean") + .HasColumnName("removed"); + + b.Property("Sex") + .HasColumnType("boolean") + .HasColumnName("sex"); + + b.Property("Sid") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sid") + .HasDefaultValueSql("NULL"); + + b.Property("SsoNameId") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sso_name_id") + .HasDefaultValueSql("NULL"); + + b.Property("SsoSessionId") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("sso_session_id") + .HasDefaultValueSql("NULL"); + + b.Property("Status") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("status") + .HasDefaultValueSql("1"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("TerminatedDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("terminateddate"); + + b.Property("Title") + .ValueGeneratedOnAdd() + .HasMaxLength(64) + .HasColumnType("character varying(64)") + .HasColumnName("title") + .HasDefaultValueSql("NULL"); + + b.Property("UserName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("username"); + + b.Property("WorkFromDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("workfromdate"); + + b.HasKey("Id"); + + b.HasIndex("Email") + .HasDatabaseName("email"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_core_user"); + + b.HasIndex("UserName", "Tenant") + .HasDatabaseName("username"); + + b.ToTable("core_user", "onlyoffice"); + + b.HasData( + new + { + Id = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + ActivationStatus = 0, + CreateDate = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Email = "", + FirstName = "Administrator", + LastModified = new DateTime(2021, 3, 9, 9, 52, 55, 765, DateTimeKind.Utc).AddTicks(1420), + LastName = "", + MobilePhoneActivation = 0, + Removed = false, + Status = 1, + Tenant = 1, + UserName = "administrator", + WorkFromDate = new DateTime(2021, 3, 9, 9, 52, 55, 764, DateTimeKind.Utc).AddTicks(9157) + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.UserDav", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenant_id"); + + b.Property("UserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("user_id"); + + b.HasKey("TenantId", "UserId") + .HasName("core_userdav_pkey"); + + b.ToTable("core_userdav", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.UserGroup", b => + { + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.Property("Userid") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("userid"); + + b.Property("UserGroupId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("groupid"); + + b.Property("RefType") + .HasColumnType("integer") + .HasColumnName("ref_type"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("Removed") + .HasColumnType("boolean") + .HasColumnName("removed"); + + b.HasKey("Tenant", "Userid", "UserGroupId", "RefType") + .HasName("core_usergroup_pkey"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_core_usergroup"); + + b.ToTable("core_usergroup", "onlyoffice"); + + b.HasData( + new + { + Tenant = 1, + Userid = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + UserGroupId = new Guid("cd84e66b-b803-40fc-99f9-b2969a54a1de"), + RefType = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Removed = false + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.UserPhoto", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("userid"); + + b.Property("Photo") + .IsRequired() + .HasColumnType("bytea") + .HasColumnName("photo"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("UserId") + .HasName("core_userphoto_pkey"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant_core_userphoto"); + + b.ToTable("core_userphoto", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.UserSecurity", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("userid"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("PwdHash") + .ValueGeneratedOnAdd() + .HasMaxLength(512) + .HasColumnType("character varying(512)") + .HasColumnName("pwdhash") + .HasDefaultValueSql("NULL"); + + b.Property("Tenant") + .HasColumnType("integer") + .HasColumnName("tenant"); + + b.HasKey("UserId") + .HasName("core_usersecurity_pkey"); + + b.HasIndex("PwdHash") + .HasDatabaseName("pwdhash"); + + b.HasIndex("Tenant") + .HasDatabaseName("tenant_core_usersecurity"); + + b.ToTable("core_usersecurity", "onlyoffice"); + + b.HasData( + new + { + UserId = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + PwdHash = "jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=", + Tenant = 1 + }); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/WebhooksDbContext/20220724114542_WebhooksDbContextMigrate.Designer.cs b/migrations/postgre/WebhooksDbContext/20220724114542_WebhooksDbContextMigrate.Designer.cs new file mode 100644 index 0000000000..9523e41fb4 --- /dev/null +++ b/migrations/postgre/WebhooksDbContext/20220724114542_WebhooksDbContextMigrate.Designer.cs @@ -0,0 +1,119 @@ +// +using System; +using ASC.Webhooks.Core.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(WebhooksDbContext))] + [Migration("20220724114542_WebhooksDbContextMigrate")] + partial class WebhooksDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Webhooks.Core.EF.Model.WebhooksConfig", b => + { + b.Property("ConfigId") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("config_id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("SecretKey") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("secret_key") + .HasDefaultValueSql("''"); + + b.Property("TenantId") + .HasColumnType("int unsigned") + .HasColumnName("tenant_id"); + + b.Property("Uri") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("uri") + .HasDefaultValueSql("''"); + + b.HasKey("ConfigId") + .HasName("PRIMARY"); + + b.ToTable("webhooks_config", (string)null); + }); + + modelBuilder.Entity("ASC.Webhooks.Core.EF.Model.WebhooksLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("ConfigId") + .HasColumnType("int") + .HasColumnName("config_id"); + + b.Property("CreationTime") + .HasColumnType("datetime") + .HasColumnName("creation_time"); + + b.Property("Event") + .HasMaxLength(100) + .HasColumnType("varchar") + .HasColumnName("event"); + + b.Property("RequestHeaders") + .HasColumnType("json") + .HasColumnName("request_headers"); + + b.Property("RequestPayload") + .IsRequired() + .HasColumnType("json") + .HasColumnName("request_payload"); + + b.Property("ResponseHeaders") + .HasColumnType("json") + .HasColumnName("response_headers"); + + b.Property("ResponsePayload") + .HasColumnType("json") + .HasColumnName("response_payload"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar") + .HasColumnName("status"); + + b.Property("TenantId") + .HasColumnType("int unsigned") + .HasColumnName("tenant_id"); + + b.Property("Uid") + .HasMaxLength(50) + .HasColumnType("varchar") + .HasColumnName("uid"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.ToTable("webhooks_logs", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/WebhooksDbContext/20220724114542_WebhooksDbContextMigrate.cs b/migrations/postgre/WebhooksDbContext/20220724114542_WebhooksDbContextMigrate.cs new file mode 100644 index 0000000000..c73cd0638c --- /dev/null +++ b/migrations/postgre/WebhooksDbContext/20220724114542_WebhooksDbContextMigrate.cs @@ -0,0 +1,60 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class WebhooksDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "webhooks_config", + columns: table => new + { + config_id = table.Column(type: "int", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + secret_key = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "''"), + tenant_id = table.Column(type: "int unsigned", nullable: false), + uri = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "''") + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.config_id); + }); + + migrationBuilder.CreateTable( + name: "webhooks_logs", + columns: table => new + { + id = table.Column(type: "int", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + config_id = table.Column(type: "int", nullable: false), + creation_time = table.Column(type: "datetime", nullable: false), + @event = table.Column(name: "event", type: "varchar", maxLength: 100, nullable: true), + request_headers = table.Column(type: "json", nullable: true), + request_payload = table.Column(type: "json", nullable: false), + response_headers = table.Column(type: "json", nullable: true), + response_payload = table.Column(type: "json", nullable: true), + status = table.Column(type: "varchar", maxLength: 50, nullable: false), + tenant_id = table.Column(type: "int unsigned", nullable: false), + uid = table.Column(type: "varchar", maxLength: 50, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PRIMARY", x => x.id); + }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "webhooks_config"); + + migrationBuilder.DropTable( + name: "webhooks_logs"); + } + } +} diff --git a/migrations/postgre/WebhooksDbContext/WebhooksDbContextModelSnapshot.cs b/migrations/postgre/WebhooksDbContext/WebhooksDbContextModelSnapshot.cs new file mode 100644 index 0000000000..07fbed37ca --- /dev/null +++ b/migrations/postgre/WebhooksDbContext/WebhooksDbContextModelSnapshot.cs @@ -0,0 +1,117 @@ +// +using System; +using ASC.Webhooks.Core.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(WebhooksDbContext))] + partial class WebhooksDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Webhooks.Core.EF.Model.WebhooksConfig", b => + { + b.Property("ConfigId") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("config_id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("SecretKey") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("secret_key") + .HasDefaultValueSql("''"); + + b.Property("TenantId") + .HasColumnType("int unsigned") + .HasColumnName("tenant_id"); + + b.Property("Uri") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("uri") + .HasDefaultValueSql("''"); + + b.HasKey("ConfigId") + .HasName("PRIMARY"); + + b.ToTable("webhooks_config", (string)null); + }); + + modelBuilder.Entity("ASC.Webhooks.Core.EF.Model.WebhooksLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("ConfigId") + .HasColumnType("int") + .HasColumnName("config_id"); + + b.Property("CreationTime") + .HasColumnType("datetime") + .HasColumnName("creation_time"); + + b.Property("Event") + .HasMaxLength(100) + .HasColumnType("varchar") + .HasColumnName("event"); + + b.Property("RequestHeaders") + .HasColumnType("json") + .HasColumnName("request_headers"); + + b.Property("RequestPayload") + .IsRequired() + .HasColumnType("json") + .HasColumnName("request_payload"); + + b.Property("ResponseHeaders") + .HasColumnType("json") + .HasColumnName("response_headers"); + + b.Property("ResponsePayload") + .HasColumnType("json") + .HasColumnName("response_payload"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar") + .HasColumnName("status"); + + b.Property("TenantId") + .HasColumnType("int unsigned") + .HasColumnName("tenant_id"); + + b.Property("Uid") + .HasMaxLength(50) + .HasColumnType("varchar") + .HasColumnName("uid"); + + b.HasKey("Id") + .HasName("PRIMARY"); + + b.ToTable("webhooks_logs", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/WebstudioDbContext/20220724114555_WebstudioDbContextMigrate.Designer.cs b/migrations/postgre/WebstudioDbContext/20220724114555_WebstudioDbContextMigrate.Designer.cs new file mode 100644 index 0000000000..dbc7933c2d --- /dev/null +++ b/migrations/postgre/WebstudioDbContext/20220724114555_WebstudioDbContextMigrate.Designer.cs @@ -0,0 +1,275 @@ +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(WebstudioDbContext))] + [Migration("20220724114555_WebstudioDbContextMigrate")] + partial class WebstudioDbContextMigrate + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Alias") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("alias"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("calls") + .HasDefaultValueSql("true"); + + b.Property("CreationDateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .HasColumnType("integer") + .HasColumnName("industry"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .IsFixedLength(); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("MappedDomain") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("mappeddomain") + .HasDefaultValueSql("NULL"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("OwnerId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner_id") + .HasDefaultValueSql("NULL"); + + b.Property("PaymentId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("payment_id") + .HasDefaultValueSql("NULL"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("spam") + .HasDefaultValueSql("true"); + + b.Property("Status") + .HasColumnType("integer") + .HasColumnName("status"); + + b.Property("StatusChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("timezone") + .HasDefaultValueSql("NULL"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("1"); + + b.Property("TrustedDomainsRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("trusteddomains") + .HasDefaultValueSql("NULL"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("version") + .HasDefaultValueSql("2"); + + b.Property("Version_Changed") + .HasColumnType("timestamp with time zone") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_tenants_tenants"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", "onlyoffice"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioIndex", b => + { + b.Property("IndexName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("index_name"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.HasKey("IndexName") + .HasName("webstudio_index_pkey"); + + b.ToTable("webstudio_index", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("TenantID"); + + b.Property("Id") + .HasMaxLength(64) + .HasColumnType("uuid") + .HasColumnName("ID"); + + b.Property("UserId") + .HasMaxLength(64) + .HasColumnType("uuid") + .HasColumnName("UserID"); + + b.Property("Data") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("TenantId", "Id", "UserId") + .HasName("webstudio_settings_pkey"); + + b.HasIndex("Id") + .HasDatabaseName("ID"); + + b.ToTable("webstudio_settings", "onlyoffice"); + + b.HasData( + new + { + TenantId = 1, + Id = new Guid("9a925891-1f92-4ed7-b277-d6f649739f06"), + UserId = new Guid("00000000-0000-0000-0000-000000000000"), + Data = "{\"Completed\":false}" + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioUserVisit", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenantid"); + + b.Property("VisitDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("visitdate"); + + b.Property("ProductId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("productid"); + + b.Property("UserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("userid"); + + b.Property("FirstVisitTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("firstvisittime"); + + b.Property("LastVisitTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("lastvisittime"); + + b.Property("VisitCount") + .HasColumnType("integer") + .HasColumnName("visitcount"); + + b.HasKey("TenantId", "VisitDate", "ProductId", "UserId") + .HasName("webstudio_uservisit_pkey"); + + b.HasIndex("VisitDate") + .HasDatabaseName("visitdate"); + + b.ToTable("webstudio_uservisit", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/migrations/postgre/WebstudioDbContext/20220724114555_WebstudioDbContextMigrate.cs b/migrations/postgre/WebstudioDbContext/20220724114555_WebstudioDbContextMigrate.cs new file mode 100644 index 0000000000..52a820f10d --- /dev/null +++ b/migrations/postgre/WebstudioDbContext/20220724114555_WebstudioDbContextMigrate.cs @@ -0,0 +1,162 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + public partial class WebstudioDbContextMigrate : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.EnsureSchema( + name: "onlyoffice"); + + migrationBuilder.CreateTable( + name: "tenants_tenants", + schema: "onlyoffice", + columns: table => new + { + id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + name = table.Column(type: "character varying(255)", maxLength: 255, nullable: false), + alias = table.Column(type: "character varying(100)", maxLength: 100, nullable: false), + mappeddomain = table.Column(type: "character varying(100)", maxLength: 100, nullable: true, defaultValueSql: "NULL"), + version = table.Column(type: "integer", nullable: false, defaultValueSql: "2"), + version_changed = table.Column(type: "timestamp with time zone", nullable: true), + language = table.Column(type: "character(10)", fixedLength: true, maxLength: 10, nullable: false, defaultValueSql: "'en-US'"), + timezone = table.Column(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL"), + trusteddomains = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"), + trusteddomainsenabled = table.Column(type: "integer", nullable: false, defaultValueSql: "1"), + status = table.Column(type: "integer", nullable: false), + statuschanged = table.Column(type: "timestamp with time zone", nullable: true), + creationdatetime = table.Column(type: "timestamp with time zone", nullable: false), + owner_id = table.Column(type: "uuid", maxLength: 38, nullable: true, defaultValueSql: "NULL"), + payment_id = table.Column(type: "character varying(38)", maxLength: 38, nullable: true, defaultValueSql: "NULL"), + industry = table.Column(type: "integer", nullable: false), + last_modified = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), + spam = table.Column(type: "boolean", nullable: false, defaultValueSql: "true"), + calls = table.Column(type: "boolean", nullable: false, defaultValueSql: "true") + }, + constraints: table => + { + table.PrimaryKey("PK_tenants_tenants", x => x.id); + }); + + migrationBuilder.CreateTable( + name: "webstudio_index", + schema: "onlyoffice", + columns: table => new + { + index_name = table.Column(type: "character varying(50)", maxLength: 50, nullable: false), + last_modified = table.Column(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + }, + constraints: table => + { + table.PrimaryKey("webstudio_index_pkey", x => x.index_name); + }); + + migrationBuilder.CreateTable( + name: "webstudio_settings", + schema: "onlyoffice", + columns: table => new + { + TenantID = table.Column(type: "integer", nullable: false), + ID = table.Column(type: "uuid", maxLength: 64, nullable: false), + UserID = table.Column(type: "uuid", maxLength: 64, nullable: false), + Data = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("webstudio_settings_pkey", x => new { x.TenantID, x.ID, x.UserID }); + }); + + migrationBuilder.CreateTable( + name: "webstudio_uservisit", + schema: "onlyoffice", + columns: table => new + { + tenantid = table.Column(type: "integer", nullable: false), + visitdate = table.Column(type: "timestamp with time zone", nullable: false), + productid = table.Column(type: "uuid", maxLength: 38, nullable: false), + userid = table.Column(type: "uuid", maxLength: 38, nullable: false), + visitcount = table.Column(type: "integer", nullable: false), + firstvisittime = table.Column(type: "timestamp with time zone", nullable: true), + lastvisittime = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("webstudio_uservisit_pkey", x => new { x.tenantid, x.visitdate, x.productid, x.userid }); + }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "tenants_tenants", + columns: new[] { "id", "alias", "creationdatetime", "industry", "last_modified", "name", "owner_id", "status", "statuschanged", "version_changed" }, + values: new object[] { 1, "localhost", new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), 0, new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), "Web Office", new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), 0, null, null }); + + migrationBuilder.InsertData( + schema: "onlyoffice", + table: "webstudio_settings", + columns: new[] { "ID", "TenantID", "UserID", "Data" }, + values: new object[] { new Guid("9a925891-1f92-4ed7-b277-d6f649739f06"), 1, new Guid("00000000-0000-0000-0000-000000000000"), "{\"Completed\":false}" }); + + migrationBuilder.CreateIndex( + name: "alias", + schema: "onlyoffice", + table: "tenants_tenants", + column: "alias", + unique: true); + + migrationBuilder.CreateIndex( + name: "last_modified_tenants_tenants", + schema: "onlyoffice", + table: "tenants_tenants", + column: "last_modified"); + + migrationBuilder.CreateIndex( + name: "mappeddomain", + schema: "onlyoffice", + table: "tenants_tenants", + column: "mappeddomain"); + + migrationBuilder.CreateIndex( + name: "version", + schema: "onlyoffice", + table: "tenants_tenants", + column: "version"); + + migrationBuilder.CreateIndex( + name: "ID", + schema: "onlyoffice", + table: "webstudio_settings", + column: "ID"); + + migrationBuilder.CreateIndex( + name: "visitdate", + schema: "onlyoffice", + table: "webstudio_uservisit", + column: "visitdate"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "tenants_tenants", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "webstudio_index", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "webstudio_settings", + schema: "onlyoffice"); + + migrationBuilder.DropTable( + name: "webstudio_uservisit", + schema: "onlyoffice"); + } + } +} diff --git a/migrations/postgre/WebstudioDbContext/WebstudioDbContextModelSnapshot.cs b/migrations/postgre/WebstudioDbContext/WebstudioDbContextModelSnapshot.cs new file mode 100644 index 0000000000..cb3347b26e --- /dev/null +++ b/migrations/postgre/WebstudioDbContext/WebstudioDbContextModelSnapshot.cs @@ -0,0 +1,273 @@ +// +using System; +using ASC.Core.Common.EF.Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace ASC.Migrations.PostgreSql.Migrations +{ + [DbContext(typeof(WebstudioDbContext))] + partial class WebstudioDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn) + .HasAnnotation("ProductVersion", "6.0.4") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("id") + .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); + + b.Property("Alias") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("alias"); + + b.Property("Calls") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("calls") + .HasDefaultValueSql("true"); + + b.Property("CreationDateTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("creationdatetime"); + + b.Property("Industry") + .HasColumnType("integer") + .HasColumnName("industry"); + + b.Property("Language") + .IsRequired() + .ValueGeneratedOnAdd() + .HasMaxLength(10) + .HasColumnType("character(10)") + .HasColumnName("language") + .HasDefaultValueSql("'en-US'") + .IsFixedLength(); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("MappedDomain") + .ValueGeneratedOnAdd() + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("mappeddomain") + .HasDefaultValueSql("NULL"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("name"); + + b.Property("OwnerId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("owner_id") + .HasDefaultValueSql("NULL"); + + b.Property("PaymentId") + .ValueGeneratedOnAdd() + .HasMaxLength(38) + .HasColumnType("character varying(38)") + .HasColumnName("payment_id") + .HasDefaultValueSql("NULL"); + + b.Property("Spam") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasColumnName("spam") + .HasDefaultValueSql("true"); + + b.Property("Status") + .HasColumnType("integer") + .HasColumnName("status"); + + b.Property("StatusChanged") + .HasColumnType("timestamp with time zone") + .HasColumnName("statuschanged"); + + b.Property("TimeZone") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("timezone") + .HasDefaultValueSql("NULL"); + + b.Property("TrustedDomainsEnabled") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("trusteddomainsenabled") + .HasDefaultValueSql("1"); + + b.Property("TrustedDomainsRaw") + .ValueGeneratedOnAdd() + .HasMaxLength(1024) + .HasColumnType("character varying(1024)") + .HasColumnName("trusteddomains") + .HasDefaultValueSql("NULL"); + + b.Property("Version") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasColumnName("version") + .HasDefaultValueSql("2"); + + b.Property("Version_Changed") + .HasColumnType("timestamp with time zone") + .HasColumnName("version_changed"); + + b.HasKey("Id"); + + b.HasIndex("Alias") + .IsUnique() + .HasDatabaseName("alias"); + + b.HasIndex("LastModified") + .HasDatabaseName("last_modified_tenants_tenants"); + + b.HasIndex("MappedDomain") + .HasDatabaseName("mappeddomain"); + + b.HasIndex("Version") + .HasDatabaseName("version"); + + b.ToTable("tenants_tenants", "onlyoffice"); + + b.HasData( + new + { + Id = 1, + Alias = "localhost", + Calls = false, + CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), + Industry = 0, + LastModified = new DateTime(2022, 7, 8, 0, 0, 0, 0, DateTimeKind.Unspecified), + Name = "Web Office", + OwnerId = new Guid("66faa6e4-f133-11ea-b126-00ffeec8b4ef"), + Spam = false, + Status = 0, + TrustedDomainsEnabled = 0, + Version = 0 + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioIndex", b => + { + b.Property("IndexName") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("index_name"); + + b.Property("LastModified") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.HasKey("IndexName") + .HasName("webstudio_index_pkey"); + + b.ToTable("webstudio_index", "onlyoffice"); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioSettings", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("TenantID"); + + b.Property("Id") + .HasMaxLength(64) + .HasColumnType("uuid") + .HasColumnName("ID"); + + b.Property("UserId") + .HasMaxLength(64) + .HasColumnType("uuid") + .HasColumnName("UserID"); + + b.Property("Data") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("TenantId", "Id", "UserId") + .HasName("webstudio_settings_pkey"); + + b.HasIndex("Id") + .HasDatabaseName("ID"); + + b.ToTable("webstudio_settings", "onlyoffice"); + + b.HasData( + new + { + TenantId = 1, + Id = new Guid("9a925891-1f92-4ed7-b277-d6f649739f06"), + UserId = new Guid("00000000-0000-0000-0000-000000000000"), + Data = "{\"Completed\":false}" + }); + }); + + modelBuilder.Entity("ASC.Core.Common.EF.Model.DbWebstudioUserVisit", b => + { + b.Property("TenantId") + .HasColumnType("integer") + .HasColumnName("tenantid"); + + b.Property("VisitDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("visitdate"); + + b.Property("ProductId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("productid"); + + b.Property("UserId") + .HasMaxLength(38) + .HasColumnType("uuid") + .HasColumnName("userid"); + + b.Property("FirstVisitTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("firstvisittime"); + + b.Property("LastVisitTime") + .HasColumnType("timestamp with time zone") + .HasColumnName("lastvisittime"); + + b.Property("VisitCount") + .HasColumnType("integer") + .HasColumnName("visitcount"); + + b.HasKey("TenantId", "VisitDate", "ProductId", "UserId") + .HasName("webstudio_uservisit_pkey"); + + b.HasIndex("VisitDate") + .HasDatabaseName("visitdate"); + + b.ToTable("webstudio_uservisit", "onlyoffice"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/packages/asc-web-common/components/Article/index.js b/packages/asc-web-common/components/Article/index.js index 0b645b89a8..6201cff576 100644 --- a/packages/asc-web-common/components/Article/index.js +++ b/packages/asc-web-common/components/Article/index.js @@ -14,6 +14,7 @@ import SubArticleBackdrop from "./sub-components/article-backdrop"; import SubArticleHeader from "./sub-components/article-header"; import SubArticleMainButton from "./sub-components/article-main-button"; import SubArticleBody from "./sub-components/article-body"; +import ArticleProfile from "./sub-components/article-profile"; import { StyledArticle } from "./styled-article"; @@ -35,6 +36,7 @@ const Article = ({ children, isBannerVisible, + hideProfileBlock, ...rest }) => { const [articleHeaderContent, setArticleHeaderContent] = React.useState(null); @@ -130,6 +132,9 @@ const Article = ({ ) : null} {articleBodyContent ? articleBodyContent.props.children : null} + {!hideProfileBlock && !isMobileOnly && ( + + )} {articleOpen && (isMobileOnly || window.innerWidth <= 375) && ( @@ -153,6 +158,7 @@ Article.propTypes = { toggleArticleOpen: PropTypes.func, setIsMobileArticle: PropTypes.func, children: PropTypes.any, + hideProfileBlock: PropTypes.bool, }; Article.Header = () => { diff --git a/packages/asc-web-common/components/Article/styled-article.js b/packages/asc-web-common/components/Article/styled-article.js index ac506fc8e1..e3142f43ca 100644 --- a/packages/asc-web-common/components/Article/styled-article.js +++ b/packages/asc-web-common/components/Article/styled-article.js @@ -28,20 +28,20 @@ const StyledArticle = styled.article` box-sizing: border-box; - padding: 0 20px; + //padding: 0 20px; @media ${tablet} { min-width: ${(props) => (props.showText ? "243px" : "60px")}; max-width: ${(props) => (props.showText ? "243px" : "60px")}; - padding: 0 8px; + //padding: 0 8px; } ${isMobile && css` min-width: ${(props) => (props.showText ? "243px" : "60px")}; max-width: ${(props) => (props.showText ? "243px" : "60px")}; - padding: 0 8px; + //padding: 0 8px; `} @media ${mobile} { @@ -55,7 +55,7 @@ const StyledArticle = styled.article` height: calc(100% - 64px) !important; margin-top: 16px; - padding: 0 8px; + //padding: 0 8px; } ${isMobileOnly && @@ -66,8 +66,6 @@ const StyledArticle = styled.article` min-width: 100% !important; width: 100%; position: fixed; - margin: 0; - margin: 0; padding: 0; margin-top: ${(props) => @@ -79,16 +77,35 @@ const StyledArticle = styled.article` props.showText && (isMobileOnly || isMobileUtils()) ? "230" : "205"}; .article-body__scrollbar { + ${isMobileOnly && + css` + margin-top: 32px !important; + `} + .scroll-body { + overflow-x: hidden !important; + height: calc(100% - 200px); ${!isDesktop && "padding-top: 16px"}; - padding-right: 0px !important; + padding: 0 20px; + + @media ${tablet} { + height: calc(100% - 150px); + padding: 0 8px !important; + } + + ${isTablet && + css` + padding: 0 8px !important; + `} @media ${mobile} { + height: calc(100% - 20px) !important; padding-bottom: 20px; } ${isMobileOnly && css` + height: calc(100% - 20px) !important; padding-bottom: 20px; `} } @@ -98,14 +115,14 @@ const StyledArticle = styled.article` StyledArticle.defaultProps = { theme: Base }; const StyledArticleHeader = styled.div` - padding: 11px 0 14px; + padding: 16px 20px 17px; margin-left: -1px; display: flex; justify-content: flex-start; align-items: center; @media ${tablet} { - padding: 16px 0 17px; + padding: 18px 8px 19px; margin: 0; justify-content: ${(props) => (props.showText ? "flex-start" : "center")}; @@ -115,19 +132,24 @@ const StyledArticleHeader = styled.div` box-sizing: border-box; } + ${isTablet && + css` + padding: 18px 8px 19px; + margin: 0; + justify-content: ${(props) => (props.showText ? "flex-start" : "center")}; + + height: 61px; + min-height: 61px; + max-height: 61px; + box-sizing: border-box; + `} + @media ${mobile} { border-bottom: ${(props) => props.theme.catalog.header.borderBottom}; padding: 12px 0 12px; // margin-bottom: 16px !important; } - ${isTablet && - css` - padding: 16px 0 17px; - justify-content: ${(props) => (props.showText ? "flex-start" : "center")}; - margin: 0; - `} - ${isMobileOnly && css` border-bottom: ${(props) => @@ -141,20 +163,20 @@ const StyledArticleHeader = styled.div` StyledArticleHeader.defaultProps = { theme: Base }; -const StyledHeading = styled(Heading)` +const StyledHeading = styled.div` margin: 0; padding: 0; - font-weight: bold; - line-height: 28px; + cursor: pointer; + @media ${tablet} { display: ${(props) => (props.showText ? "block" : "none")}; - margin-left: ${(props) => props.showText && "12px"}; + margin-left: 9px; } ${isTablet && css` display: ${(props) => (props.showText ? "block" : "none")}; - margin-left: ${(props) => props.showText && "12px"}; + margin-left: 9px !important; `} @media ${mobile} { @@ -173,18 +195,18 @@ const StyledIconBox = styled.div` height: 20px; @media ${tablet} { - display: flex; + display: ${(props) => (props.showText ? "none" : "flex")}; } + ${isTablet && + css` + display: ${(props) => (props.showText ? "none" : "flex")}; + `} + @media ${mobile} { display: none; } - ${isMobile && - css` - display: flex !important; - `} - ${isMobileOnly && css` display: none !important; @@ -206,7 +228,7 @@ const StyledMenuIcon = styled(MenuIcon)` StyledMenuIcon.defaultProps = { theme: Base }; const StyledArticleMainButton = styled.div` - padding: 0px 0px 16px; + padding: 0px 20px 16px; max-width: 100%; @media ${tablet} { @@ -247,6 +269,73 @@ const StyledCrossIcon = styled(CrossIcon)` StyledCrossIcon.defaultProps = { theme: Base }; +const StyledArticleProfile = styled.div` + padding: 16px 20px; + height: 40px !important; + display: flex; + align-items: center; + justify-content: center; + + border-top: ${(props) => props.theme.catalog.profile.borderTop}; + background-color: ${(props) => props.theme.catalog.profile.background}; + + @media ${tablet} { + padding: 16px 14px; + } + + ${isTablet && + css` + padding: 16px 14px; + `} + + .option-button { + margin-left: auto; + height: 32px; + width: 32px; + + .injected-svg { + width: 16px; + height: 16px; + } + + .option-button-icon { + display: flex; + align-items: center; + justify-content: center; + } + } +`; + +StyledArticleProfile.defaultProps = { theme: Base }; + +const StyledUserName = styled.div` + display: flex; + flex-direction: ${(props) => (props.length > 18 ? "column" : "row")}; + max-width: 131px; + min-width: 131px; + padding-left: 12px; +`; + +const StyledProfileWrapper = styled.div` + z-index: 301; + position: fixed; + bottom: 0; + left: 0; + min-width: 251px; + max-width: 251px; + + @media ${tablet} { + min-width: ${(props) => (props.showText ? "243px" : "60px")}; + max-width: ${(props) => (props.showText ? "243px" : "60px")}; + } + + ${isTablet && + css` + min-width: ${(props) => (props.showText ? "243px" : "60px")}; + max-width: ${(props) => (props.showText ? "243px" : "60px")}; + `} +`; + export { StyledArticle, StyledArticleHeader, @@ -256,4 +345,7 @@ export { StyledArticleMainButton, StyledControlContainer, StyledCrossIcon, + StyledArticleProfile, + StyledUserName, + StyledProfileWrapper, }; diff --git a/packages/asc-web-common/components/Article/sub-components/article-header.js b/packages/asc-web-common/components/Article/sub-components/article-header.js index da274009cb..ed8beec704 100644 --- a/packages/asc-web-common/components/Article/sub-components/article-header.js +++ b/packages/asc-web-common/components/Article/sub-components/article-header.js @@ -1,10 +1,11 @@ import React, { useEffect } from "react"; import PropTypes from "prop-types"; -import { useLocation } from "react-router"; +import { useHistory, useLocation } from "react-router"; import Loaders from "@appserver/common/components/Loaders"; import { isTablet as isTabletUtils } from "@appserver/components/utils/device"; import { isTablet, isMobileOnly } from "react-device-detect"; import { inject, observer } from "mobx-react"; +import { ReactSVG } from "react-svg"; import { StyledArticleHeader, StyledHeading, @@ -24,6 +25,7 @@ const ArticleHeader = ({ ...rest }) => { const location = useLocation(); + const history = useHistory(); const isLoadedSetting = isLoaded; @@ -39,6 +41,12 @@ const ArticleHeader = ({ const isTabletView = (isTabletUtils() || isTablet) && !isMobileOnly; + const onLogoClick = () => { + if (showText && isTabletView) onClick(); + else history.push("/"); + }; + + if (isMobileOnly) return <>; return ( {isTabletView && (isBurgerLoading || showLoader) ? ( @@ -48,13 +56,19 @@ const ArticleHeader = ({ style={{ height: "20px" }} /> ) : ( - - + + )} - {children} + ); diff --git a/packages/asc-web-common/components/Article/sub-components/article-profile.js b/packages/asc-web-common/components/Article/sub-components/article-profile.js new file mode 100644 index 0000000000..6e905ff750 --- /dev/null +++ b/packages/asc-web-common/components/Article/sub-components/article-profile.js @@ -0,0 +1,105 @@ +import React, { useState, useRef } from "react"; +import { inject, observer } from "mobx-react"; +import { withRouter } from "react-router"; +import { useTranslation } from "react-i18next"; +import Avatar from "@appserver/components/avatar"; +import Text from "@appserver/components/text"; +import ContextMenuButton from "@appserver/components/context-menu-button"; +import ContextMenu from "@appserver/components/context-menu"; +import { isTablet as isTabletUtils } from "@appserver/components/utils/device"; +import { isTablet, isMobileOnly } from "react-device-detect"; +import { + StyledArticleProfile, + StyledUserName, + StyledProfileWrapper, +} from "../styled-article"; + +const ArticleProfile = (props) => { + const { user, showText, getUserRole, getActions } = props; + const { t } = useTranslation("Common"); + const [isOpen, setIsOpen] = useState(false); + const ref = useRef(null); + const menuRef = useRef(null); + + const isTabletView = (isTabletUtils() || isTablet) && !isMobileOnly; + const avatarSize = isTabletView ? "min" : "base"; + const userRole = getUserRole(user); + + const toggle = (e, isOpen) => { + isOpen ? menuRef.current.show(e) : menuRef.current.hide(e); + setIsOpen(isOpen); + }; + + const onAvatarClick = (e) => { + if (isTabletView && !showText) toggle(e, !isOpen); + }; + + const onHide = () => { + setIsOpen(false); + }; + + const model = getActions(t); + const username = user.displayName.split(" "); + + return ( + + +
+ + +
+ {(!isTabletView || showText) && ( + <> + + + {username[0]} +   + + + {username[1]} + + + getActions(t)} + isDisabled={false} + usePortal={true} + /> + + )} +
+
+ ); +}; + +export default withRouter( + inject(({ auth, profileActionsStore }) => { + const { getActions, getUserRole } = profileActionsStore; + + return { + user: auth.userStore.user, + getUserRole, + getActions, + }; + })(observer(ArticleProfile)) +); diff --git a/packages/asc-web-common/components/FilterInput/StyledFilterInput.js b/packages/asc-web-common/components/FilterInput/StyledFilterInput.js index cdebac236d..e1d08a253b 100644 --- a/packages/asc-web-common/components/FilterInput/StyledFilterInput.js +++ b/packages/asc-web-common/components/FilterInput/StyledFilterInput.js @@ -27,7 +27,7 @@ const StyledFilterInput = styled.div` .filter-input_selected-row { width: 100%; - height: 32px; + min-height: 32px; display: flex; flex-direction: row; diff --git a/packages/asc-web-common/components/FilterInput/sub-components/SelectedItem.js b/packages/asc-web-common/components/FilterInput/sub-components/SelectedItem.js index 90a8fe74f6..21126a34e2 100644 --- a/packages/asc-web-common/components/FilterInput/sub-components/SelectedItem.js +++ b/packages/asc-web-common/components/FilterInput/sub-components/SelectedItem.js @@ -19,6 +19,7 @@ const StyledSelectedItem = styled.div` padding: 6px 8px; margin-right: 4px; + margin-bottom: 4px; background: #eceef1; diff --git a/packages/asc-web-common/store/SettingsStore.js b/packages/asc-web-common/store/SettingsStore.js index 6e7a377336..6677b6e429 100644 --- a/packages/asc-web-common/store/SettingsStore.js +++ b/packages/asc-web-common/store/SettingsStore.js @@ -62,7 +62,7 @@ class SettingsStore { urlSupport = "https://helpdesk.onlyoffice.com/"; urlOforms = "https://cmsoforms.onlyoffice.com/api/oforms?populate=*&locale="; - logoUrl = combineUrl(proxyURL, "/static/images/nav.logo.opened.react.svg"); + logoUrl = combineUrl(proxyURL, "/static/images/logo.docspace.react.svg"); customNames = { id: "Common", userCaption: "User", diff --git a/packages/asc-web-components/avatar/index.js b/packages/asc-web-components/avatar/index.js index 39be9434cd..9cace50711 100644 --- a/packages/asc-web-components/avatar/index.js +++ b/packages/asc-web-components/avatar/index.js @@ -100,7 +100,7 @@ const Avatar = (props) => { Avatar.propTypes = { /** Size of avatar */ - size: PropTypes.oneOf(["max", "big", "medium", "small", "min"]), + size: PropTypes.oneOf(["max", "big", "medium", "base", "small", "min"]), /** Adds a user role table */ role: PropTypes.oneOf(["owner", "admin", "guest", "user"]), /** Provide either a url to display as `Picture` or path to **.svg** file to display as `Icon` */ diff --git a/packages/asc-web-components/context-menu-button/index.js b/packages/asc-web-components/context-menu-button/index.js index 646d107018..c94a0132aa 100644 --- a/packages/asc-web-components/context-menu-button/index.js +++ b/packages/asc-web-components/context-menu-button/index.js @@ -66,7 +66,7 @@ class ContextMenuButton extends React.Component { toggle = (isOpen) => this.setState({ isOpen: isOpen }); onClose = () => { this.setState({ isOpen: !this.state.isOpen }); - this.props?.onClose(); + this.props.onClose && this.props.onClose(); }; componentDidUpdate(prevProps) { @@ -170,6 +170,7 @@ class ContextMenuButton extends React.Component { zIndex, usePortal, dropDownClassName, + iconClassName, } = this.props; const { isOpen, displayType, offsetX, offsetY } = this.state; @@ -183,6 +184,7 @@ class ContextMenuButton extends React.Component { onClick={this.callNewMenu} > { let index = idx; let style = {}; - if (Array.isArray(data.data)) { + if (Array.isArray(data?.data)) { item = data.data[data.index] ? data.data[data.index] : null; index = data.index; style = data.style; @@ -261,7 +261,7 @@ const SubMenu = (props) => { } return model.map((item, index) => { - if (item.disabled) return null; + if (item?.disabled) return null; return renderItem(item, index); }); } diff --git a/packages/asc-web-components/icon-button/styled-icon-button.js b/packages/asc-web-components/icon-button/styled-icon-button.js index ea3d7f953b..129ff87c11 100644 --- a/packages/asc-web-components/icon-button/styled-icon-button.js +++ b/packages/asc-web-components/icon-button/styled-icon-button.js @@ -4,6 +4,8 @@ import { Base } from "../themes"; const StyledOuter = styled.div` width: ${(props) => props.size ? Math.abs(parseInt(props.size)) + "px" : "20px"}; + height: ${(props) => + props.size ? Math.abs(parseInt(props.size)) + "px" : "20px"}; cursor: ${(props) => props.isDisabled || !props.isClickable ? "default" : "pointer"}; line-height: 0; diff --git a/packages/asc-web-components/themes/base.js b/packages/asc-web-components/themes/base.js index 394ecf62db..e281feffe1 100644 --- a/packages/asc-web-components/themes/base.js +++ b/packages/asc-web-components/themes/base.js @@ -993,6 +993,7 @@ const Base = { fontSize: { min: "12px", small: "12px", + base: "16px", medium: "20px", big: "34px", max: "72px", @@ -1003,6 +1004,7 @@ const Base = { left: { min: "-2px", small: "-2px", + base: "-2px", medium: "-4px", big: "0px", max: "0px", @@ -1011,6 +1013,7 @@ const Base = { bottom: { min: "3px", small: "3px", + base: "4px", medium: "6px", big: "5px", max: "0px", @@ -1084,6 +1087,7 @@ const Base = { width: { min: "32px", small: "36px", + base: "40px", medium: "48px", big: "82px", max: "160px", @@ -1092,6 +1096,7 @@ const Base = { height: { min: "32px", small: "36px", + base: "40px", medium: "48px", big: "82px", max: "160px", @@ -1823,6 +1828,11 @@ const Base = { }, headerBurgerColor: "#657077", + + profile: { + borderTop: "1px solid #eceef1", + background: "#f3f4f4", + }, }, catalogItem: { @@ -1833,7 +1843,7 @@ const Base = { marginBottom: "16px", tablet: { height: "44px", - padding: "0 8px", + padding: "0 12px", marginBottom: "24px", }, }, @@ -1927,15 +1937,15 @@ const Base = { }, header: { - backgroundColor: "#0F4071", - recoveryColor: "#27537F", - linkColor: "#7a95b0", + backgroundColor: "#F8F9F9", + recoveryColor: "#657077", + linkColor: "#657077", productColor: white, }, menuContainer: { - background: "linear-gradient(200.71deg, #2274aa 0%, #0f4071 100%)", - color: white, + background: "#F3F4F4", + color: black, }, article: { diff --git a/packages/asc-web-components/themes/dark.js b/packages/asc-web-components/themes/dark.js index c3566b75e8..da3744f6e5 100644 --- a/packages/asc-web-components/themes/dark.js +++ b/packages/asc-web-components/themes/dark.js @@ -990,6 +990,7 @@ const Dark = { fontSize: { min: "12px", small: "12px", + base: "16px", medium: "20px", big: "34px", max: "72px", @@ -1000,6 +1001,7 @@ const Dark = { left: { min: "-2px", small: "-2px", + base: "-2px", medium: "-4px", big: "0px", max: "0px", @@ -1008,6 +1010,7 @@ const Dark = { bottom: { min: "3px", small: "3px", + base: "4px", medium: "6px", big: "5px", max: "0px", @@ -1081,6 +1084,7 @@ const Dark = { width: { min: "32px", small: "36px", + base: "40px", medium: "48px", big: "82px", max: "160px", @@ -1089,6 +1093,7 @@ const Dark = { height: { min: "32px", small: "36px", + base: "40px", medium: "48px", big: "82px", max: "160px", @@ -1823,6 +1828,11 @@ const Dark = { }, headerBurgerColor: "#606060", + + profile: { + borderTop: "1px solid #474747", + background: "#3D3D3D", + }, }, catalogItem: { @@ -1833,7 +1843,7 @@ const Dark = { marginBottom: "16px", tablet: { height: "44px", - padding: "0 8px", + padding: "0 12px", marginBottom: "24px", }, }, @@ -1934,7 +1944,7 @@ const Dark = { }, menuContainer: { - background: "linear-gradient(226.22deg, #606060 0.24%, #1F1F1F 79.81%)", + background: "#3D3D3D", color: "rgba(255, 255, 255, 0.92)", }, diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Body/TableView/TableHeader.js b/products/ASC.Files/Client/src/pages/Home/Section/Body/TableView/TableHeader.js index 05baafe3cf..b43355151b 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Body/TableView/TableHeader.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Body/TableView/TableHeader.js @@ -444,7 +444,7 @@ class FilesTableHeader extends React.Component { const sortOrder = isRooms ? roomsFilter.sortOrder : filter.sortOrder; // TODO: make some better - let needReset = false; + let needReset = this.props.isRooms !== this.state.isRooms; let currentColumnStorageName = columnStorageName; let currentColumnInfoPanelStorageName = columnInfoPanelStorageName; diff --git a/products/ASC.Files/Core/ApiModels/ResponseDto/ConfigurationDto.cs b/products/ASC.Files/Core/ApiModels/ResponseDto/ConfigurationDto.cs new file mode 100644 index 0000000000..550ea838db --- /dev/null +++ b/products/ASC.Files/Core/ApiModels/ResponseDto/ConfigurationDto.cs @@ -0,0 +1,39 @@ +// (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.Files.Core.ApiModels.ResponseDto; + +public class ConfigurationDto : IMapFrom> +{ + public DocumentConfig Document { get; set; } + public string DocumentType { get; set; } + public EditorConfiguration EditorConfig { get; set; } + public EditorType EditorType { get; set; } + public string EditorUrl { get; set; } + public string Token { get; set; } + public string Type { get; set; } + public FileDto File { get; set; } +} diff --git a/products/ASC.Files/Core/Core/EF/DbFile.cs b/products/ASC.Files/Core/Core/EF/DbFile.cs index 41d204182b..63b44d8113 100644 --- a/products/ASC.Files/Core/Core/EF/DbFile.cs +++ b/products/ASC.Files/Core/Core/EF/DbFile.cs @@ -108,7 +108,8 @@ public static class DbFileExtension entity.HasKey(e => new { e.TenantId, e.Id, e.Version }) .HasName("PRIMARY"); - entity.ToTable("files_file"); + entity.ToTable("files_file") + .HasCharSet("utf8"); entity.HasIndex(e => e.ParentId) .HasDatabaseName("folder_id"); @@ -125,7 +126,9 @@ public static class DbFileExtension entity.Property(e => e.Version).HasColumnName("version"); - entity.Property(e => e.Category).HasColumnName("category"); + entity.Property(e => e.Category) + .HasColumnName("category") + .HasDefaultValueSql("'0'"); entity.Property(e => e.Changes) .HasColumnName("changes") @@ -139,7 +142,9 @@ public static class DbFileExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.ContentLength).HasColumnName("content_length"); + entity.Property(e => e.ContentLength) + .HasColumnName("content_length") + .HasDefaultValueSql("'0'"); entity.Property(e => e.ConvertedType) .HasColumnName("converted_type") @@ -158,17 +163,31 @@ public static class DbFileExtension .HasColumnName("create_on") .HasColumnType("datetime"); - entity.Property(e => e.CurrentVersion).HasColumnName("current_version"); + entity.Property(e => e.CurrentVersion) + .HasColumnName("current_version") + .HasColumnType("tinyint(1)") + .HasDefaultValueSql("'0'"); - entity.Property(e => e.ThumbnailStatus).HasColumnName("thumb"); + entity.Property(e => e.ThumbnailStatus) + .HasColumnName("thumb") + .HasDefaultValueSql("'0'"); - entity.Property(e => e.Encrypted).HasColumnName("encrypted"); + entity.Property(e => e.Encrypted) + .HasColumnType("tinyint(1)") + .HasColumnName("encrypted") + .HasDefaultValueSql("'0'"); - entity.Property(e => e.FileStatus).HasColumnName("file_status"); + entity.Property(e => e.FileStatus) + .HasColumnName("file_status") + .HasDefaultValueSql("'0'"); - entity.Property(e => e.ParentId).HasColumnName("folder_id"); + entity.Property(e => e.ParentId) + .HasColumnName("folder_id") + .HasDefaultValueSql("'0'"); - entity.Property(e => e.Forcesave).HasColumnName("forcesave"); + entity.Property(e => e.Forcesave) + .HasColumnName("forcesave") + .HasDefaultValueSql("'0'"); entity.Property(e => e.ModifiedBy) .IsRequired() diff --git a/products/ASC.Files/Core/Core/EF/DbFilesBunchObjects.cs b/products/ASC.Files/Core/Core/EF/DbFilesBunchObjects.cs index 6865a9fb1b..39c3d6c2d2 100644 --- a/products/ASC.Files/Core/Core/EF/DbFilesBunchObjects.cs +++ b/products/ASC.Files/Core/Core/EF/DbFilesBunchObjects.cs @@ -55,7 +55,8 @@ public static class DbFilesBunchObjectsExtension entity.HasKey(e => new { e.TenantId, e.RightNode }) .HasName("PRIMARY"); - entity.ToTable("files_bunch_objects"); + entity.ToTable("files_bunch_objects") + .HasCharSet("utf8"); entity.HasIndex(e => e.LeftNode) .HasDatabaseName("left_node"); diff --git a/products/ASC.Files/Core/Core/EF/DbFilesLink.cs b/products/ASC.Files/Core/Core/EF/DbFilesLink.cs index 861af44309..2e56620f2c 100644 --- a/products/ASC.Files/Core/Core/EF/DbFilesLink.cs +++ b/products/ASC.Files/Core/Core/EF/DbFilesLink.cs @@ -56,7 +56,8 @@ public static class DbFilesLinkExtension entity.HasKey(e => new { e.TenantId, e.SourceId, e.LinkedId }) .HasName("PRIMARY"); - entity.ToTable("files_link"); + entity.ToTable("files_link") + .HasCharSet("utf8"); entity.HasIndex(e => new { e.TenantId, e.SourceId, e.LinkedId, e.LinkedFor }) .HasDatabaseName("linked_for"); diff --git a/products/ASC.Files/Core/Core/EF/DbFilesProperties.cs b/products/ASC.Files/Core/Core/EF/DbFilesProperties.cs index d5f8e9f210..508702bba7 100644 --- a/products/ASC.Files/Core/Core/EF/DbFilesProperties.cs +++ b/products/ASC.Files/Core/Core/EF/DbFilesProperties.cs @@ -57,7 +57,8 @@ public static class DbFilesPropertiesExtension entity.ToTable("files_properties"); - entity.Property(e => e.TenantId).HasColumnName("tenant_id"); + entity.Property(e => e.TenantId) + .HasColumnName("tenant_id"); entity.Property(e => e.EntryId) .HasColumnName("entry_id") @@ -65,7 +66,7 @@ public static class DbFilesPropertiesExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.EntryId) + entity.Property(e => e.Data) .HasColumnName("data") .HasColumnType("mediumtext") .HasCharSet("utf8") diff --git a/products/ASC.Files/Core/Core/EF/DbFilesSecurity.cs b/products/ASC.Files/Core/Core/EF/DbFilesSecurity.cs index 979a236095..368225a851 100644 --- a/products/ASC.Files/Core/Core/EF/DbFilesSecurity.cs +++ b/products/ASC.Files/Core/Core/EF/DbFilesSecurity.cs @@ -68,8 +68,9 @@ public static class DbFilesSecurityExtension entity.HasKey(e => new { e.TenantId, e.EntryId, e.EntryType, e.Subject }) .HasName("PRIMARY"); - entity.ToTable("files_security"); - + entity.ToTable("files_security") + .HasCharSet("utf8"); + entity.HasIndex(e => e.Owner) .HasDatabaseName("owner"); @@ -103,9 +104,7 @@ public static class DbFilesSecurityExtension entity.Property(e => e.TimeStamp) .HasColumnName("timestamp") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP") - .ValueGeneratedOnAddOrUpdate(); + .HasColumnType("timestamp"); }); } public static void PgSqlAddDbFilesSecurity(this ModelBuilder modelBuilder) diff --git a/products/ASC.Files/Core/Core/EF/DbFilesTag.cs b/products/ASC.Files/Core/Core/EF/DbFilesTag.cs index aa8f9ef941..50fe859db7 100644 --- a/products/ASC.Files/Core/Core/EF/DbFilesTag.cs +++ b/products/ASC.Files/Core/Core/EF/DbFilesTag.cs @@ -49,14 +49,17 @@ public static class DbFilesTagExtension { modelBuilder.Entity(entity => { - entity.ToTable("files_tag"); + entity.ToTable("files_tag") + .HasCharSet("utf8"); entity.HasIndex(e => new { e.TenantId, e.Owner, e.Name, e.Type }) .HasDatabaseName("name"); entity.Property(e => e.Id).HasColumnName("id"); - entity.Property(e => e.Type).HasColumnName("flag"); + entity.Property(e => e.Type) + .HasColumnName("flag") + .HasDefaultValueSql("'0'"); entity.Property(e => e.Name) .IsRequired() diff --git a/products/ASC.Files/Core/Core/EF/DbFilesTagLink.cs b/products/ASC.Files/Core/Core/EF/DbFilesTagLink.cs index 7d99b3482a..02b72cc83a 100644 --- a/products/ASC.Files/Core/Core/EF/DbFilesTagLink.cs +++ b/products/ASC.Files/Core/Core/EF/DbFilesTagLink.cs @@ -60,7 +60,8 @@ public static class DbFilesTagLinkExtension entity.HasKey(e => new { e.TenantId, e.TagId, e.EntryId, e.EntryType }) .HasName("PRIMARY"); - entity.ToTable("files_tag_link"); + entity.ToTable("files_tag_link") + .HasCharSet("utf8"); entity.HasIndex(e => e.CreateOn) .HasDatabaseName("create_on"); @@ -90,7 +91,9 @@ public static class DbFilesTagLinkExtension .HasColumnName("create_on") .HasColumnType("datetime"); - entity.Property(e => e.Count).HasColumnName("tag_count"); + entity.Property(e => e.Count) + .HasColumnName("tag_count") + .HasDefaultValueSql("'0'"); }); } public static void PgSqlAddDbFilesTagLink(this ModelBuilder modelBuilder) diff --git a/products/ASC.Files/Core/Core/EF/DbFilesThirdpartyAccount.cs b/products/ASC.Files/Core/Core/EF/DbFilesThirdpartyAccount.cs index 60f2b42ab0..9ae5466282 100644 --- a/products/ASC.Files/Core/Core/EF/DbFilesThirdpartyAccount.cs +++ b/products/ASC.Files/Core/Core/EF/DbFilesThirdpartyAccount.cs @@ -63,9 +63,10 @@ public static class DbFilesThirdpartyAccountExtension { modelBuilder.Entity(entity => { - entity.ToTable("files_thirdparty_account"); - - entity.HasIndex(e => e.TenantId).HasDatabaseName("tenant_id"); + entity.ToTable("files_thirdparty_account") + .HasCharSet("utf8"); + + entity.HasIndex(e => e.TenantId).HasDatabaseName("tenant_id"); entity.Property(e => e.Id).HasColumnName("id"); @@ -80,13 +81,15 @@ public static class DbFilesThirdpartyAccountExtension .HasCharSet("utf8") .UseCollation("utf8_general_ci"); - entity.Property(e => e.FolderType).HasColumnName("folder_type"); + entity.Property(e => e.FolderType) + .HasColumnName("folder_type") + .HasDefaultValueSql("'0'"); entity.Property(e => e.RoomType).HasColumnName("room_type"); entity.Property(e => e.Password) .IsRequired() .HasColumnName("password") - .HasColumnType("varchar(100)") + .HasColumnType("varchar(512)") .HasCharSet("utf8") .UseCollation("utf8_general_ci"); @@ -137,9 +140,9 @@ public static class DbFilesThirdpartyAccountExtension { modelBuilder.Entity(entity => { - entity.ToTable("files_thirdparty_account", "onlyoffice"); - - entity.HasIndex(e => e.TenantId).HasDatabaseName("tenant_id"); + entity.ToTable("files_thirdparty_account", "onlyoffice"); + + entity.HasIndex(e => e.TenantId).HasDatabaseName("tenant_id"); entity.Property(e => e.Id).HasColumnName("id"); diff --git a/products/ASC.Files/Core/Core/EF/DbFilesThirdpartyApp.cs b/products/ASC.Files/Core/Core/EF/DbFilesThirdpartyApp.cs index 63ce1875d9..984ba7be39 100644 --- a/products/ASC.Files/Core/Core/EF/DbFilesThirdpartyApp.cs +++ b/products/ASC.Files/Core/Core/EF/DbFilesThirdpartyApp.cs @@ -58,7 +58,8 @@ public static class DbFilesThirdpartyAppExtension entity.HasKey(e => new { e.UserId, e.App }) .HasName("PRIMARY"); - entity.ToTable("files_thirdparty_app"); + entity.ToTable("files_thirdparty_app") + .HasCharSet("utf8"); entity.Property(e => e.UserId) .HasColumnName("user_id") @@ -74,9 +75,7 @@ public static class DbFilesThirdpartyAppExtension entity.Property(e => e.ModifiedOn) .HasColumnName("modified_on") - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP") - .ValueGeneratedOnAddOrUpdate(); + .HasColumnType("timestamp"); entity.Property(e => e.TenantId).HasColumnName("tenant_id"); diff --git a/products/ASC.Files/Core/Core/EF/DbFilesThirdpartyIdMapping.cs b/products/ASC.Files/Core/Core/EF/DbFilesThirdpartyIdMapping.cs index e1b4fe8eb1..891a075b7b 100644 --- a/products/ASC.Files/Core/Core/EF/DbFilesThirdpartyIdMapping.cs +++ b/products/ASC.Files/Core/Core/EF/DbFilesThirdpartyIdMapping.cs @@ -56,7 +56,8 @@ public static class DbFilesThirdpartyIdMappingExtension entity.HasKey(e => e.HashId) .HasName("PRIMARY"); - entity.ToTable("files_thirdparty_id_mapping"); + entity.ToTable("files_thirdparty_id_mapping") + .HasCharSet("utf8"); entity.HasIndex(e => new { e.TenantId, e.HashId }) .HasDatabaseName("index_1"); diff --git a/products/ASC.Files/Core/Core/EF/DbFolder.cs b/products/ASC.Files/Core/Core/EF/DbFolder.cs index f9e56f2cad..31e7fed9b5 100644 --- a/products/ASC.Files/Core/Core/EF/DbFolder.cs +++ b/products/ASC.Files/Core/Core/EF/DbFolder.cs @@ -68,7 +68,8 @@ public static class DbFolderExtension { modelBuilder.Entity(entity => { - entity.ToTable("files_folder"); + entity.ToTable("files_folder") + .HasCharSet("utf8"); entity.Ignore(r => r.IndexName); @@ -91,11 +92,17 @@ public static class DbFolderExtension .HasColumnName("create_on") .HasColumnType("datetime"); - entity.Property(e => e.FilesCount).HasColumnName("filesCount"); + entity.Property(e => e.FilesCount) + .HasColumnName("filesCount") + .HasDefaultValueSql("'0'"); - entity.Property(e => e.FolderType).HasColumnName("folder_type"); + entity.Property(e => e.FolderType) + .HasColumnName("folder_type") + .HasDefaultValueSql("'0'"); - entity.Property(e => e.FoldersCount).HasColumnName("foldersCount"); + entity.Property(e => e.FoldersCount) + .HasColumnName("foldersCount") + .HasDefaultValueSql("'0'"); entity.Property(e => e.ModifiedBy) .IsRequired() @@ -108,7 +115,9 @@ public static class DbFolderExtension .HasColumnName("modified_on") .HasColumnType("datetime"); - entity.Property(e => e.ParentId).HasColumnName("parent_id"); + entity.Property(e => e.ParentId) + .HasColumnName("parent_id") + .HasDefaultValueSql("'0'"); entity.Property(e => e.TenantId).HasColumnName("tenant_id"); diff --git a/products/ASC.Files/Core/Core/EF/DbFolderTree.cs b/products/ASC.Files/Core/Core/EF/DbFolderTree.cs index 6322cb370a..318b0df532 100644 --- a/products/ASC.Files/Core/Core/EF/DbFolderTree.cs +++ b/products/ASC.Files/Core/Core/EF/DbFolderTree.cs @@ -57,7 +57,8 @@ public static class DbFolderTreeExtension entity.HasKey(e => new { e.ParentId, e.FolderId }) .HasName("PRIMARY"); - entity.ToTable("files_folder_tree"); + entity.ToTable("files_folder_tree") + .HasCharSet("utf8"); entity.HasIndex(e => e.FolderId) .HasDatabaseName("folder_id"); diff --git a/products/ASC.Files/Core/Core/EF/FilesDbContext.cs b/products/ASC.Files/Core/Core/EF/FilesDbContext.cs index 85a8269310..4889953144 100644 --- a/products/ASC.Files/Core/Core/EF/FilesDbContext.cs +++ b/products/ASC.Files/Core/Core/EF/FilesDbContext.cs @@ -25,9 +25,6 @@ // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode namespace ASC.Files.Core.EF; - -public class MySqlFilesDbContext : FilesDbContext { } -public class PostgreSqlFilesDbContext : FilesDbContext { } public class FilesDbContext : BaseDbContext { public DbSet Files { get; set; } @@ -45,19 +42,7 @@ public class FilesDbContext : BaseDbContext public DbSet Tariffs { get; set; } public DbSet Quotas { get; set; } public DbSet Tenants { get; set; } - - protected override Dictionary> ProviderContext - { - get - { - return new Dictionary>() - { - { Provider.MySql, () => new MySqlFilesDbContext() }, - { Provider.PostgreSql, () => new PostgreSqlFilesDbContext() }, - }; - } - } - + public DbSet FilesConverts { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { ModelBuilderWrapper @@ -76,7 +61,8 @@ public class FilesDbContext : BaseDbContext .AddDbFilesProperties() .AddDbTariff() .AddDbQuota() - .AddDbTenant(); + .AddDbTenant() + .AddFilesConverts(); } } diff --git a/products/ASC.Files/Core/Core/Thirdparty/IThirdPartyProviderDao.cs b/products/ASC.Files/Core/Core/Thirdparty/IThirdPartyProviderDao.cs index e2fc1d699f..71b409df0b 100644 --- a/products/ASC.Files/Core/Core/Thirdparty/IThirdPartyProviderDao.cs +++ b/products/ASC.Files/Core/Core/Thirdparty/IThirdPartyProviderDao.cs @@ -24,8 +24,6 @@ // 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 Folder = Microsoft.OneDrive.Sdk.Folder; - namespace ASC.Files.Thirdparty; internal abstract class ThirdPartyProviderDao diff --git a/products/ASC.Files/Core/Core/Thirdparty/SharePoint/SharePointDaoBase.cs b/products/ASC.Files/Core/Core/Thirdparty/SharePoint/SharePointDaoBase.cs index ac4b91edba..6d626cfe60 100644 --- a/products/ASC.Files/Core/Core/Thirdparty/SharePoint/SharePointDaoBase.cs +++ b/products/ASC.Files/Core/Core/Thirdparty/SharePoint/SharePointDaoBase.cs @@ -160,6 +160,7 @@ internal class SharePointDaoBase : ThirdPartyProviderDao foreach (var s in securityForUpdate) { s.EntryId = newHashID; + s.TimeStamp = DateTime.Now; } await FilesDbContext.SaveChangesAsync(); diff --git a/products/ASC.Files/Core/Core/Thirdparty/Sharpbox/SharpBoxDaoBase.cs b/products/ASC.Files/Core/Core/Thirdparty/Sharpbox/SharpBoxDaoBase.cs index 62599a2803..886c2548cb 100644 --- a/products/ASC.Files/Core/Core/Thirdparty/Sharpbox/SharpBoxDaoBase.cs +++ b/products/ASC.Files/Core/Core/Thirdparty/Sharpbox/SharpBoxDaoBase.cs @@ -180,6 +180,7 @@ internal abstract class SharpBoxDaoBase : ThirdPartyProviderDao /// Class service connector diff --git a/web/ASC.Web.Core/Files/DocumentServiceLicense.cs b/products/ASC.Files/Core/Helpers/DocumentServiceLicense.cs similarity index 96% rename from web/ASC.Web.Core/Files/DocumentServiceLicense.cs rename to products/ASC.Files/Core/Helpers/DocumentServiceLicense.cs index 62afba0144..716481bd77 100644 --- a/web/ASC.Web.Core/Files/DocumentServiceLicense.cs +++ b/products/ASC.Files/Core/Helpers/DocumentServiceLicense.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.Web.Core.Files; +namespace ASC.Files.Core.Helpers; [Scope] public class DocumentServiceLicense diff --git a/web/ASC.Web.Core/Files/FileUtility.cs b/products/ASC.Files/Core/Helpers/FileUtility.cs similarity index 96% rename from web/ASC.Web.Core/Files/FileUtility.cs rename to products/ASC.Files/Core/Helpers/FileUtility.cs index 05b9918f10..eafb96042c 100644 --- a/web/ASC.Web.Core/Files/FileUtility.cs +++ b/products/ASC.Files/Core/Helpers/FileUtility.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.Web.Core.Files; +namespace ASC.Files.Core.Helpers; [Singletone] public class FileUtilityConfiguration diff --git a/web/ASC.Web.Core/Files/FilesLinkUtility.cs b/products/ASC.Files/Core/Helpers/FilesLinkUtility.cs similarity index 96% rename from web/ASC.Web.Core/Files/FilesLinkUtility.cs rename to products/ASC.Files/Core/Helpers/FilesLinkUtility.cs index e3a581d3f3..c916a553bb 100644 --- a/web/ASC.Web.Core/Files/FilesLinkUtility.cs +++ b/products/ASC.Files/Core/Helpers/FilesLinkUtility.cs @@ -24,7 +24,7 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -namespace ASC.Web.Core.Files; +namespace ASC.Files.Core.Helpers; [Scope] public class FilesLinkUtility diff --git a/products/ASC.Files/Core/Log/DocumentServiceConnectorLogger.cs b/products/ASC.Files/Core/Log/DocumentServiceConnectorLogger.cs index 3771444424..0f08d727e0 100644 --- a/products/ASC.Files/Core/Log/DocumentServiceConnectorLogger.cs +++ b/products/ASC.Files/Core/Log/DocumentServiceConnectorLogger.cs @@ -24,8 +24,8 @@ // content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 // International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode -using static ASC.Web.Core.Files.DocumentService.CommandResponse; - + + namespace ASC.Files.Core.Log; internal static partial class DocumentServiceConnectorLogger { diff --git a/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/20211022170840_FilesDbContextMySql.Designer.cs b/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/20211022170840_FilesDbContextMySql.Designer.cs deleted file mode 100644 index 1dc7109f80..0000000000 --- a/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/20211022170840_FilesDbContextMySql.Designer.cs +++ /dev/null @@ -1,521 +0,0 @@ -// - -namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql -{ - [DbContext(typeof(MySqlFilesDbContext))] - [Migration("20211022170840_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.Files.Core.EF.DbFile", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Id") - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Version") - .HasColumnType("int") - .HasColumnName("version"); - - b.Property("Category") - .HasColumnType("int") - .HasColumnName("category"); - - b.Property("Changes") - .HasColumnType("mediumtext") - .HasColumnName("changes") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Comment") - .HasColumnType("varchar(255)") - .HasColumnName("comment") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ContentLength") - .HasColumnType("bigint") - .HasColumnName("content_length"); - - b.Property("ConvertedType") - .HasColumnType("varchar(10)") - .HasColumnName("converted_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("CurrentVersion") - .HasColumnType("tinyint(1)") - .HasColumnName("current_version"); - - b.Property("Encrypted") - .HasColumnType("tinyint(1)") - .HasColumnName("encrypted"); - - b.Property("FileStatus") - .HasColumnType("int") - .HasColumnName("file_status"); - - b.Property("FolderId") - .HasColumnType("int") - .HasColumnName("folder_id"); - - b.Property("Forcesave") - .HasColumnType("int") - .HasColumnName("forcesave"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .HasColumnType("datetime") - .HasColumnName("modified_on"); - - b.Property("Thumb") - .HasColumnType("int") - .HasColumnName("thumb"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("VersionGroup") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("version_group") - .HasDefaultValueSql("'1'"); - - b.HasKey("TenantId", "Id", "Version") - .HasName("PRIMARY"); - - b.HasIndex("FolderId") - .HasDatabaseName("folder_id"); - - b.HasIndex("Id") - .HasDatabaseName("id"); - - b.HasIndex("ModifiedOn") - .HasDatabaseName("modified_on"); - - b.ToTable("files_file"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesBunchObjects", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("RightNode") - .HasColumnType("varchar(255)") - .HasColumnName("right_node") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LeftNode") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("left_node") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "RightNode") - .HasName("PRIMARY"); - - b.HasIndex("LeftNode") - .HasDatabaseName("left_node"); - - b.ToTable("files_bunch_objects"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("EntryId") - .HasColumnType("varchar(50)") - .HasColumnName("entry_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("EntryType") - .HasColumnType("int") - .HasColumnName("entry_type"); - - b.Property("Subject") - .HasColumnType("char(38)") - .HasColumnName("subject") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Owner") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("owner") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Security") - .HasColumnType("int") - .HasColumnName("security"); - - b.Property("TimeStamp") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.HasKey("TenantId", "EntryId", "EntryType", "Subject") - .HasName("PRIMARY"); - - b.HasIndex("Owner") - .HasDatabaseName("owner"); - - b.HasIndex("TenantId", "EntryType", "EntryId", "Owner") - .HasDatabaseName("tenant_id"); - - b.ToTable("files_security"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Flag") - .HasColumnType("int") - .HasColumnName("flag"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Owner") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("owner") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Owner", "Name", "Flag") - .HasDatabaseName("name"); - - b.ToTable("files_tag"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTagLink", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("TagId") - .HasColumnType("int") - .HasColumnName("tag_id"); - - b.Property("EntryId") - .HasColumnType("varchar(32)") - .HasColumnName("entry_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("EntryType") - .HasColumnType("int") - .HasColumnName("entry_type"); - - b.Property("CreateBy") - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("TagCount") - .HasColumnType("int") - .HasColumnName("tag_count"); - - b.HasKey("TenantId", "TagId", "EntryId", "EntryType") - .HasName("PRIMARY"); - - b.HasIndex("CreateOn") - .HasDatabaseName("create_on"); - - b.HasIndex("TenantId", "EntryId", "EntryType") - .HasDatabaseName("entry_id"); - - b.ToTable("files_tag_link"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("FolderType") - .HasColumnType("int") - .HasColumnName("folder_type"); - - b.Property("Password") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Provider") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(50)") - .HasColumnName("provider") - .HasDefaultValueSql("'0'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("customer_title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Url") - .HasColumnType("text") - .HasColumnName("url") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("user_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.ToTable("files_thirdparty_account"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyApp", b => - { - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("App") - .HasColumnType("varchar(50)") - .HasColumnName("app") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("modified_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("UserId", "App") - .HasName("PRIMARY"); - - b.ToTable("files_thirdparty_app"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyIdMapping", b => - { - b.Property("HashId") - .HasColumnType("char(32)") - .HasColumnName("hash_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Id") - .IsRequired() - .HasColumnType("text") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.HasKey("HashId") - .HasName("PRIMARY"); - - b.HasIndex("TenantId", "HashId") - .HasDatabaseName("index_1"); - - b.ToTable("files_thirdparty_id_mapping"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFolder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreateBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("FilesCount") - .HasColumnType("int") - .HasColumnName("filesCount"); - - b.Property("FolderType") - .HasColumnType("int") - .HasColumnName("folder_type"); - - b.Property("FoldersCount") - .HasColumnType("int") - .HasColumnName("foldersCount"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .HasColumnType("datetime") - .HasColumnName("modified_on"); - - b.Property("ParentId") - .HasColumnType("int") - .HasColumnName("parent_id"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.HasIndex("ModifiedOn") - .HasDatabaseName("modified_on"); - - b.HasIndex("TenantId", "ParentId") - .HasDatabaseName("parent_id"); - - b.ToTable("files_folder"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFolderTree", b => - { - b.Property("ParentId") - .HasColumnType("int") - .HasColumnName("parent_id"); - - b.Property("FolderId") - .HasColumnType("int") - .HasColumnName("folder_id"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.HasKey("ParentId", "FolderId") - .HasName("PRIMARY"); - - b.HasIndex("FolderId") - .HasDatabaseName("folder_id"); - - b.ToTable("files_folder_tree"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/20211022170840_FilesDbContextMySql.cs b/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/20211022170840_FilesDbContextMySql.cs deleted file mode 100644 index 9ef5523538..0000000000 --- a/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/20211022170840_FilesDbContextMySql.cs +++ /dev/null @@ -1,360 +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.Files.Core.Migrations.MySql.FilesDbContextMySql; - -public partial class FilesDbContextMySql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_bunch_objects", - columns: table => new - { - tenant_id = table.Column(type: "int", nullable: false), - right_node = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - left_node = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.right_node }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_file", - columns: table => new - { - id = table.Column(type: "int", nullable: false), - version = table.Column(type: "int", nullable: false), - tenant_id = table.Column(type: "int", nullable: false), - version_group = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), - current_version = table.Column(type: "tinyint(1)", nullable: false), - folder_id = table.Column(type: "int", nullable: false), - title = table.Column(type: "varchar(400)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - content_length = table.Column(type: "bigint", nullable: false), - file_status = table.Column(type: "int", nullable: false), - category = table.Column(type: "int", nullable: false), - create_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - create_on = table.Column(type: "datetime", nullable: false), - modified_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - modified_on = table.Column(type: "datetime", nullable: false), - converted_type = table.Column(type: "varchar(10)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - comment = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - changes = table.Column(type: "mediumtext", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - encrypted = table.Column(type: "tinyint(1)", nullable: false), - forcesave = table.Column(type: "int", nullable: false), - thumb = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.id, x.version }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_folder", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - parent_id = table.Column(type: "int", nullable: false), - title = table.Column(type: "varchar(400)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - folder_type = table.Column(type: "int", nullable: false), - create_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - create_on = table.Column(type: "datetime", nullable: false), - modified_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - modified_on = table.Column(type: "datetime", nullable: false), - tenant_id = table.Column(type: "int", nullable: false), - foldersCount = table.Column(type: "int", nullable: false), - filesCount = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_files_folder", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_folder_tree", - columns: table => new - { - folder_id = table.Column(type: "int", nullable: false), - parent_id = table.Column(type: "int", nullable: false), - level = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.parent_id, x.folder_id }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_security", - columns: table => new - { - tenant_id = table.Column(type: "int", nullable: false), - entry_id = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - entry_type = table.Column(type: "int", nullable: false), - subject = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - owner = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - security = table.Column(type: "int", nullable: false), - timestamp = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.entry_id, x.entry_type, x.subject }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_tag", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - tenant_id = table.Column(type: "int", nullable: false), - name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - owner = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - flag = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_files_tag", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_tag_link", - columns: table => new - { - tenant_id = table.Column(type: "int", nullable: false), - tag_id = table.Column(type: "int", nullable: false), - entry_type = table.Column(type: "int", nullable: false), - entry_id = table.Column(type: "varchar(32)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - create_by = table.Column(type: "char(38)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - create_on = table.Column(type: "datetime", nullable: true), - tag_count = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.tag_id, x.entry_id, x.entry_type }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_thirdparty_account", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - provider = table.Column(type: "varchar(50)", nullable: false, defaultValueSql: "'0'", collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - customer_title = table.Column(type: "varchar(400)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - user_name = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - password = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - token = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - folder_type = table.Column(type: "int", nullable: false), - create_on = table.Column(type: "datetime", nullable: false), - url = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant_id = table.Column(type: "int", nullable: false), - folder_id = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - room_type = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_files_thirdparty_account", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_thirdparty_app", - columns: table => new - { - user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - app = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - token = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant_id = table.Column(type: "int", nullable: false), - modified_on = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.user_id, x.app }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_thirdparty_id_mapping", - columns: table => new - { - hash_id = table.Column(type: "char(32)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant_id = table.Column(type: "int", nullable: false), - id = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.hash_id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "left_node", - table: "files_bunch_objects", - column: "left_node"); - - migrationBuilder.CreateIndex( - name: "folder_id", - table: "files_file", - column: "folder_id"); - - migrationBuilder.CreateIndex( - name: "id", - table: "files_file", - column: "id"); - - migrationBuilder.CreateIndex( - name: "modified_on", - table: "files_file", - column: "modified_on"); - - migrationBuilder.CreateIndex( - name: "modified_on", - table: "files_folder", - column: "modified_on"); - - migrationBuilder.CreateIndex( - name: "parent_id", - table: "files_folder", - columns: new[] { "tenant_id", "parent_id" }); - - migrationBuilder.CreateIndex( - name: "folder_id", - table: "files_folder_tree", - column: "folder_id"); - - migrationBuilder.CreateIndex( - name: "owner", - table: "files_security", - column: "owner"); - - migrationBuilder.CreateIndex( - name: "tenant_id", - table: "files_security", - columns: new[] { "tenant_id", "entry_type", "entry_id", "owner" }); - - migrationBuilder.CreateIndex( - name: "name", - table: "files_tag", - columns: new[] { "tenant_id", "owner", "name", "flag" }); - - migrationBuilder.CreateIndex( - name: "create_on", - table: "files_tag_link", - column: "create_on"); - - migrationBuilder.CreateIndex( - name: "entry_id", - table: "files_tag_link", - columns: new[] { "tenant_id", "entry_id", "entry_type" }); - - migrationBuilder.CreateIndex( - name: "index_1", - table: "files_thirdparty_id_mapping", - columns: new[] { "tenant_id", "hash_id" }); - - migrationBuilder.CreateIndex( - name: "tenant_id", - table: "files_thirdparty_account", - column: "tenant_id"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "files_bunch_objects"); - - migrationBuilder.DropTable( - name: "files_file"); - - migrationBuilder.DropTable( - name: "files_folder"); - - migrationBuilder.DropTable( - name: "files_folder_tree"); - - migrationBuilder.DropTable( - name: "files_security"); - - migrationBuilder.DropTable( - name: "files_tag"); - - migrationBuilder.DropTable( - name: "files_tag_link"); - - migrationBuilder.DropTable( - name: "files_thirdparty_account"); - - migrationBuilder.DropTable( - name: "files_thirdparty_app"); - - migrationBuilder.DropTable( - name: "files_thirdparty_id_mapping"); - } -} diff --git a/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/20211130105913_FilesDbContextMySql_Upgrade1.Designer.cs b/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/20211130105913_FilesDbContextMySql_Upgrade1.Designer.cs deleted file mode 100644 index 3fedc41b65..0000000000 --- a/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/20211130105913_FilesDbContextMySql_Upgrade1.Designer.cs +++ /dev/null @@ -1,557 +0,0 @@ -// - -#nullable disable - -namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql -{ - [DbContext(typeof(MySqlFilesDbContext))] - [Migration("20211130105913_FilesDbContextMySql_Upgrade1")] - partial class FilesDbContextMySql_Upgrade1 - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFile", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Id") - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Version") - .HasColumnType("int") - .HasColumnName("version"); - - b.Property("Category") - .HasColumnType("int") - .HasColumnName("category"); - - b.Property("Changes") - .HasColumnType("mediumtext") - .HasColumnName("changes") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Comment") - .HasColumnType("varchar(255)") - .HasColumnName("comment") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ContentLength") - .HasColumnType("bigint") - .HasColumnName("content_length"); - - b.Property("ConvertedType") - .HasColumnType("varchar(10)") - .HasColumnName("converted_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("CurrentVersion") - .HasColumnType("tinyint(1)") - .HasColumnName("current_version"); - - b.Property("Encrypted") - .HasColumnType("tinyint(1)") - .HasColumnName("encrypted"); - - b.Property("FileStatus") - .HasColumnType("int") - .HasColumnName("file_status"); - - b.Property("FolderId") - .HasColumnType("int") - .HasColumnName("folder_id"); - - b.Property("Forcesave") - .HasColumnType("int") - .HasColumnName("forcesave"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .HasColumnType("datetime") - .HasColumnName("modified_on"); - - b.Property("Thumb") - .HasColumnType("int") - .HasColumnName("thumb"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("VersionGroup") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("version_group") - .HasDefaultValueSql("'1'"); - - b.HasKey("TenantId", "Id", "Version") - .HasName("PRIMARY"); - - b.HasIndex("FolderId") - .HasDatabaseName("folder_id"); - - b.HasIndex("Id") - .HasDatabaseName("id"); - - b.HasIndex("ModifiedOn") - .HasDatabaseName("modified_on"); - - b.ToTable("files_file", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesBunchObjects", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("RightNode") - .HasColumnType("varchar(255)") - .HasColumnName("right_node") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LeftNode") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("left_node") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "RightNode") - .HasName("PRIMARY"); - - b.HasIndex("LeftNode") - .HasDatabaseName("left_node"); - - b.ToTable("files_bunch_objects", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesLink", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("SourceId") - .HasColumnType("varchar(32)") - .HasColumnName("source_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LinkedId") - .HasColumnType("varchar(32)") - .HasColumnName("linked_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LinkedFor") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("linked_for") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "SourceId", "LinkedId") - .HasName("PRIMARY"); - - b.HasIndex("TenantId", "SourceId", "LinkedId", "LinkedFor") - .HasDatabaseName("linked_for"); - - b.ToTable("files_link", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("EntryId") - .HasColumnType("varchar(50)") - .HasColumnName("entry_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("EntryType") - .HasColumnType("int") - .HasColumnName("entry_type"); - - b.Property("Subject") - .HasColumnType("char(38)") - .HasColumnName("subject") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Owner") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("owner") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Security") - .HasColumnType("int") - .HasColumnName("security"); - - b.Property("TimeStamp") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.HasKey("TenantId", "EntryId", "EntryType", "Subject") - .HasName("PRIMARY"); - - b.HasIndex("Owner") - .HasDatabaseName("owner"); - - b.HasIndex("TenantId", "EntryType", "EntryId", "Owner") - .HasDatabaseName("tenant_id"); - - b.ToTable("files_security", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Flag") - .HasColumnType("int") - .HasColumnName("flag"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Owner") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("owner") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Owner", "Name", "Flag") - .HasDatabaseName("name"); - - b.ToTable("files_tag", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTagLink", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("TagId") - .HasColumnType("int") - .HasColumnName("tag_id"); - - b.Property("EntryId") - .HasColumnType("varchar(32)") - .HasColumnName("entry_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("EntryType") - .HasColumnType("int") - .HasColumnName("entry_type"); - - b.Property("CreateBy") - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("TagCount") - .HasColumnType("int") - .HasColumnName("tag_count"); - - b.HasKey("TenantId", "TagId", "EntryId", "EntryType") - .HasName("PRIMARY"); - - b.HasIndex("CreateOn") - .HasDatabaseName("create_on"); - - b.HasIndex("TenantId", "EntryId", "EntryType") - .HasDatabaseName("entry_id"); - - b.ToTable("files_tag_link", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("FolderType") - .HasColumnType("int") - .HasColumnName("folder_type"); - - b.Property("Password") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Provider") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(50)") - .HasColumnName("provider") - .HasDefaultValueSql("'0'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("customer_title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Url") - .HasColumnType("text") - .HasColumnName("url") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("user_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.ToTable("files_thirdparty_account", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyApp", b => - { - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("App") - .HasColumnType("varchar(50)") - .HasColumnName("app") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("modified_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("UserId", "App") - .HasName("PRIMARY"); - - b.ToTable("files_thirdparty_app", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyIdMapping", b => - { - b.Property("HashId") - .HasColumnType("char(32)") - .HasColumnName("hash_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Id") - .IsRequired() - .HasColumnType("text") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.HasKey("HashId") - .HasName("PRIMARY"); - - b.HasIndex("TenantId", "HashId") - .HasDatabaseName("index_1"); - - b.ToTable("files_thirdparty_id_mapping", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFolder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreateBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("FilesCount") - .HasColumnType("int") - .HasColumnName("filesCount"); - - b.Property("FolderType") - .HasColumnType("int") - .HasColumnName("folder_type"); - - b.Property("FoldersCount") - .HasColumnType("int") - .HasColumnName("foldersCount"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .HasColumnType("datetime") - .HasColumnName("modified_on"); - - b.Property("ParentId") - .HasColumnType("int") - .HasColumnName("parent_id"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.HasIndex("ModifiedOn") - .HasDatabaseName("modified_on"); - - b.HasIndex("TenantId", "ParentId") - .HasDatabaseName("parent_id"); - - b.ToTable("files_folder", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFolderTree", b => - { - b.Property("ParentId") - .HasColumnType("int") - .HasColumnName("parent_id"); - - b.Property("FolderId") - .HasColumnType("int") - .HasColumnName("folder_id"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.HasKey("ParentId", "FolderId") - .HasName("PRIMARY"); - - b.HasIndex("FolderId") - .HasDatabaseName("folder_id"); - - b.ToTable("files_folder_tree", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/20211130105913_FilesDbContextMySql_Upgrade1.cs b/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/20211130105913_FilesDbContextMySql_Upgrade1.cs deleted file mode 100644 index a2b18e9914..0000000000 --- a/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/20211130105913_FilesDbContextMySql_Upgrade1.cs +++ /dev/null @@ -1,64 +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 - -#nullable disable - -namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql; - -public partial class FilesDbContextMySql_Upgrade1 : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "files_link", - columns: table => new - { - tenant_id = table.Column(type: "int", nullable: false), - source_id = table.Column(type: "varchar(32)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - linked_id = table.Column(type: "varchar(32)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - linked_for = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.source_id, x.linked_id }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateIndex( - name: "linked_for", - table: "files_link", - columns: new[] { "tenant_id", "source_id", "linked_id", "linked_for" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "files_link"); - } -} diff --git a/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/MySqlFilesDbContextModelSnapshot.cs b/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/MySqlFilesDbContextModelSnapshot.cs deleted file mode 100644 index c07ac2d0db..0000000000 --- a/products/ASC.Files/Core/Migrations/MySql/FilesDbContextMySql/MySqlFilesDbContextModelSnapshot.cs +++ /dev/null @@ -1,822 +0,0 @@ -// -using System; -using ASC.Files.Core.EF; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace ASC.Files.Core.Migrations.MySql.FilesDbContextMySql -{ - [DbContext(typeof(MySqlFilesDbContext))] - partial class MySqlFilesDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => - { - b.Property("Tenant") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("ActiveUsers") - .HasColumnType("int") - .HasColumnName("active_users"); - - b.Property("AvangateId") - .HasColumnType("varchar(128)") - .HasColumnName("avangate_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Description") - .HasColumnType("varchar(128)") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Features") - .HasColumnType("text") - .HasColumnName("features") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("MaxFileSize") - .HasColumnType("bigint") - .HasColumnName("max_file_size"); - - b.Property("MaxTotalSize") - .HasColumnType("bigint") - .HasColumnName("max_total_size"); - - b.Property("Name") - .HasColumnType("varchar(128)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Price") - .HasColumnType("decimal(10,2)") - .HasColumnName("price"); - - b.Property("Visible") - .HasColumnType("tinyint(1)") - .HasColumnName("visible"); - - b.HasKey("Tenant") - .HasName("PRIMARY"); - - b.ToTable("tenants_quota", (string)null); - - b.HasData( - new - { - Tenant = -1, - ActiveUsers = 10000, - AvangateId = "0", - Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", - MaxFileSize = 102400L, - MaxTotalSize = 10995116277760L, - Name = "default", - Price = 0.00m, - Visible = false - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Comment") - .HasColumnType("varchar(255)") - .HasColumnName("comment") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("create_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Quantity") - .HasColumnType("int") - .HasColumnName("quantity"); - - b.Property("Stamp") - .HasColumnType("datetime") - .HasColumnName("stamp"); - - b.Property("Tariff") - .HasColumnType("int") - .HasColumnName("tariff"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("Tenant") - .HasDatabaseName("tenant"); - - b.ToTable("tenants_tariff", (string)null); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Alias") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("alias") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Calls") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("calls") - .HasDefaultValueSql("true"); - - b.Property("CreationDateTime") - .HasColumnType("datetime") - .HasColumnName("creationdatetime"); - - b.Property("Industry") - .HasColumnType("int") - .HasColumnName("industry"); - - b.Property("Language") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("char(10)") - .HasColumnName("language") - .HasDefaultValueSql("'en-US'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("MappedDomain") - .HasColumnType("varchar(100)") - .HasColumnName("mappeddomain") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("owner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PaymentId") - .HasColumnType("varchar(38)") - .HasColumnName("payment_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Spam") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("spam") - .HasDefaultValueSql("true"); - - b.Property("Status") - .HasColumnType("int") - .HasColumnName("status"); - - b.Property("StatusChanged") - .HasColumnType("datetime") - .HasColumnName("statuschanged"); - - b.Property("TimeZone") - .HasColumnType("varchar(50)") - .HasColumnName("timezone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomainsEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("trusteddomainsenabled") - .HasDefaultValueSql("'1'"); - - b.Property("TrustedDomainsRaw") - .HasColumnType("varchar(1024)") - .HasColumnName("trusteddomains") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Version") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("version") - .HasDefaultValueSql("'2'"); - - b.Property("Version_Changed") - .HasColumnType("datetime") - .HasColumnName("version_changed"); - - b.HasKey("Id"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("MappedDomain") - .HasDatabaseName("mappeddomain"); - - b.HasIndex("Version") - .HasDatabaseName("version"); - - b.ToTable("tenants_tenants", (string)null); - - b.HasData( - new - { - Id = 1, - Alias = "localhost", - Calls = false, - CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - Name = "Web Office", - OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - Spam = false, - Status = 0, - TrustedDomainsEnabled = 0, - Version = 0 - }); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFile", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Id") - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Version") - .HasColumnType("int") - .HasColumnName("version"); - - b.Property("Category") - .HasColumnType("int") - .HasColumnName("category"); - - b.Property("Changes") - .HasColumnType("mediumtext") - .HasColumnName("changes") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Comment") - .HasColumnType("varchar(255)") - .HasColumnName("comment") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ContentLength") - .HasColumnType("bigint") - .HasColumnName("content_length"); - - b.Property("ConvertedType") - .HasColumnType("varchar(10)") - .HasColumnName("converted_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("CurrentVersion") - .HasColumnType("tinyint(1)") - .HasColumnName("current_version"); - - b.Property("Encrypted") - .HasColumnType("tinyint(1)") - .HasColumnName("encrypted"); - - b.Property("FileStatus") - .HasColumnType("int") - .HasColumnName("file_status"); - - b.Property("Forcesave") - .HasColumnType("int") - .HasColumnName("forcesave"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .HasColumnType("datetime") - .HasColumnName("modified_on"); - - b.Property("ParentId") - .HasColumnType("int") - .HasColumnName("folder_id"); - - b.Property("ThumbnailStatus") - .HasColumnType("int") - .HasColumnName("thumb"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("VersionGroup") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("version_group") - .HasDefaultValueSql("'1'"); - - b.HasKey("TenantId", "Id", "Version") - .HasName("PRIMARY"); - - b.HasIndex("Id") - .HasDatabaseName("id"); - - b.HasIndex("ModifiedOn") - .HasDatabaseName("modified_on"); - - b.HasIndex("ParentId") - .HasDatabaseName("folder_id"); - - b.ToTable("files_file", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesBunchObjects", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("RightNode") - .HasColumnType("varchar(255)") - .HasColumnName("right_node") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LeftNode") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("left_node") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "RightNode") - .HasName("PRIMARY"); - - b.HasIndex("LeftNode") - .HasDatabaseName("left_node"); - - b.ToTable("files_bunch_objects", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesLink", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("SourceId") - .HasColumnType("varchar(32)") - .HasColumnName("source_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LinkedId") - .HasColumnType("varchar(32)") - .HasColumnName("linked_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LinkedFor") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("linked_for") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "SourceId", "LinkedId") - .HasName("PRIMARY"); - - b.HasIndex("TenantId", "SourceId", "LinkedId", "LinkedFor") - .HasDatabaseName("linked_for"); - - b.ToTable("files_link", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("EntryId") - .HasColumnType("varchar(50)") - .HasColumnName("entry_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("EntryType") - .HasColumnType("int") - .HasColumnName("entry_type"); - - b.Property("Subject") - .HasColumnType("char(38)") - .HasColumnName("subject") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Owner") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("owner") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Share") - .HasColumnType("int") - .HasColumnName("security"); - - b.Property("TimeStamp") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.HasKey("TenantId", "EntryId", "EntryType", "Subject") - .HasName("PRIMARY"); - - b.HasIndex("Owner") - .HasDatabaseName("owner"); - - b.HasIndex("TenantId", "EntryType", "EntryId", "Owner") - .HasDatabaseName("tenant_id"); - - b.ToTable("files_security", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Owner") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("owner") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("flag"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Owner", "Name", "Type") - .HasDatabaseName("name"); - - b.ToTable("files_tag", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTagLink", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("TagId") - .HasColumnType("int") - .HasColumnName("tag_id"); - - b.Property("EntryId") - .HasColumnType("varchar(32)") - .HasColumnName("entry_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("EntryType") - .HasColumnType("int") - .HasColumnName("entry_type"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("tag_count"); - - b.Property("CreateBy") - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.HasKey("TenantId", "TagId", "EntryId", "EntryType") - .HasName("PRIMARY"); - - b.HasIndex("CreateOn") - .HasDatabaseName("create_on"); - - b.HasIndex("TenantId", "EntryId", "EntryType") - .HasDatabaseName("entry_id"); - - b.ToTable("files_tag_link", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("FolderId") - .HasColumnType("text") - .HasColumnName("folder_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FolderType") - .HasColumnType("int") - .HasColumnType("folder_type"); - - b.Property("Password") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Provider") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(50)") - .HasColumnName("provider") - .HasDefaultValueSql("'0'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("customer_title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Url") - .HasColumnType("text") - .HasColumnName("url") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("user_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.ToTable("files_thirdparty_account", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyApp", b => - { - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("App") - .HasColumnType("varchar(50)") - .HasColumnName("app") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("modified_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("UserId", "App") - .HasName("PRIMARY"); - - b.ToTable("files_thirdparty_app", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyIdMapping", b => - { - b.Property("HashId") - .HasColumnType("char(32)") - .HasColumnName("hash_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Id") - .IsRequired() - .HasColumnType("text") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.HasKey("HashId") - .HasName("PRIMARY"); - - b.HasIndex("TenantId", "HashId") - .HasDatabaseName("index_1"); - - b.ToTable("files_thirdparty_id_mapping", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFolder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreateBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("FilesCount") - .HasColumnType("int") - .HasColumnName("filesCount"); - - b.Property("FolderType") - .HasColumnType("int") - .HasColumnName("folder_type"); - - b.Property("FoldersCount") - .HasColumnType("int") - .HasColumnName("foldersCount"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .HasColumnType("datetime") - .HasColumnName("modified_on"); - - b.Property("ParentId") - .HasColumnType("int") - .HasColumnName("parent_id"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.HasIndex("ModifiedOn") - .HasDatabaseName("modified_on"); - - b.HasIndex("TenantId", "ParentId") - .HasDatabaseName("parent_id"); - - b.ToTable("files_folder", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFolderTree", b => - { - b.Property("ParentId") - .HasColumnType("int") - .HasColumnName("parent_id"); - - b.Property("FolderId") - .HasColumnType("int") - .HasColumnName("folder_id"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.HasKey("ParentId", "FolderId") - .HasName("PRIMARY"); - - b.HasIndex("FolderId") - .HasDatabaseName("folder_id"); - - b.ToTable("files_folder_tree", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/products/ASC.Files/Core/Migrations/PostgreSql/FilesDbContextPostgreSql/20211022170841_FilesDbContextPostgreSql.Designer.cs b/products/ASC.Files/Core/Migrations/PostgreSql/FilesDbContextPostgreSql/20211022170841_FilesDbContextPostgreSql.Designer.cs deleted file mode 100644 index dff619993d..0000000000 --- a/products/ASC.Files/Core/Migrations/PostgreSql/FilesDbContextPostgreSql/20211022170841_FilesDbContextPostgreSql.Designer.cs +++ /dev/null @@ -1,662 +0,0 @@ -// - -namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlFilesDbContext))] - [Migration("20211022170841_FilesDbContextPostgreSql")] - partial class FilesDbContextPostgreSql - { - 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.DbTenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Alias") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("alias") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Calls") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("calls") - .HasDefaultValueSql("true"); - - b.Property("CreationDateTime") - .HasColumnType("datetime") - .HasColumnName("creationdatetime"); - - b.Property("Industry") - .HasColumnType("int") - .HasColumnName("industry"); - - b.Property("Language") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("char(10)") - .HasColumnName("language") - .HasDefaultValueSql("'en-US'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("MappedDomain") - .HasColumnType("varchar(100)") - .HasColumnName("mappeddomain") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("owner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PaymentId") - .HasColumnType("varchar(38)") - .HasColumnName("payment_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Spam") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("spam") - .HasDefaultValueSql("true"); - - b.Property("Status") - .HasColumnType("int") - .HasColumnName("status"); - - b.Property("StatusChanged") - .HasColumnType("datetime") - .HasColumnName("statuschanged"); - - b.Property("TimeZone") - .HasColumnType("varchar(50)") - .HasColumnName("timezone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomains") - .HasColumnType("varchar(1024)") - .HasColumnName("trusteddomains") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomainsEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("trusteddomainsenabled") - .HasDefaultValueSql("'1'"); - - b.Property("Version") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("version") - .HasDefaultValueSql("'2'"); - - b.Property("Version_Changed") - .HasColumnType("datetime") - .HasColumnName("version_changed"); - - b.HasKey("Id"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("MappedDomain") - .HasDatabaseName("mappeddomain"); - - b.HasIndex("Version") - .HasDatabaseName("version"); - - b.ToTable("tenants_tenants"); - - b.HasData( - new - { - Id = 1, - Alias = "localhost", - Calls = false, - CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - Name = "Web Office", - OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - Spam = false, - Status = 0, - TrustedDomainsEnabled = 0, - Version = 0 - }); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFile", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Id") - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Version") - .HasColumnType("int") - .HasColumnName("version"); - - b.Property("Category") - .HasColumnType("int") - .HasColumnName("category"); - - b.Property("Changes") - .HasColumnType("mediumtext") - .HasColumnName("changes") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Comment") - .HasColumnType("varchar(255)") - .HasColumnName("comment") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ContentLength") - .HasColumnType("bigint") - .HasColumnName("content_length"); - - b.Property("ConvertedType") - .HasColumnType("varchar(10)") - .HasColumnName("converted_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("CurrentVersion") - .HasColumnType("tinyint(1)") - .HasColumnName("current_version"); - - b.Property("Encrypted") - .HasColumnType("tinyint(1)") - .HasColumnName("encrypted"); - - b.Property("FileStatus") - .HasColumnType("int") - .HasColumnName("file_status"); - - b.Property("FolderId") - .HasColumnType("int") - .HasColumnName("folder_id"); - - b.Property("Forcesave") - .HasColumnType("int") - .HasColumnName("forcesave"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .HasColumnType("datetime") - .HasColumnName("modified_on"); - - b.Property("Thumb") - .HasColumnType("int") - .HasColumnName("thumb"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("VersionGroup") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("version_group") - .HasDefaultValueSql("'1'"); - - b.HasKey("TenantId", "Id", "Version") - .HasName("PRIMARY"); - - b.HasIndex("FolderId") - .HasDatabaseName("folder_id"); - - b.HasIndex("Id") - .HasDatabaseName("id"); - - b.HasIndex("ModifiedOn") - .HasDatabaseName("modified_on"); - - b.ToTable("files_file"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesBunchObjects", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("RightNode") - .HasColumnType("varchar(255)") - .HasColumnName("right_node") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LeftNode") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("left_node") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "RightNode") - .HasName("PRIMARY"); - - b.HasIndex("LeftNode") - .HasDatabaseName("left_node"); - - b.ToTable("files_bunch_objects"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("EntryId") - .HasColumnType("varchar(50)") - .HasColumnName("entry_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("EntryType") - .HasColumnType("int") - .HasColumnName("entry_type"); - - b.Property("Subject") - .HasColumnType("char(38)") - .HasColumnName("subject") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Owner") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("owner") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Security") - .HasColumnType("int") - .HasColumnName("security"); - - b.Property("TimeStamp") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.HasKey("TenantId", "EntryId", "EntryType", "Subject") - .HasName("PRIMARY"); - - b.HasIndex("Owner") - .HasDatabaseName("owner"); - - b.HasIndex("TenantId", "EntryType", "EntryId", "Owner") - .HasDatabaseName("tenant_id"); - - b.ToTable("files_security"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Flag") - .HasColumnType("int") - .HasColumnName("flag"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Owner") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("owner") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Owner", "Name", "Flag") - .HasDatabaseName("name"); - - b.ToTable("files_tag"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTagLink", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("TagId") - .HasColumnType("int") - .HasColumnName("tag_id"); - - b.Property("EntryId") - .HasColumnType("varchar(32)") - .HasColumnName("entry_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("EntryType") - .HasColumnType("int") - .HasColumnName("entry_type"); - - b.Property("CreateBy") - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("TagCount") - .HasColumnType("int") - .HasColumnName("tag_count"); - - b.HasKey("TenantId", "TagId", "EntryId", "EntryType") - .HasName("PRIMARY"); - - b.HasIndex("CreateOn") - .HasDatabaseName("create_on"); - - b.HasIndex("TenantId", "EntryId", "EntryType") - .HasDatabaseName("entry_id"); - - b.ToTable("files_tag_link"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("FolderType") - .HasColumnType("int") - .HasColumnName("folder_type"); - - b.Property("Password") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Provider") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(50)") - .HasColumnName("provider") - .HasDefaultValueSql("'0'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("customer_title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Url") - .HasColumnType("text") - .HasColumnName("url") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("user_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.ToTable("files_thirdparty_account"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyApp", b => - { - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("App") - .HasColumnType("varchar(50)") - .HasColumnName("app") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("modified_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("UserId", "App") - .HasName("PRIMARY"); - - b.ToTable("files_thirdparty_app"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyIdMapping", b => - { - b.Property("HashId") - .HasColumnType("char(32)") - .HasColumnName("hash_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Id") - .IsRequired() - .HasColumnType("text") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.HasKey("HashId") - .HasName("PRIMARY"); - - b.HasIndex("TenantId", "HashId") - .HasDatabaseName("index_1"); - - b.ToTable("files_thirdparty_id_mapping"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFolder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreateBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("FilesCount") - .HasColumnType("int") - .HasColumnName("filesCount"); - - b.Property("FolderType") - .HasColumnType("int") - .HasColumnName("folder_type"); - - b.Property("FoldersCount") - .HasColumnType("int") - .HasColumnName("foldersCount"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .HasColumnType("datetime") - .HasColumnName("modified_on"); - - b.Property("ParentId") - .HasColumnType("int") - .HasColumnName("parent_id"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.HasIndex("ModifiedOn") - .HasDatabaseName("modified_on"); - - b.HasIndex("TenantId", "ParentId") - .HasDatabaseName("parent_id"); - - b.ToTable("files_folder"); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFolderTree", b => - { - b.Property("ParentId") - .HasColumnType("int") - .HasColumnName("parent_id"); - - b.Property("FolderId") - .HasColumnType("int") - .HasColumnName("folder_id"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.HasKey("ParentId", "FolderId") - .HasName("PRIMARY"); - - b.HasIndex("FolderId") - .HasDatabaseName("folder_id"); - - b.ToTable("files_folder_tree"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/products/ASC.Files/Core/Migrations/PostgreSql/FilesDbContextPostgreSql/20211022170841_FilesDbContextPostgreSql.cs b/products/ASC.Files/Core/Migrations/PostgreSql/FilesDbContextPostgreSql/20211022170841_FilesDbContextPostgreSql.cs deleted file mode 100644 index 51f1596666..0000000000 --- a/products/ASC.Files/Core/Migrations/PostgreSql/FilesDbContextPostgreSql/20211022170841_FilesDbContextPostgreSql.cs +++ /dev/null @@ -1,419 +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.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql; - -public partial class FilesDbContextPostgreSql : Migration -{ - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_bunch_objects", - columns: table => new - { - tenant_id = table.Column(type: "int", nullable: false), - right_node = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - left_node = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.right_node }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_file", - columns: table => new - { - id = table.Column(type: "int", nullable: false), - version = table.Column(type: "int", nullable: false), - tenant_id = table.Column(type: "int", nullable: false), - version_group = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), - current_version = table.Column(type: "tinyint(1)", nullable: false), - folder_id = table.Column(type: "int", nullable: false), - title = table.Column(type: "varchar(400)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - content_length = table.Column(type: "bigint", nullable: false), - file_status = table.Column(type: "int", nullable: false), - category = table.Column(type: "int", nullable: false), - create_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - create_on = table.Column(type: "datetime", nullable: false), - modified_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - modified_on = table.Column(type: "datetime", nullable: false), - converted_type = table.Column(type: "varchar(10)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - comment = table.Column(type: "varchar(255)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - changes = table.Column(type: "mediumtext", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - encrypted = table.Column(type: "tinyint(1)", nullable: false), - forcesave = table.Column(type: "int", nullable: false), - thumb = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.id, x.version }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_folder", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - parent_id = table.Column(type: "int", nullable: false), - title = table.Column(type: "varchar(400)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - folder_type = table.Column(type: "int", nullable: false), - create_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - create_on = table.Column(type: "datetime", nullable: false), - modified_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - modified_on = table.Column(type: "datetime", nullable: false), - tenant_id = table.Column(type: "int", nullable: false), - foldersCount = table.Column(type: "int", nullable: false), - filesCount = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_files_folder", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_folder_tree", - columns: table => new - { - folder_id = table.Column(type: "int", nullable: false), - parent_id = table.Column(type: "int", nullable: false), - level = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.parent_id, x.folder_id }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_security", - columns: table => new - { - tenant_id = table.Column(type: "int", nullable: false), - entry_id = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - entry_type = table.Column(type: "int", nullable: false), - subject = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - owner = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - security = table.Column(type: "int", nullable: false), - timestamp = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.entry_id, x.entry_type, x.subject }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_tag", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - tenant_id = table.Column(type: "int", nullable: false), - name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - owner = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - flag = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_files_tag", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_tag_link", - columns: table => new - { - tenant_id = table.Column(type: "int", nullable: false), - tag_id = table.Column(type: "int", nullable: false), - entry_type = table.Column(type: "int", nullable: false), - entry_id = table.Column(type: "varchar(32)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - create_by = table.Column(type: "char(38)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - create_on = table.Column(type: "datetime", nullable: true), - tag_count = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.tenant_id, x.tag_id, x.entry_id, x.entry_type }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_thirdparty_account", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - provider = table.Column(type: "varchar(50)", nullable: false, defaultValueSql: "'0'", collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - customer_title = table.Column(type: "varchar(400)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - user_name = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - password = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - token = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - folder_type = table.Column(type: "int", nullable: false), - create_on = table.Column(type: "datetime", nullable: false), - url = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant_id = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_files_thirdparty_account", x => x.id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_thirdparty_app", - columns: table => new - { - user_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - app = table.Column(type: "varchar(50)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - token = table.Column(type: "text", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant_id = table.Column(type: "int", nullable: false), - modified_on = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => new { x.user_id, x.app }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "files_thirdparty_id_mapping", - columns: table => new - { - hash_id = table.Column(type: "char(32)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - tenant_id = table.Column(type: "int", nullable: false), - id = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8") - }, - constraints: table => - { - table.PrimaryKey("PRIMARY", x => x.hash_id); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "tenants_tenants", - columns: table => new - { - id = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - alias = table.Column(type: "varchar(100)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - mappeddomain = table.Column(type: "varchar(100)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - version = table.Column(type: "int", nullable: false, defaultValueSql: "'2'"), - version_changed = table.Column(type: "datetime", nullable: true), - language = table.Column(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - timezone = table.Column(type: "varchar(50)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - trusteddomains = table.Column(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - trusteddomainsenabled = table.Column(type: "int", nullable: false, defaultValueSql: "'1'"), - status = table.Column(type: "int", nullable: false), - statuschanged = table.Column(type: "datetime", nullable: true), - creationdatetime = table.Column(type: "datetime", nullable: false), - owner_id = table.Column(type: "varchar(38)", nullable: false, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - payment_id = table.Column(type: "varchar(38)", nullable: true, collation: "utf8_general_ci") - .Annotation("MySql:CharSet", "utf8"), - industry = table.Column(type: "int", nullable: true), - last_modified = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - spam = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "true"), - calls = table.Column(type: "tinyint(1)", nullable: false, defaultValueSql: "true") - }, - constraints: table => - { - table.PrimaryKey("PK_tenants_tenants", x => x.id); - }) - .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.CreateIndex( - name: "left_node", - table: "files_bunch_objects", - column: "left_node"); - - migrationBuilder.CreateIndex( - name: "folder_id", - table: "files_file", - column: "folder_id"); - - migrationBuilder.CreateIndex( - name: "id", - table: "files_file", - column: "id"); - - migrationBuilder.CreateIndex( - name: "modified_on", - table: "files_file", - column: "modified_on"); - - migrationBuilder.CreateIndex( - name: "modified_on", - table: "files_folder", - column: "modified_on"); - - migrationBuilder.CreateIndex( - name: "parent_id", - table: "files_folder", - columns: new[] { "tenant_id", "parent_id" }); - - migrationBuilder.CreateIndex( - name: "folder_id", - table: "files_folder_tree", - column: "folder_id"); - - migrationBuilder.CreateIndex( - name: "owner", - table: "files_security", - column: "owner"); - - migrationBuilder.CreateIndex( - name: "tenant_id", - table: "files_security", - columns: new[] { "tenant_id", "entry_type", "entry_id", "owner" }); - - migrationBuilder.CreateIndex( - name: "name", - table: "files_tag", - columns: new[] { "tenant_id", "owner", "name", "flag" }); - - migrationBuilder.CreateIndex( - name: "create_on", - table: "files_tag_link", - column: "create_on"); - - migrationBuilder.CreateIndex( - name: "entry_id", - table: "files_tag_link", - columns: new[] { "tenant_id", "entry_id", "entry_type" }); - - migrationBuilder.CreateIndex( - name: "index_1", - table: "files_thirdparty_id_mapping", - columns: new[] { "tenant_id", "hash_id" }); - - migrationBuilder.CreateIndex( - name: "tenant_id", - table: "files_thirdparty_account", - column: "tenant_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"); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "files_bunch_objects"); - - migrationBuilder.DropTable( - name: "files_file"); - - migrationBuilder.DropTable( - name: "files_folder"); - - migrationBuilder.DropTable( - name: "files_folder_tree"); - - migrationBuilder.DropTable( - name: "files_security"); - - migrationBuilder.DropTable( - name: "files_tag"); - - migrationBuilder.DropTable( - name: "files_tag_link"); - - migrationBuilder.DropTable( - name: "files_thirdparty_account"); - - migrationBuilder.DropTable( - name: "files_thirdparty_app"); - - migrationBuilder.DropTable( - name: "files_thirdparty_id_mapping"); - - migrationBuilder.DropTable( - name: "tenants_tenants"); - } -} diff --git a/products/ASC.Files/Core/Migrations/PostgreSql/FilesDbContextPostgreSql/PostgreSqlFilesDbContextModelSnapshot.cs b/products/ASC.Files/Core/Migrations/PostgreSql/FilesDbContextPostgreSql/PostgreSqlFilesDbContextModelSnapshot.cs deleted file mode 100644 index 0d7be6e321..0000000000 --- a/products/ASC.Files/Core/Migrations/PostgreSql/FilesDbContextPostgreSql/PostgreSqlFilesDbContextModelSnapshot.cs +++ /dev/null @@ -1,821 +0,0 @@ -// -using System; -using ASC.Files.Core.EF; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace ASC.Files.Core.Migrations.PostgreSql.FilesDbContextPostgreSql -{ - [DbContext(typeof(PostgreSqlFilesDbContext))] - partial class PostgreSqlFilesDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "6.0.4") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b => - { - b.Property("Tenant") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("tenant"); - - b.Property("ActiveUsers") - .HasColumnType("int") - .HasColumnName("active_users"); - - b.Property("AvangateId") - .HasColumnType("varchar(128)") - .HasColumnName("avangate_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Description") - .HasColumnType("varchar(128)") - .HasColumnName("description") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Features") - .HasColumnType("text") - .HasColumnName("features") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("MaxFileSize") - .HasColumnType("bigint") - .HasColumnName("max_file_size"); - - b.Property("MaxTotalSize") - .HasColumnType("bigint") - .HasColumnName("max_total_size"); - - b.Property("Name") - .HasColumnType("varchar(128)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Price") - .HasColumnType("decimal(10,2)") - .HasColumnName("price"); - - b.Property("Visible") - .HasColumnType("tinyint(1)") - .HasColumnName("visible"); - - b.HasKey("Tenant") - .HasName("PRIMARY"); - - b.ToTable("tenants_quota", (string)null); - - b.HasData( - new - { - Tenant = -1, - ActiveUsers = 10000, - AvangateId = "0", - Features = "domain,audit,controlpanel,healthcheck,ldap,sso,whitelabel,branding,ssbranding,update,support,portals:10000,discencryption,privacyroom,restore", - MaxFileSize = 102400L, - MaxTotalSize = 10995116277760L, - Name = "default", - Price = 0.00m, - Visible = false - }); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.DbTariff", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Comment") - .HasColumnType("varchar(255)") - .HasColumnName("comment") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("create_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("Quantity") - .HasColumnType("int") - .HasColumnName("quantity"); - - b.Property("Stamp") - .HasColumnType("datetime") - .HasColumnName("stamp"); - - b.Property("Tariff") - .HasColumnType("int") - .HasColumnName("tariff"); - - b.Property("Tenant") - .HasColumnType("int") - .HasColumnName("tenant"); - - b.HasKey("Id"); - - b.HasIndex("Tenant") - .HasDatabaseName("tenant"); - - b.ToTable("tenants_tariff", (string)null); - }); - - modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Alias") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("alias") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Calls") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("calls") - .HasDefaultValueSql("true"); - - b.Property("CreationDateTime") - .HasColumnType("datetime") - .HasColumnName("creationdatetime"); - - b.Property("Industry") - .HasColumnType("int") - .HasColumnName("industry"); - - b.Property("Language") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("char(10)") - .HasColumnName("language") - .HasDefaultValueSql("'en-US'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LastModified") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasColumnName("last_modified") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("MappedDomain") - .HasColumnType("varchar(100)") - .HasColumnName("mappeddomain") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("OwnerId") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("owner_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("PaymentId") - .HasColumnType("varchar(38)") - .HasColumnName("payment_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Spam") - .ValueGeneratedOnAdd() - .HasColumnType("tinyint(1)") - .HasColumnName("spam") - .HasDefaultValueSql("true"); - - b.Property("Status") - .HasColumnType("int") - .HasColumnName("status"); - - b.Property("StatusChanged") - .HasColumnType("datetime") - .HasColumnName("statuschanged"); - - b.Property("TimeZone") - .HasColumnType("varchar(50)") - .HasColumnName("timezone") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TrustedDomainsEnabled") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("trusteddomainsenabled") - .HasDefaultValueSql("'1'"); - - b.Property("TrustedDomainsRaw") - .HasColumnType("varchar(1024)") - .HasColumnName("trusteddomains") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Version") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("version") - .HasDefaultValueSql("'2'"); - - b.Property("Version_Changed") - .HasColumnType("datetime") - .HasColumnName("version_changed"); - - b.HasKey("Id"); - - b.HasIndex("LastModified") - .HasDatabaseName("last_modified"); - - b.HasIndex("MappedDomain") - .HasDatabaseName("mappeddomain"); - - b.HasIndex("Version") - .HasDatabaseName("version"); - - b.ToTable("tenants_tenants", (string)null); - - b.HasData( - new - { - Id = 1, - Alias = "localhost", - Calls = false, - CreationDateTime = new DateTime(2021, 3, 9, 17, 46, 59, 97, DateTimeKind.Utc).AddTicks(4317), - LastModified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), - Name = "Web Office", - OwnerId = "66faa6e4-f133-11ea-b126-00ffeec8b4ef", - Spam = false, - Status = 0, - TrustedDomainsEnabled = 0, - Version = 0 - }); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFile", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Id") - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Version") - .HasColumnType("int") - .HasColumnName("version"); - - b.Property("Category") - .HasColumnType("int") - .HasColumnName("category"); - - b.Property("Changes") - .HasColumnType("mediumtext") - .HasColumnName("changes") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Comment") - .HasColumnType("varchar(255)") - .HasColumnName("comment") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ContentLength") - .HasColumnType("bigint") - .HasColumnName("content_length"); - - b.Property("ConvertedType") - .HasColumnType("varchar(10)") - .HasColumnName("converted_type") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("CurrentVersion") - .HasColumnType("tinyint(1)") - .HasColumnName("current_version"); - - b.Property("Encrypted") - .HasColumnType("tinyint(1)") - .HasColumnName("encrypted"); - - b.Property("FileStatus") - .HasColumnType("int") - .HasColumnName("file_status"); - - b.Property("Forcesave") - .HasColumnType("int") - .HasColumnName("forcesave"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .HasColumnType("datetime") - .HasColumnName("modified_on"); - - b.Property("ParentId") - .HasColumnType("int") - .HasColumnName("folder_id"); - - b.Property("ThumbnailStatus") - .HasColumnType("int") - .HasColumnName("thumb"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("VersionGroup") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("version_group") - .HasDefaultValueSql("'1'"); - - b.HasKey("TenantId", "Id", "Version") - .HasName("PRIMARY"); - - b.HasIndex("Id") - .HasDatabaseName("id"); - - b.HasIndex("ModifiedOn") - .HasDatabaseName("modified_on"); - - b.HasIndex("ParentId") - .HasDatabaseName("folder_id"); - - b.ToTable("files_file", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesBunchObjects", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("RightNode") - .HasColumnType("varchar(255)") - .HasColumnName("right_node") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LeftNode") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("left_node") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "RightNode") - .HasName("PRIMARY"); - - b.HasIndex("LeftNode") - .HasDatabaseName("left_node"); - - b.ToTable("files_bunch_objects", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesLink", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("SourceId") - .HasColumnType("varchar(32)") - .HasColumnName("source_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LinkedId") - .HasColumnType("varchar(32)") - .HasColumnName("linked_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("LinkedFor") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("linked_for") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("TenantId", "SourceId", "LinkedId") - .HasName("PRIMARY"); - - b.HasIndex("TenantId", "SourceId", "LinkedId", "LinkedFor") - .HasDatabaseName("linked_for"); - - b.ToTable("files_link", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesSecurity", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("EntryId") - .HasColumnType("varchar(50)") - .HasColumnName("entry_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("EntryType") - .HasColumnType("int") - .HasColumnName("entry_type"); - - b.Property("Subject") - .HasColumnType("char(38)") - .HasColumnName("subject") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Owner") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("owner") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Share") - .HasColumnType("int") - .HasColumnName("security"); - - b.Property("TimeStamp") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.HasKey("TenantId", "EntryId", "EntryType", "Subject") - .HasName("PRIMARY"); - - b.HasIndex("Owner") - .HasDatabaseName("owner"); - - b.HasIndex("TenantId", "EntryType", "EntryId", "Owner") - .HasDatabaseName("tenant_id"); - - b.ToTable("files_security", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTag", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("Name") - .IsRequired() - .HasColumnType("varchar(255)") - .HasColumnName("name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Owner") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("owner") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Type") - .HasColumnType("int") - .HasColumnName("flag"); - - b.HasKey("Id"); - - b.HasIndex("TenantId", "Owner", "Name", "Type") - .HasDatabaseName("name"); - - b.ToTable("files_tag", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesTagLink", b => - { - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("TagId") - .HasColumnType("int") - .HasColumnName("tag_id"); - - b.Property("EntryId") - .HasColumnType("varchar(32)") - .HasColumnName("entry_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("EntryType") - .HasColumnType("int") - .HasColumnName("entry_type"); - - b.Property("Count") - .HasColumnType("int") - .HasColumnName("tag_count"); - - b.Property("CreateBy") - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.HasKey("TenantId", "TagId", "EntryId", "EntryType") - .HasName("PRIMARY"); - - b.HasIndex("CreateOn") - .HasDatabaseName("create_on"); - - b.HasIndex("TenantId", "EntryId", "EntryType") - .HasDatabaseName("entry_id"); - - b.ToTable("files_tag_link", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("FolderId") - .HasColumnType("text") - .HasColumnName("folder_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("FolderType") - .HasColumnType("folder_type"); - - b.Property("Password") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("password") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Provider") - .IsRequired() - .ValueGeneratedOnAdd() - .HasColumnType("varchar(50)") - .HasColumnName("provider") - .HasDefaultValueSql("'0'") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("customer_title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Url") - .HasColumnType("text") - .HasColumnName("url") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("UserName") - .IsRequired() - .HasColumnType("varchar(100)") - .HasColumnName("user_name") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.ToTable("files_thirdparty_account", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyApp", b => - { - b.Property("UserId") - .HasColumnType("varchar(38)") - .HasColumnName("user_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("App") - .HasColumnType("varchar(50)") - .HasColumnName("app") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasColumnName("modified_on") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Token") - .HasColumnType("text") - .HasColumnName("token") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("UserId", "App") - .HasName("PRIMARY"); - - b.ToTable("files_thirdparty_app", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFilesThirdpartyIdMapping", b => - { - b.Property("HashId") - .HasColumnType("char(32)") - .HasColumnName("hash_id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("Id") - .IsRequired() - .HasColumnType("text") - .HasColumnName("id") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.HasKey("HashId") - .HasName("PRIMARY"); - - b.HasIndex("TenantId", "HashId") - .HasDatabaseName("index_1"); - - b.ToTable("files_thirdparty_id_mapping", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFolder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasColumnName("id"); - - b.Property("CreateBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("create_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("CreateOn") - .HasColumnType("datetime") - .HasColumnName("create_on"); - - b.Property("FilesCount") - .HasColumnType("int") - .HasColumnName("filesCount"); - - b.Property("FolderType") - .HasColumnType("int") - .HasColumnName("folder_type"); - - b.Property("FoldersCount") - .HasColumnType("int") - .HasColumnName("foldersCount"); - - b.Property("ModifiedBy") - .IsRequired() - .HasColumnType("char(38)") - .HasColumnName("modified_by") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.Property("ModifiedOn") - .HasColumnType("datetime") - .HasColumnName("modified_on"); - - b.Property("ParentId") - .HasColumnType("int") - .HasColumnName("parent_id"); - - b.Property("TenantId") - .HasColumnType("int") - .HasColumnName("tenant_id"); - - b.Property("Title") - .IsRequired() - .HasColumnType("varchar(400)") - .HasColumnName("title") - .UseCollation("utf8_general_ci") - .HasAnnotation("MySql:CharSet", "utf8"); - - b.HasKey("Id"); - - b.HasIndex("ModifiedOn") - .HasDatabaseName("modified_on"); - - b.HasIndex("TenantId", "ParentId") - .HasDatabaseName("parent_id"); - - b.ToTable("files_folder", (string)null); - }); - - modelBuilder.Entity("ASC.Files.Core.EF.DbFolderTree", b => - { - b.Property("ParentId") - .HasColumnType("int") - .HasColumnName("parent_id"); - - b.Property("FolderId") - .HasColumnType("int") - .HasColumnName("folder_id"); - - b.Property("Level") - .HasColumnType("int") - .HasColumnName("level"); - - b.HasKey("ParentId", "FolderId") - .HasName("PRIMARY"); - - b.HasIndex("FolderId") - .HasDatabaseName("folder_id"); - - b.ToTable("files_folder_tree", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/products/ASC.Files/Core/Services/DocumentService/Configuration.cs b/products/ASC.Files/Core/Services/DocumentService/Configuration.cs index 9b0d44037e..a9e7f813fa 100644 --- a/products/ASC.Files/Core/Services/DocumentService/Configuration.cs +++ b/products/ASC.Files/Core/Services/DocumentService/Configuration.cs @@ -35,6 +35,33 @@ public enum EditorType External, } +public class ActionLinkConfig +{ + public ActionConfig Action { get; set; } + + public static string Serialize(ActionLinkConfig actionLinkConfig) + { + return JsonSerializer.Serialize(actionLinkConfig); + } + + public class ActionConfig + { + public string Data { get; set; } + public string Type { get; set; } + } +} + +public class CoEditingConfig +{ + public bool Change { get; set; } + public bool Fast { get; set; } + + public string Mode + { + get { return Fast ? "fast" : "strict"; } + } +} + public class Configuration { internal static readonly Dictionary DocType = new Dictionary @@ -46,23 +73,8 @@ public class Configuration private FileType _fileTypeCache = FileType.Unknown; - public Configuration( - File file, - IServiceProvider serviceProvider) - { - Document = serviceProvider.GetService>(); - Document.Info.SetFile(file); - EditorConfig = serviceProvider.GetService>(); - EditorConfig.SetConfiguration(this); - } - - public EditorType EditorType - { - set => Document.Info.Type = value; - get => Document.Info.Type; - } - public DocumentConfig Document { get; set; } + public string DocumentType { get @@ -72,14 +84,28 @@ public class Configuration return documentType; } } + public EditorConfiguration EditorConfig { get; set; } + + public EditorType EditorType + { + set => Document.Info.Type = value; + get => Document.Info.Type; + } + + public string EditorUrl { get; } + + [JsonPropertyName("Error")] + public string ErrorMessage { get; set; } + public string Token { get; set; } + public string Type { set => EditorType = (EditorType)Enum.Parse(typeof(EditorType), value, true); get => EditorType.ToString().ToLower(); } - + internal FileType GetFileType { get @@ -92,10 +118,17 @@ public class Configuration return _fileTypeCache; } } - - [JsonPropertyName("Error")] - public string ErrorMessage { get; set; } - + + public Configuration( + File file, + IServiceProvider serviceProvider) + { + Document = serviceProvider.GetService>(); + Document.Info.SetFile(file); + EditorConfig = serviceProvider.GetService>(); + EditorConfig.SetConfiguration(this); + } + public static string Serialize(Configuration configuration) { return JsonSerializer.Serialize(configuration); @@ -107,37 +140,29 @@ public class Configuration [Transient] public class DocumentConfig { - public string SharedLinkKey { get; set; } - - public DocumentConfig(DocumentServiceConnector documentServiceConnector, PathProvider pathProvider, InfoConfig infoConfig) - { - Info = infoConfig; - Permissions = new PermissionsConfig(); - _documentServiceConnector = documentServiceConnector; - _pathProvider = pathProvider; - } - - private string _key = string.Empty; + private readonly DocumentServiceConnector _documentServiceConnector; + private readonly PathProvider _pathProvider; private string _fileUri; + private string _key = string.Empty; private string _title; - - public string FileType => Info.GetFile().ConvertedExtension.Trim('.'); public InfoConfig Info { get; set; } + public string Key { set => _key = value; get => DocumentServiceConnector.GenerateRevisionId(_key); } - + public PermissionsConfig Permissions { get; set; } + public string SharedLinkKey { get; set; } public string Title { set => _title = value; get => _title ?? Info.GetFile().Title; } - + public string Url { set => _fileUri = _documentServiceConnector.ReplaceCommunityAdress(value); @@ -154,38 +179,304 @@ public class DocumentConfig return _fileUri; } } + + public DocumentConfig(DocumentServiceConnector documentServiceConnector, PathProvider pathProvider, InfoConfig infoConfig) + { + Info = infoConfig; + Permissions = new PermissionsConfig(); + _documentServiceConnector = documentServiceConnector; + _pathProvider = pathProvider; + } +} + +[Transient] +public class EditorConfiguration +{ + private readonly AuthContext _authContext; + private readonly BaseCommonLinkUtility _baseCommonLinkUtility; + private readonly IDaoFactory _daoFactory; + private readonly DocumentServiceTrackerHelper _documentServiceTrackerHelper; + private readonly EntryManager _entryManager; + private readonly FilesLinkUtility _filesLinkUtility; + private readonly FilesSettingsHelper _filesSettingsHelper; + private readonly FileUtility _fileUtility; + private readonly UserInfo _userInfo; + private readonly UserManager _userManager; + private Configuration _configuration; + + private EmbeddedConfig _embeddedConfig; + + public ActionLinkConfig ActionLink { get; set; } + + public string ActionLinkString + { + get => null; + set + { + try + { + var options = new JsonSerializerOptions + { + AllowTrailingCommas = true, + PropertyNameCaseInsensitive = true + }; + + JsonSerializer.Deserialize(value, options); + } + catch (Exception) + { + ActionLink = null; + } + } + } + + public string CallbackUrl + { + get + { + return ModeWrite ? _documentServiceTrackerHelper.GetCallbackUrl(_configuration.Document.Info.GetFile().Id.ToString()) : null; + } + } + + public CoEditingConfig CoEditing + { + set { } + get + { + return !ModeWrite && User == null + ? new CoEditingConfig + { + Fast = false, + Change = false + } + : null; + } + } + + public string CreateUrl + { + get + { + if (_configuration.Document.Info.Type != EditorType.Desktop) + { + return null; + } - private readonly DocumentServiceConnector _documentServiceConnector; - private readonly PathProvider _pathProvider; + if (!_authContext.IsAuthenticated || _userManager.GetUsers(_authContext.CurrentAccount.ID).IsVisitor(_userManager)) + { + return null; + } + + return GetCreateUrl(_configuration.GetFileType); + } + } + + public CustomizationConfig Customization { get; set; } + + public EmbeddedConfig Embedded + { + set => _embeddedConfig = value; + get => _configuration.Document.Info.Type == EditorType.Embedded ? _embeddedConfig : null; + } + + public EncryptionKeysConfig EncryptionKeys { get; set; } + + public string FileChoiceUrl { get; set; } + + public string Lang => _userInfo.GetCulture().Name; + + public string Mode => ModeWrite ? "edit" : "view"; + + public bool ModeWrite { get; set; } + + public PluginsConfig Plugins { get; set; } + + public List Recent + { + get + { + if (!_authContext.IsAuthenticated || _userManager.GetUsers(_authContext.CurrentAccount.ID).IsVisitor(_userManager)) + { + return null; + } + + if (!_filesSettingsHelper.RecentSection) + { + return null; + } + + var filter = FilterType.FilesOnly; + switch (_configuration.GetFileType) + { + case FileType.Document: + filter = FilterType.DocumentsOnly; + break; + + case FileType.Spreadsheet: + filter = FilterType.SpreadsheetsOnly; + break; + + case FileType.Presentation: + filter = FilterType.PresentationsOnly; + break; + } + + var folderDao = _daoFactory.GetFolderDao(); + var files = _entryManager.GetRecentAsync(filter, false, Guid.Empty, string.Empty, false).Result.Cast>(); + + var listRecent = from file in files + where !Equals(_configuration.Document.Info.GetFile().Id, file.Id) + select + new RecentConfig + { + Folder = folderDao.GetFolderAsync(file.ParentId).Result.Title, + Title = file.Title, + Url = _baseCommonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.GetFileWebEditorUrl(file.Id)) + }; + + return listRecent.ToList(); + } + } + + public string SaveAsUrl { get; set; } + + public string SharingSettingsUrl { get; set; } + + public List Templates + { + set { } + get + { + if (!_authContext.IsAuthenticated || _userManager.GetUsers(_authContext.CurrentAccount.ID).IsVisitor(_userManager)) + { + return null; + } + + if (!_filesSettingsHelper.TemplatesSection) + { + return null; + } + + var extension = _fileUtility.GetInternalExtension(_configuration.Document.Title).TrimStart('.'); + var filter = FilterType.FilesOnly; + switch (_configuration.GetFileType) + { + case FileType.Document: + filter = FilterType.DocumentsOnly; + break; + + case FileType.Spreadsheet: + filter = FilterType.SpreadsheetsOnly; + break; + + case FileType.Presentation: + filter = FilterType.PresentationsOnly; + break; + } + + var folderDao = _daoFactory.GetFolderDao(); + var fileDao = _daoFactory.GetFileDao(); + var files = _entryManager.GetTemplatesAsync(folderDao, fileDao, filter, false, Guid.Empty, string.Empty, false).Result; + var listTemplates = from file in files + select + new TemplatesConfig + { + Image = _baseCommonLinkUtility.GetFullAbsolutePath("skins/default/images/filetype/thumb/" + extension + ".png"), + Title = file.Title, + Url = _baseCommonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.GetFileWebEditorUrl(file.Id)) + }; + return listTemplates.ToList(); + } + } + + public UserConfig User { get; set; } + + public EditorConfiguration( + UserManager userManager, + AuthContext authContext, + DisplayUserSettingsHelper displayUserSettingsHelper, + FilesLinkUtility filesLinkUtility, + FileUtility fileUtility, + BaseCommonLinkUtility baseCommonLinkUtility, + PluginsConfig pluginsConfig, + EmbeddedConfig embeddedConfig, + CustomizationConfig customizationConfig, + FilesSettingsHelper filesSettingsHelper, + IDaoFactory daoFactory, + EntryManager entryManager, + DocumentServiceTrackerHelper documentServiceTrackerHelper) + { + _userManager = userManager; + _authContext = authContext; + _filesLinkUtility = filesLinkUtility; + _fileUtility = fileUtility; + _baseCommonLinkUtility = baseCommonLinkUtility; + Customization = customizationConfig; + _filesSettingsHelper = filesSettingsHelper; + _daoFactory = daoFactory; + _entryManager = entryManager; + _documentServiceTrackerHelper = documentServiceTrackerHelper; + Plugins = pluginsConfig; + Embedded = embeddedConfig; + _userInfo = userManager.GetUsers(authContext.CurrentAccount.ID); + + if (!_userInfo.Id.Equals(ASC.Core.Configuration.Constants.Guest.ID)) + { + User = new UserConfig + { + Id = _userInfo.Id.ToString(), + Name = _userInfo.DisplayUserName(false, displayUserSettingsHelper), + }; + } + } + + internal void SetConfiguration(Configuration configuration) + { + _configuration = configuration; + Customization.SetConfiguration(_configuration); + } + + private string GetCreateUrl(FileType fileType) + { + string title; + switch (fileType) + { + case FileType.Document: + title = FilesJSResource.TitleNewFileText; + break; + + case FileType.Spreadsheet: + title = FilesJSResource.TitleNewFileSpreadsheet; + break; + + case FileType.Presentation: + title = FilesJSResource.TitleNewFilePresentation; + break; + + default: + return null; + } + + Configuration.DocType.TryGetValue(fileType, out var documentType); + + return _baseCommonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.FileHandlerPath) + + "?" + FilesLinkUtility.Action + "=create" + + "&doctype=" + documentType + + "&" + FilesLinkUtility.FileTitle + "=" + HttpUtility.UrlEncode(title); + } } [Transient] public class InfoConfig { - private File _file; - - public File GetFile() - { - return _file; - } - - public void SetFile(File file) - { - _file = file; - } - - public EditorType Type { get; set; } = EditorType.Desktop; + private readonly BreadCrumbsManager _breadCrumbsManager; + private readonly FileSharing _fileSharing; + private readonly SecurityContext _securityContext; + private readonly UserManager _userManager; private string _breadCrumbs; private bool? _favorite; private bool _favoriteIsSet; - - public InfoConfig(BreadCrumbsManager breadCrumbsManager, FileSharing fileSharing, SecurityContext securityContext, UserManager userManager) - { - _breadCrumbsManager = breadCrumbsManager; - _fileSharing = fileSharing; - _securityContext = securityContext; - _userManager = userManager; - } + private File _file; public bool? Favorite { @@ -235,11 +526,9 @@ public class InfoConfig return _breadCrumbs; } } - + public string Owner => _file.CreateByString; - - public string Uploaded => _file.CreateOnString; - + public List SharingSettings { get @@ -261,11 +550,28 @@ public class InfoConfig } } } + + public EditorType Type { get; set; } = EditorType.Desktop; + + public string Uploaded => _file.CreateOnString; + + public InfoConfig(BreadCrumbsManager breadCrumbsManager, FileSharing fileSharing, SecurityContext securityContext, UserManager userManager) + { + _breadCrumbsManager = breadCrumbsManager; + _fileSharing = fileSharing; + _securityContext = securityContext; + _userManager = userManager; + } + + public File GetFile() + { + return _file; + } - private readonly BreadCrumbsManager _breadCrumbsManager; - private readonly FileSharing _fileSharing; - private readonly SecurityContext _securityContext; - private readonly UserManager _userManager; + public void SetFile(File file) + { + _file = file; + } } public class PermissionsConfig @@ -275,450 +581,77 @@ public class PermissionsConfig public bool Download { get; set; } = true; public bool Edit { get; set; } = true; public bool FillForms { get; set; } = true; - public bool Print { get; set; } = true; public bool ModifyFilter { get; set; } = true; + public bool Print { get; set; } = true; public bool Rename { get; set; } public bool Review { get; set; } = true; } +#endregion Nested Classes + [Transient] -public class EditorConfiguration +public class CustomerConfig { - private readonly UserManager _userManager; - private readonly AuthContext _authContext; - private readonly FilesLinkUtility _filesLinkUtility; - private readonly FileUtility _fileUtility; private readonly BaseCommonLinkUtility _baseCommonLinkUtility; - private readonly FilesSettingsHelper _filesSettingsHelper; - private readonly IDaoFactory _daoFactory; - private readonly EntryManager _entryManager; - private readonly DocumentServiceTrackerHelper _documentServiceTrackerHelper; - - public EditorConfiguration( - UserManager userManager, - AuthContext authContext, - DisplayUserSettingsHelper displayUserSettingsHelper, - FilesLinkUtility filesLinkUtility, - FileUtility fileUtility, - BaseCommonLinkUtility baseCommonLinkUtility, - PluginsConfig pluginsConfig, - EmbeddedConfig embeddedConfig, - CustomizationConfig customizationConfig, - FilesSettingsHelper filesSettingsHelper, - IDaoFactory daoFactory, - EntryManager entryManager, - DocumentServiceTrackerHelper documentServiceTrackerHelper) - { - _userManager = userManager; - _authContext = authContext; - _filesLinkUtility = filesLinkUtility; - _fileUtility = fileUtility; - _baseCommonLinkUtility = baseCommonLinkUtility; - Customization = customizationConfig; - _filesSettingsHelper = filesSettingsHelper; - _daoFactory = daoFactory; - _entryManager = entryManager; - _documentServiceTrackerHelper = documentServiceTrackerHelper; - Plugins = pluginsConfig; - Embedded = embeddedConfig; - _userInfo = userManager.GetUsers(authContext.CurrentAccount.ID); - - if (!_userInfo.Id.Equals(ASC.Core.Configuration.Constants.Guest.ID)) - { - User = new UserConfig - { - Id = _userInfo.Id.ToString(), - Name = _userInfo.DisplayUserName(false, displayUserSettingsHelper), - }; - } - } - - public bool ModeWrite { get; set; } - + private readonly SettingsManager _settingsManager; + private readonly TenantWhiteLabelSettingsHelper _tenantWhiteLabelSettingsHelper; private Configuration _configuration; - + + public string Address => _settingsManager.LoadForDefaultTenant().Address; + + public string Logo => _baseCommonLinkUtility.GetFullAbsolutePath(_tenantWhiteLabelSettingsHelper.GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum.Dark, !_configuration.EditorConfig.Customization.IsRetina)); + + public string Mail => _settingsManager.LoadForDefaultTenant().Email; + + public string Name => _settingsManager.LoadForDefaultTenant().CompanyName; + + public string Www => _settingsManager.LoadForDefaultTenant().Site; + + public CustomerConfig( + SettingsManager settingsManager, + BaseCommonLinkUtility baseCommonLinkUtility, + TenantWhiteLabelSettingsHelper tenantWhiteLabelSettingsHelper) + { + _settingsManager = settingsManager; + _baseCommonLinkUtility = baseCommonLinkUtility; + _tenantWhiteLabelSettingsHelper = tenantWhiteLabelSettingsHelper; + } + internal void SetConfiguration(Configuration configuration) { _configuration = configuration; - Customization.SetConfiguration(_configuration); - } - - private readonly UserInfo _userInfo; - private EmbeddedConfig _embeddedConfig; - - public ActionLinkConfig ActionLink { get; set; } - - public CoEditingConfig CoEditing - { - set { } - get - { - return !ModeWrite && User == null - ? new CoEditingConfig - { - Fast = false, - Change = false - } - : null; - } - } - - public string ActionLinkString - { - get => null; - set - { - try - { - var options = new JsonSerializerOptions - { - AllowTrailingCommas = true, - PropertyNameCaseInsensitive = true - }; - - JsonSerializer.Deserialize(value, options); - } - catch (Exception) - { - ActionLink = null; - } - } - } - - - public List Templates - { - set { } - get - { - if (!_authContext.IsAuthenticated || _userManager.GetUsers(_authContext.CurrentAccount.ID).IsVisitor(_userManager)) - { - return null; - } - - if (!_filesSettingsHelper.TemplatesSection) - { - return null; - } - - var extension = _fileUtility.GetInternalExtension(_configuration.Document.Title).TrimStart('.'); - var filter = FilterType.FilesOnly; - switch (_configuration.GetFileType) - { - case FileType.Document: - filter = FilterType.DocumentsOnly; - break; - case FileType.Spreadsheet: - filter = FilterType.SpreadsheetsOnly; - break; - case FileType.Presentation: - filter = FilterType.PresentationsOnly; - break; - } - - var folderDao = _daoFactory.GetFolderDao(); - var fileDao = _daoFactory.GetFileDao(); - var files = _entryManager.GetTemplatesAsync(folderDao, fileDao, filter, false, Guid.Empty, string.Empty, false).Result; - var listTemplates = from file in files - select - new TemplatesConfig - { - Image = _baseCommonLinkUtility.GetFullAbsolutePath("skins/default/images/filetype/thumb/" + extension + ".png"), - Title = file.Title, - Url = _baseCommonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.GetFileWebEditorUrl(file.Id)) - }; - return listTemplates.ToList(); - } - } - - public string CallbackUrl - { - get - { - return ModeWrite ? _documentServiceTrackerHelper.GetCallbackUrl(_configuration.Document.Info.GetFile().Id.ToString()) : null; - } - } - - public string CreateUrl - { - get - { - if (_configuration.Document.Info.Type != EditorType.Desktop) - { - return null; - } - - if (!_authContext.IsAuthenticated || _userManager.GetUsers(_authContext.CurrentAccount.ID).IsVisitor(_userManager)) - { - return null; - } - - return GetCreateUrl(_configuration.GetFileType); - } - } - - public PluginsConfig Plugins { get; set; } - - public CustomizationConfig Customization { get; set; } - - public EmbeddedConfig Embedded - { - set => _embeddedConfig = value; - get => _configuration.Document.Info.Type == EditorType.Embedded ? _embeddedConfig : null; - } - - public EncryptionKeysConfig EncryptionKeys { get; set; } - - public string FileChoiceUrl { get; set; } - - public string Lang => _userInfo.GetCulture().Name; - - public string Mode => ModeWrite ? "edit" : "view"; - - public string SaveAsUrl { get; set; } - public List Recent - { - get - { - if (!_authContext.IsAuthenticated || _userManager.GetUsers(_authContext.CurrentAccount.ID).IsVisitor(_userManager)) - { - return null; - } - - if (!_filesSettingsHelper.RecentSection) - { - return null; - } - - var filter = FilterType.FilesOnly; - switch (_configuration.GetFileType) - { - case FileType.Document: - filter = FilterType.DocumentsOnly; - break; - case FileType.Spreadsheet: - filter = FilterType.SpreadsheetsOnly; - break; - case FileType.Presentation: - filter = FilterType.PresentationsOnly; - break; - } - - var folderDao = _daoFactory.GetFolderDao(); - var files = _entryManager.GetRecentAsync(filter, false, Guid.Empty, string.Empty, false).Result.Cast>(); - - var listRecent = from file in files - where !Equals(_configuration.Document.Info.GetFile().Id, file.Id) - select - new RecentConfig - { - Folder = folderDao.GetFolderAsync(file.ParentId).Result.Title, - Title = file.Title, - Url = _baseCommonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.GetFileWebEditorUrl(file.Id)) - }; - - return listRecent.ToList(); - } - } - - public string SharingSettingsUrl { get; set; } - - public UserConfig User { get; set; } - - private string GetCreateUrl(FileType fileType) - { - string title; - switch (fileType) - { - case FileType.Document: - title = FilesJSResource.TitleNewFileText; - break; - case FileType.Spreadsheet: - title = FilesJSResource.TitleNewFileSpreadsheet; - break; - case FileType.Presentation: - title = FilesJSResource.TitleNewFilePresentation; - break; - default: - return null; - } - - Configuration.DocType.TryGetValue(fileType, out var documentType); - - return _baseCommonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.FileHandlerPath) - + "?" + FilesLinkUtility.Action + "=create" - + "&doctype=" + documentType - + "&" + FilesLinkUtility.FileTitle + "=" + HttpUtility.UrlEncode(title); - } -} - -#endregion - -public class ActionLinkConfig -{ - public ActionConfig Action { get; set; } - - public class ActionConfig - { - public string Type { get; set; } - public string Data { get; set; } - } - - public static string Serialize(ActionLinkConfig actionLinkConfig) - { - return JsonSerializer.Serialize(actionLinkConfig); - } -} -public class CoEditingConfig -{ - public bool Fast { get; set; } - - public string Mode - { - get { return Fast ? "fast" : "strict"; } - } - - public bool Change { get; set; } -} - -[Transient] -public class EmbeddedConfig -{ - public string ShareLinkParam { get; set; } - - public string EmbedUrl => _baseCommonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.FilesBaseAbsolutePath - + FilesLinkUtility.EditorPage + "?" + FilesLinkUtility.Action + "=embedded" + ShareLinkParam); - - public string SaveUrl => _baseCommonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.FileHandlerPath + "?" - + FilesLinkUtility.Action + "=download" + ShareLinkParam); - - public string ShareUrl => _baseCommonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.FilesBaseAbsolutePath - + FilesLinkUtility.EditorPage + "?" + FilesLinkUtility.Action + "=view" + ShareLinkParam); - - private readonly BaseCommonLinkUtility _baseCommonLinkUtility; - private readonly FilesLinkUtility _filesLinkUtility; - - public string ToolbarDocked => "top"; - - public EmbeddedConfig(BaseCommonLinkUtility baseCommonLinkUtility, FilesLinkUtility filesLinkUtility) - { - _baseCommonLinkUtility = baseCommonLinkUtility; - _filesLinkUtility = filesLinkUtility; - } -} - -public class EncryptionKeysConfig -{ - public string CryptoEngineId => "{FFF0E1EB-13DB-4678-B67D-FF0A41DBBCEF}"; - public string PrivateKeyEnc { get; set; } - public string PublicKey { get; set; } -} - -[Transient] -public class PluginsConfig -{ - public string[] PluginsData - { - get - { - var plugins = new List(); - - if (_coreBaseSettings.Standalone || !_tenantExtra.GetTenantQuota().Free) - { - var easyBibHelper = _consumerFactory.Get(); - if (!string.IsNullOrEmpty(easyBibHelper.AppKey)) - { - plugins.Add(_baseCommonLinkUtility.GetFullAbsolutePath("ThirdParty/plugin/easybib/config.json")); - } - - var wordpressLoginProvider = _consumerFactory.Get(); - if (!string.IsNullOrEmpty(wordpressLoginProvider.ClientID) && - !string.IsNullOrEmpty(wordpressLoginProvider.ClientSecret) && - !string.IsNullOrEmpty(wordpressLoginProvider.RedirectUri)) - { - plugins.Add(_baseCommonLinkUtility.GetFullAbsolutePath("ThirdParty/plugin/wordpress/config.json")); - } - } - - return plugins.ToArray(); - } - } - - private readonly ConsumerFactory _consumerFactory; - private readonly BaseCommonLinkUtility _baseCommonLinkUtility; - private readonly CoreBaseSettings _coreBaseSettings; - private readonly TenantExtra _tenantExtra; - - public PluginsConfig( - ConsumerFactory consumerFactory, - BaseCommonLinkUtility baseCommonLinkUtility, - CoreBaseSettings coreBaseSettings, - TenantExtra tenantExtra) - { - _consumerFactory = consumerFactory; - _baseCommonLinkUtility = baseCommonLinkUtility; - _coreBaseSettings = coreBaseSettings; - _tenantExtra = tenantExtra; } } [Transient] public class CustomizationConfig { - public CustomizationConfig( - CoreBaseSettings coreBaseSettings, - SettingsManager settingsManager, - FileUtility fileUtility, - FilesSettingsHelper filesSettingsHelper, - AuthContext authContext, - FileSecurity fileSecurity, - IDaoFactory daoFactory, - GlobalFolderHelper globalFolderHelper, - PathProvider pathProvider, - CustomerConfig customerConfig, - LogoConfig logoConfig, - FileSharing fileSharing, - CommonLinkUtility commonLinkUtility, - ThirdPartySelector thirdPartySelector) - { - _coreBaseSettings = coreBaseSettings; - _settingsManager = settingsManager; - _fileUtility = fileUtility; - _filesSettingsHelper = filesSettingsHelper; - _authContext = authContext; - _fileSecurity = fileSecurity; - _daoFactory = daoFactory; - _globalFolderHelper = globalFolderHelper; - _pathProvider = pathProvider; - Customer = customerConfig; - Logo = logoConfig; - FileSharing = fileSharing; - _thirdPartySelector = thirdPartySelector; - _commonLinkUtility = commonLinkUtility; - } - - private Configuration _configuration; - private readonly ThirdPartySelector _thirdPartySelector; - - internal void SetConfiguration(Configuration configuration) - { - _configuration = configuration; - - if (_coreBaseSettings.Standalone) - { - Customer.SetConfiguration(_configuration); - } - else - { - Customer = null; - } - - Logo.SetConfiguration(_configuration); - } - [JsonIgnore] public string GobackUrl; - public bool IsRetina { get; set; } + + private readonly AuthContext _authContext; + + private readonly CommonLinkUtility _commonLinkUtility; + + private readonly CoreBaseSettings _coreBaseSettings; + + private readonly IDaoFactory _daoFactory; + + private readonly FileSecurity _fileSecurity; + + private readonly FilesSettingsHelper _filesSettingsHelper; + + private readonly FileUtility _fileUtility; + + private readonly GlobalFolderHelper _globalFolderHelper; + + private readonly PathProvider _pathProvider; + + private readonly SettingsManager _settingsManager; + + private readonly ThirdPartySelector _thirdPartySelector; + + private Configuration _configuration; public bool About => !_coreBaseSettings.Standalone && !_coreBaseSettings.CustomMode; @@ -817,8 +750,9 @@ public class CustomizationConfig } } + public bool IsRetina { get; set; } + public LogoConfig Logo { get; set; } - private FileSharing FileSharing { get; } public bool MentionShare { @@ -867,54 +801,88 @@ public class CustomizationConfig } } - private readonly CoreBaseSettings _coreBaseSettings; - private readonly SettingsManager _settingsManager; - private readonly FileUtility _fileUtility; - private readonly FilesSettingsHelper _filesSettingsHelper; - private readonly AuthContext _authContext; - private readonly FileSecurity _fileSecurity; - private readonly IDaoFactory _daoFactory; - private readonly GlobalFolderHelper _globalFolderHelper; - private readonly PathProvider _pathProvider; - private readonly CommonLinkUtility _commonLinkUtility; -} + private FileSharing FileSharing { get; } -[Transient] -public class CustomerConfig -{ - private readonly SettingsManager _settingsManager; - private readonly BaseCommonLinkUtility _baseCommonLinkUtility; - private readonly TenantLogoHelper _tenantLogoHelper; - private readonly TenantWhiteLabelSettingsHelper _tenantWhiteLabelSettingsHelper; - private Configuration _configuration; - - public CustomerConfig( + public CustomizationConfig( + CoreBaseSettings coreBaseSettings, SettingsManager settingsManager, - BaseCommonLinkUtility baseCommonLinkUtility, - TenantLogoHelper tenantLogoHelper, - TenantWhiteLabelSettingsHelper tenantWhiteLabelSettingsHelper) + FileUtility fileUtility, + FilesSettingsHelper filesSettingsHelper, + AuthContext authContext, + FileSecurity fileSecurity, + IDaoFactory daoFactory, + GlobalFolderHelper globalFolderHelper, + PathProvider pathProvider, + CustomerConfig customerConfig, + LogoConfig logoConfig, + FileSharing fileSharing, + CommonLinkUtility commonLinkUtility, + ThirdPartySelector thirdPartySelector) { + _coreBaseSettings = coreBaseSettings; _settingsManager = settingsManager; - _baseCommonLinkUtility = baseCommonLinkUtility; - _tenantLogoHelper = tenantLogoHelper; - _tenantWhiteLabelSettingsHelper = tenantWhiteLabelSettingsHelper; + _fileUtility = fileUtility; + _filesSettingsHelper = filesSettingsHelper; + _authContext = authContext; + _fileSecurity = fileSecurity; + _daoFactory = daoFactory; + _globalFolderHelper = globalFolderHelper; + _pathProvider = pathProvider; + Customer = customerConfig; + Logo = logoConfig; + FileSharing = fileSharing; + _thirdPartySelector = thirdPartySelector; + _commonLinkUtility = commonLinkUtility; } internal void SetConfiguration(Configuration configuration) { _configuration = configuration; + + if (_coreBaseSettings.Standalone) + { + Customer.SetConfiguration(_configuration); + } + else + { + Customer = null; + } + + Logo.SetConfiguration(_configuration); } +} - public string Address => _settingsManager.LoadForDefaultTenant().Address; +[Transient] +public class EmbeddedConfig +{ + private readonly BaseCommonLinkUtility _baseCommonLinkUtility; + private readonly FilesLinkUtility _filesLinkUtility; - public string Logo => _baseCommonLinkUtility.GetFullAbsolutePath( - _tenantWhiteLabelSettingsHelper.GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum.Dark, !_configuration.EditorConfig.Customization.IsRetina)); + public string EmbedUrl => _baseCommonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.FilesBaseAbsolutePath + + FilesLinkUtility.EditorPage + "?" + FilesLinkUtility.Action + "=embedded" + ShareLinkParam); - public string Mail => _settingsManager.LoadForDefaultTenant().Email; + public string SaveUrl => _baseCommonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.FileHandlerPath + "?" + + FilesLinkUtility.Action + "=download" + ShareLinkParam); - public string Name => _settingsManager.LoadForDefaultTenant().CompanyName; + public string ShareLinkParam { get; set; } - public string Www => _settingsManager.LoadForDefaultTenant().Site; + public string ShareUrl => _baseCommonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.FilesBaseAbsolutePath + + FilesLinkUtility.EditorPage + "?" + FilesLinkUtility.Action + "=view" + ShareLinkParam); + + public string ToolbarDocked => "top"; + + public EmbeddedConfig(BaseCommonLinkUtility baseCommonLinkUtility, FilesLinkUtility filesLinkUtility) + { + _baseCommonLinkUtility = baseCommonLinkUtility; + _filesLinkUtility = filesLinkUtility; + } +} + +public class EncryptionKeysConfig +{ + public string CryptoEngineId => "{FFF0E1EB-13DB-4678-B67D-FF0A41DBBCEF}"; + public string PrivateKeyEnc { get; set; } + public string PublicKey { get; set; } } public class FeedbackConfig @@ -931,23 +899,14 @@ public class GobackConfig [Transient] public class LogoConfig { - public LogoConfig( - CommonLinkUtility commonLinkUtility, - TenantLogoHelper tenantLogoHelper, - FileUtility fileUtility) - { - _commonLinkUtility = commonLinkUtility; - _tenantLogoHelper = tenantLogoHelper; - _fileUtility = fileUtility; - } + private readonly CommonLinkUtility _commonLinkUtility; + + private readonly FileUtility _fileUtility; + + private readonly TenantLogoHelper _tenantLogoHelper; private Configuration _configuration; - internal void SetConfiguration(Configuration configuration) - { - _configuration = configuration; - } - public string Image { get @@ -984,9 +943,71 @@ public class LogoConfig get => _commonLinkUtility.GetFullAbsolutePath(_commonLinkUtility.GetDefault()); } - private readonly CommonLinkUtility _commonLinkUtility; - private readonly TenantLogoHelper _tenantLogoHelper; - private readonly FileUtility _fileUtility; + public LogoConfig( + CommonLinkUtility commonLinkUtility, + TenantLogoHelper tenantLogoHelper, + FileUtility fileUtility) + { + _commonLinkUtility = commonLinkUtility; + _tenantLogoHelper = tenantLogoHelper; + _fileUtility = fileUtility; + } + + internal void SetConfiguration(Configuration configuration) + { + _configuration = configuration; + } +} + +[Transient] +public class PluginsConfig +{ + private readonly BaseCommonLinkUtility _baseCommonLinkUtility; + + private readonly ConsumerFactory _consumerFactory; + + private readonly CoreBaseSettings _coreBaseSettings; + + private readonly TenantExtra _tenantExtra; + + public string[] PluginsData + { + get + { + var plugins = new List(); + + if (_coreBaseSettings.Standalone || !_tenantExtra.GetTenantQuota().Free) + { + var easyBibHelper = _consumerFactory.Get(); + if (!string.IsNullOrEmpty(easyBibHelper.AppKey)) + { + plugins.Add(_baseCommonLinkUtility.GetFullAbsolutePath("ThirdParty/plugin/easybib/config.json")); + } + + var wordpressLoginProvider = _consumerFactory.Get(); + if (!string.IsNullOrEmpty(wordpressLoginProvider.ClientID) && + !string.IsNullOrEmpty(wordpressLoginProvider.ClientSecret) && + !string.IsNullOrEmpty(wordpressLoginProvider.RedirectUri)) + { + plugins.Add(_baseCommonLinkUtility.GetFullAbsolutePath("ThirdParty/plugin/wordpress/config.json")); + } + } + + return plugins.ToArray(); + } + } + + public PluginsConfig( + ConsumerFactory consumerFactory, + BaseCommonLinkUtility baseCommonLinkUtility, + CoreBaseSettings coreBaseSettings, + TenantExtra tenantExtra) + { + _consumerFactory = consumerFactory; + _baseCommonLinkUtility = baseCommonLinkUtility; + _coreBaseSettings = coreBaseSettings; + _tenantExtra = tenantExtra; + } } public class RecentConfig @@ -1033,6 +1054,5 @@ public static class ConfigurationExtention services.TryAdd>(); services.TryAdd>(); - } -} +} \ No newline at end of file diff --git a/products/ASC.Files/Core/Services/DocumentService/DocumentServiceConnector.cs b/products/ASC.Files/Core/Services/DocumentService/DocumentServiceConnector.cs index b78d3e7a69..7d7c47fbcc 100644 --- a/products/ASC.Files/Core/Services/DocumentService/DocumentServiceConnector.cs +++ b/products/ASC.Files/Core/Services/DocumentService/DocumentServiceConnector.cs @@ -24,8 +24,6 @@ // 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 CommandMethod = ASC.Web.Core.Files.DocumentService.CommandMethod; - namespace ASC.Web.Files.Services.DocumentService; [Scope] @@ -68,7 +66,7 @@ public class DocumentServiceConnector public static string GenerateRevisionId(string expectedKey) { - return Web.Core.Files.DocumentService.GenerateRevisionId(expectedKey); + return ASC.Files.Core.Helpers.DocumentService.GenerateRevisionId(expectedKey); } public Task<(int ResultPercent, string ConvertedDocumentUri)> GetConvertedUriAsync(string documentUri, @@ -84,7 +82,7 @@ public class DocumentServiceConnector _logger.DebugDocServiceConvert(fromExtension, toExtension, documentUri, _filesLinkUtility.DocServiceConverterUrl); try { - return Web.Core.Files.DocumentService.GetConvertedUriAsync( + return ASC.Files.Core.Helpers.DocumentService.GetConvertedUriAsync( _fileUtility, _filesLinkUtility.DocServiceConverterUrl, documentUri, @@ -164,7 +162,7 @@ public class DocumentServiceConnector _logger.DebugDocServiceBuilderRequestKey(requestKey, isAsync); try { - return await Web.Core.Files.DocumentService.DocbuilderRequestAsync( + return await ASC.Files.Core.Helpers.DocumentService.DocbuilderRequestAsync( _fileUtility, _filesLinkUtility.DocServiceDocbuilderUrl, GenerateRevisionId(requestKey), @@ -247,7 +245,7 @@ public class DocumentServiceConnector var fileUri = ReplaceCommunityAdress(url); var key = GenerateRevisionId(Guid.NewGuid().ToString()); - var uriTuple = await Web.Core.Files.DocumentService.GetConvertedUriAsync(_fileUtility, _filesLinkUtility.DocServiceConverterUrl, fileUri, fileExtension, toExtension, key, null, null, null, null, false, _fileUtility.SignatureSecret, _clientFactory); + var uriTuple = await ASC.Files.Core.Helpers.DocumentService.GetConvertedUriAsync(_fileUtility, _filesLinkUtility.DocServiceConverterUrl, fileUri, fileExtension, toExtension, key, null, null, null, null, false, _fileUtility.SignatureSecret, _clientFactory); convertedFileUri = uriTuple.ConvertedDocumentUri; } catch (Exception ex) @@ -304,7 +302,7 @@ public class DocumentServiceConnector var scriptUrl = _baseCommonLinkUtility.GetFullAbsolutePath(scriptUri.ToString()); scriptUrl = ReplaceCommunityAdress(scriptUrl); - await Web.Core.Files.DocumentService.DocbuilderRequestAsync(_fileUtility, _filesLinkUtility.DocServiceDocbuilderUrl, null, scriptUrl, false, _fileUtility.SignatureSecret, _clientFactory); + await ASC.Files.Core.Helpers.DocumentService.DocbuilderRequestAsync(_fileUtility, _filesLinkUtility.DocServiceDocbuilderUrl, null, scriptUrl, false, _fileUtility.SignatureSecret, _clientFactory); } catch (Exception ex) { diff --git a/products/ASC.Files/Core/Services/DocumentService/DocumentServiceTracker.cs b/products/ASC.Files/Core/Services/DocumentService/DocumentServiceTracker.cs index e4ee16302c..dfbdd5cb2f 100644 --- a/products/ASC.Files/Core/Services/DocumentService/DocumentServiceTracker.cs +++ b/products/ASC.Files/Core/Services/DocumentService/DocumentServiceTracker.cs @@ -24,8 +24,6 @@ // 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 CommandMethod = ASC.Web.Core.Files.DocumentService.CommandMethod; - namespace ASC.Web.Files.Services.DocumentService; public class DocumentServiceTracker @@ -194,7 +192,7 @@ public class DocumentServiceTrackerHelper _fileTracker = fileTracker; _logger = logger; _clientFactory = clientFactory; - _thirdPartySelector = thirdPartySelector; + _thirdPartySelector = thirdPartySelector; } public string GetCallbackUrl(T fileId) @@ -244,7 +242,7 @@ public class DocumentServiceTrackerHelper private async Task ProcessEditAsync(T fileId, TrackerData fileData) { - if (_thirdPartySelector.GetAppByFileId(fileId.ToString()) != null) + if (_thirdPartySelector.GetAppByFileId(fileId.ToString()) != null) { return; } @@ -253,7 +251,7 @@ public class DocumentServiceTrackerHelper var usersDrop = new List(); string docKey; - var app = _thirdPartySelector.GetAppByFileId(fileId.ToString()); + var app = _thirdPartySelector.GetAppByFileId(fileId.ToString()); if (app == null) { File fileStable; @@ -277,18 +275,18 @@ public class DocumentServiceTrackerHelper { if (!Guid.TryParse(user, out var userId)) { - if (!string.IsNullOrEmpty(user) && user.StartsWith("uid-")) - { - userId = Guid.Empty; - } - else - { - _logger.InformationDocServiceUserIdIsNotGuid(user); - continue; - } - - } - users.Remove(userId); + if (!string.IsNullOrEmpty(user) && user.StartsWith("uid-")) + { + userId = Guid.Empty; + } + else + { + _logger.InformationDocServiceUserIdIsNotGuid(user); + continue; + } + + } + users.Remove(userId); try { @@ -334,8 +332,8 @@ public class DocumentServiceTrackerHelper { userId = Guid.Empty; } - - var app = _thirdPartySelector.GetAppByFileId(fileId.ToString()); + + var app = _thirdPartySelector.GetAppByFileId(fileId.ToString()); if (app == null) { File fileStable; diff --git a/products/ASC.Files/Core/ThirdPartyApp/Token.cs b/products/ASC.Files/Core/ThirdPartyApp/Token.cs index 3fed3cced2..cbd3392664 100644 --- a/products/ASC.Files/Core/ThirdPartyApp/Token.cs +++ b/products/ASC.Files/Core/ThirdPartyApp/Token.cs @@ -101,7 +101,8 @@ public class TokenHelper App = token.App, Token = EncryptToken(token), UserId = _authContext.CurrentAccount.ID, - TenantId = _tenantManager.GetCurrentTenant().Id + TenantId = _tenantManager.GetCurrentTenant().Id, + ModifiedOn = DateTime.UtcNow }; FilesDbContext.AddOrUpdate(r => r.ThirdpartyApp, dbFilesThirdpartyApp); diff --git a/products/ASC.Files/Server/Api/EditorController.cs b/products/ASC.Files/Server/Api/EditorController.cs index 8c39e5629a..81af821326 100644 --- a/products/ASC.Files/Server/Api/EditorController.cs +++ b/products/ASC.Files/Server/Api/EditorController.cs @@ -24,8 +24,6 @@ // 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 ASC.Web.Files.ThirdPartyApp; - using FileShare = ASC.Files.Core.Security.FileShare; namespace ASC.Files.Api; @@ -40,8 +38,11 @@ public class EditorControllerInternal : EditorController EncryptionKeyPairDtoHelper encryptionKeyPairDtoHelper, SettingsManager settingsManager, EntryManager entryManager, - IHttpContextAccessor httpContextAccessor) - : base(fileStorageService, fileDtoHelper, documentServiceHelper, encryptionKeyPairDtoHelper, settingsManager, entryManager, httpContextAccessor) + IHttpContextAccessor httpContextAccessor, + IMapper mapper, + CommonLinkUtility commonLinkUtility, + FilesLinkUtility filesLinkUtility) + : base(fileStorageService, fileDtoHelper, documentServiceHelper, encryptionKeyPairDtoHelper, settingsManager, entryManager, httpContextAccessor, mapper, commonLinkUtility, filesLinkUtility) { } } @@ -49,7 +50,6 @@ public class EditorControllerInternal : EditorController public class EditorControllerThirdparty : EditorController { private readonly ThirdPartySelector _thirdPartySelector; - private readonly FilesControllerHelper _filesControllerHelper; public EditorControllerThirdparty( FileStorageService fileStorageService, @@ -60,11 +60,12 @@ public class EditorControllerThirdparty : EditorController EntryManager entryManager, IHttpContextAccessor httpContextAccessor, ThirdPartySelector thirdPartySelector, - FilesControllerHelper filesControllerHelper) - : base(fileStorageService, fileDtoHelper, documentServiceHelper, encryptionKeyPairDtoHelper, settingsManager, entryManager, httpContextAccessor) + IMapper mapper, + CommonLinkUtility commonLinkUtility, + FilesLinkUtility filesLinkUtility) + : base(fileStorageService, fileDtoHelper, documentServiceHelper, encryptionKeyPairDtoHelper, settingsManager, entryManager, httpContextAccessor, mapper, commonLinkUtility, filesLinkUtility) { _thirdPartySelector = thirdPartySelector; - _filesControllerHelper = filesControllerHelper; } [AllowAnonymous] @@ -116,6 +117,9 @@ public abstract class EditorController : ApiControllerBase protected readonly SettingsManager _settingsManager; protected readonly EntryManager _entryManager; protected readonly IHttpContextAccessor _httpContextAccessor; + private readonly IMapper _mapper; + private readonly CommonLinkUtility _commonLinkUtility; + private readonly FilesLinkUtility _filesLinkUtility; public EditorController( FileStorageService fileStorageService, @@ -124,7 +128,10 @@ public abstract class EditorController : ApiControllerBase EncryptionKeyPairDtoHelper encryptionKeyPairDtoHelper, SettingsManager settingsManager, EntryManager entryManager, - IHttpContextAccessor httpContextAccessor) + IHttpContextAccessor httpContextAccessor, + IMapper mapper, + CommonLinkUtility commonLinkUtility, + FilesLinkUtility filesLinkUtility) { _fileStorageService = fileStorageService; _fileDtoHelper = fileDtoHelper; @@ -133,6 +140,9 @@ public abstract class EditorController : ApiControllerBase _settingsManager = settingsManager; _entryManager = entryManager; _httpContextAccessor = httpContextAccessor; + _mapper = mapper; + _commonLinkUtility = commonLinkUtility; + _filesLinkUtility = filesLinkUtility; } /// @@ -202,7 +212,7 @@ public abstract class EditorController : ApiControllerBase [AllowAnonymous] [AllowNotPayment] [HttpGet("file/{fileId}/openedit")] - public async Task> OpenEditAsync(T fileId, int version, string doc, bool view) + public async Task> OpenEditAsync(T fileId, int version, string doc, bool view) { var docParams = await _documentServiceHelper.GetParamsAsync(fileId, version, doc, true, !view, true); var configuration = docParams.Configuration; @@ -229,7 +239,10 @@ public abstract class EditorController : ApiControllerBase configuration.Token = _documentServiceHelper.GetSignature(configuration); - return configuration; + var result = _mapper.Map, ConfigurationDto>(configuration); + result.EditorUrl = _commonLinkUtility.GetFullAbsolutePath(_filesLinkUtility.DocServiceApiUrl); + result.File = await _fileDtoHelper.GetAsync(file); + return result; } [HttpGet("file/{fileId}/presigned")] @@ -237,6 +250,12 @@ public abstract class EditorController : ApiControllerBase { return _fileStorageService.GetPresignedUriAsync(fileId); } + + [HttpGet("file/{fileId}/sharedusers")] + public Task> SharedUsers(T fileId) + { + return _fileStorageService.SharedUsersAsync(fileId); + } } public class EditorController : ApiControllerBase diff --git a/products/ASC.Files/Server/Api/FilesController.cs b/products/ASC.Files/Server/Api/FilesController.cs index 13299a0067..26c078b33b 100644 --- a/products/ASC.Files/Server/Api/FilesController.cs +++ b/products/ASC.Files/Server/Api/FilesController.cs @@ -24,10 +24,6 @@ // 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 ASC.Web.Files.ThirdPartyApp; - -using AutoMapper; - using FileShare = ASC.Files.Core.Security.FileShare; namespace ASC.Files.Api; diff --git a/products/ASC.Files/Server/Api/SecutiryController.cs b/products/ASC.Files/Server/Api/SecutiryController.cs index e4ae38d1b7..f4634e3de5 100644 --- a/products/ASC.Files/Server/Api/SecutiryController.cs +++ b/products/ASC.Files/Server/Api/SecutiryController.cs @@ -136,6 +136,18 @@ public abstract class SecutiryController : ApiControllerBase public Task> SetFolderSecurityInfoAsync(T folderId, SecurityInfoRequestDto inDto) { return _securityControllerHelper.SetFolderSecurityInfoAsync(folderId, inDto.Share, inDto.Notify, inDto.SharingMessage); + } + + [HttpGet("file/{fileId}/publickeys")] + public Task> GetEncryptionAccess(T fileId) + { + return _fileStorageService.GetEncryptionAccessAsync(fileId); + } + + [HttpPost("file/{fileId}/sendeditornotify")] + public Task> SendEditorNotify(T fileId, MentionMessageWrapper mentionMessage) + { + return _fileStorageService.SendEditorNotifyAsync(fileId, mentionMessage); } } diff --git a/products/ASC.Files/Server/GlobalUsings.cs b/products/ASC.Files/Server/GlobalUsings.cs index d27ac4bf57..e4a7eccd09 100644 --- a/products/ASC.Files/Server/GlobalUsings.cs +++ b/products/ASC.Files/Server/GlobalUsings.cs @@ -34,8 +34,8 @@ global using System.Web; global using ASC.Api.Core; global using ASC.Api.Core.Convention; global using ASC.Api.Core.Extensions; -global using ASC.Api.Core.Security; global using ASC.Api.Core.Routing; +global using ASC.Api.Core.Security; global using ASC.Api.Utils; global using ASC.Common; global using ASC.Common.Threading; @@ -47,18 +47,18 @@ global using ASC.Core.Users; global using ASC.FederatedLogin.Helpers; global using ASC.FederatedLogin.LoginProviders; global using ASC.Files.Core; -global using ASC.Files.Core.Entries; -global using ASC.Files.Core.VirtualRooms; global using ASC.Files.Core.ApiModels; global using ASC.Files.Core.ApiModels.RequestDto; global using ASC.Files.Core.ApiModels.ResponseDto; +global using ASC.Files.Core.Helpers; global using ASC.Files.Core.Security; global using ASC.Files.Core.Services.OFormService; +global using ASC.Files.Core.VirtualRooms; global using ASC.Files.Helpers; global using ASC.Files.Log; global using ASC.MessagingSystem.Core; +global using ASC.Security.Cryptography; global using ASC.Web.Api.Routing; -global using ASC.Web.Core.Files; global using ASC.Web.Core.PublicResources; global using ASC.Web.Core.Users; global using ASC.Web.Files; @@ -71,14 +71,16 @@ global using ASC.Web.Files.HttpHandlers; global using ASC.Web.Files.Services.DocumentService; global using ASC.Web.Files.Services.WCFService; global using ASC.Web.Files.Services.WCFService.FileOperations; +global using ASC.Web.Files.ThirdPartyApp; global using ASC.Web.Files.Utils; global using ASC.Web.Studio.Core; global using ASC.Web.Studio.Core.Notify; global using ASC.Web.Studio.Utility; -global using ASC.Security.Cryptography; global using Autofac; +global using AutoMapper; + global using Microsoft.AspNetCore.Authorization; global using Microsoft.AspNetCore.Mvc; global using Microsoft.Extensions.Hosting.WindowsServices; diff --git a/products/ASC.Files/Service/GlobalUsings.cs b/products/ASC.Files/Service/GlobalUsings.cs index 2dc48c882e..69b63d256a 100644 --- a/products/ASC.Files/Service/GlobalUsings.cs +++ b/products/ASC.Files/Service/GlobalUsings.cs @@ -56,6 +56,7 @@ global using ASC.Files.AutoCleanUp; global using ASC.Files.Core; global using ASC.Files.Core.Core.Entries; global using ASC.Files.Core.EF; +global using ASC.Files.Core.Helpers; global using ASC.Files.Core.IntegrationEvents.Events; global using ASC.Files.Core.Log; global using ASC.Files.Core.Resources; @@ -65,7 +66,6 @@ global using ASC.Files.Service.Log; global using ASC.Files.ThumbnailBuilder; global using ASC.Thumbnail.IntegrationEvents.EventHandling; global using ASC.Web.Core; -global using ASC.Web.Core.Files; global using ASC.Web.Files.Classes; global using ASC.Web.Files.Core.Search; global using ASC.Web.Files.Services.DocumentService; @@ -81,4 +81,4 @@ global using Microsoft.Extensions.Logging; global using SixLabors.ImageSharp; -global using static ASC.Web.Core.Files.DocumentService; \ No newline at end of file +global using static ASC.Files.Core.Helpers.DocumentService; \ No newline at end of file diff --git a/products/ASC.Files/Tests/ASC.Files.Tests.csproj b/products/ASC.Files/Tests/ASC.Files.Tests.csproj index e91f43d2ab..8965672c67 100644 --- a/products/ASC.Files/Tests/ASC.Files.Tests.csproj +++ b/products/ASC.Files/Tests/ASC.Files.Tests.csproj @@ -21,20 +21,20 @@ - - + + - + - + @@ -46,6 +46,7 @@ + diff --git a/products/ASC.Files/Tests/BaseFilesTests.cs b/products/ASC.Files/Tests/BaseFilesTests.cs index 873c6c7c6a..1d580e00db 100644 --- a/products/ASC.Files/Tests/BaseFilesTests.cs +++ b/products/ASC.Files/Tests/BaseFilesTests.cs @@ -26,6 +26,11 @@ +using ASC.MessagingSystem.EF.Context; +using ASC.Webhooks.Core.EF.Context; + +using Microsoft.EntityFrameworkCore; + namespace ASC.Files.Tests; class FilesApplication : WebApplicationFactory @@ -83,7 +88,7 @@ public class MySetUpClass { }); - Migrate(host.Services); + Migrate(host.Services, "ASC.Migrations.MySql"); Migrate(host.Services, Assembly.GetExecutingAssembly().GetName().Name); Scope = host.Services.CreateScope(); @@ -110,17 +115,29 @@ public class MySetUpClass { using var scope = serviceProvider.CreateScope(); - if (!string.IsNullOrEmpty(testAssembly)) - { - var configuration = scope.ServiceProvider.GetService(); - configuration["testAssembly"] = testAssembly; - } - using var db = scope.ServiceProvider.GetService>(); - db.Value.Migrate(); + db.Value.MigrateAssembly = testAssembly; + db.Value.Database.Migrate(); using var filesDb = scope.ServiceProvider.GetService>(); - filesDb.Value.Migrate(); + filesDb.Value.MigrateAssembly = testAssembly; + filesDb.Value.Database.Migrate(); + + using var messagesDb = scope.ServiceProvider.GetService>(); + messagesDb.Value.MigrateAssembly = testAssembly; + messagesDb.Value.Database.Migrate(); + + using var webHookDb = scope.ServiceProvider.GetService>(); + webHookDb.Value.MigrateAssembly = testAssembly; + webHookDb.Value.Database.Migrate(); + + using var tenantDb = scope.ServiceProvider.GetService>(); + tenantDb.Value.MigrateAssembly = testAssembly; + tenantDb.Value.Database.Migrate(); + + using var coreDb = scope.ServiceProvider.GetService>(); + coreDb.Value.MigrateAssembly = testAssembly; + coreDb.Value.Database.Migrate(); } } diff --git a/products/ASC.Files/Tests/Rooms.cs b/products/ASC.Files/Tests/Rooms.cs index 7af1eb2333..7639f2983d 100644 --- a/products/ASC.Files/Tests/Rooms.cs +++ b/products/ASC.Files/Tests/Rooms.cs @@ -169,15 +169,15 @@ public partial class BaseFilesTests Assert.IsTrue(invites.First().Success); } - [TestCase(DataTests.RoomId, DataTests.RoomLinkKey)] - [Category("Room")] - [Order(14)] - [Description("put - rooms/{id}/share - share a room by link")] - public async Task ShareRoomByLink(int id, string key) - { - var share = await PutAsync>($"rooms/{id}/share", new { Access = Core.Security.FileShare.Read, Key = key }); - Assert.IsNotNull(share); - } + //[TestCase(DataTests.RoomId, DataTests.RoomLinkKey)] + //[Category("Room")] + //[Order(14)] + //[Description("put - rooms/{id}/share - share a room by link")] + //public async Task ShareRoomByLink(int id, string key) + //{ + // var share = await PutAsync>($"rooms/{id}/share", new { Access = Core.Security.FileShare.Read, Key = key }); + // Assert.IsNotNull(share); + //} [TestCase(DataTests.RoomId)] [Category("Room")] diff --git a/products/ASC.Files/Tests/TestMigrations/20210804110106_TestMigration.Designer.cs b/products/ASC.Files/Tests/TestMigrations/20210804110106_TestMigration.Designer.cs index bc9e7724bb..2cf76d2725 100644 --- a/products/ASC.Files/Tests/TestMigrations/20210804110106_TestMigration.Designer.cs +++ b/products/ASC.Files/Tests/TestMigrations/20210804110106_TestMigration.Designer.cs @@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace ASC.Core.Common.Migrations { - [DbContext(typeof(MySqlUserDbContext))] + [DbContext(typeof(UserDbContext))] [Migration("20210804110106_TestMigration")] partial class TestMigration { diff --git a/products/ASC.Files/Tests/TestMigrations/20210804110106_TestMigration.cs b/products/ASC.Files/Tests/TestMigrations/20210804110106_TestMigration.cs index 339dc903c5..88d6b278a3 100644 --- a/products/ASC.Files/Tests/TestMigrations/20210804110106_TestMigration.cs +++ b/products/ASC.Files/Tests/TestMigrations/20210804110106_TestMigration.cs @@ -40,8 +40,8 @@ public partial class TestMigration : Migration migrationBuilder.InsertData( table: "core_user", - columns: new[] { "id", "activation_status", "bithdate", "contacts", "culture", "email", "firstname", "last_modified", "lastname", "location", "notes", "phone", "phone_activation", "removed", "sex", "sid", "sso_name_id", "sso_session_id", "status", "tenant", "terminateddate", "title", "username", "workfromdate" }, - values: new object[] { "005bb3ff-7de3-47d2-9b3d-61b9ec8a76a5", 0, null, null, null, "test@gmail.com", "Test", new DateTime(2021, 8, 4, 11, 1, 4, 513, DateTimeKind.Utc).AddTicks(2928), "User", null, null, null, 0, false, null, null, null, null, 1, 1, null, null, "TestUser", new DateTime(2021, 8, 4, 11, 1, 4, 513, DateTimeKind.Utc).AddTicks(2940) }); + columns: new[] { "id", "activation_status", "bithdate", "contacts", "culture", "email", "firstname", "last_modified", "lastname", "location", "notes", "phone", "phone_activation", "removed", "sex", "sid", "sso_name_id", "sso_session_id", "status", "tenant", "terminateddate", "title", "username", "workfromdate", "create_on" }, + values: new object[] { "005bb3ff-7de3-47d2-9b3d-61b9ec8a76a5", 0, null, null, null, "test@gmail.com", "Test", new DateTime(2021, 8, 4, 11, 1, 4, 513, DateTimeKind.Utc).AddTicks(2928), "User", null, null, null, 0, false, null, null, null, null, 1, 1, null, null, "TestUser", new DateTime(2021, 8, 4, 11, 1, 4, 513, DateTimeKind.Utc).AddTicks(2940), DateTime.UtcNow }); migrationBuilder.InsertData( table: "core_usersecurity", diff --git a/products/ASC.Files/Tests/TestMigrations/20210804110106_TestMigrationFiles.Designer.cs b/products/ASC.Files/Tests/TestMigrations/20210804110106_TestMigrationFiles.Designer.cs index 168569b7d6..d30d0e5209 100644 --- a/products/ASC.Files/Tests/TestMigrations/20210804110106_TestMigrationFiles.Designer.cs +++ b/products/ASC.Files/Tests/TestMigrations/20210804110106_TestMigrationFiles.Designer.cs @@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace ASC.Core.Common.Migrations { - [DbContext(typeof(Files.Core.EF.MySqlFilesDbContext))] + [DbContext(typeof(Files.Core.EF.FilesDbContext))] [Migration("20210804110106_TestFilesMigration")] partial class TestFilesMigration { diff --git a/products/ASC.People/Server/GlobalUsings.cs b/products/ASC.People/Server/GlobalUsings.cs index 2909a5b500..e89efece80 100644 --- a/products/ASC.People/Server/GlobalUsings.cs +++ b/products/ASC.People/Server/GlobalUsings.cs @@ -48,7 +48,7 @@ global using ASC.FederatedLogin.Profile; global using ASC.Files.Core; global using ASC.Files.Core.Security; global using ASC.MessagingSystem.Core; -global using ASC.MessagingSystem.Models; +global using ASC.MessagingSystem.EF.Model; global using ASC.People; global using ASC.People.Api; global using ASC.People.ApiModels.RequestDto; diff --git a/public/images/docspace.big.react.svg b/public/images/docspace.big.react.svg new file mode 100644 index 0000000000..115a435fae --- /dev/null +++ b/public/images/docspace.big.react.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/help.center.react.svg b/public/images/help.center.react.svg new file mode 100644 index 0000000000..eebb996f92 --- /dev/null +++ b/public/images/help.center.react.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/images/hotkeys.react.svg b/public/images/hotkeys.react.svg new file mode 100644 index 0000000000..dc6f5430be --- /dev/null +++ b/public/images/hotkeys.react.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/logo.docspace.react.svg b/public/images/logo.docspace.react.svg new file mode 100644 index 0000000000..4d72a079aa --- /dev/null +++ b/public/images/logo.docspace.react.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/images/logo.icon.react.svg b/public/images/logo.icon.react.svg new file mode 100644 index 0000000000..346c432d92 --- /dev/null +++ b/public/images/logo.icon.react.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/logout.react.svg b/public/images/logout.react.svg new file mode 100644 index 0000000000..bee3273718 --- /dev/null +++ b/public/images/logout.react.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/images/payments.react.svg b/public/images/payments.react.svg new file mode 100644 index 0000000000..4e65003633 --- /dev/null +++ b/public/images/payments.react.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/profile.react.svg b/public/images/profile.react.svg new file mode 100644 index 0000000000..33b23e8621 --- /dev/null +++ b/public/images/profile.react.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/images/support.react.svg b/public/images/support.react.svg new file mode 100644 index 0000000000..e2a751bccc --- /dev/null +++ b/public/images/support.react.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/vertical-dots.react.svg b/public/images/vertical-dots.react.svg index 5d4f6480d7..317cf210a2 100644 --- a/public/images/vertical-dots.react.svg +++ b/public/images/vertical-dots.react.svg @@ -1,3 +1,3 @@ - + diff --git a/public/images/video.guides.react.svg b/public/images/video.guides.react.svg new file mode 100644 index 0000000000..e25a0f24ff --- /dev/null +++ b/public/images/video.guides.react.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/locales/az/Common.json b/public/locales/az/Common.json index dbef06e6af..62b2ff9738 100644 --- a/public/locales/az/Common.json +++ b/public/locales/az/Common.json @@ -168,5 +168,9 @@ "View": "Baxın", "ViewWeb": "Veb versiyaya baxın", "Warning": "Xəbərdarlıq", - "Hotkeys": "Qısayollar" + "Hotkeys": "Qısayollar", + "PaymentsTitle": "Ödənişlər", + "AboutCompanyTitle": "Proqram haqqında", + "LogoutButton": "Çıxış edin", + "HelpCenter": "Yardım Mərkəzi" } diff --git a/public/locales/bg/Common.json b/public/locales/bg/Common.json index a1d6088ac6..493ec4f191 100644 --- a/public/locales/bg/Common.json +++ b/public/locales/bg/Common.json @@ -168,5 +168,9 @@ "View": "Преглед", "ViewWeb": "Отиди към уеб версия", "Warning": "Внимание", - "Hotkeys": "Бързи клавиши" + "Hotkeys": "Бързи клавиши", + "PaymentsTitle": "Плащания", + "AboutCompanyTitle": "За тази програма", + "LogoutButton": "Отписване", + "HelpCenter": "Помощен център" } diff --git a/public/locales/cs/Common.json b/public/locales/cs/Common.json index d3e23d6edc..27fa3ad914 100644 --- a/public/locales/cs/Common.json +++ b/public/locales/cs/Common.json @@ -168,5 +168,9 @@ "View": "Zobrazit", "ViewWeb": "Zobrazit webovou verzi", "Warning": "Varování", - "Hotkeys": "Klávesové zkratky" + "Hotkeys": "Klávesové zkratky", + "PaymentsTitle": "Platby", + "AboutCompanyTitle": "O tomto programu", + "LogoutButton": "Odhlásit se", + "HelpCenter": "Centrum nápovědy" } diff --git a/public/locales/de/Common.json b/public/locales/de/Common.json index 0dfeda3f91..27f56c8843 100644 --- a/public/locales/de/Common.json +++ b/public/locales/de/Common.json @@ -168,5 +168,9 @@ "View": "Anzeigen", "ViewWeb": "Web-Version öffnen", "Warning": "Warnung", - "Hotkeys": "Tastenkombinationen" + "Hotkeys": "Tastenkombinationen", + "PaymentsTitle": "Zahlungen", + "AboutCompanyTitle": "Über diese Software", + "LogoutButton": "Ausloggen", + "HelpCenter": "Hilfe-Center" } diff --git a/public/locales/el/Common.json b/public/locales/el/Common.json index 1b107feaaa..979c435c80 100644 --- a/public/locales/el/Common.json +++ b/public/locales/el/Common.json @@ -167,5 +167,9 @@ "View": "Προβολή", "ViewWeb": "Προβολή διαδικτυακής έκδοσης", "Warning": "Προειδοποίηση", - "Hotkeys": "Πλήκτρα συντόμευσης" + "Hotkeys": "Πλήκτρα συντόμευσης", + "PaymentsTitle": "Πληρωμές", + "AboutCompanyTitle": "Σχετικά με αυτό το πρόγραμμα", + "LogoutButton": "Αποσύνδεση", + "HelpCenter": "Κέντρο Βοήθειας" } diff --git a/public/locales/en/Common.json b/public/locales/en/Common.json index 477e1b0267..07f9d0ca37 100644 --- a/public/locales/en/Common.json +++ b/public/locales/en/Common.json @@ -169,5 +169,11 @@ "View": "View", "ViewWeb": "View web version", "Warning": "Warning", - "Hotkeys": "Hotkeys" + "Hotkeys": "Hotkeys", + "PaymentsTitle": "Payments", + "AboutCompanyTitle": "About this program", + "LogoutButton": "Sign Out", + "HelpCenter": "Help center", + "FeedbackAndSupport": "Feedback & Support", + "VideoGuides": "Video Guides" } diff --git a/public/locales/es/Common.json b/public/locales/es/Common.json index 06d50e3a78..92c3040909 100644 --- a/public/locales/es/Common.json +++ b/public/locales/es/Common.json @@ -168,5 +168,9 @@ "View": "Ver", "ViewWeb": "Ver versión web", "Warning": "Advertencia", - "Hotkeys": "Atajos de teclado" + "Hotkeys": "Atajos de teclado", + "PaymentsTitle": "Pagos", + "AboutCompanyTitle": "Acerca del programa", + "LogoutButton": "Salir", + "HelpCenter": "Centro de ayuda" } diff --git a/public/locales/fi/Common.json b/public/locales/fi/Common.json index aac27ef572..80bce3095b 100644 --- a/public/locales/fi/Common.json +++ b/public/locales/fi/Common.json @@ -168,5 +168,9 @@ "View": "Näkymä", "ViewWeb": "Näytä verkkoversio", "Warning": "Varoitus", - "Hotkeys": "Pikanäppäimet" + "Hotkeys": "Pikanäppäimet", + "PaymentsTitle": "Maksut", + "AboutCompanyTitle": "Tietoja tästä ohjelmasta", + "LogoutButton": "Kirjaudu ulos", + "HelpCenter": "Ohjekeskus (englanniksi)" } diff --git a/public/locales/fr/Common.json b/public/locales/fr/Common.json index 00205131cd..1fc56f1c6e 100644 --- a/public/locales/fr/Common.json +++ b/public/locales/fr/Common.json @@ -168,5 +168,9 @@ "View": "Afficher", "ViewWeb": "Voir la version web", "Warning": "Attention", - "Hotkeys": "Raccourcis clavier" + "Hotkeys": "Raccourcis clavier", + "PaymentsTitle": "Paiements", + "AboutCompanyTitle": "À propos de ce programme", + "LogoutButton": "Déconnexion", + "HelpCenter": "Centre d'aide" } diff --git a/public/locales/hy-AM/Common.json b/public/locales/hy-AM/Common.json index b6e4d75772..8c9beb4c5b 100644 --- a/public/locales/hy-AM/Common.json +++ b/public/locales/hy-AM/Common.json @@ -166,5 +166,8 @@ "Video": "Տեսանյութ", "View": "Դիտել", "ViewWeb": "Դիտել վեբ տարբերակը", - "Warning": "Զգուշացում" + "Warning": "Զգուշացում", + "PaymentsTitle": "Վճարումներ", + "AboutCompanyTitle": "Այս ծրագրի մասին", + "LogoutButton": "Դուրս գալ" } diff --git a/public/locales/it/Common.json b/public/locales/it/Common.json index 997b4a17f7..ba0b4de27f 100644 --- a/public/locales/it/Common.json +++ b/public/locales/it/Common.json @@ -168,5 +168,9 @@ "View": "Visualizza", "ViewWeb": "Visualizza la versione web", "Warning": "Avviso", - "Hotkeys": "Tasti di scelta rapida" + "Hotkeys": "Tasti di scelta rapida", + "PaymentsTitle": "Pagamenti", + "AboutCompanyTitle": "Informazioni sul programma", + "LogoutButton": "Disconnetti", + "HelpCenter": "Centro assistenza" } diff --git a/public/locales/ja/Common.json b/public/locales/ja/Common.json index ea1ef1c837..5da7f0a774 100644 --- a/public/locales/ja/Common.json +++ b/public/locales/ja/Common.json @@ -167,5 +167,9 @@ "View": "ビュー", "ViewWeb": "ウェブ版を表示する", "Warning": "警告", - "Hotkeys": "ホットキー" + "Hotkeys": "ホットキー", + "PaymentsTitle": "お支払い", + "AboutCompanyTitle": "本プログラムについて", + "LogoutButton": "サインアウト", + "HelpCenter": "ヘルプセンター" } diff --git a/public/locales/ko/Common.json b/public/locales/ko/Common.json index fa56d77b71..dfaeef0f7d 100644 --- a/public/locales/ko/Common.json +++ b/public/locales/ko/Common.json @@ -167,5 +167,9 @@ "View": "보기", "ViewWeb": "웹 버전 보기", "Warning": "경고", - "Hotkeys": "단축키" + "Hotkeys": "단축키", + "PaymentsTitle": "결제", + "AboutCompanyTitle": "프로그램 소개", + "LogoutButton": "로그아웃", + "HelpCenter": "도움말 센터" } diff --git a/public/locales/lo/Common.json b/public/locales/lo/Common.json index c7e5a34b49..19635ebc45 100644 --- a/public/locales/lo/Common.json +++ b/public/locales/lo/Common.json @@ -166,5 +166,8 @@ "View": "ມຸມມອງ", "ViewWeb": "ເປີດຜ່ານຫນ້າເວັບ", "Warning": "ແຈ້ງເຕືອນ", - "Hotkeys": "ປຸ່ມໃຊ້ປະຈຳ" + "Hotkeys": "ປຸ່ມໃຊ້ປະຈຳ", + "PaymentsTitle": "ການຊຳລະເງິນ", + "AboutCompanyTitle": "ກ່ຽວກັບໂປແກລມນີ້", + "LogoutButton": "ອອກຈາກລະບົບ" } diff --git a/public/locales/lv/Common.json b/public/locales/lv/Common.json index 500c6664f6..ae288f81dd 100644 --- a/public/locales/lv/Common.json +++ b/public/locales/lv/Common.json @@ -168,5 +168,9 @@ "View": "Skatīt", "ViewWeb": "Skatīt tīmekļa versiju", "Warning": "Brīdinājums", - "Hotkeys": "Ātrie taustiņi" + "Hotkeys": "Ātrie taustiņi", + "PaymentsTitle": "Maksājumi", + "AboutCompanyTitle": "Par šo programmu", + "LogoutButton": "Izrakstīties", + "HelpCenter": "Palīdzības centrs" } diff --git a/public/locales/nl/Common.json b/public/locales/nl/Common.json index aa22120bcc..c9fd02992f 100644 --- a/public/locales/nl/Common.json +++ b/public/locales/nl/Common.json @@ -168,5 +168,9 @@ "View": "Bekijk", "ViewWeb": "Webversie bekijken", "Warning": "Waarschuwing", - "Hotkeys": "Sneltoetsen" + "Hotkeys": "Sneltoetsen", + "PaymentsTitle": "Betalingen", + "AboutCompanyTitle": "Over dit programma", + "LogoutButton": "Uitloggen", + "HelpCenter": "Help en ondersteuning" } diff --git a/public/locales/pl/Common.json b/public/locales/pl/Common.json index 58f146b0f4..83bcaa2d94 100644 --- a/public/locales/pl/Common.json +++ b/public/locales/pl/Common.json @@ -168,5 +168,9 @@ "View": "Podgląd", "ViewWeb": "Zobacz wersję internetową", "Warning": "Ostrzeżenie", - "Hotkeys": "Skróty klawiaturowe" + "Hotkeys": "Skróty klawiaturowe", + "PaymentsTitle": "Płatności", + "AboutCompanyTitle": "O tym programie", + "LogoutButton": "Wyloguj", + "HelpCenter": "Centrum pomocy" } diff --git a/public/locales/pt-BR/Common.json b/public/locales/pt-BR/Common.json index e0fbc60b3c..fd681b5175 100644 --- a/public/locales/pt-BR/Common.json +++ b/public/locales/pt-BR/Common.json @@ -168,5 +168,9 @@ "View": "Ver", "ViewWeb": "Veja a versão web", "Warning": "Aviso", - "Hotkeys": "Teclas de acesso" + "Hotkeys": "Teclas de acesso", + "PaymentsTitle": "Pagamentos", + "AboutCompanyTitle": "Sobre este programa", + "LogoutButton": "Sair", + "HelpCenter": "Central de Ajuda" } diff --git a/public/locales/pt/Common.json b/public/locales/pt/Common.json index caf584732d..f1f08a13be 100644 --- a/public/locales/pt/Common.json +++ b/public/locales/pt/Common.json @@ -167,5 +167,9 @@ "View": "Ver", "ViewWeb": "Ver versão web", "Warning": "Aviso", - "Hotkeys": "Teclas de atalho" + "Hotkeys": "Teclas de atalho", + "PaymentsTitle": "Pagamentos", + "AboutCompanyTitle": "Sobre este programa", + "LogoutButton": "Terminar Sessão", + "HelpCenter": "Help Center" } diff --git a/public/locales/ro/Common.json b/public/locales/ro/Common.json index fc1f45c5d5..64f7343767 100644 --- a/public/locales/ro/Common.json +++ b/public/locales/ro/Common.json @@ -167,5 +167,8 @@ "View": "Vizualizare", "ViewWeb": "Accesați versiunea online", "Warning": "Avertisment", - "Hotkeys": "Comenzi rapide" + "Hotkeys": "Comenzi rapide", + "PaymentsTitle": "Plăți", + "AboutCompanyTitle": "Despre aplicația", + "LogoutButton": "Deconectare" } diff --git a/public/locales/ru/Common.json b/public/locales/ru/Common.json index 706f36c3b7..7bcade42db 100644 --- a/public/locales/ru/Common.json +++ b/public/locales/ru/Common.json @@ -168,5 +168,9 @@ "View": "Просмотр", "ViewWeb": "Просмотреть веб-версию", "Warning": "Внимание", - "Hotkeys": "Горячие клавиши" + "Hotkeys": "Горячие клавиши", + "PaymentsTitle": "Платежи", + "AboutCompanyTitle": "О программе", + "LogoutButton": "Выйти", + "HelpCenter": "Справочный центр" } diff --git a/public/locales/sk/Common.json b/public/locales/sk/Common.json index 359b86741e..a82c68662c 100644 --- a/public/locales/sk/Common.json +++ b/public/locales/sk/Common.json @@ -168,5 +168,9 @@ "View": "Vyhliadka", "ViewWeb": "Zobraziť webovú verziu", "Warning": "Upozornenie", - "Hotkeys": "Klávesové skratky" + "Hotkeys": "Klávesové skratky", + "PaymentsTitle": "Platby", + "AboutCompanyTitle": "O programe", + "LogoutButton": "Odhlásiť Sa", + "HelpCenter": "Centrum pomoci" } diff --git a/public/locales/sl/Common.json b/public/locales/sl/Common.json index 25d4e1911c..bc26c0c460 100644 --- a/public/locales/sl/Common.json +++ b/public/locales/sl/Common.json @@ -168,5 +168,9 @@ "View": "Ogled", "ViewWeb": "Ogled spletne verzije", "Warning": "Opozorilo", - "Hotkeys": "Bližnjice" + "Hotkeys": "Bližnjice", + "PaymentsTitle": "Plačila", + "AboutCompanyTitle": "O tem programu", + "LogoutButton": "Odjava", + "HelpCenter": "Center pomoči" } diff --git a/public/locales/tr/Common.json b/public/locales/tr/Common.json index 8840f9a815..c1f9d82d38 100644 --- a/public/locales/tr/Common.json +++ b/public/locales/tr/Common.json @@ -168,5 +168,9 @@ "View": "Görüntüle", "ViewWeb": "Web sürümünü görüntüle", "Warning": "Uyarı", - "Hotkeys": "Kısayol tuşları" + "Hotkeys": "Kısayol tuşları", + "PaymentsTitle": "Ödemeler", + "AboutCompanyTitle": "Bu program hakkında", + "LogoutButton": "Çıkış", + "HelpCenter": "Yardım Merkezi" } diff --git a/public/locales/uk/Common.json b/public/locales/uk/Common.json index 1e451a40f0..579a5fa6c2 100644 --- a/public/locales/uk/Common.json +++ b/public/locales/uk/Common.json @@ -168,5 +168,9 @@ "View": "Переглянути", "ViewWeb": "Переглянути веб-версію", "Warning": "Попередження", - "Hotkeys": "Сполучення клавіш" + "Hotkeys": "Сполучення клавіш", + "PaymentsTitle": "Платежі", + "AboutCompanyTitle": "Про цю програму", + "LogoutButton": "Вихід", + "HelpCenter": "Центр довідки" } diff --git a/public/locales/vi/Common.json b/public/locales/vi/Common.json index bab5325c77..6b3692a388 100644 --- a/public/locales/vi/Common.json +++ b/public/locales/vi/Common.json @@ -168,5 +168,9 @@ "View": "Xem", "ViewWeb": "Xem phiên bản web", "Warning": "Cảnh báo", - "Hotkeys": "Phím tắt" + "Hotkeys": "Phím tắt", + "PaymentsTitle": "Thanh toán", + "AboutCompanyTitle": "Giới thiệu về chương trình này", + "LogoutButton": "Đăng xuất", + "HelpCenter": "Trung tâm Hỗ trợ" } diff --git a/public/locales/zh-CN/Common.json b/public/locales/zh-CN/Common.json index 7d35683b37..e7dd66ac56 100644 --- a/public/locales/zh-CN/Common.json +++ b/public/locales/zh-CN/Common.json @@ -168,5 +168,9 @@ "View": "查看", "ViewWeb": "查看网页版", "Warning": "警告", - "Hotkeys": "快捷键" + "Hotkeys": "快捷键", + "PaymentsTitle": "付款", + "AboutCompanyTitle": "关于本计划", + "LogoutButton": "登出", + "HelpCenter": "帮助中心" } diff --git a/sql/app.data.sql b/sql/app.data.sql deleted file mode 100644 index 6226eec84e..0000000000 --- a/sql/app.data.sql +++ /dev/null @@ -1,1899 +0,0 @@ -DELIMITER DLM00 -DROP PROCEDURE IF EXISTS coreinit DLM00 - -CREATE PROCEDURE coreinit() -BEGIN - declare tenant_id int; - declare user_id varchar(36); - - IF NOT EXISTS(SELECT 1 FROM tenants_tenants LIMIT 1) THEN - start transaction; - select uuid() into @user_id; - insert into tenants_tenants(alias, name, creationdatetime, owner_id) values ('localhost','Web Office',UTC_TIMESTAMP(), @user_id); - select last_insert_id() into @tenant_id; - insert ignore into core_user(id, firstname, lastname, username, tenant, email, workfromdate, last_modified) values (@user_id,'Administrator','','administrator',@tenant_id,'', utc_timestamp(), utc_timestamp()); - insert ignore into core_usersecurity(tenant, userid, pwdhash, pwdhashsha512) values (@tenant_id,@user_id,'jGl25bVBBBW96Qi9Te4V37Fnqchz/Eu4qB9vKrRIqRg=','l/DFJ5yg4oh1F6Qp7uDhBw=='); - insert ignore into core_usergroup(tenant, userid, groupid, ref_type) values (@tenant_id,@user_id,'cd84e66b-b803-40fc-99f9-b2969a54a1de',0); - insert ignore into webstudio_settings (tenantid, id, userid, data) values (@tenant_id, '9a925891-1f92-4ed7-b277-d6f649739f06', '00000000-0000-0000-0000-000000000000', '{"Completed":false}'); - commit; - END IF; - - replace into tenants_quota (tenant, name, max_file_size, max_total_size, active_users, features) values (-1, 'default', 102400, 10995116277760, 10000, 'sso,domain,audit,controlpanel,healthcheck,ldap,portals:2'); - replace into core_settings(tenant, id, value) values (-1, 'SmtpSettings', 0xF052E090A1A3750DADCD4E9961DA04AA51EF0197E2C0623CF12C5838BFA40A9B48BAEFCBE371587731D7E3DC9E7C6009742F9E415D56DB0F0AE08E32F8904B2C441CC657C64543EAEE262044A28B4335DCB0F0C4E9401D891FA06369F984CA2D475C86C237917961C5827769831585230A66AC7787E6FB56FD3E37389267A46A); - insert ignore into core_settings(tenant, id, value) values (-1, 'FullTextSearchSettings', 0x0878CF0599B517CAA2D3DAED9D064C3EDCEEAF431F35A6F642DCADA04817E3513227BBB1DE6E2BABEB9E1077B2CF318C489814545E877501F633FBBE94022CFCDD025B5395973AF510943408BB56962EE35DA35F2F8374CF5FD12695359449D7CEFBC2C7BD112AE58752179AA2A59E5E17801E580CCC60FAEC8EBDD3D612C4886666D96D6CF060605E64C90A1FAA80C0); - insert ignore into core_settings(tenant, id, value) values (-1, 'CompanyWhiteLabelSettings', 0xF547048A4865171587D9CEBC8A496C601D96031F2C1C3E9160353942EE765DACD316F4B5F42892436FC4A21B9A6DF8FFD3BC4036B47E3A5A1B4C881B26609869FEBB6848BD88C02EEAC6A4CCB3E8F404290812F0E6E124A552BE81A58C64BB8BD3C9A8C0EDE1F9421281DE0C7AF82733C0B754E97EFFFA5A75607A91957896CBECF9563FC831300DC8E7C930A55B298EB82D6F69E0ED6E4D8752607F1881F61B032306E0F069A5F69F086A177EB41AC06F889EB0B39CBFD4B5CDB763E996554DEADB9C71CF3EF86F4A0354A864A10639DFD29B5C6D5DCDA9D4B0988EE406948BCB54C6A70ADC6C00577174285CEBCD76); - - start transaction; - insert ignore into core_subscription(source, action, recipient, object, tenant) values('asc.web.studio','send_whats_new','c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e','',-1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values('asc.web.studio','send_whats_new','c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e','email.sender',-1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('6504977c-75af-4691-9099-084d3ddeea04','new feed','c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e','',-1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values('6504977c-75af-4691-9099-084d3ddeea04','new feed','c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e','email.sender|messanger.sender',-1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('6a598c74-91ae-437d-a5f4-ad339bd11bb2','new post','c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e','',-1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values('6a598c74-91ae-437d-a5f4-ad339bd11bb2','new post','c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e','email.sender|messanger.sender',-1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('853b6eb9-73ee-438d-9b09-8ffeedf36234', 'new topic in forum', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('853b6eb9-73ee-438d-9b09-8ffeedf36234', 'new topic in forum', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('9d51954f-db9b-4aed-94e3-ed70b914e101', 'new photo uploaded', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('9d51954f-db9b-4aed-94e3-ed70b914e101', 'new photo uploaded', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('28b10049-dd20-4f54-b986-873bc14ccfc7', 'new bookmark created', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('28b10049-dd20-4f54-b986-873bc14ccfc7', 'new bookmark created', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('742cf945-cbbc-4a57-82d6-1600a12cf8ca', 'new wiki page', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('742cf945-cbbc-4a57-82d6-1600a12cf8ca', 'new wiki page', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('37620ae5-c40b-45ce-855a-39dd7d76a1fa','BirthdayReminder','abef62db-11a8-4673-9d32-ef1d8af19dc0','',-1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values('37620ae5-c40b-45ce-855a-39dd7d76a1fa','BirthdayReminder','abef62db-11a8-4673-9d32-ef1d8af19dc0','email.sender|messanger.sender',-1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('6fe286a4-479e-4c25-a8d9-0156e332b0c0', 'sharedocument', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('6fe286a4-479e-4c25-a8d9-0156e332b0c0', 'sharefolder', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6fe286a4-479e-4c25-a8d9-0156e332b0c0', 'sharedocument', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6fe286a4-479e-4c25-a8d9-0156e332b0c0', 'sharefolder', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6fe286a4-479e-4c25-a8d9-0156e332b0c0', 'updatedocument', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6045b68c-2c2e-42db-9e53-c272e814c4ad', 'invitetoproject', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6045b68c-2c2e-42db-9e53-c272e814c4ad', 'milestonedeadline', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6045b68c-2c2e-42db-9e53-c272e814c4ad', 'newcommentformessage', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6045b68c-2c2e-42db-9e53-c272e814c4ad', 'newcommentformilestone', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6045b68c-2c2e-42db-9e53-c272e814c4ad', 'newcommentfortask', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6045b68c-2c2e-42db-9e53-c272e814c4ad', 'projectcreaterequest', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6045b68c-2c2e-42db-9e53-c272e814c4ad', 'projecteditrequest', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6045b68c-2c2e-42db-9e53-c272e814c4ad', 'removefromproject', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6045b68c-2c2e-42db-9e53-c272e814c4ad', 'responsibleforproject', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6045b68c-2c2e-42db-9e53-c272e814c4ad', 'responsiblefortask', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('6045b68c-2c2e-42db-9e53-c272e814c4ad', 'taskclosed', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('40650da3-f7c1-424c-8c89-b9c115472e08', 'calendar_sharing', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('40650da3-f7c1-424c-8c89-b9c115472e08', 'event_alert', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('40650da3-f7c1-424c-8c89-b9c115472e08', 'calendar_sharing', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('40650da3-f7c1-424c-8c89-b9c115472e08', 'event_alert', 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'email.sender|messanger.sender', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values('asc.web.studio','admin_notify','cd84e66b-b803-40fc-99f9-b2969a54a1de','',-1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values('asc.web.studio','admin_notify','cd84e66b-b803-40fc-99f9-b2969a54a1de','email.sender',-1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('13ff36fb-0272-4887-b416-74f52b0d0b02', 'SetAccess', 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('13ff36fb-0272-4887-b416-74f52b0d0b02', 'SetAccess', 'abef62db-11a8-4673-9d32-ef1d8af19dc0', 'email.sender|messanger.sender', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('13ff36fb-0272-4887-b416-74f52b0d0b02', 'ResponsibleForTask', 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('13ff36fb-0272-4887-b416-74f52b0d0b02', 'ResponsibleForTask', 'abef62db-11a8-4673-9d32-ef1d8af19dc0', 'email.sender|messanger.sender', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('13ff36fb-0272-4887-b416-74f52b0d0b02', 'AddRelationshipEvent', 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('13ff36fb-0272-4887-b416-74f52b0d0b02', 'AddRelationshipEvent', 'abef62db-11a8-4673-9d32-ef1d8af19dc0', 'email.sender|messanger.sender', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('13ff36fb-0272-4887-b416-74f52b0d0b02', 'ExportCompleted', 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('13ff36fb-0272-4887-b416-74f52b0d0b02', 'ExportCompleted', 'abef62db-11a8-4673-9d32-ef1d8af19dc0', 'email.sender|messanger.sender', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('13ff36fb-0272-4887-b416-74f52b0d0b02', 'CreateNewContact', 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('13ff36fb-0272-4887-b416-74f52b0d0b02', 'CreateNewContact', 'abef62db-11a8-4673-9d32-ef1d8af19dc0', 'email.sender|messanger.sender', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) values ('13ff36fb-0272-4887-b416-74f52b0d0b02', 'ResponsibleForOpportunity', 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '', -1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values ('13ff36fb-0272-4887-b416-74f52b0d0b02', 'ResponsibleForOpportunity', 'abef62db-11a8-4673-9d32-ef1d8af19dc0', 'email.sender|messanger.sender', -1); - insert ignore into core_subscription(source, action, recipient, object, tenant) VALUES ('asc.web.studio','periodic_notify','c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e','',-1); - insert ignore into core_subscriptionmethod(source, action, recipient, sender, tenant) values('asc.web.studio','periodic_notify','c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e','email.sender',-1); - - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, '5d5b7260-f7f7-49f1-a1c9-95fbb6a12604', 'ef5e6790-f346-4b6e-b662-722bc28cb0db', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, '5d5b7260-f7f7-49f1-a1c9-95fbb6a12604', 'f11e8f3f-46e6-4e55-90e3-09c22ec565bd', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '088d5940-a80f-4403-9741-d610718ce95c', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '08d66144-e1c9-4065-9aa1-aa4bba0a7bc8', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '08d75c97-cf3f-494b-90d1-751c941fe2dd', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '0d1f72a8-63da-47ea-ae42-0900e4ac72a9', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '13e30b51-5b4d-40a5-8575-cb561899eeb1', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '19f658ae-722b-4cd8-8236-3ad150801d96', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '2c6552b3-b2e0-4a00-b8fd-13c161e337b1', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '388c29d3-c662-4a61-bf47-fc2f7094224a', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '40bf31f4-3132-4e76-8d5c-9828a89501a3', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '49ae8915-2b30-4348-ab74-b152279364fb', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '9018c001-24c2-44bf-a1db-d1121a570e74', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '948ad738-434b-4a88-8e38-7569d332910a', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'abef62db-11a8-4673-9d32-ef1d8af19dc0', '9d75a568-52aa-49d8-ad43-473756cd8903', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'a362fe79-684e-4d43-a599-65bc1f4e167f', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'c426c349-9ad4-47cd-9b8f-99fc30675951', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'd11ebcb9-0e6e-45e6-a6d0-99c41d687598', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'd1f3b53d-d9e2-4259-80e7-d24380978395', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'abef62db-11a8-4673-9d32-ef1d8af19dc0', 'd49f4e30-da10-4b39-bc6d-b41ef6e039d3', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'abef62db-11a8-4673-9d32-ef1d8af19dc0', 'd852b66f-6719-45e1-8657-18f0bb791690', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'e0759a42-47f0-4763-a26a-d5aa665bec35', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'e37239bd-c5b5-4f1e-a9f8-3ceeac209615', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'fbc37705-a04c-40ad-a68c-ce2f0423f397', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', 'fcac42b8-9386-48eb-a938-d19b3c576912', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'ba74ca02-873f-43dc-8470-8620c156bc67', '13e30b51-5b4d-40a5-8575-cb561899eeb1', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'ba74ca02-873f-43dc-8470-8620c156bc67', '49ae8915-2b30-4348-ab74-b152279364fb', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'ba74ca02-873f-43dc-8470-8620c156bc67', '63e9f35f-6bb5-4fb1-afaa-e4c2f4dec9bd', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'ba74ca02-873f-43dc-8470-8620c156bc67', '9018c001-24c2-44bf-a1db-d1121a570e74', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'ba74ca02-873f-43dc-8470-8620c156bc67', 'd1f3b53d-d9e2-4259-80e7-d24380978395', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'ba74ca02-873f-43dc-8470-8620c156bc67', 'e0759a42-47f0-4763-a26a-d5aa665bec35', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'ba74ca02-873f-43dc-8470-8620c156bc67', 'e37239bd-c5b5-4f1e-a9f8-3ceeac209615', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'ba74ca02-873f-43dc-8470-8620c156bc67', 'f11e88d7-f185-4372-927c-d88008d2c483', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'ba74ca02-873f-43dc-8470-8620c156bc67', 'f11e8f3f-46e6-4e55-90e3-09c22ec565bd', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', '00e7dfc5-ac49-4fd3-a1d6-98d84e877ac4', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', '14be970f-7af5-4590-8e81-ea32b5f7866d', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', '18ecc94d-6afa-4994-8406-aee9dff12ce2', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', '298530eb-435e-4dc6-a776-9abcd95c70e9', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', '430eaf70-1886-483c-a746-1a18e3e6bb63', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', '557d6503-633b-4490-a14c-6473147ce2b3', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', '724cbb75-d1c9-451e-bae0-4de0db96b1f7', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', '7cb5c0d1-d254-433f-abe3-ff23373ec631', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', '91b29dcd-9430-4403-b17a-27d09189be88', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', 'a18480a4-6d18-4c71-84fa-789888791f45', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', 'b630d29b-1844-4bda-bbbe-cf5542df3559', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', 'c62a9e8d-b24c-4513-90aa-7ff0f8ba38eb', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', 'd7cdb020-288b-41e5-a857-597347618533', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', '662f3db7-9bc8-42cf-84da-2765f563e9b0', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, '712d9ec3-5d2b-4b13-824f-71f00191dcca', 'e0759a42-47f0-4763-a26a-d5aa665bec35', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'bba32183-a14d-48ed-9d39-c6b4d8925fbf', '0d68b142-e20a-446e-a832-0d6b0b65a164', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '6f05c382-8bca-4469-9424-c807a98c40d7', '', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|1e04460243b54d7982f3fd6208a11960', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6743007c6f954d208c88a8601ce5e76d', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|e67be73df9ae4ce18fec1880cb518cb4', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|ea942538e68e49079394035336ee0ba8', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|32d24cb57ece46069c9419216ba42086', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|bf88953e3c434850a3fbb1e43ad53a3e', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|2a9230378b2d487b9a225ac0918acf3f', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|f4d98afdd336433287783c6945c81ea0', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|28b10049dd204f54b986873bc14ccfc7', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|3cfd481b46f24a4ab55cb8c0c9def02c', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|6a598c7491ae437da5f4ad339bd11bb2', 0); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|742cf945cbbc4a5782d61600a12cf8ca', 1); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, 'c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e', '77777777-32ae-425f-99b5-83176061d1ae', 'ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|853b6eb973ee438d9b098ffeedf36234', 1); - insert ignore into core_acl (tenant, subject, action, object, acetype) values (-1, "c5cc67d1-c3e8-43c0-a3ad-3928ae3e5b5e", "77777777-32ae-425f-99b5-83176061d1ae", "ASC.Web.Core.WebItemSecurity+WebItemSecurityObject|46cfa73af32046cf8d5bcd82e1d67f26", 0); - - insert ignore into tenants_forbiden (address) values ('controlpanel'); - insert ignore into tenants_forbiden (address) values ('localhost'); - commit; - - start transaction; - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_AlgerianDinar', 'DZD', 'د.ج', 'DZ', 0, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_ArgentinianPeso', 'ARS', '$a', 'AR', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_ArmenianDram', 'AMD', 'dram', 'AM', 0, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_AustralianDollar', 'AUD', 'A$', 'AU', 1, 1); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_AzerbaijaniManat', 'AZN', 'm', 'AZ', 0, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_BangladeshiTaka', 'BDT', 'Tk', 'BD', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_BelarusianRuble', 'BYR', 'Br', 'BY', 0, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_BrazilianReal', 'BRL', 'R$', 'BR', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_BulgarianLev', 'BGN', 'лв', 'BG', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_CanadianDollar', 'CAD', 'C$', 'CA', 1, 1); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_CentralAfricanFranc', 'XAF', 'franc', 'CF', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_ChileanPeso', 'CLP', '$', 'CL', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_ChineseYuan', 'CNY', '¥', 'CN', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_ColombianPeso', 'COP', '$', 'CO', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_CostaRicanColon', 'CRC', '₡', 'CR', 0, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_CroatianKuna', 'HRK', 'kn', 'HR', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_CubanPeso', 'CUP', '$', 'CU', 0, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_CzechKoruna', 'CZK', 'Kc', 'CZ', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_DanishKrone', 'DKK', 'kr', 'DK', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_DominicanPeso', 'DOP', 'RD$', 'DO', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_Euro', 'EUR', '€', 'EU', 1, 1); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_GeorgianLari', 'GEL', 'ლარი', 'GE', 0, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_HongKongDollar', 'HKD', 'HK$', 'HK', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_HungarianForint', 'HUF', 'Ft', 'HU', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_IndianRupee', 'INR', '₨', 'IN', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_IndonesianRupiah', 'IDR', 'Rp', 'ID', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_IsraeliSheqel', 'ILS', '₪', 'IL', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_JapaneseYen', 'JPY', '¥', 'JP', 1, 1); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_KazakhstaniTenge', 'KZT', 'тңг', 'KZ', 0, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_KenyanShilling', 'KES', 'KSh', 'KE', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_KuwaitiDinar', 'KWD', 'K.D.', 'KW', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_LatvianLats', 'LVL', 'Ls', 'LV', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_LithuanianLitas', 'LTL', 'Lt', 'LT', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_MalagasyAriary', 'MGA', 'Ar', 'MG', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_MalaysianRinggit', 'MYR', 'RM', 'MY', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_MauritianRupee', 'MUR', 'Rs', 'MU', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_MexicanPeso', 'MXN', 'MEX$', 'MX', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_MoldovanLeu', 'MDL', 'lei', 'MD', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_MoroccanDirham', 'MAD', 'د.م', 'MA', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_NewBelarusianRuble', 'BYN', 'Br', 'BY', 0, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_NewZealandDollar', 'NZD', 'NZ$', 'NZ', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_NigerianNaira', 'NGN', '₦', 'NG', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_NorwegianKrone', 'NOK', 'kr', 'NO', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_OmaniRial', 'OMR', 'ر.ع', 'OM', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_PacificFranc', 'XPF', 'franc', 'NC', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_PakistaniRupee', 'PKR', 'Rp.', 'PK', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_PhilippinePeso', 'PHP', 'P', 'PH', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_PolishZloty', 'PLN', 'zł', 'PL', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_PoundSterling', 'GBP', '£', 'GB', 1, 1); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_RomanianLeu', 'RON', 'lei', 'RO', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_Rouble', 'RUB', '₽', 'RU', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_SaudiRiyal', 'SAR', 'ر.س', 'SA', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_SerbianDinar', 'RSD', 'din.', 'SR', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_SingaporeDollar', 'SGD', 'S$', 'SG', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_SouthAfricanRand', 'ZAR', 'R', 'ZA', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_SouthKoreanWon', 'KRW', '₩', 'KR', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_SwedishKrona', 'SEK', 'kr', 'SE', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_SwissFranc', 'CHF', 'Fr', 'CH', 1, 1); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_ThaiBaht', 'THB', '฿', 'TH', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_TrinidadAndTobagoDollar', 'TTD', 'TT$', 'TT', 0, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_TurkishNewLira', 'TRY', 'YTL', 'TR', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_UkraineHryvnia', 'UAH', 'грн.', 'UA', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_UnitedArabEmiratesDirham', 'AED', 'د.إ', 'AE', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_UnitedStatesDollar', 'USD', '$', 'US', 1, 1); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_UzbekistaniSom', 'UZS', 'som', 'UZ', 0, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_VenezuelanBolivar', 'VEF', 'Bs.', 'VE', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_VietnameseDong', 'VND', '₫', 'VN', 1, 0); - insert ignore into crm_currency_info (resource_key, abbreviation, symbol, culture_name, is_convertable, is_basic) values ('Currency_WestAfricanFranc', 'XOF', 'franc', 'ML', 1, 0); - commit; - - truncate table files_converts; - start transaction; - insert into files_converts (input, output) values ('.csv', '.ods'); - insert into files_converts (input, output) values ('.csv', '.pdf'); - insert into files_converts (input, output) values ('.csv', '.xlsx'); - insert into files_converts (input, output) values ('.doc', '.docx'); - insert into files_converts (input, output) values ('.doc', '.odt'); - insert into files_converts (input, output) values ('.doc', '.pdf'); - insert into files_converts (input, output) values ('.doc', '.rtf'); - insert into files_converts (input, output) values ('.doc', '.txt'); - insert into files_converts (input, output) values ('.docm', '.docx'); - insert into files_converts (input, output) values ('.docm', '.odt'); - insert into files_converts (input, output) values ('.docm', '.pdf'); - insert into files_converts (input, output) values ('.docm', '.rtf'); - insert into files_converts (input, output) values ('.docm', '.txt'); - insert into files_converts (input, output) values ('.doct', '.docx'); - insert into files_converts (input, output) values ('.docx', '.odt'); - insert into files_converts (input, output) values ('.docx', '.pdf'); - insert into files_converts (input, output) values ('.docx', '.rtf'); - insert into files_converts (input, output) values ('.docx', '.txt'); - insert into files_converts (input, output) values ('.dot', '.docx'); - insert into files_converts (input, output) values ('.dot', '.odt'); - insert into files_converts (input, output) values ('.dot', '.pdf'); - insert into files_converts (input, output) values ('.dot', '.rtf'); - insert into files_converts (input, output) values ('.dot', '.txt'); - insert into files_converts (input, output) values ('.dotm', '.docx'); - insert into files_converts (input, output) values ('.dotm', '.odt'); - insert into files_converts (input, output) values ('.dotm', '.pdf'); - insert into files_converts (input, output) values ('.dotm', '.rtf'); - insert into files_converts (input, output) values ('.dotm', '.txt'); - insert into files_converts (input, output) values ('.dotx', '.docx'); - insert into files_converts (input, output) values ('.dotx', '.odt'); - insert into files_converts (input, output) values ('.dotx', '.pdf'); - insert into files_converts (input, output) values ('.dotx', '.rtf'); - insert into files_converts (input, output) values ('.dotx', '.txt'); - insert into files_converts (input, output) values ('.epub', '.docx'); - insert into files_converts (input, output) values ('.epub', '.odt'); - insert into files_converts (input, output) values ('.epub', '.pdf'); - insert into files_converts (input, output) values ('.epub', '.rtf'); - insert into files_converts (input, output) values ('.epub', '.txt'); - insert into files_converts (input, output) values ('.fodp', '.odp'); - insert into files_converts (input, output) values ('.fodp', '.pdf'); - insert into files_converts (input, output) values ('.fodp', '.pptx'); - insert into files_converts (input, output) values ('.fods', '.csv'); - insert into files_converts (input, output) values ('.fods', '.ods'); - insert into files_converts (input, output) values ('.fods', '.pdf'); - insert into files_converts (input, output) values ('.fods', '.xlsx'); - insert into files_converts (input, output) values ('.fodt', '.docx'); - insert into files_converts (input, output) values ('.fodt', '.odt'); - insert into files_converts (input, output) values ('.fodt', '.pdf'); - insert into files_converts (input, output) values ('.fodt', '.rtf'); - insert into files_converts (input, output) values ('.fodt', '.txt'); - insert into files_converts (input, output) values ('.html', '.docx'); - insert into files_converts (input, output) values ('.html', '.odt'); - insert into files_converts (input, output) values ('.html', '.pdf'); - insert into files_converts (input, output) values ('.html', '.rtf'); - insert into files_converts (input, output) values ('.html', '.txt'); - insert into files_converts (input, output) values ('.mht', '.docx'); - insert into files_converts (input, output) values ('.mht', '.odt'); - insert into files_converts (input, output) values ('.mht', '.pdf'); - insert into files_converts (input, output) values ('.mht', '.rtf'); - insert into files_converts (input, output) values ('.mht', '.txt'); - insert into files_converts (input, output) values ('.odp', '.pdf'); - insert into files_converts (input, output) values ('.odp', '.pptx'); - insert into files_converts (input, output) values ('.otp', '.odp'); - insert into files_converts (input, output) values ('.otp', '.pdf'); - insert into files_converts (input, output) values ('.otp', '.pptx'); - insert into files_converts (input, output) values ('.ods', '.csv'); - insert into files_converts (input, output) values ('.ods', '.pdf'); - insert into files_converts (input, output) values ('.ods', '.xlsx'); - insert into files_converts (input, output) values ('.ots', '.csv'); - insert into files_converts (input, output) values ('.ots', '.ods'); - insert into files_converts (input, output) values ('.ots', '.pdf'); - insert into files_converts (input, output) values ('.ots', '.xlsx'); - insert into files_converts (input, output) values ('.odt', '.docx'); - insert into files_converts (input, output) values ('.odt', '.pdf'); - insert into files_converts (input, output) values ('.odt', '.rtf'); - insert into files_converts (input, output) values ('.odt', '.txt'); - insert into files_converts (input, output) values ('.ott', '.docx'); - insert into files_converts (input, output) values ('.ott', '.odt'); - insert into files_converts (input, output) values ('.ott', '.pdf'); - insert into files_converts (input, output) values ('.ott', '.rtf'); - insert into files_converts (input, output) values ('.ott', '.txt'); - insert into files_converts (input, output) values ('.pot', '.odp'); - insert into files_converts (input, output) values ('.pot', '.pdf'); - insert into files_converts (input, output) values ('.pot', '.pptx'); - insert into files_converts (input, output) values ('.potm', '.odp'); - insert into files_converts (input, output) values ('.potm', '.pdf'); - insert into files_converts (input, output) values ('.potm', '.pptx'); - insert into files_converts (input, output) values ('.potx', '.odp'); - insert into files_converts (input, output) values ('.potx', '.pdf'); - insert into files_converts (input, output) values ('.potx', '.pptx'); - insert into files_converts (input, output) values ('.pps', '.odp'); - insert into files_converts (input, output) values ('.pps', '.pdf'); - insert into files_converts (input, output) values ('.pps', '.pptx'); - insert into files_converts (input, output) values ('.ppsm', '.odp'); - insert into files_converts (input, output) values ('.ppsm', '.pdf'); - insert into files_converts (input, output) values ('.ppsm', '.pptx'); - insert into files_converts (input, output) values ('.ppsx', '.odp'); - insert into files_converts (input, output) values ('.ppsx', '.pdf'); - insert into files_converts (input, output) values ('.ppsx', '.pptx'); - insert into files_converts (input, output) values ('.ppt', '.odp'); - insert into files_converts (input, output) values ('.ppt', '.pdf'); - insert into files_converts (input, output) values ('.ppt', '.pptx'); - insert into files_converts (input, output) values ('.pptm', '.odp'); - insert into files_converts (input, output) values ('.pptm', '.pdf'); - insert into files_converts (input, output) values ('.pptm', '.pptx'); - insert into files_converts (input, output) values ('.pptt', '.pptx'); - insert into files_converts (input, output) values ('.pptx', '.odp'); - insert into files_converts (input, output) values ('.pptx', '.pdf'); - insert into files_converts (input, output) values ('.rtf', '.docx'); - insert into files_converts (input, output) values ('.rtf', '.odt'); - insert into files_converts (input, output) values ('.rtf', '.pdf'); - insert into files_converts (input, output) values ('.rtf', '.txt'); - insert into files_converts (input, output) values ('.txt', '.docx'); - insert into files_converts (input, output) values ('.txt', '.odt'); - insert into files_converts (input, output) values ('.txt', '.pdf'); - insert into files_converts (input, output) values ('.txt', '.rtf'); - insert into files_converts (input, output) values ('.xls', '.csv'); - insert into files_converts (input, output) values ('.xls', '.ods'); - insert into files_converts (input, output) values ('.xls', '.pdf'); - insert into files_converts (input, output) values ('.xls', '.xlsx'); - insert into files_converts (input, output) values ('.xlsm', '.csv'); - insert into files_converts (input, output) values ('.xlsm', '.ods'); - insert into files_converts (input, output) values ('.xlsm', '.pdf'); - insert into files_converts (input, output) values ('.xlsm', '.xlsx'); - insert into files_converts (input, output) values ('.xlst', '.xlsx'); - insert into files_converts (input, output) values ('.xlsx', '.csv'); - insert into files_converts (input, output) values ('.xlsx', '.ods'); - insert into files_converts (input, output) values ('.xlsx', '.pdf'); - insert into files_converts (input, output) values ('.xlt', '.csv'); - insert into files_converts (input, output) values ('.xlt', '.ods'); - insert into files_converts (input, output) values ('.xlt', '.pdf'); - insert into files_converts (input, output) values ('.xlt', '.xlsx'); - insert into files_converts (input, output) values ('.xltm', '.csv'); - insert into files_converts (input, output) values ('.xltm', '.ods'); - insert into files_converts (input, output) values ('.xltm', '.pdf'); - insert into files_converts (input, output) values ('.xltm', '.xlsx'); - insert into files_converts (input, output) values ('.xltx', '.csv'); - insert into files_converts (input, output) values ('.xltx', '.ods'); - insert into files_converts (input, output) values ('.xltx', '.pdf'); - insert into files_converts (input, output) values ('.xltx', '.xlsx'); - insert into files_converts (input, output) values ('.xps', '.pdf'); - commit; - - start transaction; - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.gmx.com', 'Drafts', 3, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.gmx.com', 'OUTBOX', 2, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.gmx.com', 'Sent', 2, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.gmx.com', 'Spam', 5, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.gmx.com', 'Trash', 4, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.googlemail.com', 'Migrated', 1, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.googlemail.com', '[Gmail]', 1, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.googlemail.com', '[Gmail]/Destacados', 0, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.googlemail.com', '[Gmail]/Enviados', 2, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.googlemail.com', '[Gmail]/Gesendet', 2, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.googlemail.com', '[Gmail]/Important', 0, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.googlemail.com', '[Gmail]/Sent Mail', 2, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.googlemail.com', '[Gmail]/Wichtig', 0, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.googlemail.com', '[Gmail]/Важное', 0, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.googlemail.com', '[Gmail]/Отправленные', 2, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.hushmail.com', 'Drafts', 3, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.hushmail.com', 'Junk', 5, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.hushmail.com', 'Sent', 2, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.hushmail.com', 'Trash', 4, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.mail.yahoo.com', 'Bulk Mail', 5, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.mail.yahoo.com', 'Draft', 3, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.mail.yahoo.com', 'Sent', 2, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.mail.yahoo.com', 'Trash', 4, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.rambler.ru', 'DraftBox', 3, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.rambler.ru', 'SentBox', 2, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.rambler.ru', 'Spam', 5, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.rambler.ru', 'Trash', 4, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('imap.yandex.ru', 'исходящие', 0, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('mail.rambler.ru', 'DraftBox', 3, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('mail.rambler.ru', 'SentBox', 2, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('mail.rambler.ru', 'Spam', 5, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('mail.rambler.ru', 'Trash', 4, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('secureimap.t-online.de', 'INBOX.Archive', 0, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('secureimap.t-online.de', 'INBOX.Drafts', 3, 1); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('secureimap.t-online.de', 'INBOX.Sent', 2, 0); - insert ignore into mail_imap_special_mailbox (server, name, folder_id, skip) values ('secureimap.t-online.de', 'INBOX.Trash', 4, 1); - - insert ignore into mail_imap_flags (name, folder_id, skip) values ('all', 0, 1); - insert ignore into mail_imap_flags (name, folder_id, skip) values ('archive', 0, 1); - insert ignore into mail_imap_flags (name, folder_id, skip) values ('bulk', 5, 0); - insert ignore into mail_imap_flags (name, folder_id, skip) values ('drafts', 0, 1); - insert ignore into mail_imap_flags (name, folder_id, skip) values ('flagged', 0, 1); - insert ignore into mail_imap_flags (name, folder_id, skip) values ('important', 0, 1); - insert ignore into mail_imap_flags (name, folder_id, skip) values ('inbox', 1, 0); - insert ignore into mail_imap_flags (name, folder_id, skip) values ('junk', 5, 0); - insert ignore into mail_imap_flags (name, folder_id, skip) values ('noselect', 0, 1); - insert ignore into mail_imap_flags (name, folder_id, skip) values ('sent', 2, 0); - insert ignore into mail_imap_flags (name, folder_id, skip) values ('spam', 5, 0); - insert ignore into mail_imap_flags (name, folder_id, skip) values ('trash', 0, 1); - - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (1, '1und1.de', '1&1', '1&1', 'http://hilfe-center.1und1.de/access/search/go.php?t=e698123'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (2, 'abc.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (3, 'agate.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (4, 'alice.it', 'Alice Italy', 'Alice', 'http://aiuto.alice.it/informazioni/clientemail/thunderbird.html'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (5, 'amail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (6, 'amber.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (7, 'aol.com', 'AOL Mail', 'AOL', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (8, 'apost.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (9, 'aqua.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (10, 'arcor.de', 'Arcor', 'Arcor', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (11, 'arubapec.it', 'Aruba PEC', 'Aruba', 'http://pec.aruba.it/guide_filmate.asp'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (12, 'att.net', 'AT&T', 'AT&T', 'http://www.att.com/esupport/article.jsp?sid=KB401570&ct=9000152'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (13, 'ballade.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (14, 'bay.wind.ne.jp', '?????????', 'wind', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (15, 'bb-niigata.jp', 'BB????', 'BB-NIIGATA', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (16, 'beige.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (17, 'biglobe.ne.jp', 'Biglobe', 'Biglobe', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (18, 'bigpond.com', 'Telstra Bigpond', 'Bigpond', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (19, 'blue.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (20, 'bluemail.ch', 'bluewin.ch', 'bluewin.ch', 'http://smtphelp.bluewin.ch/swisscomdtg/setup/?'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (21, 'bluewin.ch', 'bluewin.ch', 'bluewin.ch', 'http://smtphelp.bluewin.ch/swisscomdtg/setup/'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (22, 'bmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (23, 'bolero.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (24, 'bpost.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (25, 'broba.cc', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (26, 'brown.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (27, 'camel.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (28, 'cameo.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (29, 'cc9.ne.jp', 'CC9???????????', 'CC9', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (30, 'cek.ne.jp', '???????????', 'CEK-Net', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (31, 'cgl.ucsf.edu', 'UCSF CGL email', 'CGL email', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (32, 'charter.com', 'Charter Commuications', 'Charter', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (33, 'clio.ne.jp', 'CLIO-Net??????', 'CLIO-Net', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (34, 'cmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (35, 'co1.wind.ne.jp', '?????????', 'wind', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (36, 'co2.wind.ne.jp', '?????????', 'wind', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (37, 'co3.wind.ne.jp', '?????????', 'wind', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (38, 'cocoa.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (39, 'coda.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (40, 'comcast.net', 'Comcast', 'Comcast', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (41, 'concerto.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (42, 'coral.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (43, 'courante.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (44, 'cpost.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (45, 'cream.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (46, 'dan.wind.ne.jp', '?????????', 'wind', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (47, 'dance.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (48, 'dd.iij4u.or.jp', 'IIJ4U', 'IIJ4U', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (49, 'df.eu', 'domainFACTORY', 'domainFACTORY', 'http://www.df.eu/de/service/df-faq/e-mail/mail-programme/'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (50, 'dmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (51, 'earthlink.net', 'EarthLink', 'EarthLink', 'http://support.earthlink.net/email/email-server-settings.php'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (52, 'ebony.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (53, 'email.it', 'email.it', 'email.it', 'http://www.email.it/ita/config/thunder.php'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (54, 'email.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (55, 'ewetel.de', 'EWE Tel', 'EWE Tel', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (56, 'fantasy.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (57, 'flamenco.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (58, 'fmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (59, 'francetelecom.fr', 'France Telecom / Orange', 'Orange', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (60, 'free.fr', 'Free Telecom', 'free.fr', 'http://www.free.fr/assistance/599-thunderbird.html'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (61, 'freenet.de', 'Freenet Mail', 'Freenet', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (62, 'fuga.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (63, 'gandi.net', 'Gandi Mail', 'Gandi', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (64, 'gmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (65, 'gmx.com', 'GMX Freemail', 'GMX', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (66, 'gmx.net', 'GMX Freemail', 'GMX', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (67, 'go.tvm.ne.jp', '????????????????????', 'TVM-Net', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (68, 'goo.jp', 'goo ????????', 'goo', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (69, 'googlemail.com', 'Google Mail', 'GMail', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (70, 'grape.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (71, 'gray.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (72, 'hal.ne.jp', '?????????', 'HAL', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (73, 'hana.or.jp', '????????', '????', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (74, 'hotmail.com', 'Microsoft Live Hotmail', 'Hotmail', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (75, 'i.softbank.jp', 'SoftBank', 'SoftBank', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (76, 'ic-net.or.jp', 'IC-NET', 'IC-NET', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (77, 'iijmio-mail.jp', 'IIJmio ????????', 'IIJmio', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (78, 'iiyama-catv.ne.jp', '???????i?????', 'i?????', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (79, 'imail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (80, 'inbox.lt', 'Inbox.lt', 'Inbox.lt', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (81, 'inbox.lv', 'Inbox.lv', 'Inbox.lv', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (82, 'indigo.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (83, 'inet-shibata.or.jp', '??????????', 'INET-SHIBATA', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (84, 'internode.on.net', 'Internode', 'Internode', 'http://www.internode.on.net/support/guides/email/secure_email/'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (85, 'ipax.at', 'IPAX Internet Services', 'IPAX', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (86, 'ivory.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (87, 'iwafune.ne.jp', '???????????', 'IWAFUNE', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (88, 'jade.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (89, 'janis.or.jp', 'Janis', 'Janis', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (90, 'jet.ne.jp', 'JETINTERNET', 'JET', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (91, 'ji.jet.ne.jp', 'JETINTERNET', 'JET', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (92, 'jmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (93, 'kabelmail.de', 'Kabel Deutschland', 'Kabel D', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (94, 'kelcom.net', 'KELCOM Internet', 'KELCOM', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (95, 'khaki.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (96, 'kl.wind.ne.jp', '?????????', 'wind', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (97, 'kmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (98, 'kokuyou.ne.jp', '????????????', '?????', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (99, 'lapis.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (100, 'laposte.net', 'LaPoste', 'LaPoste', 'http://www.geckozone.org/forum/viewtopic.php?f=4&t=93118'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (101, 'lemon.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (102, 'libero.it', 'Libero Mail', 'Libero', 'http://aiuto.libero.it/mail/istruzioni/configura-mozilla-thunderbird-per-windows-a11.phtml'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (103, 'lilac.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (104, 'lime.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (105, 'mahoroba.ne.jp', '???????????', '????', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (106, 'mail.com', 'mail.com', 'mail.com', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (107, 'mail.dk', 'TDC (DK)', 'TDC', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (108, 'mail.iwafune.ne.jp', '???????????', 'IWAFUNE', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (109, 'mail.ru', 'mail.ru', 'mail.ru', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (110, 'mail.telenor.dk', 'Telenor Danmark', 'Telenor', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (111, 'mail.wind.ne.jp', '?????????', 'wind', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (112, 'maroon.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (113, 'me.com', 'Apple iCloud', 'Apple', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (114, 'minuet.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (115, 'ml.murakami.ne.jp', '???????????', 'IWAFUNE', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (116, 'mnet.ne.jp', 'Mnet ??? ????', 'Mnet???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (117, 'mopera.net', 'mopera U', 'mopera U', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (118, 'mozilla.com', 'Mozilla Corporation and Mozilla Foundation internal email addresses', 'mozilla.com', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (119, 'mx1.tiki.ne.jp', 'TikiTiki???????', 'TikiTiki', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (120, 'navy.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (121, 'nctsoft.com', 'nctsoft', 'nct', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (122, 'nifty.com', '@nifty', '@nifty', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (123, 'nsat.jp', 'BB????', 'NSAT', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (124, 'o2.pl', 'o2 Poczta', 'o2', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (125, 'olive.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (126, 'onet.pl', 'Poczta Onet', 'Onet', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (127, 'opal.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (128, 'orange.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (129, 'orchid.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (130, 'ovh.net', 'OVH', 'OVH', 'http://guides.ovh.com/ConfigurationEmail'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (131, 'pal.kijimadaira.jp', '????FTTH', '????FTTH', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (132, 'palette.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (133, 'parabox.or.jp', '??????', 'PARABOX', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (134, 'pdx.edu', 'Portland State University Mail', 'PSU Mail', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (135, 'peach.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (136, 'peoplepc.com', 'PeoplePC', 'PeoplePC', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (137, 'plum.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (138, 'po.dcn.ne.jp', 'DCN???????????', 'DCN', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (139, 'po.wind.ne.jp', '?????????', 'wind', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (140, 'polka.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (141, 'pop.shibata.ne.jp', '??????????', 'INET-SHIBATA', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (142, 'posteo.de', 'Posteo', 'Posteo', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (143, 'purple.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (144, 'qip.ru', 'qip.ru', 'qip.ru', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (145, 'rainbow.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (146, 'rambler.ru', 'Rambler Mail', 'Rambler', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (147, 'red.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (148, 'rmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (149, 'rondo.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (150, 'rose.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (151, 'rouge.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (152, 'rr.com', 'RoadRunner', 'RR', 'http://help.rr.com/HMSFaqs/e_emailserveraddys.aspx'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (153, 'ruby.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (154, 'sakunet.ne.jp', '?????????', 'Saku-Net', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (155, 'sea.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (156, 'sepia.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (157, 'serenade.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (158, 'seznam.cz', 'Seznam', 'Seznam', 'http://napoveda.seznam.cz/cz/jake-jsou-adresy-pop3-a-smtp-serveru.html'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (159, 'sfr.fr', 'SFR / Neuf', 'SFR', 'http://assistance.sfr.fr/internet_neufbox-de-SFR/utiliser-email/parametrer-id-sfr/fc-505-50680'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (160, 'silk.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (161, 'silver.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (162, 'sky.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (163, 'skynet.be', 'skynet', 'skynet', 'http://support.en.belgacom.be/app/answers/detail/a_id/14337/kw/thunderbird'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (164, 'smail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (165, 'snow.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (166, 'so.wind.ne.jp', '?????????', 'wind', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (167, 'sonata.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (168, 'strato.de', 'Strato', 'Strato', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (169, 'studenti.univr.it', 'Universita degli Studi di Verona', 'UniVR', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (170, 'suite.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (171, 'sympatico.ca', 'Sympatico Email', 'Sympatico', 'http://internet.bell.ca/index.cfm?method=content.view&category_id=585&content_id=12767'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (172, 'symphony.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (173, 't-online.de', 'T-Online', 'T-Online', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (174, 'taupe.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (175, 'terra.es', 'Correo Terra', 'Terra', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (176, 'tiki.ne.jp', 'TikiTiki???????', 'TikiTiki', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (177, 'tiscali.cz', 'Tiscali', 'Tiscali', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (178, 'tiscali.it', 'Tiscali Italy', 'Tiscali', 'http://assistenza.tiscali.it/tecnica/posta/configurazioni/'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (179, 'tmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (180, 'toccata.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (181, 'topaz.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (182, 'trio.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (183, 'umail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (184, 'umich.edu', 'UM ITCS Email', 'UM ITCS', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (185, 'upcmail.nl', 'UPC Nederland', 'UPC', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (186, 'verizon.net', 'Verizon Online', 'Verizon', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (187, 'versatel.de', 'Versatel', 'Versatel', 'http://www.versatel.de/hilfe/index_popup.php?einrichtung_email_programm'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (188, 'violet.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (189, 'vm.aikis.or.jp', 'aikis', 'aikis', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (190, 'vmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (191, 'vp.tiki.ne.jp', 'TikiTiki???????', 'TikiTiki', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (192, 'waltz.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (193, 'wave.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (194, 'web.de', 'WEB.DE Freemail', 'Web.de', 'http://hilfe.freemail.web.de/freemail/e-mail/pop3/thunderbird/'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (195, 'white.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (196, 'wildwestdomains.com', 'Your WildWest domain', 'WildWest', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (197, 'wine.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (198, 'wmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (199, 'wp.pl', 'Poczta Wirtualna Polska', 'Poczta WP', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (200, 'xmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (201, 'xp.wind.jp', '?????????', 'wind', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (202, 'xpost.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (203, 'xs4all.nl', 'XS4All', 'XS4All', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (204, 'xtra.co.nz', 'Yahoo! Mail', 'Yahoo', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (205, 'yahoo.co.jp', 'Yahoo! ???', 'Yahoo! ???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (206, 'yahoo.com', 'Yahoo! Mail', 'Yahoo', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (207, 'yandex.ru', 'Yandex Mail', 'Yandex', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (208, 'ybb.ne.jp', 'Yahoo! BB', 'Yahoo! BB', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (209, 'yellow.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (210, 'ymail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (211, 'ypost.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (212, 'ziggo.nl', 'Ziggo', 'Ziggo', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (213, 'zmail.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (214, 'zpost.plala.or.jp', '???', '???', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (215, 'avsmedia.com', 'avsmedia.com', 'avsmedia', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (216, 'avsmedia.net', 'avsmedia.net', 'avsmedia', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (218, 'ilearney.com', 'ilearney.com', 'ilearney.com', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (219, 'fpl-technology.com', 'fpl-technology.com', 'fpl-technology.com', 'http://fpl-technology.com'); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (220, 'icloud.com', 'Apple iCloud', 'Apple', NULL); - insert ignore into mail_mailbox_provider (id, name, display_name, display_short_name, documentation) values (221, 'office365.com', 'Microsoft Office 365', 'Office365', 'https://products.office.com'); - - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (493, 1, 'imap', 'imap.1und1.de', 993, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (494, 1, 'imap', 'imap.1und1.de', 143, 'STARTTLS', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (495, 1, 'pop3', 'pop.1und1.de', 995, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (496, 1, 'pop3', 'pop.1und1.de', 110, 'STARTTLS', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (497, 1, 'smtp', 'smtp.1und1.de', 587, 'STARTTLS', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (498, 2, 'pop3', 'abc.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (499, 2, 'smtp', 'abc.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (500, 3, 'pop3', 'agate.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (501, 3, 'smtp', 'agate.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (502, 4, 'imap', 'in.alice.it', 143, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (503, 4, 'pop3', 'in.alice.it', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (504, 4, 'smtp', 'out.alice.it', 587, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (505, 5, 'pop3', 'amail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (506, 5, 'smtp', 'amail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (507, 6, 'pop3', 'amber.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (508, 6, 'smtp', 'amber.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (509, 7, 'imap', 'imap.aol.com', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (510, 7, 'imap', 'imap.aol.com', 143, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (511, 7, 'pop3', 'pop.aol.com', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (512, 7, 'pop3', 'pop.aol.com', 110, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (513, 7, 'smtp', 'smtp.aol.com', 587, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (514, 8, 'pop3', 'apost.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (515, 8, 'smtp', 'apost.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (516, 9, 'pop3', 'aqua.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (517, 9, 'smtp', 'aqua.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (518, 10, 'imap', 'imap.arcor.de', 993, 'SSL', '%EMAILLOCALPART%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (519, 10, 'imap', 'imap.arcor.de', 143, 'STARTTLS', '%EMAILLOCALPART%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (520, 10, 'pop3', 'pop3.arcor.de', 995, 'SSL', '%EMAILLOCALPART%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (521, 10, 'smtp', 'mail.arcor.de', 465, 'SSL', '%EMAILLOCALPART%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (522, 11, 'imap', 'imaps.pec.aruba.it', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (523, 11, 'pop3', 'pop3s.pec.aruba.it', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (524, 11, 'smtp', 'smtps.pec.aruba.it', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (525, 12, 'pop3', 'pop.att.yahoo.com', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (526, 12, 'smtp', 'smtp.att.yahoo.com', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (527, 215, 'pop3', 'mail.avsmedia.com', 110, 'plain', '%EMAILLOCALPART%@%EMAILHOSTNAME%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (528, 215, 'smtp', 'mail.avsmedia.com', 25, 'plain', '', 'none', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (529, 216, 'pop3', '78.40.187.62', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (530, 216, 'smtp', '78.40.187.62', 25, 'plain', '', 'none', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (531, 13, 'pop3', 'ballade.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (532, 13, 'smtp', 'ballade.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (533, 14, 'pop3', 'bay.wind.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (534, 14, 'smtp', 'bay.wind.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (535, 15, 'pop3', 'pop.bb-niigata.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (536, 15, 'smtp', 'pop.bb-niigata.jp', 25, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (537, 16, 'pop3', 'beige.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (538, 16, 'smtp', 'beige.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (539, 17, 'pop3', 'mail.biglobe.ne.jp', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (540, 17, 'smtp', 'mail.biglobe.ne.jp', 587, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (541, 18, 'pop3', 'mail.bigpond.com', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (542, 18, 'smtp', 'mail.bigpond.com', 25, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (543, 19, 'pop3', 'blue.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (544, 19, 'smtp', 'blue.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (545, 20, 'imap', 'imaps.bluewin.ch', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (546, 20, 'pop3', 'pop3s.bluewin.ch', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (547, 20, 'smtp', 'smtpauths.bluewin.ch', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (548, 21, 'imap', 'imaps.bluewin.ch', 993, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (549, 21, 'pop3', 'pop3s.bluewin.ch', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (550, 21, 'smtp', 'smtpauths.bluewin.ch', 465, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (551, 22, 'pop3', 'bmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (552, 22, 'smtp', 'bmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (553, 23, 'pop3', 'bolero.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (554, 23, 'smtp', 'bolero.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (555, 24, 'pop3', 'bpost.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (556, 24, 'smtp', 'bpost.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (557, 25, 'pop3', 'mail.broba.cc', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (558, 25, 'smtp', 'mail.broba.cc', 587, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (559, 26, 'pop3', 'brown.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (560, 26, 'smtp', 'brown.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (561, 27, 'pop3', 'camel.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (562, 27, 'smtp', 'camel.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (563, 28, 'pop3', 'cameo.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (564, 28, 'smtp', 'cameo.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (565, 29, 'pop3', 'pop.cc9.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (566, 29, 'smtp', 'smtp.cc9.ne.jp', 25, 'plain', '', 'none', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (567, 30, 'pop3', 'mail.cek.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (568, 30, 'smtp', 'smtp.cek.ne.jp', 25, 'plain', '', 'none', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (569, 31, 'imap', 'plato.cgl.ucsf.edu', 993, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (570, 31, 'smtp', 'plato.cgl.ucsf.edu', 587, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (571, 32, 'imap', 'mobile.charter.net', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (572, 32, 'imap', 'imap.charter.net', 143, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (573, 32, 'smtp', 'mobile.charter.net', 587, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (574, 33, 'pop3', 'mail.clio.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (575, 33, 'smtp', 'mail.clio.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (576, 34, 'pop3', 'cmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (577, 34, 'smtp', 'cmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (578, 35, 'pop3', 'co1.wind.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (579, 35, 'smtp', 'co1.wind.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (580, 36, 'pop3', 'co2.wind.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (581, 36, 'smtp', 'co2.wind.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (582, 37, 'pop3', 'co3.wind.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (583, 37, 'smtp', 'co3.wind.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (584, 38, 'pop3', 'cocoa.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (585, 38, 'smtp', 'cocoa.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (586, 39, 'pop3', 'coda.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (587, 39, 'smtp', 'coda.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (588, 40, 'pop3', 'mail.comcast.net', 110, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (589, 40, 'smtp', 'smtp.comcast.net', 587, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (590, 41, 'pop3', 'concerto.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (591, 41, 'smtp', 'concerto.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (592, 42, 'pop3', 'coral.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (593, 42, 'smtp', 'coral.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (594, 43, 'pop3', 'courante.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (595, 43, 'smtp', 'courante.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (596, 44, 'pop3', 'cpost.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (597, 44, 'smtp', 'cpost.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (598, 45, 'pop3', 'cream.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (599, 45, 'smtp', 'cream.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (600, 46, 'pop3', 'dan.wind.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (601, 46, 'smtp', 'dan.wind.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (602, 47, 'pop3', 'dance.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (603, 47, 'smtp', 'dance.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (604, 48, 'pop3', 'mbox.iij4u.or.jp', 110, 'STARTTLS', '%EMAILLOCALPART%.%EMAILDOMAIN%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (605, 48, 'smtp', 'mbox.iij4u.or.jp', 587, 'STARTTLS', '%EMAILLOCALPART%.%EMAILDOMAIN%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (606, 49, 'imap', 'sslmailpool.ispgateway.de', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (607, 49, 'pop3', 'sslmailpool.ispgateway.de', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (608, 49, 'smtp', 'smtprelaypool.ispgateway.de', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (609, 50, 'pop3', 'dmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (610, 50, 'smtp', 'dmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (611, 51, 'imap', 'imap.earthlink.net', 143, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (612, 51, 'pop3', 'pop.earthlink.net', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (613, 51, 'smtp', 'smtpauth.earthlink.net', 587, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (614, 52, 'pop3', 'ebony.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (615, 52, 'smtp', 'ebony.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (616, 53, 'imap', 'imapmail.email.it', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (617, 53, 'pop3', 'popmail.email.it', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (618, 53, 'smtp', 'smtp.email.it', 587, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (619, 54, 'pop3', 'email.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (620, 54, 'smtp', 'email.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (621, 55, 'pop3', 'pop3s-1.ewetel.net', 995, 'SSL', '%EMAILLOCALPART%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (622, 55, 'smtp', 'smtps-1.ewetel.net', 25, 'STARTTLS', '%EMAILLOCALPART%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (623, 56, 'pop3', 'fantasy.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (624, 56, 'smtp', 'fantasy.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (625, 57, 'pop3', 'flamenco.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (626, 57, 'smtp', 'flamenco.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (627, 58, 'pop3', 'fmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (628, 58, 'smtp', 'fmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (629, 59, 'pop3', 'pop.orange.fr', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (630, 59, 'imap', 'imap.orange.fr', 143, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (631, 59, 'smtp', 'smtp.orange.fr', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (632, 60, 'imap', 'imap.free.fr', 993, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (633, 60, 'pop3', 'pop.free.fr', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (634, 60, 'smtp', 'smtp.free.fr', 25, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (635, 61, 'imap', 'mx.freenet.de', 993, 'SSL', '%EMAILADDRESS%', 'password-encrypted', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (636, 61, 'imap', 'mx.freenet.de', 143, 'STARTTLS', '%EMAILADDRESS%', 'password-encrypted', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (637, 61, 'pop3', 'mx.freenet.de', 995, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (638, 61, 'pop3', 'mx.freenet.de', 110, 'STARTTLS', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (639, 61, 'smtp', 'mx.freenet.de', 465, 'SSL', '%EMAILADDRESS%', 'password-encrypted', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (640, 62, 'pop3', 'fuga.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (641, 62, 'smtp', 'fuga.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (642, 63, 'imap', 'mail.gandi.net', 993, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (643, 63, 'imap', 'mail.gandi.net', 143, 'STARTTLS', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (644, 63, 'pop3', 'mail.gandi.net', 995, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (645, 63, 'pop3', 'mail.gandi.net', 110, 'STARTTLS', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (646, 63, 'smtp', 'mail.gandi.net', 465, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (647, 64, 'pop3', 'gmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (648, 64, 'smtp', 'gmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (649, 65, 'imap', 'imap.gmx.com', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (650, 65, 'imap', 'imap.gmx.com', 143, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (651, 65, 'pop3', 'pop.gmx.com', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (652, 65, 'pop3', 'pop.gmx.com', 110, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (653, 65, 'smtp', 'mail.gmx.com', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (654, 66, 'imap', 'imap.gmx.net', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (655, 66, 'imap', 'imap.gmx.net', 143, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (656, 66, 'pop3', 'pop.gmx.net', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (657, 66, 'pop3', 'pop.gmx.net', 110, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (658, 66, 'smtp', 'mail.gmx.net', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (659, 67, 'pop3', 'go.tvm.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (660, 67, 'smtp', 'go.tvm.ne.jp', 25, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (661, 68, 'pop3', 'pop.mail.goo.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (662, 68, 'smtp', 'smtp.mail.goo.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (663, 69, 'imap', 'imap.googlemail.com', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (664, 69, 'pop3', 'pop.googlemail.com', 995, 'SSL', 'recent:%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (665, 69, 'smtp', 'smtp.googlemail.com', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (666, 70, 'pop3', 'grape.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (667, 70, 'smtp', 'grape.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (668, 71, 'pop3', 'gray.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (669, 71, 'smtp', 'gray.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (670, 72, 'pop3', 'mail.hal.ne.jp', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (671, 72, 'smtp', 'mail.hal.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (672, 73, 'pop3', 'mail.hana.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (673, 73, 'smtp', 'mail.hana.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (674, 74, 'pop3', 'pop-mail.outlook.com', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (675, 74, 'smtp', 'smtp-mail.outlook.com', 587, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (676, 75, 'imap', 'imap.softbank.jp', 993, 'SSL', '%EMAILLOCALPART%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (677, 75, 'smtp', 'smtp.softbank.jp', 465, 'SSL', '%EMAILLOCALPART%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (678, 76, 'pop3', 'mail.ic-net.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (679, 76, 'smtp', 'smtp.ic-net.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (680, 77, 'pop3', 'mbox.iijmio-mail.jp', 110, 'STARTTLS', '%EMAILLOCALPART%.%EMAILDOMAIN%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (681, 77, 'smtp', 'mbox.iijmio-mail.jp', 587, 'STARTTLS', '%EMAILLOCALPART%.%EMAILDOMAIN%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (682, 78, 'pop3', 'mail.iiyama-catv.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (683, 78, 'smtp', 'smtp.iiyama-catv.ne.jp', 25, 'plain', '', 'none', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (684, 79, 'pop3', 'imail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (685, 79, 'smtp', 'imail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (686, 80, 'pop3', 'mail.inbox.lt', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (687, 80, 'smtp', 'mail.inbox.lt', 587, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (688, 81, 'pop3', 'mail.inbox.lv', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (689, 81, 'smtp', 'mail.inbox.lv', 587, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (690, 82, 'pop3', 'indigo.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (691, 82, 'smtp', 'indigo.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (692, 83, 'pop3', 'po.inet-shibata.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (693, 83, 'smtp', 'po.inet-shibata.or.jp', 25, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (694, 84, 'imap', 'mail.internode.on.net', 993, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (695, 84, 'pop3', 'mail.internode.on.net', 995, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (696, 84, 'smtp', 'mail.internode.on.net', 465, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (697, 85, 'imap', 'mail.ipax.at', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (698, 85, 'smtp', 'mail.ipax.at', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (699, 86, 'pop3', 'ivory.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (700, 86, 'smtp', 'ivory.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (701, 87, 'pop3', 'po.iwafune.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (702, 87, 'smtp', 'po.iwafune.ne.jp', 25, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (703, 88, 'pop3', 'jade.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (704, 88, 'smtp', 'jade.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (705, 89, 'pop3', 'mail.%EMAILDOMAIN%', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (706, 89, 'smtp', 'smtp.%EMAILDOMAIN%', 25, 'plain', '', 'none', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (707, 90, 'pop3', 'pop.jet.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (708, 90, 'imap', 'imap.jet.ne.jp', 993, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (709, 90, 'smtp', 'smtp.jet.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (710, 91, 'pop3', 'pop02.jet.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (711, 91, 'smtp', 'smtp02.jet.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (712, 92, 'pop3', 'jmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (713, 92, 'smtp', 'jmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (714, 93, 'pop3', 'pop3.kabelmail.de', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (715, 93, 'smtp', 'smtp.kabelmail.de', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (716, 94, 'pop3', 'pop1.kelcom.net', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (717, 94, 'smtp', 'smtp.kelcom.net', 25, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (718, 95, 'pop3', 'khaki.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (719, 95, 'smtp', 'khaki.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (720, 96, 'pop3', 'kl.wind.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (721, 96, 'smtp', 'kl.wind.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (722, 97, 'pop3', 'kmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (723, 97, 'smtp', 'kmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (724, 98, 'pop3', 'mail.kokuyou.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (725, 98, 'smtp', 'smtp.kokuyou.ne.jp', 25, 'plain', '', 'none', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (726, 99, 'pop3', 'lapis.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (727, 99, 'smtp', 'lapis.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (728, 100, 'imap', 'imap.laposte.net', 993, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (729, 100, 'pop3', 'pop.laposte.net', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (730, 100, 'smtp', 'smtp.laposte.net', 465, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (731, 101, 'pop3', 'lemon.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (732, 101, 'smtp', 'lemon.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (733, 102, 'imap', 'imapmail.libero.it', 143, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (734, 102, 'pop3', 'popmail.libero.it', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (735, 102, 'smtp', 'smtp.libero.it', 25, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (736, 103, 'pop3', 'lilac.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (737, 103, 'smtp', 'lilac.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (738, 104, 'pop3', 'lime.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (739, 104, 'smtp', 'lime.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (740, 105, 'pop3', 'mail.mahoroba.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (741, 105, 'smtp', 'mail.mahoroba.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (742, 106, 'imap', 'imap.mail.com', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (743, 106, 'imap', 'imap.mail.com', 143, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (744, 106, 'pop3', 'pop.mail.com', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (745, 106, 'pop3', 'pop.mail.com', 110, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (746, 106, 'smtp', 'smtp.mail.com', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (747, 107, 'pop3', 'pop3.mail.dk', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (748, 107, 'smtp', 'asmtp.mail.dk', 587, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (749, 108, 'pop3', 'mail.iwafune.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (750, 108, 'smtp', 'mail.iwafune.ne.jp', 25, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (751, 109, 'pop3', 'pop.mail.ru', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (752, 109, 'imap', 'imap.mail.ru', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (753, 109, 'smtp', 'smtp.mail.ru', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (754, 110, 'imap', 'mail.telenor.dk', 143, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (755, 110, 'pop3', 'mail.telenor.dk', 110, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (756, 110, 'smtp', 'mail.telenor.dk', 587, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (757, 111, 'pop3', 'mail.wind.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (758, 111, 'smtp', 'mail.wind.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (759, 112, 'pop3', 'maroon.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (760, 112, 'smtp', 'maroon.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (761, 113, 'imap', 'imap.mail.me.com', 993, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (762, 113, 'smtp', 'smtp.mail.me.com', 587, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (763, 114, 'pop3', 'minuet.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (764, 114, 'smtp', 'minuet.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (765, 115, 'pop3', 'ml.murakami.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (766, 115, 'smtp', 'ml.murakami.ne.jp', 25, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (767, 116, 'pop3', 'mail.mnet.ne.jp', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (768, 116, 'smtp', 'mail.mnet.ne.jp', 587, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (769, 117, 'imap', 'mail.mopera.net', 993, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (770, 117, 'imap', 'mail.mopera.net', 143, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (771, 117, 'pop3', 'mail.mopera.net', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (772, 117, 'pop3', 'mail.mopera.net', 110, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (773, 117, 'smtp', 'mail.mopera.net', 465, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (774, 118, 'imap', 'mail.mozilla.com', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (775, 118, 'smtp', 'smtp.mozilla.org', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (776, 119, 'pop3', '%EMAILDOMAIN%', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (777, 119, 'smtp', 'smtp-auth.tiki.ne.jp', 587, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (778, 120, 'pop3', 'navy.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (779, 120, 'smtp', 'navy.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (780, 121, 'pop3', 'mail.nctsoft.com', 110, 'plain', '%EMAILLOCALPART%@%EMAILHOSTNAME%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (781, 121, 'smtp', 'mail.nctsoft.com', 25, 'plain', '', 'none', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (782, 122, 'pop3', 'pop.nifty.com', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (783, 122, 'smtp', 'smtp.nifty.com', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (784, 123, 'pop3', 'mail.nsat.jp', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (785, 123, 'smtp', 'mail.nsat.jp', 587, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (786, 124, 'pop3', 'poczta.o2.pl', 995, 'SSL', '%EMAILLOCALPART%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (787, 124, 'smtp', 'poczta.o2.pl', 465, 'SSL', '%EMAILLOCALPART%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (788, 125, 'pop3', 'olive.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (789, 125, 'smtp', 'olive.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (790, 126, 'pop3', 'pop3.poczta.onet.pl', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (791, 126, 'smtp', 'smtp.poczta.onet.pl', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (792, 127, 'pop3', 'opal.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (793, 127, 'smtp', 'opal.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (794, 128, 'pop3', 'orange.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (795, 128, 'smtp', 'orange.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (796, 129, 'pop3', 'orchid.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (797, 129, 'smtp', 'orchid.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (798, 130, 'imap', 'ssl0.ovh.net', 993, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (799, 130, 'pop3', 'ssl0.ovh.net', 995, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (800, 130, 'smtp', 'ssl0.ovh.net', 465, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (801, 131, 'pop3', 'mail.pal.kijimadaira.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (802, 131, 'smtp', 'smtp.pal.kijimadaira.jp', 25, 'plain', '', 'none', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (803, 132, 'pop3', 'palette.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (804, 132, 'smtp', 'palette.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (805, 133, 'pop3', 'pop3.parabox.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (806, 133, 'smtp', 'smtp.parabox.or.jp', 25, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (807, 134, 'imap', 'psumail.pdx.edu', 993, 'SSL', '%EMAILADDRESS%', 'password-encrypted', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (808, 134, 'imap', 'psumail.pdx.edu', 587, 'STARTTLS', '%EMAILADDRESS%', 'password-encrypted', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (809, 134, 'smtp', 'mailhost.pdx.edu', 465, 'SSL', '%EMAILADDRESS%', 'password-encrypted', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (810, 135, 'pop3', 'peach.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (811, 135, 'smtp', 'peach.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (812, 136, 'imap', 'imap.peoplepc.com', 143, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (813, 136, 'pop3', 'pop.peoplepc.com', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (814, 136, 'smtp', 'smtpauth.peoplepc.com', 587, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (815, 137, 'pop3', 'plum.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (816, 137, 'smtp', 'plum.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (817, 138, 'pop3', 'po.dcn.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (818, 138, 'smtp', 'po.dcn.ne.jp', 25, 'plain', '', 'none', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (819, 139, 'pop3', 'po.wind.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (820, 139, 'smtp', 'po.wind.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (821, 140, 'pop3', 'polka.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (822, 140, 'smtp', 'polka.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (823, 141, 'pop3', '%EMAILDOMAIN%', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (824, 141, 'smtp', '%EMAILDOMAIN%', 25, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (825, 142, 'imap', 'posteo.de', 143, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (826, 142, 'smtp', 'posteo.de', 587, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (827, 143, 'pop3', 'purple.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (828, 143, 'smtp', 'purple.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (829, 144, 'pop3', 'pop.qip.ru', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (830, 144, 'imap', 'imap.qip.ru', 143, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (831, 144, 'smtp', 'smtp.qip.ru', 25, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (832, 145, 'pop3', 'rainbow.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (833, 145, 'smtp', 'rainbow.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (834, 146, 'imap', 'imap.rambler.ru', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (835, 146, 'pop3', 'pop.rambler.ru', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (836, 146, 'smtp', 'smtp.rambler.ru', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (837, 147, 'pop3', 'red.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (838, 147, 'smtp', 'red.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (839, 148, 'pop3', 'rmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (840, 148, 'smtp', 'rmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (841, 149, 'pop3', 'rondo.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (842, 149, 'smtp', 'rondo.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (843, 150, 'pop3', 'rose.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (844, 150, 'smtp', 'rose.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (845, 151, 'pop3', 'rouge.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (846, 151, 'smtp', 'rouge.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (847, 152, 'pop3', 'pop-server.%EMAILDOMAIN%', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (848, 152, 'smtp', 'smtp-server.%EMAILDOMAIN%', 25, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (849, 153, 'pop3', 'ruby.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (850, 153, 'smtp', 'ruby.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (851, 154, 'pop3', 'mail.sakunet.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (852, 154, 'smtp', 'smtp.sakunet.ne.jp', 25, 'plain', '', 'none', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (853, 155, 'pop3', 'sea.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (854, 155, 'smtp', 'sea.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (855, 156, 'pop3', 'sepia.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (856, 156, 'smtp', 'sepia.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (857, 157, 'pop3', 'serenade.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (858, 157, 'smtp', 'serenade.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (859, 158, 'pop3', 'pop3.seznam.cz', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (860, 158, 'smtp', 'smtp.seznam.cz', 25, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (861, 159, 'imap', 'imap.sfr.fr', 143, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (862, 159, 'pop3', 'pop.sfr.fr', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (863, 159, 'smtp', 'smtp.sfr.fr', 587, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (864, 160, 'pop3', 'silk.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (865, 160, 'smtp', 'silk.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (866, 161, 'pop3', 'silver.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (867, 161, 'smtp', 'silver.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (868, 162, 'pop3', 'sky.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (869, 162, 'smtp', 'sky.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (870, 163, 'imap', 'imap.skynet.be', 993, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (871, 163, 'pop3', 'pop.skynet.be', 110, 'plain', '%EMAILADDRESS%', 'password-encrypted', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (872, 163, 'smtp', 'relay.skynet.be', 587, 'STARTTLS', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (873, 164, 'pop3', 'smail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (874, 164, 'smtp', 'smail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (875, 165, 'pop3', 'snow.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (876, 165, 'smtp', 'snow.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (877, 166, 'imap', 'so.wind.ne.jp', 143, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (878, 166, 'smtp', 'so.wind.ne.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (879, 167, 'pop3', 'sonata.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (880, 167, 'smtp', 'sonata.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (881, 168, 'imap', 'imap.strato.de', 993, 'SSL', '%EMAILADDRESS%', 'password-encrypted', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (882, 168, 'pop3', 'pop3.strato.de', 995, 'SSL', '%EMAILADDRESS%', 'password-encrypted', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (883, 168, 'smtp', 'smtp.strato.de', 465, 'SSL', '%EMAILADDRESS%', 'password-encrypted', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (884, 169, 'pop3', 'mail.studenti.univr.it', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (885, 169, 'smtp', 'mail.studenti.univr.it', 465, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (886, 170, 'pop3', 'suite.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (887, 170, 'smtp', 'suite.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (888, 171, 'pop3', 'pophm.sympatico.ca', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (889, 171, 'smtp', 'smtphm.sympatico.ca', 587, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (890, 172, 'pop3', 'symphony.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (891, 172, 'smtp', 'symphony.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (892, 173, 'imap', 'secureimap.t-online.de', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (893, 173, 'pop3', 'securepop.t-online.de', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (894, 173, 'smtp', 'securesmtp.t-online.de', 587, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (895, 174, 'pop3', 'taupe.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (896, 174, 'smtp', 'taupe.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (897, 175, 'imap', 'imap4.terra.es', 143, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (898, 175, 'pop3', 'pop3.terra.es', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (899, 175, 'smtp', 'mailhost.terra.es', 25, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (900, 176, 'pop3', 'mx.tiki.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (901, 176, 'smtp', 'smtp-auth.tiki.ne.jp', 587, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (902, 177, 'pop3', 'pop3.mail.tiscali.cz', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (903, 177, 'smtp', 'smtp.mail.tiscali.cz', 25, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (904, 178, 'imap', 'imap.tiscali.it', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (905, 178, 'pop3', 'pop.tiscali.it', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (906, 178, 'smtp', 'smtp.tiscali.it', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (907, 179, 'pop3', 'tmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (908, 179, 'smtp', 'tmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (909, 180, 'pop3', 'toccata.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (910, 180, 'smtp', 'toccata.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (911, 181, 'pop3', 'topaz.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (912, 181, 'smtp', 'topaz.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (913, 182, 'pop3', 'trio.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (914, 182, 'smtp', 'trio.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (915, 183, 'pop3', 'umail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (916, 183, 'smtp', 'umail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (917, 184, 'imap', 'mail.umich.edu', 993, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (918, 184, 'smtp', 'smtp.mail.umich.edu', 587, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (919, 185, 'pop3', 'pop3.upcmail.nl', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (920, 185, 'smtp', 'smtp.upcmail.nl', 25, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (921, 186, 'pop3', 'incoming.verizon.net', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (922, 186, 'smtp', 'outgoing.verizon.net', 465, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (923, 187, 'imap', 'mx.versatel.de', 143, 'plain', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (924, 187, 'pop3', 'mx.versatel.de', 143, 'plain', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (925, 187, 'smtp', 'smtp.versatel.de', 25, 'plain', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (926, 188, 'pop3', 'violet.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (927, 188, 'smtp', 'violet.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (928, 189, 'pop3', 'mail.aikis.or.jp', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (929, 189, 'smtp', 'mail.aikis.or.jp', 587, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (930, 190, 'pop3', 'vmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (931, 190, 'smtp', 'vmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (932, 191, 'pop3', 'vp.tiki.ne.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (933, 191, 'smtp', 'vs.tiki.ne.jp', 587, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (934, 192, 'pop3', 'waltz.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (935, 192, 'smtp', 'waltz.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (936, 193, 'pop3', 'wave.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (937, 193, 'smtp', 'wave.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (938, 194, 'imap', 'imap.web.de', 993, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (939, 194, 'imap', 'imap.web.de', 143, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (940, 194, 'pop3', 'pop3.web.de', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (941, 194, 'pop3', 'pop3.web.de', 110, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (942, 194, 'smtp', 'smtp.web.de', 587, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (943, 195, 'pop3', 'white.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (944, 195, 'smtp', 'white.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (945, 196, 'pop3', 'pop.secureserver.net', 995, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (946, 196, 'imap', 'imap.secureserver.net', 993, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (947, 196, 'smtp', 'smtpout.secureserver.net', 465, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (948, 197, 'pop3', 'wine.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (949, 197, 'smtp', 'wine.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (950, 198, 'pop3', 'wmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (951, 198, 'smtp', 'wmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (952, 199, 'pop3', 'pop3.wp.pl', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (953, 199, 'smtp', 'smtp.wp.pl', 587, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (954, 200, 'pop3', 'xmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (955, 200, 'smtp', 'xmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (956, 201, 'pop3', 'xp.wind.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (957, 201, 'smtp', 'xp.wind.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (958, 202, 'pop3', 'xpost.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (959, 202, 'smtp', 'xpost.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (960, 203, 'pop3', 'pops.xs4all.nl', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (961, 203, 'smtp', 'smtps.xs4all.nl', 465, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (962, 204, 'pop3', 'pop3.xtra.co.nz', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (963, 204, 'smtp', 'send.xtra.co.nz', 465, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (964, 205, 'pop3', 'pop.mail.yahoo.co.jp', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (965, 205, 'smtp', 'smtp.mail.yahoo.co.jp', 465, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (966, 206, 'pop3', 'pop.mail.yahoo.com', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (967, 206, 'imap', 'imap.mail.yahoo.com', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (968, 206, 'smtp', 'smtp.mail.yahoo.com', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (969, 207, 'imap', 'imap.yandex.ru', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (970, 207, 'pop3', 'pop.yandex.ru', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (971, 207, 'smtp', 'smtp.yandex.ru', 465, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (972, 208, 'pop3', 'ybbpop.mail.yahoo.co.jp', 995, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (973, 208, 'smtp', 'ybbsmtp.mail.yahoo.co.jp', 465, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (974, 209, 'pop3', 'yellow.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (975, 209, 'smtp', 'yellow.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (976, 210, 'pop3', 'ymail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (977, 210, 'smtp', 'ymail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (978, 211, 'pop3', 'ypost.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (979, 211, 'smtp', 'ypost.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (980, 212, 'pop3', 'pop.ziggo.nl', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (981, 212, 'smtp', 'smtp.ziggo.nl', 587, 'STARTTLS', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (982, 213, 'pop3', 'zmail.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (983, 213, 'smtp', 'zmail.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (984, 214, 'pop3', 'zpost.mail.plala.or.jp', 110, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (985, 214, 'smtp', 'zpost.mail.plala.or.jp', 587, 'plain', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (988, 218, 'pop3', 'mail.ilearney.com', 110, 'plain', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (989, 218, 'smtp', 'mail.ilearney.com', 25, 'plain', '', 'none', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (990, 219, 'pop3', 'pop3s.aruba.it', 995, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (991, 219, 'imap', 'imaps.aruba.it', 993, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (992, 219, 'smtp', 'smtps.aruba.it', 465, 'SSL', '%EMAILADDRESS%', 'password-cleartext', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (993, 74, 'imap', 'imap-mail.outlook.com', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (994, 220, 'imap', 'imap.mail.me.com', 993, 'SSL', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (995, 220, 'smtp', 'smtp.mail.me.com', 587, 'STARTTLS', '%EMAILLOCALPART%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (996, 221, 'pop3', 'outlook.office365.com', 995, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (997, 221, 'imap', 'outlook.office365.com', 993, 'SSL', '%EMAILADDRESS%', '', 0); - insert ignore into mail_mailbox_server (id, id_provider, type, hostname, port, socket_type, username, authentication, is_user_data) values (998, 221, 'smtp', 'smtp.office365.com', 587, 'STARTTLS', '%EMAILADDRESS%', '', 0); - - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1203, 110, '1031.inord.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1204, 110, '123mail.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1205, 110, '12fuel.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1206, 110, '12mail.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1207, 110, '12move.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (776, 1, '1and1.co.uk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (774, 1, '1and1.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (764, 1, '1and1.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (777, 1, '1and1.es'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (775, 1, '1and1.fr'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1012, 106, '2die4.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1208, 110, '2senior.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1385, 144, '5ballov.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (778, 2, 'abc.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (999, 106, 'accountant.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1013, 106, 'activist.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1014, 106, 'adexec.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1386, 144, 'aeterna.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1015, 106, 'africamail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (779, 3, 'agate.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (784, 7, 'aim.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1016, 106, 'aircraftmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1017, 106, 'alabama.usa.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1018, 106, 'alaska.usa.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (780, 4, 'alice.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1019, 106, 'allergist.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1020, 106, 'alumni.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1021, 106, 'alumnidirector.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (781, 5, 'amail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (782, 6, 'amber.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1022, 106, 'americamail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (801, 12, 'ameritech.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (827, 25, 'amethyst.broba.cc'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1339, 126, 'amorki.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1023, 106, 'amorous.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1209, 110, 'anarki.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1210, 110, 'anderledes.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1024, 106, 'angelic.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (783, 7, 'aol.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (786, 8, 'apost.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (787, 9, 'aqua.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1025, 106, 'archaeologist.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (788, 10, 'arcor.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1026, 106, 'arizona.usa.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1027, 106, 'artlover.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (790, 11, 'arubapec.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1028, 106, 'asia-mail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1029, 106, 'atheist.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (794, 12, 'att.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1030, 106, 'australiamail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1337, 126, 'autograf.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1395, 146, 'autorambler.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (805, 215, 'avsmedia.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (806, 216, 'avsmedia.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (807, 13, 'ballade.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1031, 106, 'bartender.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (812, 14, 'bay.gunmanet.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (811, 14, 'bay.gunmanet.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (810, 14, 'bay.wind.co.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (809, 14, 'bay.wind.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (808, 14, 'bay.wind.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (813, 15, 'bb-niigata.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (868, 48, 'bc.iij4u.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1211, 110, 'begavet.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (814, 16, 'beige.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (795, 12, 'bellsouth.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1032, 106, 'berlin.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1033, 106, 'bigger.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (815, 17, 'biglobe.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (816, 18, 'bigpond.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (819, 18, 'bigpond.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (817, 18, 'bigpond.net.au'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1034, 106, 'bikerider.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1035, 106, 'birdlover.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1212, 110, 'bitnisse.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (869, 48, 'bk.iij4u.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1190, 109, 'bk.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1036, 106, 'blader.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (989, 102, 'blu.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (820, 19, 'blue.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (821, 20, 'bluemail.ch'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (822, 21, 'bluewin.ch'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (823, 22, 'bmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1037, 106, 'boardermail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (824, 23, 'bolero.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (870, 48, 'bp.iij4u.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (825, 24, 'bpost.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1038, 106, 'brazilmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1039, 106, 'brew-master.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (830, 26, 'brown.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (871, 48, 'bu.iij4u.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1338, 126, 'buziaczek.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1040, 106, 'california.usa.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1041, 106, 'californiamail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (831, 27, 'camel.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (832, 28, 'cameo.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1042, 106, 'caress.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1500, 212, 'casema.nl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1043, 106, 'catlover.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (833, 29, 'cc9.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (834, 30, 'cek.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (835, 31, 'cgl.ucsf.edu'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (837, 32, 'charter.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (836, 32, 'charter.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1003, 106, 'cheerful.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1044, 106, 'chef.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1446, 185, 'chello.nl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1045, 106, 'chemist.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1046, 106, 'chinamail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1213, 110, 'city.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1047, 106, 'clerk.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1048, 106, 'cliffhanger.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (838, 33, 'clio.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (839, 34, 'cmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1454, 187, 'cneweb.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (841, 35, 'co1.wind.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (840, 35, 'co1.wind.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (843, 36, 'co2.wind.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (842, 36, 'co2.wind.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (845, 37, 'co3.wind.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (844, 37, 'co3.wind.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (846, 38, 'cocoa.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (847, 39, 'coda.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1049, 106, 'collector.org'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1050, 106, 'columnist.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (848, 40, 'comcast.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1051, 106, 'comic.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1052, 106, 'computer4u.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (849, 41, 'concerto.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1000, 106, 'consultant.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1053, 106, 'contractor.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1214, 110, 'cool.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1054, 106, 'coolsite.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (828, 25, 'coral.broba.ccv'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (850, 42, 'coral.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1055, 106, 'counsellor.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1056, 106, 'count.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1057, 106, 'couple.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (851, 43, 'courante.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (852, 44, 'cpost.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (853, 45, 'cream.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1058, 106, 'cutey.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1061, 106, 'cyber-wizard.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1059, 106, 'cyberdude.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1215, 110, 'cyberdude.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1060, 106, 'cybergal.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1216, 110, 'cyberjunkie.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1062, 106, 'dallasmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (858, 46, 'dan.gunmanet.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (857, 46, 'dan.gunmanet.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (856, 46, 'dan.wind.co.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (855, 46, 'dan.wind.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (854, 46, 'dan.wind.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (859, 47, 'dance.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1063, 106, 'dbzmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (860, 48, 'dd.iij4u.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1064, 106, 'deliveryman.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1615, 18, 'designgallery.com.au'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (829, 25, 'diamond.broba.cc'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1065, 106, 'diplomats.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1066, 106, 'disciples.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1218, 110, 'dk-online.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1217, 110, 'dk2net.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (873, 50, 'dmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1067, 106, 'doctor.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1068, 106, 'doglover.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1069, 106, 'doramail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1001, 106, 'dr.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1070, 106, 'dublin.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (953, 77, 'e23.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1071, 106, 'earthling.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (874, 51, 'earthlink.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (877, 52, 'ebony.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1219, 110, 'elinstallatoer.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1220, 110, 'elsker.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1221, 110, 'elvis.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1072, 106, 'elvisfan.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (996, 106, 'email.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1410, 158, 'email.cz'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1194, 110, 'email.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (878, 53, 'email.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (879, 54, 'email.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1002, 106, 'engineer.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1073, 106, 'englandmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1006, 106, 'europe.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1074, 106, 'europemail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (880, 55, 'ewetel.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (881, 55, 'ewetel.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1075, 106, 'execs.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1222, 110, 'fald.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1076, 106, 'fan.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (882, 56, 'fantasy.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1223, 110, 'fedt.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1077, 106, 'feelings.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1224, 110, 'feminin.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (861, 48, 'ff.iij4u.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1200, 110, 'film.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1078, 106, 'financier.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1079, 106, 'fireman.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (883, 57, 'flamenco.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (803, 12, 'flash.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1080, 106, 'florida.usa.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (884, 58, 'fmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1450, 187, 'foni.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1081, 106, 'footballer.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1225, 110, 'forening.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1390, 144, 'fotoplenka.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1510, 219, 'fpl-technology.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (887, 60, 'free.fr'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (888, 61, 'freenet.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1369, 144, 'fromru.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1370, 144, 'front.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (889, 62, 'fuga.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1226, 110, 'gadefejer.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (890, 63, 'gandi.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1082, 106, 'gardener.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (826, 25, 'garnet.broba.cc'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1227, 110, 'gason.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1451, 187, 'gelsennet.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1083, 106, 'geologist.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1084, 106, 'germanymail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (792, 11, 'gigapec.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (924, 69, 'gmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (891, 64, 'gmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (916, 66, 'gmx.at'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (919, 66, 'gmx.biz'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (898, 65, 'gmx.ca'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (917, 66, 'gmx.ch'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (899, 65, 'gmx.cn'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (900, 65, 'gmx.co.in'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (895, 65, 'gmx.co.uk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (892, 65, 'gmx.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (901, 65, 'gmx.com.br'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (902, 65, 'gmx.com.my'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (911, 65, 'gmx.com.tr'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (915, 66, 'gmx.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (896, 65, 'gmx.es'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (918, 66, 'gmx.eu'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (897, 65, 'gmx.fr'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (903, 65, 'gmx.hk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (904, 65, 'gmx.ie'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (921, 66, 'gmx.info'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (912, 65, 'gmx.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (913, 65, 'gmx.li'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (914, 66, 'gmx.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (920, 66, 'gmx.org'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (905, 65, 'gmx.ph'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (906, 65, 'gmx.pt'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (907, 65, 'gmx.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (908, 65, 'gmx.se'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (909, 65, 'gmx.sg'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (893, 65, 'gmx.tm'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (910, 65, 'gmx.tw'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (894, 65, 'gmx.us'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (922, 67, 'go.tvm.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1327, 124, 'go2.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (771, 1, 'go4more.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (923, 68, 'goo.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (926, 69, 'google.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (925, 69, 'googlemail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1085, 106, 'graduate.org'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (928, 70, 'grape.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1086, 106, 'graphic-designer.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (929, 71, 'gray.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1228, 110, 'grin.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1229, 110, 'grov.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1087, 106, 'hackermail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1088, 106, 'hairdresser.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (930, 72, 'hal.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (931, 73, 'hana.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1230, 110, 'hardworking.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1231, 110, 'heaven.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1232, 110, 'hemmelig.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (862, 48, 'hh.iij4u.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1089, 106, 'hilarious.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1090, 106, 'hockeymail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1502, 212, 'home.nl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1091, 106, 'homemail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1092, 106, 'hot-shot.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1371, 144, 'hotbox.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (934, 74, 'hotmail.co.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (933, 74, 'hotmail.co.uk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (932, 74, 'hotmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (935, 74, 'hotmail.com.br'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (936, 74, 'hotmail.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (939, 74, 'hotmail.es'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (937, 74, 'hotmail.fr'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (938, 74, 'hotmail.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1372, 144, 'hotmail.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1093, 106, 'hour.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1233, 110, 'huleboer.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1094, 106, 'humanoid.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (948, 75, 'i.softbank.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (949, 76, 'ic-net.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (950, 77, 'iijmio-mail.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (955, 78, 'iiyama-catv.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1507, 218, 'ilearney.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1095, 106, 'illinois.usa.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1234, 110, 'image.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (956, 79, 'imail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1010, 106, 'iname.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1235, 110, 'inbound.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (957, 80, 'inbox.lt'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (958, 81, 'inbox.lv'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1188, 109, 'inbox.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1236, 110, 'indbakke.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (959, 82, 'indigo.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (960, 83, 'inet-shibata.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1237, 110, 'infile.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1197, 110, 'info.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (793, 11, 'ingpec.eu'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1096, 106, 'innocent.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1097, 106, 'inorbit.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1098, 106, 'instruction.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1099, 106, 'instructor.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1100, 106, 'insurer.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (961, 84, 'internode.on.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (990, 102, 'inwind.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1198, 110, 'io.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (988, 102, 'iol.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (962, 85, 'ipax.at'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1101, 106, 'irelandmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (872, 49, 'ispgateway.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1199, 110, 'it.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1102, 106, 'italymail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (963, 86, 'ivory.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (964, 87, 'iwafune.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (876, 51, 'ix.netcom.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (965, 88, 'jade.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (966, 89, 'janis.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1103, 106, 'japan.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (927, 69, 'jazztel.es'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (967, 90, 'jet.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (968, 91, 'ji.jet.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (969, 92, 'jmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1104, 106, 'journalist.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1238, 110, 'jyde.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (981, 96, 'k1.gunmanet.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (980, 96, 'k1.gunmanet.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (979, 96, 'k1.wind.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (978, 96, 'k1.wind.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (970, 93, 'kabelmail.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (971, 94, 'kelcom.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1105, 106, 'keromail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (972, 95, 'khaki.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1106, 106, 'kittymail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (863, 48, 'kk.iij4u.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (977, 96, 'kl.gunmanet.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (976, 96, 'kl.gunmanet.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (975, 96, 'kl.wind.co.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (974, 96, 'kl.wind.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (973, 96, 'kl.wind.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1239, 110, 'klog.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (982, 97, 'kmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1240, 110, 'knus.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (983, 98, 'kokuyou.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1107, 106, 'koreamail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1373, 144, 'krovatka.su'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1241, 110, 'krudt.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1242, 110, 'kulturel.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (772, 1, 'kundenserver.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1374, 144, 'land.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (984, 99, 'lapis.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (985, 100, 'laposte.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1243, 110, 'larsen.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1108, 106, 'lawyer.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1244, 110, 'lazy.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1109, 106, 'legislator.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (986, 101, 'lemon.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1393, 146, 'lenta.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (987, 102, 'libero.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (991, 103, 'lilac.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (992, 104, 'lime.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1005, 106, 'linuxmail.org'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1189, 109, 'list.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (942, 74, 'live.co.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (941, 74, 'live.co.uk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (940, 74, 'live.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (943, 74, 'live.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (944, 74, 'live.fr'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (945, 74, 'live.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (946, 74, 'live.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1509, 74, 'live.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1007, 106, 'london.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1110, 106, 'loveable.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1111, 106, 'lovecat.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1245, 110, 'lystig.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1321, 119, 'ma100.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1283, 113, 'mac.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1112, 106, 'mad.scientist.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1113, 106, 'madonnafan.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1114, 106, 'madrid.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (993, 105, 'mahoroba.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (994, 106, 'mail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1246, 110, 'mail.dia.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1185, 107, 'mail.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1281, 111, 'mail.gunmanet.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1280, 111, 'mail.gunmanet.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1279, 111, 'mail.gunmanet.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1186, 108, 'mail.iwafune.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (995, 106, 'mail.org'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1187, 109, 'mail.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1191, 110, 'mail.telenor.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1278, 111, 'mail.wind.co.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1277, 111, 'mail.wind.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1276, 111, 'mail.wind.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1375, 144, 'mail15.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1376, 144, 'mail333.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1115, 106, 'marchmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1282, 112, 'maroon.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1247, 110, 'maskulin.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1284, 113, 'me.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1388, 144, 'memori.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1116, 106, 'mexicomail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1248, 110, 'min-postkasse.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1117, 106, 'mindless.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (875, 51, 'mindspring.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1118, 106, 'minister.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1285, 114, 'minuet.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (952, 77, 'miobox.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (951, 77, 'miomio.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1286, 115, 'ml.murakami.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1360, 141, 'ml.shibata.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1287, 116, 'mnet.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1195, 110, 'mobil.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1119, 106, 'mobsters.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1120, 106, 'monarchy.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1288, 117, 'mopera.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1121, 106, 'moscowmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1289, 118, 'mozilla.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1290, 118, 'mozillafoundation.org'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (947, 74, 'msn.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1122, 106, 'munich.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1123, 106, 'musician.org'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1124, 106, 'muslim.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1249, 110, 'musling.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1291, 119, 'mx1.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1292, 119, 'mx2.et.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1293, 119, 'mx2.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1294, 119, 'mx2.wt.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1306, 119, 'mx21.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1307, 119, 'mx22.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1295, 119, 'mx3.et.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1296, 119, 'mx3.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1308, 119, 'mx31.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1309, 119, 'mx32.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1310, 119, 'mx35.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1311, 119, 'mx36.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1297, 119, 'mx4.et.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1298, 119, 'mx4.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1312, 119, 'mx41.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1299, 119, 'mx5.et.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1300, 119, 'mx5.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1313, 119, 'mx51.et.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1314, 119, 'mx51.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1315, 119, 'mx52.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1301, 119, 'mx6.et.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1302, 119, 'mx6.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1316, 119, 'mx61.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1303, 119, 'mx7.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1317, 119, 'mx71.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1304, 119, 'mx8.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1318, 119, 'mx81.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1319, 119, 'mx82.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1305, 119, 'mx9.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1320, 119, 'mx91.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (791, 11, 'mypec.eu'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1394, 146, 'myrambler.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1009, 106, 'myself.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1494, 207, 'narod.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1250, 110, 'natteliv.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1322, 120, 'navy.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1323, 121, 'nctsoft.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1251, 110, 'netbruger.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (785, 7, 'netscape.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1414, 159, 'neuf.fr'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1377, 144, 'newmail.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1125, 106, 'newyork.usa.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1324, 122, 'nifty.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1378, 144, 'nightmail.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1379, 144, 'nm.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (864, 48, 'nn.iij4u.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1325, 123, 'nsat.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1126, 106, 'null.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (800, 12, 'nvbell.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1127, 106, 'nycmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1326, 124, 'o2.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1128, 106, 'oath.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1330, 125, 'olive.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1332, 126, 'onet.eu'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1331, 126, 'onet.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (765, 1, 'online.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (766, 1, 'onlinehome.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1335, 126, 'op.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1341, 127, 'opal.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1129, 106, 'optician.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (886, 59, 'orange.fr'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1342, 128, 'orange.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1343, 129, 'orchid.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1508, 74, 'outlook.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1344, 130, 'ovh.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (798, 12, 'pacbell.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1130, 106, 'pacificwest.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1345, 131, 'pal.kijimadaira.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1346, 132, 'palette.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1347, 133, 'parabox.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1348, 134, 'pdx.edu'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1349, 135, 'peach.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (789, 11, 'pec.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1252, 110, 'pedal.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1253, 110, 'pengemand.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1350, 136, 'peoplepc.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1131, 106, 'petlover.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1389, 144, 'photofile.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1132, 106, 'photographer.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1380, 144, 'pisem.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1133, 106, 'playful.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1351, 137, 'plum.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1352, 138, 'po.dcn.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1357, 139, 'po.gunmanet.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1356, 139, 'po.gunmanet.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1355, 139, 'po.wind.co.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1354, 139, 'po.wind.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1353, 139, 'po.wind.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1368, 144, 'pochta.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1381, 144, 'pochtamt.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1334, 126, 'poczta.onet.eu'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1333, 126, 'poczta.onet.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1134, 106, 'poetic.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1254, 110, 'pokerface.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1135, 106, 'politician.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1358, 140, 'polka.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1359, 141, 'pop.shibata.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1382, 144, 'pop3.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1136, 106, 'popstar.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (997, 106, 'post.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1193, 110, 'post.cybercity.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1411, 158, 'post.cz'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1255, 110, 'post.dia.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1362, 142, 'posteo.at'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1363, 142, 'posteo.ch'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1361, 142, 'posteo.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1365, 142, 'posteo.eu'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1364, 142, 'posteo.org'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1256, 110, 'postman.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (865, 48, 'pp.iij4u.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1137, 106, 'presidency.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1138, 106, 'priest.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1257, 110, 'privat.dia.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1196, 110, 'privatmail.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (797, 12, 'prodigy.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1139, 106, 'programmer.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1329, 124, 'prokonto.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1140, 106, 'publicist.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1366, 143, 'purple.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1367, 144, 'qip.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1258, 110, 'quake.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1501, 212, 'quicknet.nl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1397, 146, 'r0.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1391, 145, 'rainbow.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1392, 146, 'rambler.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1383, 144, 'rbcmail.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1259, 110, 'ready.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1141, 106, 'realtyagent.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1142, 106, 'reborn.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1398, 147, 'red.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1143, 106, 'reggaefan.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1144, 106, 'religious.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1145, 106, 'repairman.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1146, 106, 'representative.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1340, 126, 'republika.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1147, 106, 'rescueteam.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1148, 106, 'revenue.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1399, 148, 'rmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1396, 146, 'ro.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1486, 206, 'rocketmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1149, 106, 'rocketship.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1150, 106, 'rockfan.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1151, 106, 'rome.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1400, 149, 'rondo.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1401, 150, 'rose.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1402, 151, 'rouge.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1152, 106, 'royal.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1403, 152, 'rr.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (866, 48, 'rr.iij4u.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1404, 153, 'ruby.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1455, 187, 'ruhrnet-online.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1425, 168, 'rzone.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1153, 106, 'saintly.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1405, 154, 'sakunet.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1154, 106, 'salesperson.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1155, 106, 'sanfranmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (796, 12, 'sbcglobal.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (773, 1, 'schlund.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1156, 106, 'scientist.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1157, 106, 'scotlandmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1406, 155, 'sea.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1260, 110, 'secret.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1158, 106, 'secretary.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1464, 196, 'secureserver.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1159, 106, 'seductive.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1407, 156, 'sepia.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1408, 157, 'serenade.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1409, 158, 'seznam.cz'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1413, 159, 'sfr.fr'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1415, 160, 'silk.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1416, 161, 'silver.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1160, 106, 'singapore.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1417, 162, 'sky.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1418, 163, 'skynet.be'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1261, 110, 'sleepy.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1419, 164, 'smail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1384, 144, 'smtp.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1161, 106, 'snakebite.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (802, 12, 'snet.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1420, 165, 'snow.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1422, 166, 'so.wind.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1421, 166, 'so.wind.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (768, 1, 'sofort-start.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (770, 1, 'sofort-surf.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (767, 1, 'sofortstart.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (769, 1, 'sofortsurf.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1423, 167, 'sonata.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1162, 106, 'songwriter.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1163, 106, 'soon.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1164, 106, 'spainmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1412, 158, 'spoluzaci.cz'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1262, 110, 'sporty.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (867, 48, 'ss.iij4u.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1424, 168, 'strato.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1426, 169, 'studenti.univr.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1427, 170, 'suite.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1263, 110, 'superbruger.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (799, 12, 'swbell.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1428, 171, 'sympatico.ca'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1429, 172, 'symphony.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1430, 173, 't-online.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1264, 110, 'talent.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1265, 110, 'tanke.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1431, 174, 'taupe.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1266, 110, 'taxidriver.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1165, 106, 'teachers.org'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1004, 106, 'techie.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1166, 106, 'technologist.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1267, 110, 'teens.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1268, 110, 'teknik.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1452, 187, 'telebel.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1453, 187, 'telelev.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (818, 18, 'telstra.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1432, 175, 'terra.es'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1167, 106, 'texas.usa.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1168, 106, 'thegame.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1169, 106, 'therapist.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1433, 176, 'tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1434, 177, 'tiscali.cz'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1438, 178, 'tiscali.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1269, 110, 'tjekket.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1328, 124, 'tlen.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1439, 179, 'tmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1440, 180, 'toccata.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1170, 106, 'toke.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1171, 106, 'tokyo.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1172, 106, 'toothfairy.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1441, 181, 'topaz.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1270, 110, 'traceroute.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1442, 182, 'trio.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1271, 110, 'tv.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1173, 106, 'tvstar.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1272, 110, 'ugenstilbud.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1443, 183, 'umail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1444, 184, 'umich.edu'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1174, 106, 'umpire.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1273, 110, 'ungdom.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1445, 185, 'upcmail.nl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (998, 106, 'usa.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1008, 106, 'uymail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1447, 186, 'verizon.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1449, 187, 'versanet.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1448, 187, 'versatel.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1274, 110, 'video.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1456, 188, 'violet.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1192, 110, 'vip.cybercity.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1275, 110, 'vittig.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1457, 189, 'vm.aikis.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1458, 190, 'vmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1336, 126, 'vp.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1459, 191, 'vp.tiki.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1175, 106, 'wallet.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1460, 192, 'waltz.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (885, 59, 'wanadoo.fr'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (804, 12, 'wans.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1461, 193, 'wave.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1462, 194, 'web.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1176, 106, 'webname.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1177, 106, 'weirdness.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1983, 74, 'wensil.in'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1463, 195, 'white.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1178, 106, 'who.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1179, 106, 'whoever.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1465, 197, 'wine.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1180, 106, 'winning.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1181, 106, 'witty.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1466, 198, 'wmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1435, 177, 'wo.cz'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1202, 110, 'wol.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1182, 106, 'worker.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1183, 106, 'workmail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1437, 177, 'worldmail.cz'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1436, 177, 'worldonline.cz'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1201, 110, 'worldonline.dk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1467, 199, 'wp.pl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1011, 106, 'writeme.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (954, 77, 'x-il.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1468, 200, 'xmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1469, 201, 'xp.wind.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1470, 202, 'xpost.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1471, 203, 'xs4all.nl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1472, 204, 'xtra.co.nz'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1493, 207, 'ya.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1473, 205, 'yahoo.co.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1480, 206, 'yahoo.co.nz'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1479, 206, 'yahoo.co.uk'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1474, 206, 'yahoo.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1482, 206, 'yahoo.com.ar'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1481, 206, 'yahoo.com.au'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1483, 206, 'yahoo.com.br'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1484, 206, 'yahoo.com.mx'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1475, 206, 'yahoo.de'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1478, 206, 'yahoo.es'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1477, 206, 'yahoo.fr'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1476, 206, 'yahoo.it'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1490, 207, 'yandex.by'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1488, 207, 'yandex.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1491, 207, 'yandex.kz'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1489, 207, 'yandex.net'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1487, 207, 'yandex.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1492, 207, 'yandex.ua'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1495, 208, 'ybb.ne.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1496, 209, 'yellow.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1485, 206, 'ymail.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1497, 210, 'ymail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1184, 106, 'yours.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1498, 211, 'ypost.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1499, 212, 'ziggo.nl'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1387, 144, 'ziza.ru'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1503, 213, 'zmail.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1504, 214, 'zpost.plala.or.jp'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1505, 220, 'icloud.com'); - insert ignore into mail_mailbox_domain (id, id_provider, name) values (1506, 221, 'office365.com'); - commit; - -END DLM00 - -CALL coreinit() DLM00 - -DELIMITER ; \ No newline at end of file diff --git a/sql/app.sql b/sql/app.sql deleted file mode 100644 index d8c1e27a43..0000000000 --- a/sql/app.sql +++ /dev/null @@ -1,2380 +0,0 @@ -CREATE TABLE IF NOT EXISTS `account_links` ( - `id` varchar(200) NOT NULL, - `uid` varchar(200) NOT NULL, - `provider` char(60) DEFAULT NULL, - `profile` text NOT NULL, - `linked` datetime NOT NULL, - PRIMARY KEY (`id`,`uid`), - KEY `uid` (`uid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `audit_events` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `ip` varchar(50) DEFAULT NULL, - `initiator` varchar(200) DEFAULT NULL, - `browser` varchar(200) DEFAULT NULL, - `platform` varchar(200) DEFAULT NULL, - `date` datetime NOT NULL, - `tenant_id` int(10) NOT NULL, - `user_id` char(38) DEFAULT NULL, - `page` varchar(300) DEFAULT NULL, - `action` int(11) DEFAULT NULL, - `description` varchar(20000) DEFAULT NULL, - `target` text, - PRIMARY KEY (`id`), - KEY `date` (`tenant_id`,`date`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `backup_backup` ( - `id` char(38) NOT NULL, - `tenant_id` int(11) NOT NULL, - `is_scheduled` int(1) NOT NULL, - `name` varchar(255) NOT NULL, - `storage_type` int(11) NOT NULL, - `storage_base_path` varchar(255) DEFAULT NULL, - `storage_path` varchar(255) NOT NULL, - `created_on` datetime NOT NULL, - `expires_on` datetime NOT NULL DEFAULT '0001-01-01 00:00:00', - `storage_params` TEXT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`), - KEY `expires_on` (`expires_on`), - KEY `is_scheduled` (`is_scheduled`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `backup_schedule` ( - `tenant_id` int(11) NOT NULL, - `backup_mail` int(11) NOT NULL DEFAULT '0', - `cron` varchar(255) NOT NULL, - `backups_stored` int(11) NOT NULL, - `storage_type` int(11) NOT NULL, - `storage_base_path` varchar(255) DEFAULT NULL, - `last_backup_time` datetime NOT NULL, - `storage_params` TEXT NULL, - PRIMARY KEY (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `blogs_comments` ( - `tenant` int(11) NOT NULL, - `id` char(38) NOT NULL, - `post_id` char(38) NOT NULL, - `content` text, - `created_by` char(38) NOT NULL, - `created_when` datetime NOT NULL, - `parent_id` char(38) DEFAULT NULL, - `inactive` int(11) DEFAULT NULL, - PRIMARY KEY (`tenant`,`id`), - KEY `ixComments_PostId` (`tenant`,`post_id`), - KEY `ixComments_Created` (`created_when`,`tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `blogs_posts` ( - `post_id` int(11) NOT NULL AUTO_INCREMENT, - `id` char(38) NOT NULL, - `title` varchar(255) NOT NULL, - `content` mediumtext NOT NULL, - `created_by` char(38) NOT NULL, - `created_when` datetime NOT NULL, - `blog_id` int(11) NOT NULL, - `Tenant` int(11) NOT NULL DEFAULT '0', - `LastCommentId` char(38) DEFAULT NULL, - `LastModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`post_id`), - KEY `ixPosts_CreatedBy` (`Tenant`,`created_by`), - KEY `ixPosts_LastCommentId` (`Tenant`,`LastCommentId`), - KEY `ixPosts_CreatedWhen` (`created_when`,`Tenant`), - KEY `LastModified` (`LastModified`), - KEY `Tenant` (`Tenant`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `blogs_reviewposts` ( - `post_id` char(38) NOT NULL, - `reviewed_by` char(38) NOT NULL, - `timestamp` datetime NOT NULL, - `Tenant` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`Tenant`,`post_id`,`reviewed_by`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `blogs_tags` ( - `post_id` varchar(38) NOT NULL, - `name` varchar(255) NOT NULL, - `Tenant` int(11) NOT NULL, - PRIMARY KEY (`Tenant`,`post_id`,`name`), - KEY `name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `bookmarking_bookmark` ( - `ID` int(11) NOT NULL AUTO_INCREMENT, - `URL` text, - `Date` datetime DEFAULT NULL, - `Name` varchar(255) DEFAULT NULL, - `Description` text, - `UserCreatorID` char(38) DEFAULT NULL, - `Tenant` int(11) NOT NULL, - PRIMARY KEY (`ID`), - KEY `Tenant` (`Tenant`), - KEY `DateIndex` (`Date`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `bookmarking_bookmarktag` ( - `BookmarkID` int(11) NOT NULL, - `TagID` int(11) NOT NULL, - `Tenant` int(11) NOT NULL, - PRIMARY KEY (`BookmarkID`,`TagID`), - KEY `Tenant` (`Tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `bookmarking_comment` ( - `ID` char(38) NOT NULL, - `UserID` char(38) DEFAULT NULL, - `Content` text, - `Datetime` datetime DEFAULT NULL, - `Parent` char(38) DEFAULT NULL, - `BookmarkID` int(11) DEFAULT NULL, - `Inactive` int(11) DEFAULT NULL, - `Tenant` int(11) NOT NULL, - PRIMARY KEY (`Tenant`,`ID`), - KEY `IndexCommentBookmarkID` (`Tenant`,`BookmarkID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `bookmarking_tag` ( - `TagID` int(11) NOT NULL AUTO_INCREMENT, - `Name` varchar(255) NOT NULL, - `Tenant` int(11) NOT NULL, - PRIMARY KEY (`TagID`), - KEY `Name` (`Tenant`,`Name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `bookmarking_userbookmark` ( - `UserBookmarkID` int(11) NOT NULL AUTO_INCREMENT, - `UserID` char(38) DEFAULT NULL, - `DateAdded` datetime DEFAULT NULL, - `Name` varchar(255) DEFAULT NULL, - `Description` text, - `BookmarkID` int(11) NOT NULL, - `Raiting` int(11) NOT NULL DEFAULT '0', - `Tenant` int(11) NOT NULL, - `LastModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`UserBookmarkID`), - KEY `BookmarkID` (`BookmarkID`), - KEY `LastModified` (`LastModified`), - KEY `Tenant` (`Tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `bookmarking_userbookmarktag` ( - `UserBookmarkID` int(11) NOT NULL, - `TagID` int(11) NOT NULL, - `Tenant` int(11) NOT NULL, - PRIMARY KEY (`UserBookmarkID`,`TagID`), - KEY `Tenant` (`Tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `calendar_calendars` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `owner_id` char(38) NOT NULL, - `name` varchar(255) NOT NULL, - `description` varchar(255) DEFAULT NULL, - `tenant` int(10) NOT NULL, - `text_color` varchar(50) NOT NULL DEFAULT '#000000', - `background_color` varchar(50) NOT NULL DEFAULT '#fa9191', - `alert_type` smallint(6) NOT NULL DEFAULT '0', - `time_zone` varchar(255) NOT NULL DEFAULT 'UTC', - `ical_url` mediumtext, - `caldav_guid` char(38) DEFAULT NULL, - `is_todo` int(11) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `owner_id` (`tenant`,`owner_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `calendar_calendar_item` ( - `calendar_id` int(10) NOT NULL, - `item_id` char(38) NOT NULL, - `is_group` smallint(2) NOT NULL DEFAULT '0', - PRIMARY KEY (`calendar_id`,`item_id`,`is_group`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `calendar_calendar_user` ( - `calendar_id` int(10) NOT NULL DEFAULT '0', - `ext_calendar_id` varchar(50) NOT NULL DEFAULT '', - `user_id` char(38) NOT NULL, - `hide_events` smallint(2) NOT NULL DEFAULT '0', - `is_accepted` smallint(2) NOT NULL DEFAULT '0', - `text_color` varchar(50) NOT NULL, - `background_color` varchar(50) NOT NULL, - `is_new` smallint(2) NOT NULL DEFAULT '0', - `alert_type` smallint(6) NOT NULL DEFAULT '0', - `name` varchar(255) DEFAULT NULL, - `time_zone` varchar(255) DEFAULT 'UTC', - PRIMARY KEY (`calendar_id`,`ext_calendar_id`,`user_id`), - KEY `user_id` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `calendar_events` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `tenant` int(11) NOT NULL, - `name` varchar(255) NOT NULL, - `description` text NOT NULL, - `calendar_id` int(11) NOT NULL, - `start_date` datetime NOT NULL, - `end_date` datetime NOT NULL, - `update_date` datetime NULL DEFAULT NULL, - `all_day_long` smallint(6) NOT NULL DEFAULT '0', - `repeat_type` smallint(6) NOT NULL DEFAULT '0', - `owner_id` char(38) NOT NULL, - `alert_type` smallint(6) NOT NULL DEFAULT '0', - `rrule` varchar(255) DEFAULT NULL, - `uid` varchar(255) DEFAULT NULL, - `status` smallint(6) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `calendar_id` (`tenant`,`calendar_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `calendar_event_history` ( - `tenant` int(11) NOT NULL, - `calendar_id` int(11) NOT NULL, - `event_uid` char(255) NOT NULL, - `event_id` int(10) NOT NULL DEFAULT '0', - `ics` mediumtext, - PRIMARY KEY (`tenant`,`calendar_id`,`event_uid`), - KEY `event_id` (`tenant`,`event_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `calendar_event_item` ( - `event_id` int(10) NOT NULL, - `item_id` char(38) NOT NULL, - `is_group` smallint(2) NOT NULL DEFAULT '0', - PRIMARY KEY (`event_id`,`item_id`,`is_group`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `calendar_event_user` ( - `event_id` int(10) NOT NULL, - `user_id` char(38) NOT NULL, - `alert_type` smallint(6) NOT NULL DEFAULT '0', - `is_unsubscribe` smallint(2) NOT NULL DEFAULT '0', - PRIMARY KEY (`event_id`,`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `calendar_notifications` ( - `user_id` char(38) NOT NULL, - `event_id` int(10) NOT NULL, - `notify_date` datetime NOT NULL, - `tenant` int(10) NOT NULL, - `alert_type` smallint(2) NOT NULL, - `repeat_type` smallint(2) NOT NULL DEFAULT '0', - `time_zone` varchar(255) NOT NULL DEFAULT 'UTC', - `rrule` varchar(255) DEFAULT NULL, - PRIMARY KEY (`user_id`,`event_id`), - KEY `event_id` (`event_id`), - KEY `notify_date` (`notify_date`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `calendar_todos` ( - `id` INT(10) NOT NULL AUTO_INCREMENT, - `tenant` INT(11) NOT NULL, - `name` VARCHAR(255) NOT NULL, - `description` TEXT NOT NULL, - `calendar_id` INT(11) NOT NULL, - `start_date` DATETIME NULL DEFAULT NULL, - `completed` DATETIME NULL DEFAULT NULL, - `owner_id` CHAR(38) NOT NULL, - `uid` VARCHAR(255) NULL DEFAULT NULL, - PRIMARY KEY (`id`), - INDEX `calendar_id` (`tenant`, `calendar_id`) -)ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `core_acl` ( - `tenant` int(11) NOT NULL, - `subject` varchar(38) NOT NULL, - `action` varchar(38) NOT NULL, - `object` varchar(255) NOT NULL DEFAULT '', - `acetype` int(11) NOT NULL, - PRIMARY KEY (`tenant`,`subject`,`action`,`object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `core_group` ( - `tenant` int(11) NOT NULL, - `id` varchar(38) NOT NULL, - `name` varchar(128) NOT NULL, - `categoryid` varchar(38) DEFAULT NULL, - `parentid` varchar(38) DEFAULT NULL, - `sid` varchar(512) DEFAULT NULL, - `removed` int(11) NOT NULL DEFAULT '0', - `last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `parentid` (`tenant`,`parentid`), - KEY `last_modified` (`last_modified`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `core_settings` ( - `tenant` int(11) NOT NULL, - `id` varchar(128) NOT NULL, - `value` mediumblob NOT NULL, - `last_modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`tenant`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `core_subscription` ( - `tenant` int(11) NOT NULL, - `source` varchar(38) NOT NULL, - `action` varchar(128) NOT NULL, - `recipient` varchar(38) NOT NULL, - `object` varchar(128) NOT NULL, - `unsubscribed` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`tenant`,`source`,`action`,`recipient`,`object`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; - -CREATE TABLE IF NOT EXISTS `core_subscriptionmethod` ( - `tenant` int(11) NOT NULL, - `source` varchar(38) NOT NULL, - `action` varchar(128) NOT NULL, - `recipient` varchar(38) NOT NULL, - `sender` varchar(1024) NOT NULL, - PRIMARY KEY (`tenant`,`source`,`action`,`recipient`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `core_user` ( - `tenant` int(11) NOT NULL, - `id` varchar(38) NOT NULL, - `username` varchar(255) NOT NULL, - `firstname` varchar(64) NOT NULL, - `lastname` varchar(64) NOT NULL, - `sex` int(11) DEFAULT NULL, - `bithdate` datetime DEFAULT NULL, - `status` int(11) NOT NULL DEFAULT '1', - `activation_status` int(11) NOT NULL DEFAULT '0', - `email` varchar(255) DEFAULT NULL, - `workfromdate` datetime DEFAULT NULL, - `terminateddate` datetime DEFAULT NULL, - `title` varchar(64) DEFAULT NULL, - `department` varchar(128) DEFAULT NULL, - `culture` varchar(20) DEFAULT NULL, - `contacts` varchar(1024) DEFAULT NULL, - `phone` varchar(255) DEFAULT NULL, - `phone_activation` int(11) NOT NULL DEFAULT '0', - `location` varchar(255) DEFAULT NULL, - `notes` varchar(512) DEFAULT NULL, - `sid` varchar(512) DEFAULT NULL, - `sso_name_id` varchar(512) DEFAULT NULL, - `sso_session_id` varchar(512) DEFAULT NULL, - `removed` int(11) NOT NULL DEFAULT '0', - `create_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `last_modified` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `last_modified` (`last_modified`), - KEY `username` (`tenant`,`username`), - KEY `email` (`email`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `core_usergroup` ( - `tenant` int(11) NOT NULL, - `userid` varchar(38) NOT NULL, - `groupid` varchar(38) NOT NULL, - `ref_type` int(11) NOT NULL, - `removed` int(11) NOT NULL DEFAULT '0', - `last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`tenant`,`userid`,`groupid`,`ref_type`), - KEY `last_modified` (`last_modified`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `core_userphoto` ( - `tenant` int(11) NOT NULL, - `userid` varchar(38) NOT NULL, - `photo` mediumblob NOT NULL, - PRIMARY KEY (`userid`), - KEY `tenant` (`tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `core_usersecurity` ( - `tenant` int(11) NOT NULL, - `userid` varchar(38) NOT NULL, - `pwdhash` varchar(512) DEFAULT NULL, - `pwdhashsha512` varchar(512) DEFAULT NULL, - PRIMARY KEY (`userid`), - KEY `pwdhash` (`pwdhash`(255)), - KEY `tenant` (`tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_case` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(255) NOT NULL, - `is_closed` tinyint(1) NOT NULL DEFAULT '0', - `create_by` char(38) NOT NULL, - `create_on` datetime NOT NULL, - `tenant_id` int(11) NOT NULL, - `last_modifed_on` datetime DEFAULT NULL, - `last_modifed_by` char(38) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`), - KEY `create_on` (`create_on`), - KEY `last_modifed_on` (`last_modifed_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_contact` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `tenant_id` int(11) NOT NULL, - `is_company` tinyint(1) NOT NULL, - `notes` text, - `title` varchar(255) DEFAULT NULL, - `first_name` varchar(255) DEFAULT NULL, - `last_name` varchar(255) DEFAULT NULL, - `company_name` varchar(255) DEFAULT NULL, - `industry` varchar(255) DEFAULT NULL, - `status_id` int(11) NOT NULL DEFAULT '0', - `company_id` int(11) NOT NULL, - `contact_type_id` int(11) NOT NULL DEFAULT '0', - `create_by` char(38) NOT NULL, - `create_on` datetime NOT NULL, - `last_modifed_on` datetime DEFAULT NULL, - `last_modifed_by` char(38) DEFAULT NULL, - `display_name` varchar(255) DEFAULT NULL, - `is_shared` tinyint(4) DEFAULT NULL, - `currency` varchar(3) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `company_id` (`tenant_id`,`company_id`), - KEY `display_name` (`tenant_id`,`display_name`), - KEY `create_on` (`create_on`), - KEY `last_modifed_on` (`last_modifed_on`,`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_contact_info` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `data` text NOT NULL, - `category` int(255) NOT NULL, - `tenant_id` int(255) NOT NULL, - `is_primary` tinyint(4) NOT NULL, - `contact_id` int(11) NOT NULL, - `type` int(255) NOT NULL, - `last_modifed_on` datetime DEFAULT NULL, - `last_modifed_by` char(38) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `IX_Contact` (`tenant_id`,`contact_id`), - KEY `last_modifed_on` (`last_modifed_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_currency_info` ( - `resource_key` varchar(255) NOT NULL, - `abbreviation` varchar(255) NOT NULL, - `symbol` varchar(255) NOT NULL, - `culture_name` varchar(255) NOT NULL, - `is_convertable` tinyint(4) NOT NULL, - `is_basic` tinyint(4) NOT NULL, - PRIMARY KEY (`abbreviation`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_currency_rate` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `from_currency` varchar(255) NOT NULL, - `to_currency` varchar(255) NOT NULL, - `rate` decimal(10,2) NOT NULL DEFAULT '0.00', - `create_by` char(38) NOT NULL, - `create_on` datetime NOT NULL, - `tenant_id` int(11) NOT NULL, - `last_modifed_by` char(38) DEFAULT NULL, - `last_modifed_on` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`), - KEY `from_currency` (`from_currency`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_deal` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(255) NOT NULL, - `description` text, - `responsible_id` char(38) NOT NULL, - `contact_id` int(11) NOT NULL, - `create_on` datetime NOT NULL, - `create_by` char(38) NOT NULL, - `bid_currency` varchar(255) DEFAULT NULL, - `bid_value` decimal(50,9) NOT NULL DEFAULT '0.000000000', - `bid_type` int(11) NOT NULL DEFAULT '0', - `deal_milestone_id` int(11) NOT NULL, - `tenant_id` int(11) NOT NULL, - `expected_close_date` datetime NOT NULL, - `per_period_value` int(11) NOT NULL DEFAULT '0', - `deal_milestone_probability` int(11) DEFAULT NULL, - `last_modifed_on` datetime DEFAULT NULL, - `last_modifed_by` char(38) DEFAULT NULL, - `actual_close_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `contact_id` (`tenant_id`,`contact_id`), - KEY `create_on` (`create_on`), - KEY `deal_milestone_id` (`deal_milestone_id`), - KEY `last_modifed_on` (`last_modifed_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_deal_milestone` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `color` varchar(50) NOT NULL DEFAULT '0', - `sort_order` int(10) NOT NULL DEFAULT '0', - `title` varchar(250) NOT NULL, - `description` text, - `probability` int(10) NOT NULL DEFAULT '0', - `status` int(10) NOT NULL DEFAULT '0', - `tenant_id` int(10) NOT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_entity_contact` ( - `entity_id` int(11) NOT NULL, - `entity_type` int(11) NOT NULL, - `contact_id` int(11) NOT NULL, - PRIMARY KEY (`entity_id`,`entity_type`,`contact_id`), - KEY `IX_Contact` (`contact_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_entity_tag` ( - `tag_id` int(11) NOT NULL, - `entity_id` int(11) NOT NULL, - `entity_type` int(10) NOT NULL, - PRIMARY KEY (`entity_id`,`entity_type`,`tag_id`), - KEY `tag_id` (`tag_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_field_description` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `tenant_id` int(11) NOT NULL, - `label` varchar(255) NOT NULL, - `type` int(11) NOT NULL, - `sort_order` int(11) NOT NULL DEFAULT '0', - `mask` text, - `entity_type` int(255) NOT NULL, - PRIMARY KEY (`id`), - KEY `entity_type` (`tenant_id`,`entity_type`,`sort_order`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_field_value` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `value` text, - `entity_id` int(11) NOT NULL, - `tenant_id` int(11) NOT NULL, - `field_id` int(11) NOT NULL, - `entity_type` int(10) NOT NULL, - `last_modifed_on` datetime DEFAULT NULL, - `last_modifed_by` char(38) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `field_id` (`field_id`), - KEY `last_modifed_on` (`last_modifed_on`), - KEY `tenant_id` (`tenant_id`,`entity_id`,`entity_type`,`field_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_invoice` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `status` int(11) NOT NULL DEFAULT '1', - `number` varchar(255) NOT NULL, - `issue_date` datetime NOT NULL, - `template_type` int(11) NOT NULL DEFAULT '0', - `contact_id` int(11) NOT NULL DEFAULT '-1', - `consignee_id` int(11) NOT NULL DEFAULT '-1', - `entity_type` int(11) NOT NULL, - `entity_id` int(11) NOT NULL, - `due_date` datetime NOT NULL, - `language` varchar(255) NOT NULL, - `currency` varchar(255) NOT NULL, - `exchange_rate` decimal(10,2) NOT NULL DEFAULT '1.00', - `purchase_order_number` varchar(255) NOT NULL, - `terms` text, - `description` text, - `json_data` text, - `file_id` int(11) NOT NULL DEFAULT '-1', - `create_on` datetime NOT NULL, - `create_by` char(38) NOT NULL, - `last_modifed_on` datetime DEFAULT NULL, - `last_modifed_by` char(38) DEFAULT NULL, - `tenant_id` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_invoice_item` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(255) NOT NULL, - `description` text NOT NULL, - `stock_keeping_unit` varchar(255) NOT NULL, - `price` decimal(10,2) NOT NULL DEFAULT '0.00', - `quantity` int(11) NOT NULL DEFAULT '0', - `stock_quantity` int(11) NOT NULL DEFAULT '0', - `track_inventory` tinyint(4) NOT NULL DEFAULT '0', - `invoice_tax1_id` int(11) NOT NULL DEFAULT '0', - `invoice_tax2_id` int(11) NOT NULL DEFAULT '0', - `currency` varchar(255) NOT NULL, - `create_on` datetime NOT NULL, - `create_by` char(38) NOT NULL, - `last_modifed_on` datetime DEFAULT NULL, - `last_modifed_by` char(38) DEFAULT NULL, - `tenant_id` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_invoice_line` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `invoice_id` int(11) NOT NULL, - `invoice_item_id` int(11) NOT NULL, - `invoice_tax1_id` int(11) NOT NULL, - `invoice_tax2_id` int(11) NOT NULL, - `description` text NOT NULL, - `quantity` int(11) NOT NULL DEFAULT '0', - `price` decimal(10,2) NOT NULL DEFAULT '0.00', - `discount` int(11) NOT NULL DEFAULT '0', - `sort_order` int(11) NOT NULL DEFAULT '0', - `tenant_id` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_invoice_tax` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) NOT NULL, - `description` text NOT NULL, - `rate` decimal(10,2) NOT NULL DEFAULT '0.00', - `create_on` datetime NOT NULL, - `create_by` char(38) NOT NULL, - `last_modifed_on` datetime DEFAULT NULL, - `last_modifed_by` char(38) DEFAULT NULL, - `tenant_id` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_list_item` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(255) NOT NULL, - `sort_order` int(11) NOT NULL DEFAULT '0', - `color` varchar(255) DEFAULT NULL, - `additional_params` varchar(255) DEFAULT NULL, - `tenant_id` int(11) NOT NULL, - `list_type` int(255) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `list_type` (`tenant_id`,`list_type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_organisation_logo` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `content` mediumtext NOT NULL, - `create_by` char(38) NOT NULL, - `create_on` datetime NOT NULL, - `tenant_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_projects` ( - `project_id` int(10) NOT NULL, - `contact_id` int(10) NOT NULL, - `tenant_id` int(10) NOT NULL, - PRIMARY KEY (`tenant_id`,`contact_id`,`project_id`), - KEY `project_id` (`tenant_id`,`project_id`), - KEY `contact_id` (`tenant_id`,`contact_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_relationship_event` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `contact_id` int(11) NOT NULL, - `content` text, - `create_by` char(38) NOT NULL, - `create_on` datetime NOT NULL, - `tenant_id` int(11) NOT NULL, - `entity_type` int(11) NOT NULL, - `entity_id` int(11) NOT NULL, - `category_id` int(11) NOT NULL, - `last_modifed_by` char(38) DEFAULT NULL, - `last_modifed_on` datetime DEFAULT NULL, - `have_files` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`), - KEY `IX_Contact` (`contact_id`), - KEY `IX_Entity` (`entity_id`,`entity_type`), - KEY `last_modifed_on` (`last_modifed_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_report_file` ( - `file_id` int(11) NOT NULL, - `report_type` int(11) NOT NULL, - `create_on` datetime NOT NULL, - `create_by` char(38) NOT NULL, - `tenant_id` int(11) NOT NULL, - PRIMARY KEY (`file_id`), - KEY `tenant_id` (`tenant_id`), - KEY `create_by` (`create_by`), - KEY `create_on` (`create_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_tag` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, - `tenant_id` int(11) NOT NULL, - `entity_type` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_task` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(255) NOT NULL, - `description` text, - `deadline` datetime NOT NULL, - `responsible_id` char(38) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', - `contact_id` int(11) NOT NULL DEFAULT '-1', - `is_closed` int(1) NOT NULL DEFAULT '0', - `tenant_id` int(11) NOT NULL, - `entity_type` int(11) NOT NULL, - `entity_id` int(11) NOT NULL, - `category_id` int(11) NOT NULL DEFAULT '0', - `create_on` datetime NOT NULL, - `create_by` char(38) NOT NULL, - `last_modifed_on` datetime DEFAULT NULL, - `last_modifed_by` char(38) DEFAULT NULL, - `alert_value` int(10) NOT NULL DEFAULT '0', - `exec_alert` int(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `responsible_id` (`tenant_id`,`responsible_id`), - KEY `IX_Contact` (`tenant_id`,`contact_id`), - KEY `IX_Entity` (`tenant_id`,`entity_id`,`entity_type`), - KEY `create_on` (`create_on`), - KEY `deadline` (`deadline`), - KEY `last_modifed_on` (`last_modifed_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_task_template` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `create_on` datetime NOT NULL, - `create_by` char(38) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', - `last_modifed_on` datetime NOT NULL, - `last_modifed_by` char(38) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', - `title` varchar(255) NOT NULL, - `category_id` int(10) NOT NULL, - `description` tinytext, - `responsible_id` char(38) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', - `is_notify` tinyint(4) NOT NULL, - `offset` bigint(20) NOT NULL DEFAULT '0', - `sort_order` int(11) NOT NULL DEFAULT '0', - `deadLine_is_fixed` tinyint(4) NOT NULL, - `tenant_id` int(10) NOT NULL, - `container_id` int(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `template_id` (`tenant_id`,`container_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_task_template_container` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `title` varchar(256) NOT NULL, - `entity_type` int(10) NOT NULL, - `tenant_id` int(10) NOT NULL, - `create_on` datetime NOT NULL, - `create_by` char(38) NOT NULL DEFAULT '0', - `last_modifed_on` datetime NOT NULL, - `last_modifed_by` char(38) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `entity_type` (`tenant_id`,`entity_type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_task_template_task` ( - `task_id` int(10) NOT NULL, - `task_template_id` int(10) NOT NULL, - `tenant_id` int(10) NOT NULL, - PRIMARY KEY (`tenant_id`,`task_id`,`task_template_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_voip_calls` ( - `id` varchar(50) NOT NULL, - `parent_call_id` varchar(50) NOT NULL, - `number_from` varchar(50) NOT NULL, - `number_to` varchar(50) NOT NULL, - `status` int(10) DEFAULT NULL, - `answered_by` varchar(50) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', - `dial_date` datetime DEFAULT NULL, - `dial_duration` int(11) DEFAULT NULL, - `record_sid` VARCHAR(50) NULL DEFAULT NULL, - `record_url` text, - `record_duration` int(11) DEFAULT NULL, - `record_price` DECIMAL(10,4) NOT NULL, - `contact_id` int(10) DEFAULT NULL, - `price` decimal(10,4) DEFAULT NULL, - `tenant_id` int(10) NOT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`), - KEY `parent_call_id` (`parent_call_id`, `tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `crm_voip_number` ( - `id` varchar(50) NOT NULL, - `number` varchar(50) NOT NULL, - `alias` varchar(255) DEFAULT NULL, - `settings` text, - `tenant_id` int(10) NOT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `dbsync_last` ( - `last_key` varchar(128) NOT NULL, - `last_date` datetime NOT NULL, - PRIMARY KEY (`last_key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `events_comment` ( - `Id` int(11) NOT NULL AUTO_INCREMENT, - `Feed` int(11) NOT NULL, - `Comment` text NOT NULL, - `Parent` int(11) NOT NULL DEFAULT '0', - `Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `Creator` varchar(38) DEFAULT NULL, - `Inactive` int(11) NOT NULL DEFAULT '0', - `Tenant` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`Id`), - KEY `Tenant` (`Tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `events_feed` ( - `Id` int(11) NOT NULL AUTO_INCREMENT, - `FeedType` int(11) NOT NULL DEFAULT '1', - `Caption` text NOT NULL, - `Text` text, - `Date` datetime NOT NULL, - `Creator` varchar(38) DEFAULT NULL, - `Tenant` int(11) NOT NULL DEFAULT '0', - `LastModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`Id`), - KEY `Date` (`Date`), - KEY `LastModified` (`LastModified`), - KEY `Tenant` (`Tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `events_poll` ( - `Id` int(11) NOT NULL, - `PollType` int(11) NOT NULL DEFAULT '0', - `StartDate` datetime NOT NULL, - `EndDate` datetime NOT NULL, - `Tenant` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`Id`), - KEY `Tenant` (`Tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `events_pollanswer` ( - `Variant` int(11) NOT NULL, - `User` varchar(64) NOT NULL, - `Tenant` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`Variant`,`User`), - KEY `Tenant` (`Tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `events_pollvariant` ( - `Id` int(11) NOT NULL AUTO_INCREMENT, - `Poll` int(11) NOT NULL, - `Name` varchar(1024) NOT NULL, - `Tenant` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`Id`), - KEY `Poll` (`Tenant`,`Poll`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `events_reader` ( - `Feed` int(11) NOT NULL, - `Reader` varchar(38) NOT NULL, - `Tenant` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`Feed`,`Reader`), - KEY `Tenant` (`Tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `feed_aggregate` ( - `id` varchar(88) NOT NULL, - `tenant` int(10) NOT NULL, - `product` varchar(50) NOT NULL, - `module` varchar(50) NOT NULL, - `author` char(38) NOT NULL, - `modified_by` char(38) NOT NULL, - `created_date` datetime NOT NULL, - `modified_date` datetime NOT NULL, - `group_id` varchar(70) DEFAULT NULL, - `json` mediumtext NOT NULL, - `keywords` text, - `aggregated_date` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `product` (`tenant`,`product`), - KEY `aggregated_date` (`tenant`,`aggregated_date`), - KEY `modified_date` (`tenant`,`modified_date`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `feed_last` ( - `last_key` varchar(128) NOT NULL, - `last_date` datetime NOT NULL, - PRIMARY KEY (`last_key`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `feed_readed` ( - `user_id` varchar(38) NOT NULL, - `timestamp` datetime NOT NULL, - `module` varchar(50) NOT NULL, - `tenant_id` int(10) NOT NULL, - PRIMARY KEY (`tenant_id`,`user_id`,`module`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `feed_users` ( - `feed_id` varchar(88) NOT NULL, - `user_id` char(38) NOT NULL, - PRIMARY KEY (`feed_id`,`user_id`), - KEY `user_id` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `files_bunch_objects` ( - `tenant_id` int(10) NOT NULL, - `right_node` varchar(255) NOT NULL, - `left_node` varchar(255) NOT NULL, - PRIMARY KEY (`tenant_id`,`right_node`), - KEY `left_node` (`left_node`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `files_converts` ( - `input` varchar(50) NOT NULL, - `output` varchar(50) NOT NULL, - PRIMARY KEY (`input`,`output`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `files_file` ( - `id` int(11) NOT NULL, - `version` int(11) NOT NULL, - `version_group` int(11) NOT NULL DEFAULT '1', - `current_version` int(11) NOT NULL DEFAULT '0', - `folder_id` int(11) NOT NULL DEFAULT '0', - `title` varchar(400) NOT NULL, - `content_length` bigint(25) NOT NULL DEFAULT '0', - `file_status` int(11) NOT NULL DEFAULT '0', - `category` int(11) NOT NULL DEFAULT '0', - `create_by` char(38) NOT NULL, - `create_on` datetime NOT NULL, - `modified_by` char(38) NOT NULL, - `modified_on` datetime NOT NULL, - `tenant_id` int(11) NOT NULL, - `converted_type` varchar(10) DEFAULT NULL, - `comment` varchar(255) DEFAULT NULL, - `changes` mediumtext, - `encrypted` int(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`tenant_id`,`id`,`version`), - KEY `modified_on` (`modified_on`), - KEY `folder_id` (`folder_id`), - KEY `id` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `files_folder` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `parent_id` int(11) NOT NULL DEFAULT '0', - `title` varchar(400) NOT NULL, - `folder_type` int(11) NOT NULL DEFAULT '0', - `create_by` char(38) NOT NULL, - `create_on` datetime NOT NULL, - `modified_by` char(38) NOT NULL, - `modified_on` datetime NOT NULL, - `tenant_id` int(11) NOT NULL, - `foldersCount` int(10) NOT NULL DEFAULT '0', - `filesCount` int(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `parent_id` (`tenant_id`,`parent_id`), - KEY `modified_on` (`modified_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `files_folder_tree` ( - `folder_id` int(11) NOT NULL, - `parent_id` int(11) NOT NULL, - `level` int(11) NOT NULL, - PRIMARY KEY (`parent_id`,`folder_id`), - KEY `folder_id` (`folder_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `files_security` ( - `tenant_id` int(10) NOT NULL, - `entry_id` varchar(50) NOT NULL, - `entry_type` int(10) NOT NULL, - `subject` char(38) NOT NULL, - `owner` char(38) NOT NULL, - `security` int(11) NOT NULL, - `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`tenant_id`,`entry_id`,`entry_type`,`subject`), - KEY `owner` (`owner`), - KEY `tenant_id` (`tenant_id`,`entry_type`,`entry_id`,`owner`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `files_tag` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) NOT NULL, - `owner` varchar(38) NOT NULL, - `flag` int(11) NOT NULL DEFAULT '0', - `tenant_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `name` (`tenant_id`,`owner`,`name`,`flag`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `files_tag_link` ( - `tenant_id` int(10) NOT NULL, - `tag_id` int(10) NOT NULL, - `entry_type` int(10) NOT NULL, - `entry_id` varchar(32) NOT NULL, - `create_by` char(38) DEFAULT NULL, - `create_on` datetime DEFAULT NULL, - `tag_count` int(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`tenant_id`,`tag_id`,`entry_id`,`entry_type`), - KEY `entry_id` (`tenant_id`,`entry_id`,`entry_type`), - KEY `create_on` (`create_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `files_thirdparty_account` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `provider` varchar(50) NOT NULL DEFAULT '0', - `customer_title` varchar(400) NOT NULL, - `user_name` varchar(100) NOT NULL, - `password` varchar(100) NOT NULL, - `token` text, - `user_id` varchar(38) NOT NULL, - `folder_type` int(11) NOT NULL DEFAULT '0', - `create_on` datetime NOT NULL, - `url` text, - `tenant_id` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `files_thirdparty_app` ( - `user_id` varchar(38) NOT NULL, - `app` varchar(50) NOT NULL, - `token` text, - `tenant_id` int(11) NOT NULL, - `modified_on` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`user_id`,`app`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `files_thirdparty_id_mapping` ( - `hash_id` char(32) NOT NULL, - `id` text NOT NULL, - `tenant_id` int(11) NOT NULL, - PRIMARY KEY (`hash_id`), - KEY `index_1` (`tenant_id`,`hash_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_answer` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `question_id` int(11) NOT NULL, - `create_date` datetime DEFAULT NULL, - `user_id` char(38) NOT NULL, - `TenantID` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `TenantID` (`TenantID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_answer_variant` ( - `answer_id` int(11) NOT NULL, - `variant_id` int(11) NOT NULL, - PRIMARY KEY (`answer_id`,`variant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_attachment` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(500) NOT NULL, - `post_id` int(11) NOT NULL, - `size` int(11) NOT NULL DEFAULT '0', - `download_count` int(11) NOT NULL DEFAULT '0', - `content_type` int(11) NOT NULL DEFAULT '0', - `mime_content_type` varchar(100) DEFAULT NULL, - `create_date` datetime DEFAULT NULL, - `path` varchar(1000) NOT NULL, - `TenantID` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `post_id` (`TenantID`,`post_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_category` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(500) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `sort_order` int(11) NOT NULL DEFAULT '0', - `create_date` datetime NOT NULL, - `poster_id` char(38) NOT NULL, - `tenantid` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `TenantID` (`tenantid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_lastvisit` ( - `tenantid` int(11) NOT NULL, - `user_id` char(38) NOT NULL, - `thread_id` int(11) NOT NULL, - `last_visit` datetime NOT NULL, - PRIMARY KEY (`tenantid`,`user_id`,`thread_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_post` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `topic_id` int(11) NOT NULL, - `poster_id` char(38) NOT NULL, - `create_date` datetime NOT NULL, - `subject` varchar(500) NOT NULL DEFAULT '', - `text` mediumtext NOT NULL, - `edit_date` datetime DEFAULT NULL, - `edit_count` int(11) NOT NULL DEFAULT '0', - `is_approved` int(11) NOT NULL DEFAULT '0', - `parent_post_id` int(11) NOT NULL DEFAULT '0', - `formatter` int(11) NOT NULL DEFAULT '0', - `editor_id` char(38) DEFAULT NULL, - `TenantID` int(11) NOT NULL DEFAULT '0', - `LastModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `topic_id` (`TenantID`,`topic_id`), - KEY `create_date` (`create_date`), - KEY `LastModified` (`LastModified`), - KEY `TenantID` (`TenantID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_question` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `topic_id` int(11) NOT NULL, - `type` int(11) NOT NULL DEFAULT '0', - `name` varchar(500) NOT NULL, - `create_date` datetime NOT NULL, - `TenantID` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `topic_id` (`TenantID`,`topic_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_tag` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(200) NOT NULL, - `is_approved` int(11) NOT NULL DEFAULT '0', - `TenantID` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `TenantID` (`TenantID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_thread` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(500) NOT NULL, - `description` varchar(500) NOT NULL DEFAULT '', - `sort_order` int(11) NOT NULL DEFAULT '0', - `category_id` int(11) NOT NULL, - `topic_count` int(11) NOT NULL DEFAULT '0', - `post_count` int(11) NOT NULL DEFAULT '0', - `is_approved` int(11) NOT NULL DEFAULT '0', - `TenantID` int(11) NOT NULL DEFAULT '0', - `recent_post_id` int(11) NOT NULL DEFAULT '0', - `recent_topic_id` int(11) NOT NULL DEFAULT '0', - `recent_post_date` datetime DEFAULT NULL, - `recent_poster_id` char(38) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `tenantid` (`TenantID`,`category_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_topic` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `thread_id` int(11) NOT NULL, - `title` varchar(500) NOT NULL, - `type` int(11) NOT NULL DEFAULT '0', - `create_date` datetime NOT NULL, - `view_count` int(11) NOT NULL DEFAULT '0', - `post_count` int(11) NOT NULL DEFAULT '0', - `recent_post_id` int(11) NOT NULL DEFAULT '0', - `is_approved` int(11) NOT NULL DEFAULT '0', - `poster_id` char(38) DEFAULT NULL, - `sticky` int(11) NOT NULL DEFAULT '0', - `closed` int(11) DEFAULT '0', - `question_id` varchar(45) DEFAULT '0', - `TenantID` int(11) NOT NULL DEFAULT '0', - `LastModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `thread_id` (`thread_id`), - KEY `LastModified` (`LastModified`), - KEY `TenantID` (`TenantID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_topicwatch` ( - `TenantID` int(11) NOT NULL, - `UserID` char(38) NOT NULL, - `TopicID` int(11) NOT NULL, - `ThreadID` int(11) NOT NULL, - PRIMARY KEY (`TenantID`,`UserID`,`TopicID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_topic_tag` ( - `topic_id` int(11) NOT NULL, - `tag_id` int(11) NOT NULL, - PRIMARY KEY (`topic_id`,`tag_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `forum_variant` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(200) NOT NULL, - `question_id` int(11) NOT NULL, - `sort_order` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `install_registration` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP, - `email` varchar(500) NOT NULL, - `version` varchar(500) NOT NULL, - `ip` varchar(50) NOT NULL, - `tenant` varchar(36) DEFAULT NULL, - `alias` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `jabber_archive` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `jid` varchar(255) NOT NULL, - `stamp` datetime NOT NULL, - `message` mediumtext, - PRIMARY KEY (`id`), - KEY `jabber_archive_jid` (`jid`(190)) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `jabber_archive_switch` ( - `id` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `jabber_clear` ( - `lastdate` datetime DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `jabber_offactivity` ( - `jid` varchar(255) NOT NULL, - `logout` datetime DEFAULT NULL, - `status` varchar(255) DEFAULT NULL, - PRIMARY KEY (`jid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `jabber_offmessage` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `jid` varchar(255) NOT NULL, - `message` mediumtext, - PRIMARY KEY (`id`), - KEY `jabber_offmessage_jid` (`jid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `jabber_offpresence` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `jid_to` varchar(255) NOT NULL, - `jid_from` varchar(255) DEFAULT NULL, - `type` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `jabber_offpresence_to` (`jid_to`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `jabber_private` ( - `jid` varchar(255) NOT NULL, - `tag` varchar(255) NOT NULL, - `namespace` varchar(255) NOT NULL, - `element` mediumtext, - PRIMARY KEY (`jid`,`tag`,`namespace`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `jabber_room` ( - `jid` varchar(255) NOT NULL, - `title` varchar(255) DEFAULT NULL, - `description` text, - `subject` varchar(255) DEFAULT NULL, - `instructions` varchar(255) DEFAULT NULL, - `pwd` varchar(255) DEFAULT NULL, - `pwdprotect` int(11) DEFAULT NULL, - `visible` int(11) DEFAULT NULL, - `members` text, - `maxoccupant` int(11) DEFAULT NULL, - `historycountonenter` int(11) DEFAULT NULL, - `anonymous` int(11) DEFAULT NULL, - `logging` int(11) DEFAULT NULL, - `membersonly` int(11) DEFAULT NULL, - `usernamesonly` int(11) DEFAULT NULL, - `moderated` int(11) DEFAULT NULL, - `persistent` int(11) DEFAULT NULL, - `presencebroadcastedfrom` int(11) DEFAULT NULL, - `canchangesubject` int(11) DEFAULT NULL, - `caninvite` int(11) DEFAULT NULL, - `canseememberlist` int(11) DEFAULT NULL, - PRIMARY KEY (`jid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `jabber_room_history` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `jid` varchar(255) NOT NULL, - `stamp` datetime NOT NULL, - `message` mediumtext NOT NULL, - PRIMARY KEY (`id`), - KEY `jabber_room_history_jid` (`jid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `jabber_roster` ( - `jid` varchar(255) NOT NULL, - `item_jid` varchar(255) NOT NULL, - `name` varchar(512) DEFAULT NULL, - `subscription` int(11) NOT NULL DEFAULT '0', - `ask` int(11) NOT NULL DEFAULT '0', - `groups` text, - PRIMARY KEY (`jid`,`item_jid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `jabber_vcard` ( - `jid` varchar(255) NOT NULL, - `vcard` text NOT NULL, - PRIMARY KEY (`jid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `login_events` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `ip` varchar(50) DEFAULT NULL, - `login` varchar(200) DEFAULT NULL, - `browser` varchar(200) DEFAULT NULL, - `platform` varchar(200) DEFAULT NULL, - `date` datetime NOT NULL, - `tenant_id` int(10) NOT NULL, - `user_id` char(38) NOT NULL, - `page` varchar(300) DEFAULT NULL, - `action` int(11) DEFAULT NULL, - `description` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `date` (`date`), - KEY `tenant_id` (`tenant_id`,`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_alerts` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `tenant` int(11) NOT NULL, - `id_user` varchar(255) NOT NULL, - `id_mailbox` int(11) NOT NULL DEFAULT '-1', - `type` int(11) NOT NULL DEFAULT '0', - `data` mediumtext, - PRIMARY KEY (`id`), - KEY `tenant_id_user_id_mailbox_type` (`tenant`,`id_user`,`id_mailbox`,`type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; - -CREATE TABLE IF NOT EXISTS `mail_attachment` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `id_mail` int(11) NOT NULL, - `name` varchar(255) NOT NULL, - `stored_name` varchar(255) DEFAULT NULL, - `type` varchar(255) DEFAULT NULL, - `size` bigint(20) NOT NULL DEFAULT '0', - `need_remove` int(11) NOT NULL DEFAULT '0', - `file_number` int(11) NOT NULL DEFAULT '0', - `content_id` varchar(255) DEFAULT NULL, - `tenant` int(11) NOT NULL, - `id_mailbox` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `tenant` (`tenant`,`id_mail`), - KEY `id_mail` (`id_mail`,`content_id`), - KEY `id_mailbox` (`id_mailbox`,`tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; - -CREATE TABLE IF NOT EXISTS `mail_chain` ( - `id` varchar(255) NOT NULL, - `id_mailbox` int(10) unsigned NOT NULL, - `tenant` int(10) unsigned NOT NULL, - `id_user` varchar(255) NOT NULL, - `folder` int(10) unsigned NOT NULL, - `length` int(10) unsigned NOT NULL, - `unread` tinyint(1) unsigned NOT NULL, - `has_attachments` tinyint(1) unsigned NOT NULL, - `importance` tinyint(1) unsigned NOT NULL, - `tags` text NOT NULL, - `is_crm_chain` tinyint(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`tenant`,`id_user`,`id`,`id_mailbox`,`folder`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_chain_x_crm_entity` ( - `id_tenant` int(11) NOT NULL, - `id_mailbox` int(11) NOT NULL, - `id_chain` varchar(255) NOT NULL, - `entity_id` int(11) NOT NULL, - `entity_type` int(11) NOT NULL, - PRIMARY KEY (`id_tenant`,`id_mailbox`,`id_chain`,`entity_id`,`entity_type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_contacts` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `id_user` varchar(255) NOT NULL, - `tenant` int(11) NOT NULL, - `name` varchar(255) DEFAULT NULL, - `address` varchar(255) NOT NULL, - `description` varchar(100) DEFAULT NULL, - `type` int(11) NOT NULL, - `has_photo` tinyint(1) NOT NULL DEFAULT '0', - `last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tenant_id_user_name_address` (`tenant`,`id_user`,`address`), - KEY `last_modified` (`last_modified`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_contact_info` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `tenant` int(11) NOT NULL, - `id_user` varchar(255) NOT NULL, - `id_contact` int(11) unsigned NOT NULL, - `data` varchar(255) NOT NULL, - `type` int(11) NOT NULL, - `is_primary` tinyint(1) NOT NULL DEFAULT '0', - `last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `last_modified` (`last_modified`), - KEY `contact_id` (`id_contact`), - KEY `tenant_id_user_data` (`tenant`,`id_user`,`data`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_display_images` ( - `tenant` int(10) NOT NULL, - `id_user` varchar(255) NOT NULL, - `address` varchar(255) NOT NULL, - PRIMARY KEY (`tenant`,`id_user`,`address`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_folder` ( - `tenant` int(11) NOT NULL, - `id_user` varchar(255) NOT NULL, - `folder` smallint(5) unsigned NOT NULL, - `time_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `unread_messages_count` int(10) unsigned NOT NULL DEFAULT '0', - `total_messages_count` int(10) unsigned NOT NULL DEFAULT '0', - `unread_conversations_count` int(10) unsigned NOT NULL DEFAULT '0', - `total_conversations_count` int(10) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`tenant`,`id_user`,`folder`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_folder_counters` ( - `tenant` int(11) NOT NULL, - `id_user` varchar(255) NOT NULL, - `folder` smallint(5) unsigned NOT NULL, - `unread_messages_count` int(10) unsigned NOT NULL DEFAULT '0', - `total_messages_count` int(10) unsigned NOT NULL DEFAULT '0', - `unread_conversations_count` int(10) unsigned NOT NULL DEFAULT '0', - `total_conversations_count` int(10) unsigned NOT NULL DEFAULT '0', - `time_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`tenant`,`id_user`,`folder`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_filter` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `tenant` INT(11) NOT NULL, - `id_user` VARCHAR(38) NOT NULL, - `enabled` TINYINT(1) NOT NULL DEFAULT '1', - `filter` TEXT NOT NULL, - `position` INT(11) NOT NULL DEFAULT '0', - `date_created` TIMESTAMP NULL DEFAULT NULL, - `date_modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), -INDEX `tenant_id_user` (`tenant`, `id_user`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_imap_flags` ( - `name` varchar(50) NOT NULL, - `folder_id` int(11) NOT NULL, - `skip` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_imap_special_mailbox` ( - `server` varchar(255) NOT NULL, - `name` varchar(255) NOT NULL, - `folder_id` int(11) NOT NULL, - `skip` int(11) NOT NULL, - PRIMARY KEY (`server`,`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_mail` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `id_mailbox` int(11) NOT NULL DEFAULT '0', - `id_user` varchar(255) NOT NULL, - `tenant` int(11) NOT NULL, - `uidl` varchar(255) DEFAULT NULL, - `md5` varchar(255) DEFAULT NULL, - `address` varchar(255) NOT NULL, - `from_text` text, - `to_text` text, - `reply_to` text, - `cc` text, - `bcc` text, - `subject` text, - `introduction` varchar(255) NOT NULL DEFAULT '', - `importance` tinyint(1) NOT NULL DEFAULT '0', - `date_received` datetime NOT NULL DEFAULT '1975-01-01 00:00:00', - `date_sent` datetime NOT NULL DEFAULT '1975-01-01 00:00:00', - `size` int(11) NOT NULL DEFAULT '0', - `attachments_count` int(11) NOT NULL DEFAULT '0', - `unread` int(11) NOT NULL DEFAULT '0', - `is_answered` int(11) NOT NULL DEFAULT '0', - `is_forwarded` int(11) NOT NULL DEFAULT '0', - `is_from_crm` int(11) NOT NULL DEFAULT '0', - `is_from_tl` int(11) NOT NULL DEFAULT '0', - `is_text_body_only` int(11) NOT NULL DEFAULT '0', - `has_parse_error` tinyint(1) NOT NULL DEFAULT '0', - `calendar_uid` varchar(255) DEFAULT NULL, - `stream` varchar(38) NOT NULL, - `folder` int(11) NOT NULL DEFAULT '1', - `folder_restore` int(11) NOT NULL DEFAULT '1', - `spam` int(11) NOT NULL DEFAULT '0', - `time_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `is_removed` tinyint(1) NOT NULL DEFAULT '0', - `mime_message_id` varchar(255) DEFAULT NULL, - `mime_in_reply_to` varchar(255) DEFAULT NULL, - `chain_id` varchar(255) DEFAULT NULL, - `chain_date` datetime NOT NULL DEFAULT '1975-01-01 00:00:00', - PRIMARY KEY (`id`), - KEY `chain_index_folders` (`chain_id`,`id_mailbox`,`folder`), - KEY `uidl` (`uidl`,`id_mailbox`), - KEY `mime_message_id` (`id_mailbox`,`mime_message_id`), - KEY `md5` (`md5`,`id_mailbox`), - KEY `list_conversations` (`tenant`, `id_user`, `folder`, `chain_date`), - KEY `list_messages` (`tenant`, `id_user`, `folder`, `date_sent`), - KEY `time_modified` (`time_modified`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; - -CREATE TABLE IF NOT EXISTS `mail_mailbox` ( - `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `tenant` INT(11) NOT NULL, - `id_user` VARCHAR(38) NOT NULL, - `address` VARCHAR(255) NOT NULL, - `name` VARCHAR(255) NULL DEFAULT NULL, - `enabled` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', - `is_removed` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `is_processed` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `is_server_mailbox` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `imap` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `user_online` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `is_default` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `msg_count_last` INT(11) NOT NULL DEFAULT '0', - `size_last` INT(11) NOT NULL DEFAULT '0', - `login_delay` INT(11) UNSIGNED NOT NULL DEFAULT '30', - `quota_error` TINYINT(1) NOT NULL DEFAULT '0', - `imap_intervals` MEDIUMTEXT NULL, - `begin_date` TIMESTAMP NOT NULL DEFAULT '1975-01-01 00:00:00', - `email_in_folder` TEXT NULL, - `pop3_password` VARCHAR(255) NULL DEFAULT NULL, - `smtp_password` VARCHAR(255) NULL DEFAULT NULL, - `token_type` TINYINT(4) NOT NULL DEFAULT '0', - `token` TEXT NULL, - `id_smtp_server` INT(11) NOT NULL, - `id_in_server` INT(11) NOT NULL, - `date_checked` DATETIME NULL DEFAULT NULL, - `date_user_checked` DATETIME NULL DEFAULT NULL, - `date_login_delay_expires` DATETIME NOT NULL DEFAULT '1975-01-01 00:00:00', - `date_auth_error` DATETIME NULL DEFAULT NULL, - `date_created` DATETIME NULL DEFAULT NULL, - `date_modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - INDEX `address_index` (`address`), - INDEX `main_mailbox_id_smtp_server_mail_mailbox_server_id` (`id_smtp_server`), - INDEX `main_mailbox_id_in_server_mail_mailbox_server_id` (`id_in_server`), - INDEX `date_login_delay_expires` (`date_checked`, `date_login_delay_expires`), - INDEX `user_id_index` (`tenant`, `id_user`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_mailbox_autoreply` ( - `id_mailbox` int(11) NOT NULL, - `tenant` int(11) NOT NULL, - `turn_on` tinyint(1) NOT NULL, - `only_contacts` tinyint(1) NOT NULL, - `turn_on_to_date` tinyint(1) NOT NULL, - `from_date` datetime NOT NULL, - `to_date` datetime NOT NULL, - `subject` text, - `html` text, - PRIMARY KEY (`id_mailbox`), - KEY `tenant` (`tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_mailbox_autoreply_history` ( - `id_mailbox` int(11) NOT NULL, - `tenant` int(11) NOT NULL, - `sending_email` varchar(255) NOT NULL, - `sending_date` datetime NOT NULL, - PRIMARY KEY (`id_mailbox`,`sending_email`), - KEY `tenant` (`tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_mailbox_domain` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `id_provider` int(11) NOT NULL DEFAULT '0', - `name` varchar(255) NOT NULL, - PRIMARY KEY (`id`), - KEY `id_provider` (`name`,`id_provider`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; - -CREATE TABLE IF NOT EXISTS `mail_mailbox_provider` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) NOT NULL, - `display_name` varchar(255) DEFAULT NULL, - `display_short_name` varchar(255) DEFAULT NULL, - `documentation` varchar(255) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; - -CREATE TABLE IF NOT EXISTS `mail_mailbox_server` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `id_provider` int(11) NOT NULL DEFAULT '0', - `type` enum('pop3','imap','smtp') NOT NULL, - `hostname` varchar(255) NOT NULL, - `port` int(11) NOT NULL DEFAULT '0', - `socket_type` enum('plain','SSL','STARTTLS') NOT NULL DEFAULT 'plain', - `username` varchar(255) DEFAULT NULL, - `authentication` varchar(255) DEFAULT NULL, - `is_user_data` tinyint(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `id_provider` (`id_provider`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_mailbox_signature` ( - `tenant` int(11) NOT NULL, - `id_mailbox` int(11) NOT NULL, - `html` text, - `is_active` tinyint(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`id_mailbox`), - KEY `tenant` (`tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_pop_unordered_domain` ( - `server` varchar(255) NOT NULL, - PRIMARY KEY (`server`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_server_address` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `tenant` int(11) NOT NULL, - `name` varchar(64) NOT NULL, - `id_domain` int(11) NOT NULL, - `id_mailbox` int(11) NOT NULL, - `is_mail_group` int(10) NOT NULL DEFAULT '0', - `is_alias` int(10) NOT NULL DEFAULT '0', - `date_created` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `id_mailbox_fk_index` (`id_mailbox`), - KEY `domain_index` (`id_domain`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_server_dns` ( - `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `tenant` INT(11) NOT NULL, - `id_user` VARCHAR(255) NOT NULL, - `id_domain` INT(11) NOT NULL DEFAULT '-1', - `dkim_selector` VARCHAR(63) NOT NULL DEFAULT 'dkim', - `dkim_private_key` TEXT NULL, - `dkim_public_key` TEXT NULL, - `dkim_ttl` INT(11) NOT NULL DEFAULT '300', - `dkim_verified` TINYINT(1) NOT NULL DEFAULT '0', - `dkim_date_checked` DATETIME NULL DEFAULT NULL, - `domain_check` TEXT NULL, - `spf` TEXT NULL, - `spf_ttl` INT(11) NOT NULL DEFAULT '300', - `spf_verified` TINYINT(1) NOT NULL DEFAULT '0', - `spf_date_checked` DATETIME NULL DEFAULT NULL, - `mx` VARCHAR(255) NULL DEFAULT NULL, - `mx_ttl` INT(11) NOT NULL DEFAULT '300', - `mx_verified` TINYINT(1) NOT NULL DEFAULT '0', - `mx_date_checked` DATETIME NULL DEFAULT NULL, - `time_modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - INDEX `id_domain_tenant_id_user` (`id_domain`, `tenant`, `id_user`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_server_domain` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `tenant` int(11) NOT NULL, - `name` varchar(255) NOT NULL, - `is_verified` int(10) NOT NULL DEFAULT '0', - `date_added` datetime NOT NULL, - `date_checked` datetime NOT NULL DEFAULT '1975-01-01 00:00:00', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`), - KEY `tenant` (`tenant`), - KEY `date_checked` (`date_checked`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_server_mail_group` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `id_tenant` int(11) NOT NULL, - `id_address` int(11) NOT NULL, - `date_created` datetime NOT NULL, - `address` varchar(320) NOT NULL, - PRIMARY KEY (`id`), - KEY `mail_server_address_fk_id` (`id_address`), - KEY `tenant` (`id_tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_server_mail_group_x_mail_server_address` ( - `id_address` int(11) NOT NULL, - `id_mail_group` int(11) NOT NULL, - PRIMARY KEY (`id_address`,`id_mail_group`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_server_server` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `mx_record` varchar(128) NOT NULL DEFAULT '', - `connection_string` text NOT NULL, - `server_type` int(11) NOT NULL, - `smtp_settings_id` int(11) NOT NULL, - `imap_settings_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `mail_server_server_type_server_type_fk_id` (`server_type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_server_server_type` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(64) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_server_server_x_tenant` ( - `id_tenant` int(11) NOT NULL, - `id_server` int(11) NOT NULL, - PRIMARY KEY (`id_tenant`,`id_server`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_tag` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `tenant` int(11) NOT NULL, - `id_user` varchar(255) NOT NULL, - `name` varchar(255) NOT NULL, - `style` varchar(20) DEFAULT NULL, - `addresses` text NOT NULL, - `count` int(10) NOT NULL DEFAULT '0', - `crm_id` int(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `username` (`tenant`,`id_user`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_tag_addresses` ( - `id_tag` int(11) unsigned NOT NULL, - `address` varchar(255) NOT NULL, - `tenant` int(11) NOT NULL, - PRIMARY KEY (`id_tag`,`address`,`tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_tag_mail` ( - `tenant` int(11) NOT NULL, - `id_user` varchar(255) NOT NULL, - `id_mail` int(11) NOT NULL, - `id_tag` int(11) NOT NULL, - `time_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`tenant`,`id_user`,`id_mail`,`id_tag`), - KEY `id_mail` (`id_mail`), - KEY `id_tag` (`id_tag`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_user_folder` ( - `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `parent_id` INT(11) NOT NULL DEFAULT '0', - `tenant` INT(11) NOT NULL, - `id_user` VARCHAR(38) NOT NULL, - `name` VARCHAR(400) NOT NULL, - `folders_count` INT(11) UNSIGNED NOT NULL, - `unread_messages_count` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `total_messages_count` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `unread_conversations_count` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `total_conversations_count` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `modified_on` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - INDEX `tenant_user_parent` (`tenant`, `id_user`, `parent_id`) -)ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_user_folder_tree` ( - `folder_id` INT(11) UNSIGNED NOT NULL, - `parent_id` INT(11) UNSIGNED NOT NULL, - `level` INT(11) UNSIGNED NOT NULL, - PRIMARY KEY (`parent_id`, `folder_id`), - INDEX `folder_id` (`folder_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mail_user_folder_x_mail` ( - `tenant` INT(11) NOT NULL, - `id_user` VARCHAR(38) NOT NULL, - `id_mail` INT(11) UNSIGNED NOT NULL, - `id_folder` INT(11) UNSIGNED NOT NULL, - `time_created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`tenant`, `id_user`, `id_mail`, `id_folder`), - INDEX `id_mail` (`id_mail`), - INDEX `id_tag` (`id_folder`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `mobile_app_install` ( - `user_email` varchar(255) NOT NULL, - `app_type` int(11) NOT NULL, - `registered_on` datetime NOT NULL, - `last_sign` datetime DEFAULT NULL, - PRIMARY KEY (`user_email`,`app_type`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `notify_info` ( - `notify_id` int(10) NOT NULL, - `state` int(10) NOT NULL DEFAULT '0', - `attempts` int(10) NOT NULL DEFAULT '0', - `modify_date` datetime NOT NULL, - `priority` int(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`notify_id`), - KEY `state` (`state`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `notify_promotion_watch` ( - `id` varchar(50) NOT NULL, - `user_id` varchar(50) NOT NULL, - `session_id` varchar(25) NOT NULL DEFAULT '', - `viewcount` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`user_id`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `notify_queue` ( - `notify_id` int(11) NOT NULL AUTO_INCREMENT, - `tenant_id` int(11) NOT NULL, - `sender` varchar(255) DEFAULT NULL, - `reciever` varchar(255) DEFAULT NULL, - `subject` varchar(1024) DEFAULT NULL, - `content_type` varchar(64) DEFAULT NULL, - `content` text, - `sender_type` varchar(64) DEFAULT NULL, - `reply_to` varchar(1024) DEFAULT NULL, - `creation_date` datetime NOT NULL, - `attachments` text NULL, - PRIMARY KEY (`notify_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `notify_tip_watch` ( - `tip_id` varchar(50) NOT NULL, - `user_id` varchar(38) NOT NULL, - `tenant_id` int(11) NOT NULL, - PRIMARY KEY (`tip_id`,`user_id`), - KEY `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_comments` ( - `comment_id` int(11) NOT NULL AUTO_INCREMENT, - `id` char(38) NOT NULL, - `content` text, - `inactive` tinyint(1) NOT NULL DEFAULT '0', - `create_by` char(38) NOT NULL, - `create_on` datetime NOT NULL, - `parent_id` char(38) DEFAULT NULL, - `tenant_id` int(11) NOT NULL, - `target_uniq_id` varchar(50) NOT NULL, - PRIMARY KEY (`comment_id`,`id`), - KEY `target_uniq_id` (`tenant_id`,`target_uniq_id`), - KEY `create_on` (`create_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_following_project_participant` ( - `project_id` int(11) NOT NULL, - `participant_id` char(38) NOT NULL, - PRIMARY KEY (`participant_id`,`project_id`), - KEY `project_id` (`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_messages` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(255) DEFAULT NULL, - `status` int(11) NOT NULL DEFAULT '0', - `create_by` char(38) NOT NULL, - `create_on` datetime NOT NULL, - `last_modified_on` datetime DEFAULT NULL, - `last_modified_by` char(38) DEFAULT NULL, - `content` mediumtext, - `project_id` int(11) NOT NULL, - `tenant_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`), - KEY `project_id` (`project_id`), - KEY `create_on` (`create_on`), - KEY `last_modified_on` (`last_modified_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_milestones` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(255) DEFAULT NULL, - `description` text, - `deadline` datetime NOT NULL, - `responsible_id` char(38) DEFAULT NULL, - `status` int(11) NOT NULL, - `status_changed` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', - `project_id` int(11) NOT NULL, - `tenant_id` int(11) NOT NULL, - `is_notify` tinyint(1) NOT NULL DEFAULT '0', - `is_key` tinyint(1) DEFAULT '0', - `create_by` char(38) DEFAULT NULL, - `create_on` datetime DEFAULT NULL, - `last_modified_by` char(38) DEFAULT NULL, - `last_modified_on` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`), - KEY `project_id` (`project_id`), - KEY `create_on` (`create_on`), - KEY `last_modified_on` (`last_modified_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_projects` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `status` int(11) NOT NULL, - `status_changed` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', - `title` varchar(255) DEFAULT NULL, - `description` text, - `responsible_id` char(38) NOT NULL, - `tenant_id` int(11) NOT NULL, - `private` int(10) NOT NULL DEFAULT '0', - `create_on` datetime DEFAULT NULL, - `create_by` char(38) DEFAULT NULL, - `last_modified_on` datetime DEFAULT NULL, - `last_modified_by` char(38) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `responsible_id` (`responsible_id`), - KEY `tenant_id` (`tenant_id`), - KEY `create_on` (`create_on`), - KEY `last_modified_on` (`last_modified_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_project_participant` ( - `project_id` int(11) NOT NULL, - `participant_id` char(38) NOT NULL, - `security` int(10) NOT NULL DEFAULT '0', - `created` timestamp NOT NULL DEFAULT '2000-01-01 00:00:00', - `updated` timestamp NOT NULL DEFAULT '2000-01-01 00:00:00', - `removed` int(10) NOT NULL DEFAULT '0', - `tenant` int(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`tenant`,`project_id`,`participant_id`), - KEY `participant_id` (`participant_id`), - KEY `created` (`created`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_project_tag` ( - `tag_id` int(11) NOT NULL, - `project_id` int(11) NOT NULL, - PRIMARY KEY (`project_id`,`tag_id`), - KEY `tag_id` (`tag_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_reports` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `type` INT(11) NOT NULL, - `name` VARCHAR(1024) NOT NULL, - `fileId` INT(11) NOT NULL DEFAULT '0', - `create_on` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, - `create_by` VARCHAR(38) NULL DEFAULT NULL, - `tenant_id` INT(10) NOT NULL, - PRIMARY KEY (`id`), - INDEX `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_report_template` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `type` int(11) NOT NULL, - `name` varchar(1024) NOT NULL, - `filter` text, - `cron` varchar(255) DEFAULT NULL, - `create_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `create_by` varchar(38) DEFAULT NULL, - `tenant_id` int(10) NOT NULL, - `auto` int(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_subtasks` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `Title` varchar(255) NOT NULL, - `responsible_id` char(38) NOT NULL, - `task_id` int(11) NOT NULL, - `status` int(11) NOT NULL, - `status_changed` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', - `tenant_id` int(11) NOT NULL, - `create_by` char(38) DEFAULT NULL, - `create_on` datetime DEFAULT NULL, - `last_modified_by` char(38) DEFAULT NULL, - `last_modified_on` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `responsible_id` (`responsible_id`), - KEY `task_id` (`tenant_id`,`task_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_tags` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(255) DEFAULT NULL, - `tenant_id` int(11) DEFAULT NULL, - `create_on` datetime DEFAULT NULL, - `create_by` char(38) DEFAULT NULL, - `last_modified_on` datetime DEFAULT NULL, - `last_modified_by` char(38) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_tasks` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(255) DEFAULT NULL, - `description` text, - `responsible_id` char(38) DEFAULT '00000000-0000-0000-0000-000000000000', - `priority` int(11) NOT NULL, - `status` int(11) NOT NULL, - `status_changed` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', - `project_id` int(11) NOT NULL, - `milestone_id` int(11) DEFAULT NULL, - `tenant_id` int(11) NOT NULL, - `sort_order` int(11) NOT NULL DEFAULT '0', - `deadline` datetime DEFAULT NULL, - `create_by` char(38) NOT NULL, - `create_on` datetime DEFAULT NULL, - `last_modified_by` char(38) DEFAULT NULL, - `last_modified_on` datetime DEFAULT NULL, - `start_date` datetime DEFAULT NULL, - `progress` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `responsible_id` (`responsible_id`), - KEY `project_id` (`project_id`), - KEY `deadline` (`deadline`), - KEY `create_on` (`create_on`), - KEY `milestone_id` (`tenant_id`,`milestone_id`), - KEY `tenant_id` (`tenant_id`,`project_id`), - KEY `last_modified_on` (`last_modified_on`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_tasks_links` ( - `tenant_id` int(10) NOT NULL DEFAULT '0', - `task_id` int(10) NOT NULL DEFAULT '0', - `parent_id` int(10) NOT NULL DEFAULT '0', - `link_type` int(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`tenant_id`,`task_id`,`parent_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_tasks_order` ( - `tenant_id` int(10) NOT NULL, - `project_id` int(10) NOT NULL, - `task_order` text, - PRIMARY KEY (`tenant_id`,`project_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_tasks_recurrence` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `task_id` int(11) NOT NULL, - `cron` varchar(255) DEFAULT NULL, - `start_date` datetime NOT NULL, - `end_date` datetime NOT NULL, - `tenant_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `task_id` (`tenant_id`,`task_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_tasks_responsible` ( - `tenant_id` int(11) NOT NULL, - `task_id` int(11) NOT NULL, - `responsible_id` char(38) NOT NULL, - PRIMARY KEY (`tenant_id`,`task_id`,`responsible_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_templates` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(255) DEFAULT NULL, - `description` text, - `create_by` char(38) NOT NULL, - `last_modified_on` datetime DEFAULT NULL, - `last_modified_by` char(38) DEFAULT NULL, - `create_on` datetime DEFAULT NULL, - `tenant_id` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `projects_time_tracking` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `note` varchar(255) DEFAULT NULL, - `date` datetime NOT NULL, - `hours` float DEFAULT '0', - `tenant_id` int(11) NOT NULL, - `relative_task_id` int(11) DEFAULT NULL, - `person_id` char(38) NOT NULL, - `project_id` int(11) NOT NULL, - `create_on` datetime DEFAULT NULL, - `create_by` char(38) DEFAULT NULL, - `payment_status` int(10) NOT NULL DEFAULT '0', - `status_changed` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', - PRIMARY KEY (`id`), - KEY `person_id` (`person_id`), - KEY `project_id` (`project_id`), - KEY `relative_task_id` (`tenant_id`,`relative_task_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `res_authors` ( - `login` varchar(150) NOT NULL, - `password` varchar(50) NOT NULL, - `isAdmin` tinyint(1) NOT NULL DEFAULT '0', - `online` int(10) NOT NULL DEFAULT '0', - `lastVisit` datetime DEFAULT NULL, - PRIMARY KEY (`login`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AVG_ROW_LENGTH=4096; - -CREATE TABLE IF NOT EXISTS `res_authorsfile` ( - `authorLogin` varchar(50) NOT NULL, - `fileid` int(11) NOT NULL, - `writeAccess` tinyint(1) DEFAULT NULL, - PRIMARY KEY (`authorLogin`,`fileid`), - KEY `res_authorsfile_FK2` (`fileid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `res_authorslang` ( - `authorLogin` varchar(50) NOT NULL, - `cultureTitle` varchar(20) NOT NULL, - PRIMARY KEY (`authorLogin`,`cultureTitle`), - KEY `res_authorslang_FK2` (`cultureTitle`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AVG_ROW_LENGTH=1170; - -CREATE TABLE IF NOT EXISTS `res_cultures` ( - `title` varchar(120) NOT NULL, - `value` varchar(120) NOT NULL, - `available` tinyint(1) NOT NULL DEFAULT '0', - `creationDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`title`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `res_data` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `fileid` int(11) NOT NULL, - `title` varchar(120) NOT NULL, - `cultureTitle` varchar(20) NOT NULL, - `textValue` text, - `description` text, - `timeChanges` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `resourceType` varchar(20) DEFAULT NULL, - `flag` int(11) NOT NULL DEFAULT '0', - `link` varchar(120) DEFAULT NULL, - `authorLogin` varchar(50) NOT NULL DEFAULT 'Console', - PRIMARY KEY (`fileid`,`cultureTitle`,`title`), - UNIQUE KEY `id` (`id`), - KEY `dateIndex` (`timeChanges`), - KEY `resources_FK2` (`cultureTitle`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AVG_ROW_LENGTH=140; - -CREATE TABLE IF NOT EXISTS `res_files` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `projectName` varchar(50) NOT NULL, - `moduleName` varchar(50) NOT NULL, - `resName` varchar(50) NOT NULL, - `isLock` tinyint(1) NOT NULL DEFAULT '0', - `lastUpdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `creationDate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - PRIMARY KEY (`id`), - UNIQUE KEY `resname` (`resName`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AVG_ROW_LENGTH=16384; - -CREATE TABLE IF NOT EXISTS `res_reserve` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `fileid` int(11) NOT NULL, - `title` varchar(120) NOT NULL, - `cultureTitle` varchar(20) NOT NULL, - `textValue` text, - `flag` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`fileid`,`title`,`cultureTitle`), - UNIQUE KEY `id` (`id`), - KEY `resources_FK2` (`cultureTitle`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 AVG_ROW_LENGTH=250; - -CREATE TABLE IF NOT EXISTS `sso_links` ( - `id` varchar(200) NOT NULL, - `uid` varchar(200) NOT NULL, - `profile` varchar(200) NOT NULL, - PRIMARY KEY (`id`,`uid`,`profile`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `sso_tokens` ( - `tokenType` varchar(50) NOT NULL, - `tenant` int(11) NOT NULL, - `tokenId` varchar(100) NOT NULL, - `expirationDate` datetime NOT NULL, - PRIMARY KEY (`tokenId`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `tenants_buttons` ( - `tariff_id` int(10) NOT NULL, - `partner_id` varchar(50) NOT NULL, - `button_url` text NOT NULL, - PRIMARY KEY (`tariff_id`,`partner_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `tenants_forbiden` ( - `address` varchar(50) NOT NULL, - PRIMARY KEY (`address`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `tenants_iprestrictions` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `tenant` int(10) NOT NULL, - `ip` varchar(50) NOT NULL, - PRIMARY KEY (`id`), - KEY `tenant` (`tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `tenants_partners` ( - `tenant_id` int(10) NOT NULL, - `partner_id` varchar(36) DEFAULT NULL, - `affiliate_id` varchar(50) DEFAULT NULL, - `campaign` VARCHAR(50) NULL DEFAULT NULL, - PRIMARY KEY (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `tenants_quota` ( - `tenant` int(10) NOT NULL, - `name` varchar(128) DEFAULT NULL, - `description` varchar(128) DEFAULT NULL, - `max_file_size` bigint(20) NOT NULL DEFAULT '0', - `max_total_size` bigint(20) NOT NULL DEFAULT '0', - `active_users` int(10) NOT NULL DEFAULT '0', - `features` text, - `price` decimal(10,2) NOT NULL DEFAULT '0.00', - `price2` decimal(10,2) NOT NULL DEFAULT '0.00', - `avangate_id` varchar(128) DEFAULT NULL, - `visible` int(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; - -CREATE TABLE IF NOT EXISTS `tenants_quotarow` ( - `tenant` int(11) NOT NULL, - `path` varchar(255) NOT NULL, - `counter` bigint(20) NOT NULL DEFAULT '0', - `tag` varchar(1024) DEFAULT NULL, - `last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`tenant`,`path`), - KEY `last_modified` (`last_modified`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `tenants_tariff` ( - `id` int(10) NOT NULL AUTO_INCREMENT, - `tenant` int(10) NOT NULL, - `tariff` int(10) NOT NULL, - `stamp` datetime NOT NULL, - `tariff_key` varchar(64) DEFAULT NULL, - `comment` varchar(255) DEFAULT NULL, - `create_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `tenant` (`tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `tenants_tenants` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) NOT NULL, - `alias` varchar(100) NOT NULL, - `mappeddomain` varchar(100) DEFAULT NULL, - `version` int(10) NOT NULL DEFAULT '2', - `version_changed` datetime DEFAULT NULL, - `language` char(10) NOT NULL DEFAULT 'en-US', - `timezone` varchar(50) DEFAULT NULL, - `trusteddomains` varchar(1024) DEFAULT NULL, - `trusteddomainsenabled` int(10) NOT NULL DEFAULT '1', - `status` int(11) NOT NULL DEFAULT '0', - `statuschanged` datetime DEFAULT NULL, - `creationdatetime` datetime NOT NULL, - `owner_id` varchar(38) DEFAULT NULL, - `public` int(10) NOT NULL DEFAULT '0', - `publicvisibleproducts` varchar(1024) DEFAULT NULL, - `payment_id` varchar(38) DEFAULT NULL, - `industry` int(11) NOT NULL DEFAULT '0', - `last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `spam` INT(10) NOT NULL DEFAULT '1', - `calls` INT(10) NOT NULL DEFAULT '1', - PRIMARY KEY (`id`), - UNIQUE KEY `alias` (`alias`), - KEY `last_modified` (`last_modified`), - KEY `mappeddomain` (`mappeddomain`), - KEY `version` (`version`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `tenants_version` ( - `id` int(10) NOT NULL, - `version` varchar(64) NOT NULL, - `url` varchar(64) NOT NULL, - `default_version` int(11) NOT NULL DEFAULT '0', - `visible` int(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `webstudio_fckuploads` ( - `TenantID` int(11) NOT NULL, - `StoreDomain` varchar(50) NOT NULL, - `FolderID` varchar(100) NOT NULL, - `ItemID` varchar(100) NOT NULL, - PRIMARY KEY (`TenantID`,`StoreDomain`,`FolderID`,`ItemID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `webstudio_index` ( - `index_name` varchar(50) NOT NULL, - `last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`index_name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `webstudio_settings` ( - `TenantID` int(11) NOT NULL, - `ID` varchar(64) NOT NULL, - `UserID` varchar(64) NOT NULL, - `Data` mediumtext NOT NULL, - PRIMARY KEY (`TenantID`,`ID`,`UserID`), - KEY `ID` (`ID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `webstudio_uservisit` ( - `tenantid` int(11) NOT NULL, - `visitdate` datetime NOT NULL, - `productid` varchar(38) NOT NULL, - `userid` varchar(38) NOT NULL, - `visitcount` int(11) NOT NULL DEFAULT '0', - `firstvisittime` datetime DEFAULT NULL, - `lastvisittime` datetime DEFAULT NULL, - PRIMARY KEY (`tenantid`,`visitdate`,`productid`,`userid`), - KEY `visitdate` (`visitdate`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `wiki_categories` ( - `Tenant` int(11) NOT NULL, - `CategoryName` varchar(255) NOT NULL, - `PageName` varchar(255) NOT NULL, - PRIMARY KEY (`Tenant`,`CategoryName`,`PageName`), - KEY `PageName` (`Tenant`,`PageName`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `wiki_comments` ( - `Tenant` int(11) NOT NULL, - `Id` char(38) NOT NULL, - `ParentId` char(38) NOT NULL, - `PageName` varchar(255) NOT NULL, - `Body` text NOT NULL, - `UserId` char(38) NOT NULL, - `Date` datetime NOT NULL, - `Inactive` int(11) NOT NULL, - PRIMARY KEY (`Tenant`,`Id`), - KEY `PageName` (`Tenant`,`PageName`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `wiki_files` ( - `Tenant` int(11) NOT NULL, - `FileName` varchar(255) NOT NULL, - `Version` int(11) NOT NULL, - `UploadFileName` text NOT NULL, - `UserID` char(38) NOT NULL, - `Date` datetime NOT NULL, - `FileLocation` text NOT NULL, - `FileSize` int(11) NOT NULL, - PRIMARY KEY (`Tenant`,`FileName`,`Version`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `wiki_pages` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `tenant` int(11) NOT NULL, - `pagename` varchar(255) NOT NULL, - `version` int(11) NOT NULL, - `modified_by` char(38) NOT NULL, - `modified_on` datetime NOT NULL, - PRIMARY KEY (`id`,`tenant`,`pagename`), - KEY `modified_on` (`modified_on`), - KEY `tenant` (`tenant`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `wiki_pages_history` ( - `tenant` int(11) NOT NULL, - `pagename` varchar(255) NOT NULL, - `version` int(11) NOT NULL, - `create_by` char(38) NOT NULL, - `create_on` datetime NOT NULL, - `body` mediumtext, - PRIMARY KEY (`tenant`,`pagename`,`version`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE IF NOT EXISTS `short_links` ( - `id` INT(21) NOT NULL AUTO_INCREMENT, - `short` VARCHAR(12) COLLATE utf8_bin NULL DEFAULT NULL, - `link` TEXT NULL, - PRIMARY KEY (`id`), - UNIQUE INDEX `UNIQUE` (`short`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/sql/createdb.sql b/sql/createdb.sql deleted file mode 100644 index 4983697abd..0000000000 --- a/sql/createdb.sql +++ /dev/null @@ -1,4 +0,0 @@ -CREATE DATABASE IF NOT EXISTS `DB_NAME` CHARACTER SET utf8 COLLATE 'utf8_general_ci'; -use `DB_NAME`; -set @@global.max_allowed_packet = 104857600; -set @@global.group_concat_max_len = 20971520; \ No newline at end of file diff --git a/sql/docspace_upgrade1.sql b/sql/docspace_upgrade1.sql deleted file mode 100644 index 674843c047..0000000000 --- a/sql/docspace_upgrade1.sql +++ /dev/null @@ -1,34 +0,0 @@ -DELIMITER DLM00 - -CREATE PROCEDURE docspace_upgrade1() -BEGIN - IF EXISTS (SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'files_thirdparty_account' AND COLUMN_NAME = 'root_folder_type') THEN - ALTER TABLE files_thirdparty_account CHANGE root_folder_type room_type INT NOT NULL; - END IF; - - IF NOT EXISTS (SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'files_thirdparty_account' AND COLUMN_NAME = 'room_type') THEN - ALTER TABLE files_thirdparty_account ADD room_type INT NOT NULL; - END IF; - - IF NOT EXISTS (SELECT * FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'files_thirdparty_account' AND COLUMN_NAME = 'folder_Id') THEN - ALTER TABLE files_thirdparty_account ADD folder_id TEXT NULL COLLATE UTF8_GENERAL_CI; - END IF; - - IF NOT EXISTS(SELECT * FROM information_schema.`TABLES` WHERE `TABLE_SCHEMA` = DATABASE() AND `TABLE_NAME` = 'hosting_instance_registration') THEN - CREATE TABLE hosting_instance_registration ( - instance_registration_id VARCHAR(255) NOT NULL COLLATE 'utf8_general_ci', - last_updated DATETIME NULL DEFAULT NULL, - worker_type_name VARCHAR(255) NOT NULL COLLATE 'utf8_general_ci', - is_active TINYINT(3) NOT NULL, - PRIMARY KEY (instance_registration_id) USING BTREE, - INDEX worker_type_name (worker_type_name) USING BTREE - ) - COLLATE='utf8mb4_0900_ai_ci' - ENGINE=InnoDB; - END IF; - -END DLM00 - -CALL docspace_upgrade1() DLM00 - -DELIMITER ; \ No newline at end of file diff --git a/web/ASC.Web.Api/Api/CapabilitiesController.cs b/web/ASC.Web.Api/Api/CapabilitiesController.cs index d63604e81f..01013e658c 100644 --- a/web/ASC.Web.Api/Api/CapabilitiesController.cs +++ b/web/ASC.Web.Api/Api/CapabilitiesController.cs @@ -33,7 +33,8 @@ public class CapabilitiesController : ControllerBase { private readonly CoreBaseSettings _coreBaseSettings; private readonly TenantManager _tenantManager; - private readonly ProviderManager _providerManager; + private readonly ProviderManager _providerManager; + private readonly SettingsManager _settingsManager; private readonly IConfiguration _configuration; private readonly IHttpContextAccessor _httpContextAccessor; private readonly ILogger _log; @@ -42,14 +43,16 @@ public class CapabilitiesController : ControllerBase public CapabilitiesController( CoreBaseSettings coreBaseSettings, TenantManager tenantManager, - ProviderManager providerManager, + ProviderManager providerManager, + SettingsManager settingsManager, IConfiguration configuration, IHttpContextAccessor httpContextAccessor, ILogger logger) { _coreBaseSettings = coreBaseSettings; _tenantManager = tenantManager; - _providerManager = providerManager; + _providerManager = providerManager; + _settingsManager = settingsManager; _configuration = configuration; _httpContextAccessor = httpContextAccessor; _log = logger; @@ -120,18 +123,17 @@ public class CapabilitiesController : ControllerBase || SetupInfo.IsVisibleSettings(ManagementType.SingleSignOnSettings.ToString()) && _tenantManager.GetTenantQuota(_tenantManager.GetCurrentTenant().Id).Sso) { - //var settings = SettingsManager.Load(); + var settings = _settingsManager.Load(); - //if (settings.EnableSso) - //{ - var uri = _httpContextAccessor.HttpContext.Request.GetUrlRewriter(); - - var configUrl = _configuration["web:sso:saml:login:url"] ?? ""; - - result.SsoUrl = $"{uri.Scheme}://{uri.Host}{((uri.Port == 80 || uri.Port == 443) ? "" : ":" + uri.Port)}{configUrl}"; - result.SsoLabel = string.Empty; - // result.SsoLabel = settings.SpLoginLabel; - //} + if (settings.EnableSso) + { + var uri = _httpContextAccessor.HttpContext.Request.GetUrlRewriter(); + + var configUrl = _configuration["web:sso:saml:login:url"] ?? ""; + + result.SsoUrl = $"{uri.Scheme}://{uri.Host}{((uri.Port == 80 || uri.Port == 443) ? "" : ":" + uri.Port)}{configUrl}"; + result.SsoLabel = settings.SpLoginLabel; + } } } catch (Exception ex) diff --git a/web/ASC.Web.Api/GlobalUsings.cs b/web/ASC.Web.Api/GlobalUsings.cs index f436ba35ce..3abad4bfbd 100644 --- a/web/ASC.Web.Api/GlobalUsings.cs +++ b/web/ASC.Web.Api/GlobalUsings.cs @@ -85,9 +85,10 @@ global using ASC.FederatedLogin; global using ASC.FederatedLogin.Helpers; global using ASC.FederatedLogin.LoginProviders; global using ASC.FederatedLogin.Profile; +global using ASC.Files.Core.Helpers; global using ASC.IPSecurity; global using ASC.MessagingSystem.Core; -global using ASC.MessagingSystem.Models; +global using ASC.MessagingSystem.EF.Model; global using ASC.Notify.Cron; global using ASC.Security.Cryptography; global using ASC.Web.Api; @@ -100,7 +101,6 @@ global using ASC.Web.Api.Log; global using ASC.Web.Api.Models; global using ASC.Web.Api.Routing; global using ASC.Web.Core; -global using ASC.Web.Core.Files; global using ASC.Web.Core.Helpers; global using ASC.Web.Core.Mobile; global using ASC.Web.Core.PublicResources; @@ -123,7 +123,7 @@ global using ASC.Web.Studio.UserControls.Management.SingleSignOnSettings; global using ASC.Web.Studio.UserControls.Statistics; global using ASC.Web.Studio.Utility; global using ASC.Webhooks.Core; -global using ASC.Webhooks.Core.Dao.Models; +global using ASC.Webhooks.Core.EF.Model; global using Autofac; @@ -144,5 +144,5 @@ global using MimeKit; global using static ASC.ActiveDirectory.Base.Settings.LdapSettings; global using static ASC.Security.Cryptography.EmailValidationKeyProvider; - + global using SecurityContext = ASC.Core.SecurityContext; \ No newline at end of file diff --git a/web/ASC.Web.Client/public/locales/az/NavMenu.json b/web/ASC.Web.Client/public/locales/az/NavMenu.json index 2c840722c6..6a149286da 100644 --- a/web/ASC.Web.Client/public/locales/az/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/az/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Proqram haqqında", - "LogoutButton": "Çıxış edin", "RecoverAccess": "Girişi bərpa edin", "RecoverContactEmailPlaceholder": "Əlaqə üçün e-poçt ünvanı", "RecoverDescribeYourProblemPlaceholder": "Probleminizi təsvir edin", "RecoverTextBody": "Cari hesabınızla giriş edə bilmirsinizsə və ya yeni istifadəçi kimi qeydiyyatdan keçmək istəyirsinizsə, o zaman portal administratoru ilə əlaqə saxlayın.", "RecoverTitle": "Girişin bərpası", - "TurnOnDesktopVersion": "Masaüstü versiyanı işə salın", - "HelpCenter": "Yardım Mərkəzi" + "TurnOnDesktopVersion": "Masaüstü versiyanı işə salın" } diff --git a/web/ASC.Web.Client/public/locales/az/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/az/PaymentsEnterprise.json index d86790a9ae..32f11a6787 100644 --- a/web/ASC.Web.Client/public/locales/az/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/az/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "{{organizationName}} nəzərdən keçirdiyiniz üçün təşəkkür edirik!", "HeaderExpiredTrialLicense": "Ödənişsiz sınaq müddəti bitmişdir", "HeaderLicense": "Siz {{organizationName}} məxsus Müəssisə buraxılışından istifadə edirsiniz", - "PaymentsTitle": "Ödənişlər", "RenewalLicense": "Əgər lisenziyanızı yeniləmisinizsə, o zaman lisenziya faylınızı yükləyin.", "SubscriptionRenewedLicense": "Əldə etmək üçün abunəliyinizi yeniləyin:", "SuccessLoadingLicense": "Lisenziya uğurla aktivləşdirilmişdir" diff --git a/web/ASC.Web.Client/public/locales/bg/NavMenu.json b/web/ASC.Web.Client/public/locales/bg/NavMenu.json index b200b3d7ad..208c3774e9 100644 --- a/web/ASC.Web.Client/public/locales/bg/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/bg/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "За тази програма", - "LogoutButton": "Отписване", "RecoverAccess": "Поднови достъп", "RecoverContactEmailPlaceholder": "Имейл за контакт", "RecoverDescribeYourProblemPlaceholder": "Опишете проблема си", "RecoverTextBody": "Ако не можете да се впишете със съществуващия си профил или искате да се регистрирате като нов потребител, свържете се с администратора на портала. ", "RecoverTitle": "Възстановяване на достъп", - "TurnOnDesktopVersion": "Превключете на настолна версия", - "HelpCenter": "Помощен център" + "TurnOnDesktopVersion": "Превключете на настолна версия" } diff --git a/web/ASC.Web.Client/public/locales/bg/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/bg/PaymentsEnterprise.json index 78cb9a050d..fa5174df6a 100644 --- a/web/ASC.Web.Client/public/locales/bg/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/bg/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Благодарим Ви, че проверихте {{organizationName}}!", "HeaderExpiredTrialLicense": "Безплатният пробен период е изтекъл", "HeaderLicense": "Използвате {{organizationName}} Enterprise Edition", - "PaymentsTitle": "Плащания", "RenewalLicense": "Ако вече сте закупили подновяване, качете лицензионния файл.", "SubscriptionRenewedLicense": "Подновете абонамент, за да получите:", "SuccessLoadingLicense": "Лицензът е активиран успешно" diff --git a/web/ASC.Web.Client/public/locales/cs/NavMenu.json b/web/ASC.Web.Client/public/locales/cs/NavMenu.json index 2ae15f9b33..6f5550b01b 100644 --- a/web/ASC.Web.Client/public/locales/cs/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/cs/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "O tomto programu", - "LogoutButton": "Odhlásit se", "RecoverAccess": "Obnovit přístup", "RecoverContactEmailPlaceholder": "Kontaktní emailová adresa", "RecoverDescribeYourProblemPlaceholder": "Popište svůj problém", "RecoverTextBody": "Pokud se nemůžete přihlásit pomocí stávajícího účtu nebo chcete být zaregistrováni jako nový uživatel, kontaktujte správce portálu. ", "RecoverTitle": "Obnovení přístupu", - "TurnOnDesktopVersion": "Zapnout verzi pro počítač", - "HelpCenter": "Centrum nápovědy" + "TurnOnDesktopVersion": "Zapnout verzi pro počítač" } diff --git a/web/ASC.Web.Client/public/locales/cs/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/cs/PaymentsEnterprise.json index 7ce89b3d88..9f772c479a 100644 --- a/web/ASC.Web.Client/public/locales/cs/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/cs/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Děkujeme, že jste vyzkoušeli {{organizationName}}!", "HeaderExpiredTrialLicense": "Bezplatné zkušební období vypršelo", "HeaderLicense": "Používáte Enterprise Edition {{organizationName}}", - "PaymentsTitle": "Platby", "RenewalLicense": "Pokud jste již zakoupili obnovení, nahrajte licenční soubor.", "SubscriptionRenewedLicense": "Obnovte předplatné a získejte:", "SuccessLoadingLicense": "Licence byla úspěšně aktivována" diff --git a/web/ASC.Web.Client/public/locales/de/NavMenu.json b/web/ASC.Web.Client/public/locales/de/NavMenu.json index de275997b8..085a2f4164 100644 --- a/web/ASC.Web.Client/public/locales/de/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/de/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Über diese Software", - "LogoutButton": "Ausloggen", "RecoverAccess": "Zugriff wiederherstellen", "RecoverContactEmailPlaceholder": "E-Mail-Adresse", "RecoverDescribeYourProblemPlaceholder": "Bitte Problem beschreiben", "RecoverTextBody": "Wenn Sie sich mit Ihren Anmeldeinformationen nicht einloggen können oder ein neues Profil erstellen möchten, wenden Sie sich an den Administrator des Portals.", "RecoverTitle": "Zugriffswiederherstellung", - "TurnOnDesktopVersion": "Desktopversion anzeigen", - "HelpCenter": "Hilfe-Center" + "TurnOnDesktopVersion": "Desktopversion anzeigen" } diff --git a/web/ASC.Web.Client/public/locales/de/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/de/PaymentsEnterprise.json index d1f2bcfd8d..356badd797 100644 --- a/web/ASC.Web.Client/public/locales/de/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/de/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Vielen Dank für Ihr Interesse an der Testversion für {{organizationName}}!", "HeaderExpiredTrialLicense": "Kostenlose Testversion ist abgelaufen", "HeaderLicense": "Sie benutzen {{organizationName}} Enterprise Edition", - "PaymentsTitle": "Zahlungen", "RenewalLicense": "Wenn Sie Ihre Lizenz schon erneut haben, laden Sie die Lizenzdatei hoch.", "SubscriptionRenewedLicense": "Verlängern Sie Ihr Abonnement und erhalten Sie:", "SuccessLoadingLicense": "Lizenz wurde erfolgreich aktiviert" diff --git a/web/ASC.Web.Client/public/locales/el/NavMenu.json b/web/ASC.Web.Client/public/locales/el/NavMenu.json index a58a99ccbb..56ca586135 100644 --- a/web/ASC.Web.Client/public/locales/el/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/el/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Σχετικά με αυτό το πρόγραμμα", - "LogoutButton": "Αποσύνδεση", "RecoverAccess": "Ανάκτηση πρόσβασης", "RecoverContactEmailPlaceholder": "Email επικοινωνίας", "RecoverDescribeYourProblemPlaceholder": "Περιγράψτε το πρόβλημά σας", "RecoverTextBody": "Εάν δεν μπορείτε να συνδεθείτε με τον υπάρχοντα λογαριασμό σας ή θέλετε να εγγραφείτε ως νέος χρήστης, επικοινωνήστε με τον διαχειριστή της πύλης.", "RecoverTitle": "Ανάκτηση πρόσβασης", - "TurnOnDesktopVersion": "Ενεργοποιήστε την έκδοση για υπολογιστές", - "HelpCenter": "Κέντρο Βοήθειας" + "TurnOnDesktopVersion": "Ενεργοποιήστε την έκδοση για υπολογιστές" } diff --git a/web/ASC.Web.Client/public/locales/el/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/el/PaymentsEnterprise.json index 31a246047f..05ead438cc 100644 --- a/web/ASC.Web.Client/public/locales/el/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/el/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Σας ευχαριστούμε που είδατε την {{organizationName}}!", "HeaderExpiredTrialLicense": "Η δωρεάν δοκιμαστική περίοδος έχει λήξει", "HeaderLicense": "Χρησιμοποιείτε την έκδοση Enterprise της {{organizationName}}", - "PaymentsTitle": "Πληρωμές", "RenewalLicense": "Αν έχετε ήδη αγοράσει την ανανέωση, ανεβάστε το αρχείο της άδειας χρήσης.", "SubscriptionRenewedLicense": "Ανανεώστε τη συνδρομή για να λάβετε:", "SuccessLoadingLicense": "Η άδεια χρήσης ενεργοποιήθηκε με επιτυχία" diff --git a/web/ASC.Web.Client/public/locales/en/NavMenu.json b/web/ASC.Web.Client/public/locales/en/NavMenu.json index 16108c9c75..c66556bf46 100644 --- a/web/ASC.Web.Client/public/locales/en/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/en/NavMenu.json @@ -1,12 +1,8 @@ { - "AboutCompanyTitle": "About this program", - "LogoutButton": "Sign Out", "RecoverAccess": "Recover access", "RecoverContactEmailPlaceholder": "Contact email", "RecoverDescribeYourProblemPlaceholder": "Describe your problem", "RecoverTextBody": "If you can't log in with your existing account or want to be registered as a new user, contact the portal administrator.", "RecoverTitle": "Access recovery", - "TurnOnDesktopVersion": "Turn on desktop version", - "CommunityForum": "Community forum", - "HelpCenter": "Help center" + "TurnOnDesktopVersion": "Turn on desktop version" } diff --git a/web/ASC.Web.Client/public/locales/en/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/en/PaymentsEnterprise.json index 9497c44cdd..f20e6d9120 100644 --- a/web/ASC.Web.Client/public/locales/en/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/en/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Thank you for having checked out {{organizationName}}!", "HeaderExpiredTrialLicense": "Free trial period has expired", "HeaderLicense": "You are using {{organizationName}} Enterprise Edition", - "PaymentsTitle": "Payments", "RenewalLicense": "If you have already purchased the renewal, upload the license file.", "SubscriptionRenewedLicense": "Renew subscription to get:", "SuccessLoadingLicense": "License activated successfully" diff --git a/web/ASC.Web.Client/public/locales/es/NavMenu.json b/web/ASC.Web.Client/public/locales/es/NavMenu.json index c7cfc581e4..1d42683841 100644 --- a/web/ASC.Web.Client/public/locales/es/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/es/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Acerca del programa", - "LogoutButton": "Salir", "RecoverAccess": "Recuperar acceso", "RecoverContactEmailPlaceholder": "E-mail de contacto", "RecoverDescribeYourProblemPlaceholder": "Describa su problema", "RecoverTextBody": "Si no puede conectarse con su cuenta actual o quiere registrarse como nuevo usuario, póngase en contacto con el administrador del portal. ", "RecoverTitle": "Recuperación de acceso", - "TurnOnDesktopVersion": "Activar la versión de escritorio", - "HelpCenter": "Centro de ayuda" + "TurnOnDesktopVersion": "Activar la versión de escritorio" } diff --git a/web/ASC.Web.Client/public/locales/es/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/es/PaymentsEnterprise.json index 84ac067b39..6794b566ba 100644 --- a/web/ASC.Web.Client/public/locales/es/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/es/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Gracias por haber visitado {{organizationName}}.", "HeaderExpiredTrialLicense": "El periodo gratis de prueba ha expirado", "HeaderLicense": "Está utilizando {{organizationName}} Enterprise Edition", - "PaymentsTitle": "Pagos", "RenewalLicense": "Si usted ya ha comprado la renovación, suba el archivo de la licencia.", "SubscriptionRenewedLicense": "Renueve la suscripción para obtener:", "SuccessLoadingLicense": "Licencia se ha activado correctamente" diff --git a/web/ASC.Web.Client/public/locales/fi/NavMenu.json b/web/ASC.Web.Client/public/locales/fi/NavMenu.json index 050b0d5b1a..bb64de5add 100644 --- a/web/ASC.Web.Client/public/locales/fi/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/fi/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Tietoja tästä ohjelmasta", - "LogoutButton": "Kirjaudu ulos", "RecoverAccess": "Palauta käyttöoikeus", "RecoverContactEmailPlaceholder": "Sähköposti yhteydenottoa varten", "RecoverDescribeYourProblemPlaceholder": "Kuvaile ongelmasi", "RecoverTextBody": "Jos et voi kirjautua sisään nykyisellä tililläsi tai haluat rekisteröityä uutena käyttäjänä, ota yhteyttä portaalin järjestelmänvalvojaan. ", "RecoverTitle": "Käytä palautusta", - "TurnOnDesktopVersion": "Ota työpöytäversio käyttöön", - "HelpCenter": "Ohjekeskus (englanniksi)" + "TurnOnDesktopVersion": "Ota työpöytäversio käyttöön" } diff --git a/web/ASC.Web.Client/public/locales/fi/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/fi/PaymentsEnterprise.json index 1297519c19..327675f83e 100644 --- a/web/ASC.Web.Client/public/locales/fi/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/fi/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Kiitos, että tutustuit yhtiöön {{organizationName}}!", "HeaderExpiredTrialLicense": "Ilmainen kokeilujakso on päättynyt", "HeaderLicense": "Käytät {{organizationName}} Enterprise Editionia", - "PaymentsTitle": "Maksut", "RenewalLicense": "Jos olet jo uusinut tilauksen, lataa lisenssitiedosto.", "SubscriptionRenewedLicense": "Uusimalla tilauksen saat:", "SuccessLoadingLicense": "Lisenssi aktivoitu" diff --git a/web/ASC.Web.Client/public/locales/fr/NavMenu.json b/web/ASC.Web.Client/public/locales/fr/NavMenu.json index 57d2f37a6d..315f0f4b74 100644 --- a/web/ASC.Web.Client/public/locales/fr/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/fr/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "À propos de ce programme", - "LogoutButton": "Déconnexion", "RecoverAccess": "Récupérer l'accès", "RecoverContactEmailPlaceholder": "E-mail de contact", "RecoverDescribeYourProblemPlaceholder": "Décrivez votre problème", "RecoverTextBody": "Si vous ne pouvez pas vous connecter avec votre compte existant ou que vous souhaitez en créer un nouveau, merci de contacter l'administrateur du portail.", "RecoverTitle": "Récupération d'accès", - "TurnOnDesktopVersion": "Activer l'application de bureau", - "HelpCenter": "Centre d'aide" + "TurnOnDesktopVersion": "Activer l'application de bureau" } diff --git a/web/ASC.Web.Client/public/locales/fr/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/fr/PaymentsEnterprise.json index 2ebe5d947e..38b64d355e 100644 --- a/web/ASC.Web.Client/public/locales/fr/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/fr/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Merci d'avoir vérifié {{organizationName}}!", "HeaderExpiredTrialLicense": "La période d'essai a expiré", "HeaderLicense": "Vous utilisez l’édition entreprise de {{organizationName}}", - "PaymentsTitle": "Paiements", "RenewalLicense": "Si vous avez déjà renouvelé votre licence, sélectionnez le fichier de licence.", "SubscriptionRenewedLicense": "Renouvelez votre abonnement pour obtenir :", "SuccessLoadingLicense": "Licence activée avec succès" diff --git a/web/ASC.Web.Client/public/locales/hy-AM/NavMenu.json b/web/ASC.Web.Client/public/locales/hy-AM/NavMenu.json index 3339a13e1d..f601d055ba 100644 --- a/web/ASC.Web.Client/public/locales/hy-AM/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/hy-AM/NavMenu.json @@ -1,6 +1,4 @@ { - "AboutCompanyTitle": "Այս ծրագրի մասին", - "LogoutButton": "Դուրս գալ", "RecoverAccess": "Վերականգնել մատչումը", "RecoverContactEmailPlaceholder": "Կոնտակտային էլ. փոստ", "RecoverDescribeYourProblemPlaceholder": "Նկարագրեք Ձեր խնդիրը", diff --git a/web/ASC.Web.Client/public/locales/hy-AM/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/hy-AM/PaymentsEnterprise.json index 0fa9899f0f..66562c283e 100644 --- a/web/ASC.Web.Client/public/locales/hy-AM/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/hy-AM/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Շնորհակալություն արտաստուգման համար {{organizationName}}!", "HeaderExpiredTrialLicense": "Անվճար փորձաշրջանը սպառվել է", "HeaderLicense": "Դուք օգտագործում եք {{organizationName}} Enterprise Edition", - "PaymentsTitle": "Վճարումներ", "RenewalLicense": "Եթե ​​Դուք արդեն գնել եք նորացումը, վերբեռնեք լիցենզիայի ֆայլը.", "SubscriptionRenewedLicense": "Նորացրեք բաժանորդագրությունը ստանալու համար՝", "SuccessLoadingLicense": "Լիցենզիան հաջողությամբ ակտիվացվեց" diff --git a/web/ASC.Web.Client/public/locales/it/NavMenu.json b/web/ASC.Web.Client/public/locales/it/NavMenu.json index bec8ad1ed3..0b2b8385ea 100644 --- a/web/ASC.Web.Client/public/locales/it/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/it/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Informazioni sul programma", - "LogoutButton": "Disconnetti", "RecoverAccess": "Rimuovi accesso", "RecoverContactEmailPlaceholder": "Email di contatto", "RecoverDescribeYourProblemPlaceholder": "Descrivi il tuo problema", "RecoverTextBody": "Se non riesci ad accedere con il tuo account esistente o desideri essere registrato come un nuovo utente, contatta l'amministratore del portale.", "RecoverTitle": "Ripristino dell'accesso", - "TurnOnDesktopVersion": "‎Attivare la versione desktop‎", - "HelpCenter": "Centro assistenza" + "TurnOnDesktopVersion": "‎Attivare la versione desktop‎" } diff --git a/web/ASC.Web.Client/public/locales/it/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/it/PaymentsEnterprise.json index e15b83e206..8df3009461 100644 --- a/web/ASC.Web.Client/public/locales/it/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/it/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Grazie per aver controllato {{organizationName}}!", "HeaderExpiredTrialLicense": "Il periodo di prova gratuito è scaduto", "HeaderLicense": "Stai utilizzando come: {{organizationName}} la versione Enterprise", - "PaymentsTitle": "Pagamenti", "RenewalLicense": "Se hai già acquistato il rinnovo, carica il file di licenza.", "SubscriptionRenewedLicense": "Rinnova l'abbonamento per ottenere:", "SuccessLoadingLicense": "La licenza è stata attivata correttamente" diff --git a/web/ASC.Web.Client/public/locales/ja/NavMenu.json b/web/ASC.Web.Client/public/locales/ja/NavMenu.json index c4abf39b15..2287c1e8c5 100644 --- a/web/ASC.Web.Client/public/locales/ja/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/ja/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "本プログラムについて", - "LogoutButton": "サインアウト", "RecoverAccess": "アクセス回復", "RecoverContactEmailPlaceholder": "連絡先メール", "RecoverDescribeYourProblemPlaceholder": "ご質問を説明ください", "RecoverTextBody": "既存のアカウントでログインできない場合や、新規ユーザーとして登録したい場合は、ポータル管理者にお問い合わせください。 ", "RecoverTitle": "アクセス回復機能", - "TurnOnDesktopVersion": "デスクトップ版を起動する", - "HelpCenter": "ヘルプセンター" + "TurnOnDesktopVersion": "デスクトップ版を起動する" } diff --git a/web/ASC.Web.Client/public/locales/ja/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/ja/PaymentsEnterprise.json index dc3420867d..ecfab2a926 100644 --- a/web/ASC.Web.Client/public/locales/ja/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/ja/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "{{organizationName}}をご検討してくださった方、ありがとうございました!", "HeaderExpiredTrialLicense": "無料体験期間が終了しました。", "HeaderLicense": "{{organizationName}} エンタープライズ版を使用しています。", - "PaymentsTitle": "お支払い", "RenewalLicense": "すでに更新を購入されている場合は、ライセンスファイルをアップロードしてください。", "SubscriptionRenewedLicense": "サブスクリプションを更新すると", "SuccessLoadingLicense": "ライセンス認証が完了しました" diff --git a/web/ASC.Web.Client/public/locales/ko/NavMenu.json b/web/ASC.Web.Client/public/locales/ko/NavMenu.json index 34ecb79797..faf134e780 100644 --- a/web/ASC.Web.Client/public/locales/ko/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/ko/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "프로그램 소개", - "LogoutButton": "로그아웃", "RecoverAccess": "액세스 복구", "RecoverContactEmailPlaceholder": "연락처 이메일", "RecoverDescribeYourProblemPlaceholder": "겪고 계신 문제를 설명해주세요", "RecoverTextBody": "기존 계정으로 로그인하실 수 없거나 새로운 사용자로 등록하시길 원하시는 경우, 포털 관리자에게 문의하세요. ", "RecoverTitle": "액세스 복원", - "TurnOnDesktopVersion": "데스크탑 버전 켜기", - "HelpCenter": "도움말 센터" + "TurnOnDesktopVersion": "데스크탑 버전 켜기" } diff --git a/web/ASC.Web.Client/public/locales/ko/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/ko/PaymentsEnterprise.json index f20c37a62d..632d9beb6e 100644 --- a/web/ASC.Web.Client/public/locales/ko/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/ko/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "{{organizationName}}을 찾아주셔서 감사합니다!", "HeaderExpiredTrialLicense": "무료 체험 기간이 종료되었습니다", "HeaderLicense": "{{organizationName}} Enterprise Edition을 이용하고 계십니다", - "PaymentsTitle": "결제", "RenewalLicense": "이미 갱신하신 경우, 라이센스 파일을 업로드해주세요.", "SubscriptionRenewedLicense": "구독 갱신 혜택:", "SuccessLoadingLicense": "라이센스가 성공적으로 활성화되었습니다" diff --git a/web/ASC.Web.Client/public/locales/lo/NavMenu.json b/web/ASC.Web.Client/public/locales/lo/NavMenu.json index 186c48ed18..3d2e7bea46 100644 --- a/web/ASC.Web.Client/public/locales/lo/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/lo/NavMenu.json @@ -1,6 +1,4 @@ { - "AboutCompanyTitle": "ກ່ຽວກັບໂປແກລມນີ້", - "LogoutButton": "ອອກຈາກລະບົບ", "RecoverAccess": "ກູ້ຄືນການເຂົ້າເຖິງ", "RecoverContactEmailPlaceholder": "ອີເມວຕິດຕໍ່", "RecoverDescribeYourProblemPlaceholder": "ອະທິບາຍບັນຫາຂອງທ່ານ", diff --git a/web/ASC.Web.Client/public/locales/lo/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/lo/PaymentsEnterprise.json index f48145128a..ddcc93254e 100644 --- a/web/ASC.Web.Client/public/locales/lo/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/lo/PaymentsEnterprise.json @@ -13,7 +13,6 @@ "ExpiryTrialLicense": "ຂໍຂອບໃຈສຳລັບການກວດສອບ {{organizationName}}!", "HeaderExpiredTrialLicense": "ມີໄລຍະເວລາທົດລອງໃຊ້ຟຣີ", "HeaderLicense": "ທ່ານກຳລັງໃຊ້ {{organizationName}} Enterprise Edition", - "PaymentsTitle": "ການຊຳລະເງິນ", "RenewalLicense": "ຖ້າທ່ານໄດ້ຕໍ່ອາຍຸການນຳໃຊ້ແລ້ວ, ໃຫ້ທ່ານໂຫລດຟາຍເອກະສານໃບອະນຸຍາດລົງ", "SubscriptionRenewedLicense": "ການຕໍ່ອາຍຸການສະໝັກເພື່ອຮັບ:", "SuccessLoadingLicense": "ໃບອະນຸຍາດເປີດໃຊ້ງານແລ້ວ" diff --git a/web/ASC.Web.Client/public/locales/lv/NavMenu.json b/web/ASC.Web.Client/public/locales/lv/NavMenu.json index d9f4bb98b4..8d9532a50b 100644 --- a/web/ASC.Web.Client/public/locales/lv/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/lv/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Par šo programmu", - "LogoutButton": "Izrakstīties", "RecoverAccess": "Atgūt piekļuvi", "RecoverContactEmailPlaceholder": "E-pasts saziņai", "RecoverDescribeYourProblemPlaceholder": "Aprakstiet savu problēmu", "RecoverTextBody": "Ja nevarat pieteikties ar savu esošo kontu vai vēlaties reģistrēties kā jauns lietotājs, sazinieties ar portāla administratoru. ", "RecoverTitle": "Piekļuves atkopšana", - "TurnOnDesktopVersion": "Ieslēgt darbvirsmas versiju", - "HelpCenter": "Palīdzības centrs" + "TurnOnDesktopVersion": "Ieslēgt darbvirsmas versiju" } diff --git a/web/ASC.Web.Client/public/locales/lv/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/lv/PaymentsEnterprise.json index ed6261c9ee..72ce299f52 100644 --- a/web/ASC.Web.Client/public/locales/lv/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/lv/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Paldies, ka apskatījāt: {{organizationName}}!", "HeaderExpiredTrialLicense": "Bezmaksas izmēģinājuma periods ir beidzies", "HeaderLicense": "Jūs izmantojat {{organizationName}} Enterprise Edition", - "PaymentsTitle": "Maksājumi", "RenewalLicense": "Ja esat jau iegādājies atjaunošanu, augšupielādējiet licences failu.", "SubscriptionRenewedLicense": "Atjaunojiet abonementu,lai atjauninātu:", "SuccessLoadingLicense": "Licence ir veiksmīgi aktivizēta" diff --git a/web/ASC.Web.Client/public/locales/nl/NavMenu.json b/web/ASC.Web.Client/public/locales/nl/NavMenu.json index 7d84ef8264..5cd0184031 100644 --- a/web/ASC.Web.Client/public/locales/nl/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/nl/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Over dit programma", - "LogoutButton": "Uitloggen", "RecoverAccess": "Toegang herstellen", "RecoverContactEmailPlaceholder": "Contact e-mail", "RecoverDescribeYourProblemPlaceholder": "Beschrijf uw probleem", "RecoverTextBody": "Als u zich niet kunt aanmelden met uw bestaande account of als nieuwe gebruiker wilt worden geregistreerd, neem dan contact op met de portaalbeheerder.", "RecoverTitle": "Toegang herstel", - "TurnOnDesktopVersion": "Schakel desktop versie in", - "HelpCenter": "Help en ondersteuning" + "TurnOnDesktopVersion": "Schakel desktop versie in" } diff --git a/web/ASC.Web.Client/public/locales/nl/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/nl/PaymentsEnterprise.json index 8b75813317..42d3fa7db3 100644 --- a/web/ASC.Web.Client/public/locales/nl/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/nl/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Dank u dat u gekeken hebt naar {{organizationName}}!", "HeaderExpiredTrialLicense": "Gratis proefperiode is verlopen", "HeaderLicense": "U gebruikt {{organizationName}} Enterprise Editie", - "PaymentsTitle": "Betalingen", "RenewalLicense": "Als u de verlenging al gekocht heeft, upload dan het licentiebestand.", "SubscriptionRenewedLicense": "Verleng abonnement om te gebruiken:", "SuccessLoadingLicense": "Licentie met succes geactiveerd" diff --git a/web/ASC.Web.Client/public/locales/pl/NavMenu.json b/web/ASC.Web.Client/public/locales/pl/NavMenu.json index 509878fe0e..156ded901a 100644 --- a/web/ASC.Web.Client/public/locales/pl/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/pl/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "O tym programie", - "LogoutButton": "Wyloguj", "RecoverAccess": "Odzyskaj dostęp", "RecoverContactEmailPlaceholder": "E-mail kontaktowy", "RecoverDescribeYourProblemPlaceholder": "Opisz swój problem", "RecoverTextBody": "Jeśli nie możesz się zalogować za pomocą istniejącego konta, lub chcesz zarejestrować się jako nowy użytkownik, skontaktuj się z administratorem portalu. ", "RecoverTitle": "Odzyskiwanie dostępu", - "TurnOnDesktopVersion": "Włącz wersję na komputer stacjonarny", - "HelpCenter": "Centrum pomocy" + "TurnOnDesktopVersion": "Włącz wersję na komputer stacjonarny" } diff --git a/web/ASC.Web.Client/public/locales/pl/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/pl/PaymentsEnterprise.json index 75a1e46d60..9a0e726ee5 100644 --- a/web/ASC.Web.Client/public/locales/pl/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/pl/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Dziękujemy za sprawdzenie {{organizationName}}!", "HeaderExpiredTrialLicense": "Bezpłatny okres próbny wygasł", "HeaderLicense": "Korzystasz z wersji {{organizationName}} Enterprise Edition", - "PaymentsTitle": "Płatności", "RenewalLicense": "Jeśli zakupiono już odnowienie, należy wgrać plik licencyjny.", "SubscriptionRenewedLicense": "Odnów subskrypcję, aby uzyskać:", "SuccessLoadingLicense": "Licencja została pomyślnie aktywowana" diff --git a/web/ASC.Web.Client/public/locales/pt-BR/NavMenu.json b/web/ASC.Web.Client/public/locales/pt-BR/NavMenu.json index 2e9985e21c..81ebead684 100644 --- a/web/ASC.Web.Client/public/locales/pt-BR/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/pt-BR/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Sobre este programa", - "LogoutButton": "Sair", "RecoverAccess": "Recuperar o acesso", "RecoverContactEmailPlaceholder": "E-mail de contato", "RecoverDescribeYourProblemPlaceholder": "Descreva seu problema", "RecoverTextBody": "Se você não conseguir entrar com sua conta existente ou quiser ser registrado como um novo usuário, entre em contato com o administrador do portal. ", "RecoverTitle": "Recuperação de acesso", - "TurnOnDesktopVersion": "Ligar a versão desktop", - "HelpCenter": "Central de Ajuda" + "TurnOnDesktopVersion": "Ligar a versão desktop" } diff --git a/web/ASC.Web.Client/public/locales/pt-BR/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/pt-BR/PaymentsEnterprise.json index 1ce0f33408..5586f6f380 100644 --- a/web/ASC.Web.Client/public/locales/pt-BR/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/pt-BR/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Obrigado por ter verificado {{organizationName}}!", "HeaderExpiredTrialLicense": "Período de teste gratuito expirou", "HeaderLicense": "Você está usando {{organizationName}} Edição Empresarial", - "PaymentsTitle": "Pagamentos", "RenewalLicense": "Se você já comprou a renovação, faça o upload do arquivo de licença.", "SubscriptionRenewedLicense": "Renovar assinatura para obter:", "SuccessLoadingLicense": "Licença ativada com sucesso" diff --git a/web/ASC.Web.Client/public/locales/pt/NavMenu.json b/web/ASC.Web.Client/public/locales/pt/NavMenu.json index 3027a961ca..f196961311 100644 --- a/web/ASC.Web.Client/public/locales/pt/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/pt/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Sobre este programa", - "LogoutButton": "Terminar Sessão", "RecoverAccess": "Recuperar o acesso", "RecoverContactEmailPlaceholder": "Email de contacto", "RecoverDescribeYourProblemPlaceholder": "Descreva o seu problema", "RecoverTextBody": "Se não consegue iniciar sessão com a sua conta ou se quiser registar-se como um novo utilizador, contacte o administrador do portal.", "RecoverTitle": "Recuperação de acesso", - "TurnOnDesktopVersion": "Ativar a versão para computador", - "HelpCenter": "Help Center" + "TurnOnDesktopVersion": "Ativar a versão para computador" } diff --git a/web/ASC.Web.Client/public/locales/pt/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/pt/PaymentsEnterprise.json index 4884b2eb8d..3905157d6c 100644 --- a/web/ASC.Web.Client/public/locales/pt/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/pt/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Obrigado por ter consultado {{organizationName}}!!", "HeaderExpiredTrialLicense": "O período de avaliação gratuita expirou", "HeaderLicense": "Está a utilizar a Edição Empresarial da {{organizationName}}", - "PaymentsTitle": "Pagamentos", "RenewalLicense": "Se já comprou uma renovação, carrega o ficheiro da licença.", "SubscriptionRenewedLicense": "Renove a subscrição para obter:", "SuccessLoadingLicense": "Licença atividade com êxito" diff --git a/web/ASC.Web.Client/public/locales/ro/NavMenu.json b/web/ASC.Web.Client/public/locales/ro/NavMenu.json index 437179ab45..f3caf6bc6f 100644 --- a/web/ASC.Web.Client/public/locales/ro/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/ro/NavMenu.json @@ -1,6 +1,4 @@ { - "AboutCompanyTitle": "Despre aplicația", - "LogoutButton": "Deconectare", "RecoverAccess": "Recuperarea accesului la cont", "RecoverContactEmailPlaceholder": "E-mail de contact", "RecoverDescribeYourProblemPlaceholder": "Descrieți problema", diff --git a/web/ASC.Web.Client/public/locales/ro/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/ro/PaymentsEnterprise.json index 6303d30b18..733b0a0a81 100644 --- a/web/ASC.Web.Client/public/locales/ro/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/ro/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Vă mulțumim pentru verificarea {{organizationName}}!", "HeaderExpiredTrialLicense": "Perioada de probă a expirat", "HeaderLicense": "Dumneavoastră utilizați {{organizationName}} Enterprise Edition", - "PaymentsTitle": "Plăți", "RenewalLicense": "Dacă ați reînnoit deja licența dvs, încărcați fișierul de licență.", "SubscriptionRenewedLicense": "Reînnoiți abonament și obțineți:", "SuccessLoadingLicense": "Licența activată cu succes" diff --git a/web/ASC.Web.Client/public/locales/ru/NavMenu.json b/web/ASC.Web.Client/public/locales/ru/NavMenu.json index 0b777e4bdd..1df4d90ed5 100644 --- a/web/ASC.Web.Client/public/locales/ru/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/ru/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "О программе", - "LogoutButton": "Выйти", "RecoverAccess": "Доступ к порталу", "RecoverContactEmailPlaceholder": "Адрес email, по которому можно связаться с Вами", "RecoverDescribeYourProblemPlaceholder": "Пожалуйста, опишите вашу проблему", "RecoverTextBody": "Если Вы уже зарегистрированы и у Вас есть проблемы с доступом к этому порталу, или Вы хотите зарегистрироваться как новый пользователь портала, пожалуйста, обратитесь к администратору портала, используя форму, расположенную ниже.", "RecoverTitle": "Доступ к порталу", - "TurnOnDesktopVersion": "Включить версию для ПК", - "HelpCenter": "Справочный центр" + "TurnOnDesktopVersion": "Включить версию для ПК" } diff --git a/web/ASC.Web.Client/public/locales/ru/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/ru/PaymentsEnterprise.json index 9c938c5c03..f63de73ba9 100644 --- a/web/ASC.Web.Client/public/locales/ru/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/ru/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Благодарим Вас за то, что опробовали {{organizationName}}!", "HeaderExpiredTrialLicense": "Бесплатный пробный период истек", "HeaderLicense": "Вы используете {{organizationName}} Enterprise Edition", - "PaymentsTitle": "Платежи", "RenewalLicense": " Если вы уже купили обновление, загрузите файл лицензии.", "SubscriptionRenewedLicense": "Обновите подписку, чтобы получить:", "SuccessLoadingLicense": "Лицензия успешно активирована" diff --git a/web/ASC.Web.Client/public/locales/sk/NavMenu.json b/web/ASC.Web.Client/public/locales/sk/NavMenu.json index 33cdb0f66e..5d079ee75b 100644 --- a/web/ASC.Web.Client/public/locales/sk/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/sk/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "O programe", - "LogoutButton": "Odhlásiť Sa", "RecoverAccess": "Obnoviť prístup", "RecoverContactEmailPlaceholder": "Kontaktný email", "RecoverDescribeYourProblemPlaceholder": "Opíšte svoj problém", "RecoverTextBody": "Ak sa nemôžete prihlásiť so svojím existujúcim kontom, alebo sa chcete zaregistrovať ako nový užívateľ, kontaktujte admina portálu.", "RecoverTitle": "Obnova prístupu", - "TurnOnDesktopVersion": "Zapnúť počítačovú verziu", - "HelpCenter": "Centrum pomoci" + "TurnOnDesktopVersion": "Zapnúť počítačovú verziu" } diff --git a/web/ASC.Web.Client/public/locales/sk/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/sk/PaymentsEnterprise.json index 894d28c518..9a751b100a 100644 --- a/web/ASC.Web.Client/public/locales/sk/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/sk/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Ďakujeme, že ste si vyskúšali {{organizationName}}!", "HeaderExpiredTrialLicense": "Platnosť bezplatného skúšobného obdobia uplynula", "HeaderLicense": "Používate {{organizationName}} Enterprise Edition", - "PaymentsTitle": "Platby", "RenewalLicense": "Ak ste si už zakúpili obnovenie, odošlite licenčný súbor.", "SubscriptionRenewedLicense": "Obnovením predplatného získate:", "SuccessLoadingLicense": "Licencia bola úspešne aktivovaná" diff --git a/web/ASC.Web.Client/public/locales/sl/NavMenu.json b/web/ASC.Web.Client/public/locales/sl/NavMenu.json index 624a540bdc..01aefcb76f 100644 --- a/web/ASC.Web.Client/public/locales/sl/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/sl/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "O tem programu", - "LogoutButton": "Odjava", "RecoverAccess": "Obnova dostopa", "RecoverContactEmailPlaceholder": "Kontaktni email", "RecoverDescribeYourProblemPlaceholder": "Opišite vaš problem", "RecoverTextBody": "Če se ne morete prijaviti z obstoječim računom ali se želite registrirati kot nov uporabnik, se obrnite na skrbnika portala. ", "RecoverTitle": "Dostop za obnovo", - "TurnOnDesktopVersion": "Vključi namizno verzijo", - "HelpCenter": "Center pomoči" + "TurnOnDesktopVersion": "Vključi namizno verzijo" } diff --git a/web/ASC.Web.Client/public/locales/sl/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/sl/PaymentsEnterprise.json index 0cfe3011ef..6826f67180 100644 --- a/web/ASC.Web.Client/public/locales/sl/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/sl/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Hvala, ker ste preverili {{organizationName}}!", "HeaderExpiredTrialLicense": "Brezplačno preizkusno obdobje se je izteklo", "HeaderLicense": "Uporabljate {{organizationName}} Enterprise verzijo", - "PaymentsTitle": "Plačila", "RenewalLicense": "Če ste podaljšanje že kupili, naložite licenčno datoteko.", "SubscriptionRenewedLicense": "Podaljšajte naročnino, če želite:", "SuccessLoadingLicense": "Licenca je uspešno aktivirana" diff --git a/web/ASC.Web.Client/public/locales/tr/NavMenu.json b/web/ASC.Web.Client/public/locales/tr/NavMenu.json index fce9488412..b26e23e5d3 100644 --- a/web/ASC.Web.Client/public/locales/tr/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/tr/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Bu program hakkında", - "LogoutButton": "Çıkış", "RecoverAccess": "Erişimi kurtar", "RecoverContactEmailPlaceholder": "İletişim e-postası", "RecoverDescribeYourProblemPlaceholder": "Sorununuzu tarif edin", "RecoverTextBody": "Eğer hesabınıza giriş yapamıyorsanız veya yeni kullanıcı olarak kayıt olmak istiyorsanız, portal yöneticisi ile iletişime geçin. ", "RecoverTitle": "Erişim kurtarma", - "TurnOnDesktopVersion": "Masaüstü sürümünü aç", - "HelpCenter": "Yardım Merkezi" + "TurnOnDesktopVersion": "Masaüstü sürümünü aç" } diff --git a/web/ASC.Web.Client/public/locales/tr/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/tr/PaymentsEnterprise.json index 8f862f181e..f595390365 100644 --- a/web/ASC.Web.Client/public/locales/tr/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/tr/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Ödeme yaptığınız için teşekkürler {{organizationName}}!", "HeaderExpiredTrialLicense": "Ücretsiz deneme süresi sona erdi", "HeaderLicense": "{{organizationName}} Enterprise Edition kullanıyorsunuz", - "PaymentsTitle": "Ödemeler", "RenewalLicense": "Eğer halihazırda yenileme satın aldıysanız, lisans dosyasını yükleyin.", "SubscriptionRenewedLicense": "Şunu almak için aboneliği yenileyin:", "SuccessLoadingLicense": "Lisans başarıyla etkinleştirildi" diff --git a/web/ASC.Web.Client/public/locales/uk/NavMenu.json b/web/ASC.Web.Client/public/locales/uk/NavMenu.json index c511147083..ddb18ec12e 100644 --- a/web/ASC.Web.Client/public/locales/uk/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/uk/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Про цю програму", - "LogoutButton": "Вихід", "RecoverAccess": "Відновити доступ", "RecoverContactEmailPlaceholder": "Контактна електронна пошта", "RecoverDescribeYourProblemPlaceholder": "Опишіть свою проблему", "RecoverTextBody": "Якщо ви не можете увійти зі своїм існуючим обліковим записом або хочете зареєструватися як новий користувач, зверніться до адміністратора порталу.", "RecoverTitle": "Відновлення доступу", - "TurnOnDesktopVersion": "Увімкнути настільну версію", - "HelpCenter": "Центр довідки" + "TurnOnDesktopVersion": "Увімкнути настільну версію" } diff --git a/web/ASC.Web.Client/public/locales/uk/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/uk/PaymentsEnterprise.json index f559ee822c..a861e79b61 100644 --- a/web/ASC.Web.Client/public/locales/uk/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/uk/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Дякуємо, що спробували {{organizationName}}!", "HeaderExpiredTrialLicense": "Безкоштовний пробний період закінчився", "HeaderLicense": "Ви використовуєте {{organizationName}} Enterprise Edition", - "PaymentsTitle": "Платежі", "RenewalLicense": "Якщо ви вже придбали поновлення, передайте файл ліцензії.", "SubscriptionRenewedLicense": "Поновіть підписку, щоб отримати:", "SuccessLoadingLicense": "Ліцензію успішно активовано" diff --git a/web/ASC.Web.Client/public/locales/vi/NavMenu.json b/web/ASC.Web.Client/public/locales/vi/NavMenu.json index 94ac02c225..ef8f7baf53 100644 --- a/web/ASC.Web.Client/public/locales/vi/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/vi/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "Giới thiệu về chương trình này", - "LogoutButton": "Đăng xuất", "RecoverAccess": "Khôi phục quyền truy cập", "RecoverContactEmailPlaceholder": "Email liên hệ", "RecoverDescribeYourProblemPlaceholder": "Mô tả vấn đề của bạn", "RecoverTextBody": "Nếu bạn không thể đăng nhập bằng tài khoản hiện có của mình hoặc muốn đăng ký làm người dùng mới, hãy liên hệ với quản trị viên cổng thông tin.", "RecoverTitle": "Khôi phục truy cập", - "TurnOnDesktopVersion": "Bật phiên bản dành cho máy tính", - "HelpCenter": "Trung tâm Hỗ trợ" + "TurnOnDesktopVersion": "Bật phiên bản dành cho máy tính" } diff --git a/web/ASC.Web.Client/public/locales/vi/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/vi/PaymentsEnterprise.json index 2d06420183..69c7f18ec2 100644 --- a/web/ASC.Web.Client/public/locales/vi/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/vi/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "Cảm ơn bạn đã thanh toán {{organizationName}}! ", "HeaderExpiredTrialLicense": "Đã hết thời gian dùng thử miễn phí", "HeaderLicense": "Bạn đang sử dụng {{organizationName}} Phiên bản doanh nghiệp", - "PaymentsTitle": "Thanh toán", "RenewalLicense": "Nếu bạn đã thanh toán gia hạn, hãy tải tệp giấy phép lên.", "SubscriptionRenewedLicense": "Hãy gia hạn gói dịch vụ để nhận:", "SuccessLoadingLicense": "Giấy phép được kích hoạt thành công" diff --git a/web/ASC.Web.Client/public/locales/zh-CN/NavMenu.json b/web/ASC.Web.Client/public/locales/zh-CN/NavMenu.json index a8647bbc18..597ffab419 100644 --- a/web/ASC.Web.Client/public/locales/zh-CN/NavMenu.json +++ b/web/ASC.Web.Client/public/locales/zh-CN/NavMenu.json @@ -1,11 +1,8 @@ { - "AboutCompanyTitle": "关于本计划", - "LogoutButton": "登出", "RecoverAccess": "恢复访问", "RecoverContactEmailPlaceholder": "联系邮箱", "RecoverDescribeYourProblemPlaceholder": "描述您的问题", "RecoverTextBody": "如果您无法使用现有账户登录或希望注册为新用户,请联系门户管理员。", "RecoverTitle": "访问恢复", - "TurnOnDesktopVersion": "打开桌面版", - "HelpCenter": "帮助中心" + "TurnOnDesktopVersion": "打开桌面版" } diff --git a/web/ASC.Web.Client/public/locales/zh-CN/PaymentsEnterprise.json b/web/ASC.Web.Client/public/locales/zh-CN/PaymentsEnterprise.json index ccf408a9f2..08af9089cf 100644 --- a/web/ASC.Web.Client/public/locales/zh-CN/PaymentsEnterprise.json +++ b/web/ASC.Web.Client/public/locales/zh-CN/PaymentsEnterprise.json @@ -14,7 +14,6 @@ "ExpiryTrialLicense": "感谢您购买{{organizationName}}!", "HeaderExpiredTrialLicense": "免费试用已结束", "HeaderLicense": "您正在使用{{organizationName}}企业版", - "PaymentsTitle": "付款", "RenewalLicense": "如果您已续订,请上传许可文件。", "SubscriptionRenewedLicense": "更新订阅以获取:", "SuccessLoadingLicense": "许可激活成功" diff --git a/web/ASC.Web.Client/src/Shell.jsx b/web/ASC.Web.Client/src/Shell.jsx index fee336ce21..7f3ad3a8a5 100644 --- a/web/ASC.Web.Client/src/Shell.jsx +++ b/web/ASC.Web.Client/src/Shell.jsx @@ -9,6 +9,7 @@ import ErrorBoundary from "@appserver/common/components/ErrorBoundary"; import Layout from "./components/Layout"; import ScrollToTop from "./components/Layout/ScrollToTop"; import history from "@appserver/common/history"; +import Toast from "@appserver/components/toast"; import toastr from "studio/toastr"; import { combineUrl, updateTempContent } from "@appserver/common/utils"; import { Provider as MobxProvider } from "mobx-react"; @@ -25,6 +26,9 @@ import Snackbar from "@appserver/components/snackbar"; import moment from "moment"; import ReactSmartBanner from "./components/SmartBanner"; import { useThemeDetector } from "./helpers/utils"; +import { isMobileOnly } from "react-device-detect"; +import IndicatorLoader from "./components/IndicatorLoader"; +import DialogsWrapper from "./components/dialogs/DialogsWrapper"; const { proxyURL } = AppServerConfig; const homepage = config.homepage; @@ -200,6 +204,7 @@ const Shell = ({ items = [], page = "home", ...rest }) => { roomsMode, setSnackbarExist, userTheme, + user, } = rest; useEffect(() => { @@ -430,6 +435,7 @@ const Shell = ({ items = [], page = "home", ...rest }) => { const pathname = window.location.pathname.toLowerCase(); const isEditor = pathname.indexOf("doceditor") !== -1; + const isLogin = pathname.indexOf("login") !== -1; if (!window.AppServer.studio) { window.AppServer.studio = {}; @@ -519,9 +525,12 @@ const Shell = ({ items = [], page = "home", ...rest }) => { return ( + - {isEditor ? <> : } + {isEditor || isLogin || !isMobileOnly ? <> : } + +
diff --git a/web/ASC.Web.Client/src/components/IndicatorLoader/index.js b/web/ASC.Web.Client/src/components/IndicatorLoader/index.js new file mode 100644 index 0000000000..44940c0a18 --- /dev/null +++ b/web/ASC.Web.Client/src/components/IndicatorLoader/index.js @@ -0,0 +1,33 @@ +import React from "react"; +import styled, { css } from "styled-components"; +import { isMobileOnly } from "react-device-detect"; + +const StyledWrapper = styled.div` + #ipl-progress-indicator { + position: fixed; + z-index: 390; + top: 0; + left: -6px; + width: 0%; + height: 3px; + background-color: #eb835f; + -moz-border-radius: 1px; + -webkit-border-radius: 1px; + border-radius: 1px; + + ${isMobileOnly && + css` + top: 48px; + `} + } +`; + +const IndicatorLoader = () => { + return ( + +
+
+ ); +}; + +export default IndicatorLoader; diff --git a/web/ASC.Web.Client/src/components/Main/index.js b/web/ASC.Web.Client/src/components/Main/index.js index 1ee661ede2..34eaa8598c 100644 --- a/web/ASC.Web.Client/src/components/Main/index.js +++ b/web/ASC.Web.Client/src/components/Main/index.js @@ -9,12 +9,7 @@ import { } from "react-device-detect"; const StyledMain = styled.main` - height: ${(props) => - isIOS && !isFirefox - ? "calc(var(--vh, 1vh) * 100)" - : props.isDesktop - ? "100vh" - : "calc(100vh - 48px)"}; + height: ${isIOS && !isFirefox ? "calc(var(--vh, 1vh) * 100)" : "100vh"}; width: 100vw; z-index: 0; display: flex; diff --git a/web/ASC.Web.Client/src/components/NavMenu/index.js b/web/ASC.Web.Client/src/components/NavMenu/index.js index dcd9310952..a9f28dd332 100644 --- a/web/ASC.Web.Client/src/components/NavMenu/index.js +++ b/web/ASC.Web.Client/src/components/NavMenu/index.js @@ -2,7 +2,6 @@ import React from "react"; import PropTypes from "prop-types"; import styled, { css } from "styled-components"; import Backdrop from "@appserver/components/backdrop"; -import Toast from "@appserver/components/toast"; import Aside from "@appserver/components/aside"; import Header from "./sub-components/header"; @@ -52,19 +51,6 @@ const StyledContainer = styled.header` width: 100%; `} - - #ipl-progress-indicator { - position: fixed; - z-index: 390; - top: ${(props) => (props.isDesktop ? "0" : "48px")}; - left: -6px; - width: 0%; - height: 3px; - background-color: #eb835f; - -moz-border-radius: 1px; - -webkit-border-radius: 1px; - border-radius: 1px; - } `; StyledContainer.defaultProps = { theme: Base }; @@ -170,8 +156,6 @@ class NavMenu extends React.Component { isVisible={value.isVisible} isDesktop={hideHeader} > - - )} {preparationPortalDialogVisible && } -
)} diff --git a/web/ASC.Web.Client/src/components/NavMenu/sub-components/header-nav.js b/web/ASC.Web.Client/src/components/NavMenu/sub-components/header-nav.js index 8be3f377a7..76767f8445 100644 --- a/web/ASC.Web.Client/src/components/NavMenu/sub-components/header-nav.js +++ b/web/ASC.Web.Client/src/components/NavMenu/sub-components/header-nav.js @@ -1,34 +1,12 @@ -import React, { useCallback, useState } from "react"; +import React from "react"; import PropTypes from "prop-types"; import styled, { css } from "styled-components"; -import NavItem from "./nav-item"; import ProfileActions from "./profile-actions"; import { useTranslation } from "react-i18next"; import { tablet, mobile } from "@appserver/components/utils/device"; -import { combineUrl, deleteCookie } from "@appserver/common/utils"; import { inject, observer } from "mobx-react"; import { withRouter } from "react-router"; -import { AppServerConfig } from "@appserver/common/constants"; -import config from "../../../../package.json"; -import { isDesktop, isMobile, isMobileOnly } from "react-device-detect"; -import AboutDialog from "../../pages/About/AboutDialog"; -import DebugInfoDialog from "../../pages/DebugInfo"; -import HeaderCatalogBurger from "./header-catalog-burger"; - -const { proxyURL } = AppServerConfig; -const homepage = config.homepage; - -const PROXY_HOMEPAGE_URL = combineUrl(proxyURL, homepage); -const ABOUT_URL = combineUrl(PROXY_HOMEPAGE_URL, "/about"); -const SETTINGS_URL = combineUrl(PROXY_HOMEPAGE_URL, "/settings"); -const PROFILE_SELF_URL = combineUrl( - PROXY_HOMEPAGE_URL, - "/products/people/view/@self" -); -const PROFILE_MY_URL = combineUrl(PROXY_HOMEPAGE_URL, "/my"); -const COMMUNITY_URL = "https://forum.onlyoffice.com/c/personal/43"; -const HELP_URL = - "https://helpcenter.onlyoffice.com/userguides/workspace-personal.aspx"; +import { isMobile, isMobileOnly } from "react-device-detect"; const StyledNav = styled.nav` display: flex; @@ -67,197 +45,29 @@ const StyledNav = styled.nav` `} `; const HeaderNav = ({ - history, - modules, user, - logout, isAuthenticated, - peopleAvailable, - isPersonal, userIsUpdate, setUserIsUpdate, - buildVersionInfo, - debugInfo, - settingsModule, - setHotkeyPanelVisible, - currentProductId, + getActions, }) => { const { t } = useTranslation(["NavMenu", "Common", "About"]); - const [visibleAboutDialog, setVisibleAboutDialog] = useState(false); - const [visibleDebugDialog, setVisibleDebugDialog] = useState(false); + const userActions = getActions(t); - const onProfileClick = useCallback(() => { - peopleAvailable - ? history.push(PROFILE_SELF_URL) - : history.push(PROFILE_MY_URL); - }, []); - - const onAboutClick = useCallback(() => { - if (isDesktop) { - setVisibleAboutDialog(true); - } else { - history.push(ABOUT_URL); - } - }, []); - - const onHotkeysClick = useCallback(() => { - setHotkeyPanelVisible(true); - }, []); - - const onCommunityClick = useCallback(() => { - window.open(COMMUNITY_URL, "_blank"); - }, []); - - const onHelpClick = useCallback(() => { - window.open(HELP_URL, "_blank"); - }, []); - - const onCloseDialog = () => setVisibleDialog(false); - const onDebugClick = useCallback(() => { - setVisibleDebugDialog(true); - }, []); - - const onCloseAboutDialog = () => setVisibleAboutDialog(false); - const onCloseDebugDialog = () => setVisibleDebugDialog(false); - - const onSwitchToDesktopClick = useCallback(() => { - deleteCookie("desktop_view"); - window.open( - `${window.location.origin}?desktop_view=true`, - "_self", - "", - true - ); - }, []); - - const onLogoutClick = useCallback(() => logout && logout(), [logout]); - - const settingsUrl = - settingsModule && combineUrl(PROXY_HOMEPAGE_URL, settingsModule.link); - const onSettingsClick = - settingsModule && useCallback(() => history.push(settingsUrl), []); - - const getCurrentUserActions = useCallback(() => { - const settings = - settingsModule && !isPersonal - ? { - key: "SettingsBtn", - label: t("Common:Settings"), - onClick: onSettingsClick, - url: settingsUrl, - } - : null; - - let hotkeys = null; - if (modules) { - const moduleIndex = modules.findIndex((m) => m.appName === "files"); - - if ( - moduleIndex !== -1 && - modules[moduleIndex].id === currentProductId && - !isMobile - ) { - hotkeys = { - key: "HotkeysBtn", - label: t("Common:Hotkeys"), - onClick: onHotkeysClick, - }; - } - } - - const communityForum = isPersonal - ? { - key: "CommunityBtn", - label: t("CommunityForum"), - onClick: onCommunityClick, - } - : null; - - const helpCenter = isPersonal - ? { - key: "HelpBtn", - label: t("HelpCenter"), - onClick: onHelpClick, - } - : null; - const actions = [ - { - key: "ProfileBtn", - label: t("Common:Profile"), - onClick: onProfileClick, - url: peopleAvailable ? PROFILE_SELF_URL : PROFILE_MY_URL, - }, - settings, - { - key: "SwitchToBtn", - ...(!isPersonal && { - label: t("TurnOnDesktopVersion"), - onClick: onSwitchToDesktopClick, - url: `${window.location.origin}?desktop_view=true`, - target: "_self", - }), - }, - hotkeys, - communityForum, - helpCenter, - { - key: "AboutBtn", - label: t("AboutCompanyTitle"), - onClick: onAboutClick, - url: ABOUT_URL, - }, - { - key: "LogoutBtn", - label: t("LogoutButton"), - onClick: onLogoutClick, - isButton: true, - }, - ]; - - if (debugInfo) { - actions.splice(3, 0, { - key: "DebugBtn", - label: "Debug Info", - onClick: onDebugClick, - }); - } - - return actions; - }, [onProfileClick, onAboutClick, onLogoutClick, currentProductId]); - //console.log("HeaderNav render"); return ( {isAuthenticated && user ? ( <> - {/* */} ) : ( <> )} - - - - {debugInfo && ( - - )} ); }; @@ -265,59 +75,22 @@ const HeaderNav = ({ HeaderNav.displayName = "HeaderNav"; HeaderNav.propTypes = { - history: PropTypes.object, - modules: PropTypes.array, user: PropTypes.object, - logout: PropTypes.func, isAuthenticated: PropTypes.bool, - isLoaded: PropTypes.bool, - currentProductId: PropTypes.string, - toggleArticleOpen: PropTypes.func, }; export default withRouter( - inject(({ auth }) => { - const { - settingsStore, - userStore, - isAuthenticated, - isLoaded, - language, - logout, - } = auth; - const { - defaultPage, - personal: isPersonal, - version: versionAppServer, - currentProductId, - toggleArticleOpen, - buildVersionInfo, - debugInfo, - setHotkeyPanelVisible, - } = settingsStore; + inject(({ auth, profileActionsStore }) => { + const { userStore, isAuthenticated } = auth; const { user, userIsUpdate, setUserIsUpdate } = userStore; - const modules = auth.availableModules; - const settingsModule = modules.find((module) => module.id === "settings"); + const { getActions } = profileActionsStore; return { - isPersonal, user, isAuthenticated, - isLoaded, - language, - defaultPage: defaultPage || "/", - modules, - logout, - peopleAvailable: modules.some((m) => m.appName === "people"), - versionAppServer, userIsUpdate, setUserIsUpdate, - currentProductId, - toggleArticleOpen, - buildVersionInfo, - debugInfo, - settingsModule, - setHotkeyPanelVisible, + getActions, }; })(observer(HeaderNav)) ); diff --git a/web/ASC.Web.Client/src/components/NavMenu/sub-components/header.js b/web/ASC.Web.Client/src/components/NavMenu/sub-components/header.js index dd2e6a4c6d..ac9ac1255e 100644 --- a/web/ASC.Web.Client/src/components/NavMenu/sub-components/header.js +++ b/web/ASC.Web.Client/src/components/NavMenu/sub-components/header.js @@ -46,29 +46,21 @@ const Header = styled.header` .header-logo-wrapper { height: 24px; - height: 26px; display: flex; align-items: center; - + justify-items: center; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); ${NoUserSelect} } .header-logo-icon { + position: absolute; + right: 50%; + transform: translateX(50%); height: 24px; - position: relative; - padding-right: 20px; - padding-left: ${(props) => - !props.needNavMenu || props.isPersonal || props.isDesktopView || isMobile - ? "20px" - : "4px"}; cursor: pointer; - - @media ${tablet} { - padding-left: 16px; - } } .mobile-short-logo { width: 146px; diff --git a/web/ASC.Web.Client/src/components/NavMenu/sub-components/profile-actions.js b/web/ASC.Web.Client/src/components/NavMenu/sub-components/profile-actions.js index ae0751e2ab..38e53bc300 100644 --- a/web/ASC.Web.Client/src/components/NavMenu/sub-components/profile-actions.js +++ b/web/ASC.Web.Client/src/components/NavMenu/sub-components/profile-actions.js @@ -155,7 +155,7 @@ class ProfileActions extends React.PureComponent { (action?.isButton ? (