Merge branch 'release/rc-v1.2.0' into bugfix/mediaviewer-primary-loading

This commit is contained in:
Alexey Safronov 2023-02-03 16:49:46 +03:00
commit 1759f7c564
201 changed files with 9400 additions and 12108 deletions

View File

@ -115,7 +115,7 @@ apt-get install -o DPkg::options::="--force-confnew" -yq \
nodejs \
gcc \
make \
dotnet-sdk-6.0 \
dotnet-sdk-7.0 \
mysql-server \
mysql-client \
postgresql \

View File

@ -123,10 +123,10 @@ elif [ "$UPDATE" = "true" ] && [ "$DOCUMENT_SERVER_INSTALLED" = "true" ]; then
${package_manager} -y update ${package_sysname}-documentserver
fi
{ ${package_manager} check-update ${package_sysname}-${product}; PRODUCT_CHECK_UPDATE=$?; } || true
{ ${package_manager} check-update ${product}; PRODUCT_CHECK_UPDATE=$?; } || true
if [ "$PRODUCT_INSTALLED" = "false" ]; then
${package_manager} install -y ${package_sysname}-${product}
${product}-configuration.sh \
${package_manager} install -y ${product}
${product}-configuration \
-mysqlh ${MYSQL_SERVER_HOST} \
-mysqld ${MYSQL_SERVER_DB_NAME} \
-mysqlu ${MYSQL_SERVER_USER} \
@ -140,8 +140,8 @@ elif [[ $PRODUCT_CHECK_UPDATE -eq $UPDATE_AVAILABLE_CODE ]]; then
MYSQL_SERVER_PORT=$(echo $USER_CONNECTIONSTRING | grep -oP 'Port=\K.*' | grep -o '^[^;]*')
MYSQL_ROOT_PASS=$(echo $USER_CONNECTIONSTRING | grep -oP 'Password=\K.*' | grep -o '^[^;]*')
${package_manager} -y update ${package_sysname}-${product}
${product}-configuration.sh \
${package_manager} -y update ${product}
${product}-configuration \
-e ${ENVIRONMENT} \
-mysqlh ${MYSQL_SERVER_HOST} \
-mysqld ${MYSQL_SERVER_DB_NAME} \

View File

@ -110,7 +110,7 @@ ${package_manager} versionlock clear
${package_manager} -y install epel-release \
python3 \
nodejs \
dotnet-sdk-6.0 \
dotnet-sdk-7.0 \
elasticsearch-${ELASTIC_VERSION} --enablerepo=elasticsearch \
mysql-server \
nginx \
@ -118,7 +118,8 @@ ${package_manager} -y install epel-release \
postgresql-server \
rabbitmq-server$rabbitmq_version \
redis --enablerepo=remi \
SDL2 $POWERTOOLS_REPO
SDL2 $POWERTOOLS_REPO \
expect
py3_version=$(python3 -c 'import sys; print(sys.version_info.minor)')
if [[ $py3_version -lt 6 ]]; then

View File

@ -0,0 +1,16 @@
/var/log/onlyoffice/{{product}}/*.log {
daily
missingok
rotate 30
compress
dateext
delaycompress
notifempty
nocreate
sharedscripts
postrotate
if pgrep -x ""systemd"" >/dev/null; then
systemctl restart {{product}}* > /dev/null
fi
endscript
}

View File

@ -172,7 +172,7 @@ while [ "$1" != "" ]; do
;;
-? | -h | --help )
echo " Usage: bash ${PRODUCT}-configuration.sh [PARAMETER] [[PARAMETER], ...]"
echo " Usage: bash ${PRODUCT}-configuration [PARAMETER] [[PARAMETER], ...]"
echo
echo " Parameters:"
echo " -ash, --appshost ${PRODUCT} ip"
@ -244,7 +244,7 @@ restart_services() {
echo -n "Restarting services... "
for SVC in login api socket studio-notify notify \
people-server files files-services studio backup \
clear-events backup-background ssoauth doceditor
clear-events backup-background ssoauth doceditor healthchecks
do
systemctl enable ${PRODUCT}-$SVC >/dev/null 2>&1
systemctl restart ${PRODUCT}-$SVC

View File

@ -59,6 +59,7 @@ SERVICE_NAME=(
doceditor
migration-runner
login
healthchecks
)
reassign_values (){
@ -142,6 +143,11 @@ reassign_values (){
WORK_DIR="${BASE_DIR}/products/ASC.Login/login/"
EXEC_FILE="server.js"
;;
healthchecks )
SERVICE_PORT="5033"
WORK_DIR="${BASE_DIR}/services/ASC.Web.HealthChecks.UI/"
EXEC_FILE="ASC.Web.HealthChecks.UI.dll"
;;
esac
SERVICE_NAME="$1"
if [[ "${EXEC_FILE}" == *".js" ]]; then

View File

@ -1,6 +1,6 @@
[Unit]
Description=DocSpace-${SERVICE_NAME}
After=network.target syslog.target
After=network.target
[Service]
Type=${SERVICE_TYPE}

View File

@ -2,4 +2,4 @@
* Initial Release.
-- Ascensio System SIA <support@onlyoffice.com> Fri, 19 Mar 2021 18:39:30 +0300
-- Ascensio System SIA <support@onlyoffice.com> Fri, 19 Mar 2021 18:39:30 +0300

View File

@ -1 +1 @@
9
10

View File

@ -1,21 +1,24 @@
Source: {{product}}
Section: web
Priority: optional
Maintainer: onlyoffice
Build-Depends: debhelper (>= 10), nodejs (>=18), dotnet-sdk-6.0, yarn
Maintainer: Ascensio System SIA <support@onlyoffice.com>
Build-Depends: debhelper (>= 10), po-debconf, nodejs (>=18), dotnet-sdk-7.0, yarn
Standards-Version: {{package_header_tag_version}}
Homepage: https://www.onlyoffice.com/
Architecture: any
Package: {{product}}
Architecture: any
Depends: {{product}}-api (= {{package_header_tag_version}}),
Depends: debconf,
${misc:Depends}, ${shlibs:Depends},
{{product}}-api (= {{package_header_tag_version}}),
{{product}}-backup (= {{package_header_tag_version}}),
{{product}}-backup-background (= {{package_header_tag_version}}),
{{product}}-clear-events (= {{package_header_tag_version}}),
{{product}}-doceditor(= {{package_header_tag_version}}),
{{product}}-files (= {{package_header_tag_version}}),
{{product}}-files-services (= {{package_header_tag_version}}),
{{product}}-healthchecks (= {{package_header_tag_version}}),
{{product}}-login (= {{package_header_tag_version}}),
{{product}}-migration-runner (= {{package_header_tag_version}}),
{{product}}-notify (= {{package_header_tag_version}}),
@ -26,52 +29,61 @@ Depends: {{product}}-api (= {{package_header_tag_version}}),
{{product}}-ssoauth (= {{package_header_tag_version}}),
{{product}}-studio (= {{package_header_tag_version}}),
{{product}}-studio-notify (= {{package_header_tag_version}})
Description: Description
Description: {{product}}
ONLYOFFICE {{product}} is a new way to collaborate on documents with teams,
clients, partners, etc., based on the concept of rooms - special spaces with
predefined permissions. Dependency package.
Package: {{product}}-common
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: Description
Depends: adduser, logrotate, ${misc:Depends}, ${shlibs:Depends}
Description: {{product}}-common
{{product}}-common
Package: {{product}}-backup
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-6.0,
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-backup
{{product}}-backup
Package: {{product}}-files
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-6.0,
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-files
{{product}}-files
Package: {{product}}-files-services
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-6.0,
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-files-services
{{product}}-files-services
Package: {{product}}-notify
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-6.0,
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-notify
{{product}}-notify
Package: {{product}}-people-server
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-6.0,
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-people-server
{{product}}-people-server
Package: {{product}}-socket
Architecture: any
@ -79,44 +91,50 @@ Depends: {{product}}-common (= {{package_header_tag_version}}),
nodejs (>=16),
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-socket
{{product}}-socket
Package: {{product}}-studio-notify
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-6.0,
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-studio-notify
{{product}}-studio-notify
Package: {{product}}-api
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-6.0,
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-api
{{product}}-api
Package: {{product}}-api-system
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-6.0,
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-api-system
{{product}}-api-system
Package: {{product}}-studio
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-6.0,
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-studio
{{product}}-studio
Package: {{product}}-proxy
Architecture: any
Depends: nginx, ${misc:Depends}, ${shlibs:Depends}
Description: Description
Description: {{product}}-proxy
{{product}}-proxy
Package: {{product}}-ssoauth
Architecture: any
@ -124,31 +142,35 @@ Depends: {{product}}-common (= {{package_header_tag_version}}),
nodejs (>=16),
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-ssoauth
{{product}}-ssoauth
Package: {{product}}-backup-background
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-6.0,
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-backup-background
{{product}}-backup-background
Package: {{product}}-clear-events
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-6.0,
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-clear-events
{{product}}-clear-events
Package: {{product}}-migration-runner
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-6.0,
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-migration-runner
{{product}}-migration-runner
Package: {{product}}-radicale
Architecture: any
@ -156,7 +178,8 @@ Depends: {{product}}-common (= {{package_header_tag_version}}),
python3-pip,
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-radicale
{{product}}-radicale
Package: {{product}}-doceditor
Architecture: any
@ -164,7 +187,8 @@ Depends: {{product}}-common (= {{package_header_tag_version}}),
nodejs (>=16),
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-doceditor
{{product}}-doceditor
Package: {{product}}-login
Architecture: any
@ -172,4 +196,14 @@ Depends: {{product}}-common (= {{package_header_tag_version}}),
nodejs (>=16),
${misc:Depends},
${shlibs:Depends}
Description: Description
Description: {{product}}-login
{{product}}-login
Package: {{product}}-healthchecks
Architecture: any
Depends: {{product}}-common (= {{package_header_tag_version}}),
dotnet-sdk-7.0,
${misc:Depends},
${shlibs:Depends}
Description: {{product}}-healthchecks
{{product}}-healthchecks

View File

@ -3,31 +3,30 @@ Upstream-Name: ONLYOFFICE-{{product}}
Source: http://onlyoffice.com
Files: *
Copyright: (c) Copyright Ascensio System SIA, 2021 support@onlyoffice.com
License: AGPLv3
Copyright: 2023, Ascensio System SIA <support@onlyoffice.com>
License: AGPL-3
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

View File

@ -0,0 +1,3 @@
# List of source files containing translatable strings.
[type: gettext/rfc822deb] {{product}}.templates

View File

@ -0,0 +1 @@
# List of source files containing translatable strings but should be ignored.

View File

@ -0,0 +1,18 @@
msgid ""
msgstr ""
"Project-Id-Version: {{product}}\n"
"Report-Msgid-Bugs-To: support@onlyoffice.com\n"
"POT-Creation-Date: 2023-01-24 18:30+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Ascensio System SIA <support@onlyoffice.com>\n"
"Language-Team: Ascensio System SIA <support@onlyoffice.com>\n"
"Language: ru_RU\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. Type: string
#. Description
#: ../{{product}}.templates:1001
msgid "Select environment for {{product}} configuration:"
msgstr "Выберите наименование среды для конфигурации {{product}}:"

View File

@ -0,0 +1,24 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the {{product}} package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: {{product}}\n"
"Report-Msgid-Bugs-To: support@onlyoffice.com\n"
"POT-Creation-Date: 2023-01-24 18:26+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#. Type: string
#. Description
#: ../{{product}}.templates:1001
msgid "Select environment for {{product}} configuration:"
msgstr ""

View File

@ -48,7 +48,7 @@ case "$1" in
db_get onlyoffice/ds-port || true
DOCUMENT_SERVER_PORT="$RET"
bash /usr/bin/{{product}}-configuration.sh -e $ENVIRONMENT -mysqlh $DB_HOST -mysqld $DB_NAME -mysqlu $DB_USER -mysqlp $DB_PWD -ash $APP_HOST -asp $APP_PORT -dsh $DOCUMENT_SERVER_HOST \
bash /usr/bin/{{product}}-configuration -e $ENVIRONMENT -mysqlh $DB_HOST -mysqld $DB_NAME -mysqlu $DB_USER -mysqlp $DB_PWD -ash $APP_HOST -asp $APP_PORT -dsh $DOCUMENT_SERVER_HOST \
-dsp $DOCUMENT_SERVER_PORT -rdh $REDIS_HOST -rdp $REDIS_PORT -rbh $RABBITMQ_HOST -rbp $RABBITMQ_PORT -rbu $RABBITMQ_USER -rbpw $RABBITMQ_PASSWORD -ess $ELK_SHEME -esh $ELK_HOST -esp $ELK_PORT
;;

View File

@ -1,3 +1,4 @@
../../../config/*.json etc/onlyoffice/{{product}}
../../../config/*.config etc/onlyoffice/{{product}}
../common/{{product}}-configuration.sh usr/bin
../common/{{product}}-configuration usr/bin
../common/logrotate/{{product}}-common etc/logrotate.d

View File

@ -13,9 +13,11 @@ if ! cat /etc/group | grep -q "nginx:"; then
fi
if ! cat /etc/passwd | grep -q "nginx:"; then
adduser --quiet --system nginx
adduser --quiet -g nginx --no-create-home --home /nonexistent --system nginx
usermod -aG nginx nginx
fi
usermod -aG onlyoffice,nginx onlyoffice
chown -R onlyoffice:onlyoffice /var/log/onlyoffice/{{product}} /var/www/{{product}} /etc/onlyoffice/{{product}}
#DEBHELPER#

View File

@ -0,0 +1 @@
../../../publish/services/ASC.Web.HealthChecks.UI/service/* var/www/{{product}}/services/ASC.Web.HealthChecks.UI

View File

@ -13,3 +13,5 @@ python3 -m pip install --upgrade radicale==3.0.5
python3 -m pip install --upgrade ${DIR}/Tools/radicale/plugins/app_auth_plugin/.
python3 -m pip install --upgrade ${DIR}/Tools/radicale/plugins/app_store_plugin/.
python3 -m pip install --upgrade ${DIR}/Tools/radicale/plugins/app_rights_plugin/.
#DEBHELPER#

View File

@ -1,7 +1,7 @@
Template: {{product}}/environment
Type: string
Default: production
Description: Select environment for {{product}} configuration:
_Description: Select environment for {{product}} configuration:
Template: {{product}}/host
Type: string
@ -11,32 +11,32 @@ Description: {{product}} host:
Template: {{product}}/port
Type: string
Default: 80
Description: {{product}} port:
Description: {{product}} listening port:
Template: {{product}}/db-host
Type: string
Default: localhost
Description: MySQL host:
Description: Database host:
Template: {{product}}/db-user
Type: string
Default: root
Description: MySQL user:
Description: Database user:
Template: {{product}}/db-pwd
Type: password
Description: MySQL password:
Description: Database password:
Template: {{product}}/db-name
Type: string
Default: onlyoffice
Description: MySQL database name:
Description: Database name:
Template: {{product}}/elasticsearch-sheme
Type: select
Choices: http, https
Default: http
Description: Elasticsearch sheme:
Description: Elasticsearch protocol:
Template: {{product}}/elasticsearch-host
Type: string

View File

@ -17,12 +17,14 @@ override_dh_auto_clean:
@echo "RULES.$@"
dh_testdir
rm -rf ${CURRENT_PATH}/debian/*.service
rm -rf ${CURRENT_PATH}/debian/*.lintian-overrides
rm -rf ${SRC_PATH}/build/install/${PRODUCT}*
override_dh_auto_configure:
@echo "RULES.$@"
dh_testdir
dh_auto_configure
dh_lintian
override_dh_auto_build:
cd ${SRC_PATH}/${SCRIPT_PATH}/systemd; \
@ -30,25 +32,35 @@ override_dh_auto_build:
cd ${SRC_PATH}/${SCRIPT_PATH}; \
bash build-frontend.sh -sp ${SRC_PATH}; \
bash build-backend.sh -sp ${SRC_PATH}; \
bash publish-backend.sh -sp ${SRC_PATH}
bash publish-backend.sh -sp ${SRC_PATH} -ar "-r linux-x64"
rm ${SRC_PATH}/config/nginx/onlyoffice-login.conf
find ${SRC_PATH}/publish/ \
-depth -type f -regex '.*\(eslintrc.*\|npmignore\|gitignore\|gitattributes\|gitmodules\|un~\|DS_Store\)' -exec rm -f {} \;
rm -rf ${SRC_PATH}/ASC.Migration.Runner/service/runtimes/linux-arm*
rm -f ${SRC_PATH}/config/nginx/onlyoffice-login.conf
sed -i "s@var/www@var/www/${PRODUCT}@g" ${SRC_PATH}/config/nginx/*.conf
sed -i "s@var/www@var/www/${PRODUCT}@g" ${SRC_PATH}/config/nginx/includes/*.conf
json -I -f ${SRC_PATH}/config/appsettings.services.json -e "this.logPath=\"/var/log/onlyoffice/${PRODUCT}\"" -e "this.socket={ 'path': '../ASC.Socket.IO/' }" \
-e "this.ssoauth={ 'path': '../ASC.SsoAuth/' }" -e "this.core={ 'products': { 'folder': '/var/www/${PRODUCT}/products', 'subfolder': 'server'} }"
for i in ${PRODUCT} $$(ls ${CURRENT_PATH}/debian/*.install | grep -oP 'debian/\K.*' | grep -o '^[^.]*'); do \
cp ${CURRENT_PATH}/debian/source/lintian-overrides ${CURRENT_PATH}/debian/$$i.lintian-overrides; \
done
override_dh_fixperms:
dh_fixperms
override_dh_auto_install:
dh_installinit --no-start
dh_systemd_enable --no-enable
dh_systemd_start --no-start
override_dh_strip:
# dh_strip --exclude=/site-packages/
dh_strip -Xarm --no-automatic-dbgsym
override_dh_shlibdeps:
# dh_shlibdeps --exclude=/site-packages/
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -Xarm -Xkafka
override_dh_installinit:
# don't do anything, silences lintian warnings "init.d-script-not-included-in-package"

View File

@ -0,0 +1 @@
1.0

View File

@ -0,0 +1,43 @@
# Ignoring node_modules errors due to lack of ability to influence them
embedded-javascript-library var/www/{{product}}/services/*/node_modules/*
# Ignoring node_modules errors due to lack of ability to influence them
executable-not-elf-or-script var/www/{{product}}/services/*/node_modules/*
# Ignoring node_modules errors due to lack of ability to influence them
privacy-breach-generic var/www/{{product}}/services/*/node_modules/*
# Ignoring node_modules errors due to lack of ability to influence them
script-not-executable var/www/{{product}}/services/*/node_modules/*
# Ignoring node_modules errors due to lack of ability to influence them
unusual-interpreter var/www/{{product}}/services/*/node_modules/*
# The use of the /var/www directory is caused by its past history as the default document root
dir-or-file-in-var-www
# Our project uses embedded libraries such as librdkafka.so
embedded-library
# DLLs exported need to be executable
executable-not-elf-or-script
# Dh_shibdeps generate not needed ldconfig call
package-has-unnecessary-activation-of-ldconfig-trigger
# Temporary ignoring of description errors
description-is-pkg-name
description-starts-with-package-name
description-too-short
description-synopsis-is-duplicated
# There is no manual page for {{product}}-configuration
binary-without-manpage
# Chown is used for the directories of our project, the user and group are created before that
maintainer-script-should-not-use-recursive-chown-or-chmod
# Scripts are not designed to be run manually
script-not-executable
# first number (major version) must be at least 2, but we currently version 1
invalid-standards-version
# Temporary ignoring of translation errors
untranslatable-debconf-templates

View File

@ -39,8 +39,8 @@ sed -i "s!localhost:5007!${FILES_HOST}!g" ${PATH_TO_CONF}/appsettings.json
sed -i "s!localhost:5009!${FILES_SERVICES_HOST}!g" ${PATH_TO_CONF}/appsettings.json
sed -i "s!localhost:5005!${NOTIFY_HOST}!g" ${PATH_TO_CONF}/appsettings.json
sed -i "s!localhost:5004!${PEOPLE_SERVER_HOST}!g" ${PATH_TO_CONF}/appsettings.json
sed -i "s!localhost:5006!${API_HOST}!g" ${PATH_TO_CONF}/appsettings.json
sed -i "s!localhost:5000!${STUDIO_NOTIFY_HOST}!g" ${PATH_TO_CONF}/appsettings.json
sed -i "s!localhost:5000!${API_HOST}!g" ${PATH_TO_CONF}/appsettings.json
sed -i "s!localhost:5006!${STUDIO_NOTIFY_HOST}!g" ${PATH_TO_CONF}/appsettings.json
sed -i "s!localhost:5003!${STUDIO_HOST}!g" ${PATH_TO_CONF}/appsettings.json
dotnet ${RUN_DLL} --urls=${URLS}

View File

@ -0,0 +1,44 @@
# Ignoring node_modules errors due to lack of ability to influence them
addFilter(r'node_modules')
# Packages use a non-standard user and group for our project directories, but the user and group are created in %pre common
addFilter(r' W: non-standard-(uid|gid)')
# This is necessary to ensure that all child packages are updated correctly
addFilter(r'W: requires-on-release')
# The signature of packages occurs in further stages
addFilter(r'E: no-signature')
# The basic documentation comes with the common package
addFilter(r'W: no-documentation')
# The directory is needed to keep the required data
addFilter(r'W: hidden-file-or-dir')
# Some packages do not need scriptlets
addFilter(r'W: empty-(%preun|%pre|%postun|%post)')
# This is implemented for easier updating of the config, in case of adding new data or correcting errors.
addFilter(r'W: conffile-without-noreplace-flag')
# In our packaging libraries are stored in the catalog of services
addFilter(r'E: binary-or-shlib-defines-rpath')
# The directory is used to store systemd files
addFilter(r'W: only-non-binary-in-usr-lib')
# Rpmbuild does not support different architectures for child packages
addFilter(r'E: no-binary')
# There is no manual page for {{product}}-configuration.sh
addFilter(r'W: no-manual-page-for-binary')
# Dependency on a non-existent package
addFilter(r'E: no-dependency-on locales-api')
# Scripts are not designed to be run manually
addFilter(r'E: non-executable-script')
# docspace-configuration.sh has a permission of 744, so that users do not have the opportunity to run the script
addFilter(r'non-standard-executable-perm')

View File

@ -4,10 +4,21 @@ bash build/install/common/systemd/build.sh
bash build/install/common/build-frontend.sh --srcpath %{_builddir}/%{sourcename}
bash build/install/common/build-backend.sh --srcpath %{_builddir}/%{sourcename}
bash build/install/common/publish-backend.sh --srcpath %{_builddir}/%{sourcename}
rename -f -v "s/product([^\/]*)$/%{product}\$1/g" build/install/common/*.sh
bash build/install/common/publish-backend.sh --srcpath %{_builddir}/%{sourcename} -ar "-r linux-x64"
rename -f -v "s/product([^\/]*)$/%{product}\$1/g" build/install/common/*
sed -i "s/{{product}}/%{product}/g" %{_builddir}/%{sourcename}/build/install/common/logrotate/product-common
sed -i "s@var/www@var/www/%{product}@g" config/nginx/*.conf && sed -i "s@var/www@var/www/%{product}@g" config/nginx/includes/*.conf && rm config/nginx/onlyoffice-login.conf
rm -rf %{_builddir}/%{sourcename}/ASC.Migration.Runner/service/runtimes/linux-arm*
rm -f %{_builddir}/%{sourcename}/config/nginx/onlyoffice-login.conf
sed -i "s@var/www@var/www/%{product}@g" config/nginx/*.conf && sed -i "s@var/www@var/www/%{product}@g" config/nginx/includes/*.conf
json -I -f %{_builddir}/%{sourcename}/config/appsettings.services.json -e "this.logPath=\"/var/log/onlyoffice/%{product}\"" -e "this.socket={ 'path': '../ASC.Socket.IO/' }" \
-e "this.ssoauth={ 'path': '../ASC.SsoAuth/' }" -e "this.core={ 'products': { 'folder': '%{buildpath}/products', 'subfolder': 'server'} }"
find %{_builddir}/%{sourcename}/publish/ \
%{_builddir}/%{sourcename}/ASC.Migration.Runner \
-depth -type f -regex '.*\(dll\|dylib\|so\)$' -exec chmod 755 {} \;
find %{_builddir}/%{sourcename}/publish/ \
%{_builddir}/%{sourcename}/ASC.Migration.Runner \
-depth -type f -regex '.*\(so\)$' -exec strip {} \;

View File

@ -1,11 +1,9 @@
%files
%config %attr(644, root, root) %{_bindir}/*
%attr(744, root, root) %{_bindir}/*
%files api
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/studio/ASC.Web.Api/
%{buildpath}/products/ASC.People/server/ASC.People.dll
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
/usr/lib/systemd/system/%{product}-api.service
%dir %{buildpath}/studio/
%dir %{buildpath}/products/ASC.People/
@ -22,8 +20,6 @@
%files backup
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/services/ASC.Data.Backup/
%{buildpath}/products/ASC.People/server/ASC.People.dll
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
/usr/lib/systemd/system/%{product}-backup.service
%dir %{buildpath}/services/
%dir %{buildpath}/products/
@ -35,6 +31,9 @@
%files common
%defattr(-, onlyoffice, onlyoffice, -)
%config %{_sysconfdir}/onlyoffice/%{product}/
%exclude %{_sysconfdir}/onlyoffice/%{product}/nginx
%{_docdir}/%{name}-%{version}-%{release}/
%config %{_sysconfdir}/logrotate.d/%{product}-common
%{_var}/log/onlyoffice/%{product}/
%dir %{_sysconfdir}/onlyoffice/
%dir %{_var}/log/onlyoffice/
@ -42,8 +41,6 @@
%files files-services
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/products/ASC.Files/service/
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
%{buildpath}/products/ASC.People/server/ASC.People*.dll
/usr/lib/systemd/system/%{product}-files-services.service
%dir %{buildpath}/products/
%dir %{buildpath}/products/ASC.People/
@ -54,8 +51,6 @@
%files notify
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/services/ASC.Notify/
%{buildpath}/products/ASC.People/server/ASC.People.dll
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
/usr/lib/systemd/system/%{product}-notify.service
%dir %{buildpath}/services/
%dir %{buildpath}/products/
@ -67,7 +62,6 @@
%files files
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/products/ASC.Files/server/
%{buildpath}/products/ASC.People/server/ASC.People.dll
/usr/lib/systemd/system/%{product}-files.service
%dir %{buildpath}/products/
%dir %{buildpath}/products/ASC.Files/
@ -76,16 +70,14 @@
%files proxy
%defattr(-, onlyoffice, onlyoffice, -)
%{_sysconfdir}/nginx/includes/*
%{_sysconfdir}/nginx/conf.d/*
%config %{_sysconfdir}/nginx/includes/*
%config %{_sysconfdir}/nginx/conf.d/*
%{buildpath}/public/
%{buildpath}/client/
%files studio-notify
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/services/ASC.Studio.Notify/
%{buildpath}/products/ASC.People/server/ASC.People.dll
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
/usr/lib/systemd/system/%{product}-studio-notify.service
%dir %{buildpath}/services/
%dir %{buildpath}/products/
@ -97,7 +89,6 @@
%files people-server
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/products/ASC.People/server/
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
/usr/lib/systemd/system/%{product}-people-server.service
%dir %{buildpath}/products/
%dir %{buildpath}/products/ASC.People/
@ -107,8 +98,6 @@
%files socket
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/services/ASC.Socket.IO/
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
%{buildpath}/products/ASC.People/server/ASC.People.dll
/usr/lib/systemd/system/%{product}-socket.service
%dir %{buildpath}/services/
%dir %{buildpath}/products/
@ -118,8 +107,6 @@
%files studio
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/studio/ASC.Web.Studio/
%{buildpath}/products/ASC.People/server/ASC.People.dll
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
/usr/lib/systemd/system/%{product}-studio.service
%dir %{buildpath}/studio/
%dir %{buildpath}/products/
@ -170,3 +157,9 @@
/usr/lib/systemd/system/%{product}-login.service
%dir %{buildpath}/products/
%dir %{buildpath}/products/ASC.Login/
%files healthchecks
%defattr(-, onlyoffice, onlyoffice, -)
%{buildpath}/services/ASC.Web.HealthChecks.UI
/usr/lib/systemd/system/%{product}-healthchecks.service
%dir %{buildpath}/services/

View File

@ -1,8 +1,10 @@
%install
rm -rf %{buildroot}
mkdir -p "%{buildroot}%{_bindir}/"
mkdir -p "%{buildroot}%{_docdir}/%{name}-%{version}-%{release}/"
mkdir -p "%{buildroot}%{_sysconfdir}/logrotate.d"
mkdir -p "%{buildroot}%{_sysconfdir}/nginx/conf.d/"
mkdir -p "%{buildroot}%{_sysconfdir}/nginx/includes/"
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/"
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/.private/"
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/data/"
mkdir -p "%{buildroot}%{_var}/log/onlyoffice/%{product}/"
@ -22,20 +24,24 @@ mkdir -p "%{buildroot}%{buildpath}/services/ASC.Notify/"
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Socket.IO/"
mkdir -p "%{buildroot}%{buildpath}/services/ASC.SsoAuth/"
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Studio.Notify/"
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Web.HealthChecks.UI/"
mkdir -p "%{buildroot}%{buildpath}/studio/ASC.Web.Api/"
mkdir -p "%{buildroot}%{buildpath}/studio/ASC.Web.Studio/"
mkdir -p "%{buildroot}%{buildpath}/public/"
mkdir -p "%{buildroot}%{buildpath}/client/"
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Login/login/"
mkdir -p "%{buildroot}/usr/lib/systemd/system/"
cp -rf %{_builddir}/%{sourcename}/LICENSE "%{buildroot}%{_docdir}/%{name}-%{version}-%{release}/"
cp -rf %{_builddir}/%{sourcename}/README.md "%{buildroot}%{_docdir}/%{name}-%{version}-%{release}/"
cp -rf %{_builddir}/%{sourcename}/ASC.Migration.Runner/service/* "%{buildroot}%{buildpath}/services/ASC.Migration.Runner/"
cp -rf %{_builddir}/%{sourcename}/build/deploy/editor/* "%{buildroot}%{buildpath}/products/ASC.Files/editor/"
cp -rf %{_builddir}/%{sourcename}/build/deploy/public/* "%{buildroot}%{buildpath}/public/"
cp -rf %{_builddir}/%{sourcename}/build/deploy/client/* "%{buildroot}%{buildpath}/client/"
cp -rf %{_builddir}/%{sourcename}/build/deploy/login/* "%{buildroot}%{buildpath}/products/ASC.Login/login/"
cp -rf %{_builddir}/%{sourcename}/build/install/RadicalePlugins/* "%{buildroot}%{buildpath}/Tools/radicale/plugins/"
cp -rf %{_builddir}/%{sourcename}/build/install/common/%{product}-configuration.sh "%{buildroot}%{_bindir}/"
cp -rf %{_builddir}/%{sourcename}/build/install/common/%{product}-configuration "%{buildroot}%{_bindir}/"
cp -rf %{_builddir}/%{sourcename}/build/install/common/systemd/modules/* "%{buildroot}/usr/lib/systemd/system/"
cp -rf %{_builddir}/%{sourcename}/build/install/common/logrotate/product-common "%{buildroot}%{_sysconfdir}/logrotate.d/%{product}-common"
cp -rf %{_builddir}/%{sourcename}/config/* "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/"
cp -rf %{_builddir}/%{sourcename}/config/nginx/includes/onlyoffice*.conf "%{buildroot}%{_sysconfdir}/nginx/includes/"
cp -rf %{_builddir}/%{sourcename}/config/nginx/onlyoffice*.conf "%{buildroot}%{_sysconfdir}/nginx/conf.d/"
@ -52,4 +58,5 @@ cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Socket.IO/service/* "%{bu
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.SsoAuth/service/* "%{buildroot}%{buildpath}/services/ASC.SsoAuth/"
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Studio.Notify/service/* "%{buildroot}%{buildpath}/services/ASC.Studio.Notify/"
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Web.Api/service/* "%{buildroot}%{buildpath}/studio/ASC.Web.Api/"
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Web.HealthChecks.UI/service/* "%{buildroot}%{buildpath}/services/ASC.Web.HealthChecks.UI/"
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Web.Studio/service/* "%{buildroot}%{buildpath}/studio/ASC.Web.Studio/"

View File

@ -1,149 +1,178 @@
%package backup
Summary: backup
Summary: Backup
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-6.0
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description backup
Backup
%package common
Summary: common
Summary: Common
Group: Applications/Internet
Requires: logrotate
%description common
Common
%package files-services
Summary: files-services
Summary: Files-services
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-6.0
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description files-services
Files-services
%package notify
Summary: notify
Summary: Notify
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-6.0
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description notify
Notify
%package files
Summary: files
Summary: Files
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-6.0
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description files
Files
%package proxy
Summary: proxy
Summary: Proxy
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nginx >= 1.9.5
Requires: mysql-community-client >= 5.7.0
AutoReqProv: no
%description proxy
Proxy
%package studio-notify
Summary: studio-notify
Summary: Studio-notify
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-6.0
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description studio-notify
Studio-notify
%package people-server
Summary: people-server
Summary: People-server
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-6.0
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description people-server
People-server
%package socket
Summary: socket
Summary: Socket
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nodejs >= 16.0
AutoReqProv: no
%description socket
Socket
%package studio
Summary: studio
Summary: Studio
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-6.0
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description studio
Studio
%package api
Summary: api
Summary: Api
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-6.0
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description api
Api
%package api-system
Summary: api-system
Summary: Api-system
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-6.0
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description api-system
Api-system
%package ssoauth
Summary: ssoauth
Summary: Ssoauth
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nodejs >= 16.0
AutoReqProv: no
%description ssoauth
Ssoauth
%package clear-events
Summary: clear-events
Summary: Clear-events
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-6.0
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description clear-events
Clear-events
%package backup-background
Summary: backup-background
Summary: Backup-background
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-6.0
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description backup-background
Backup-background
%package radicale
Summary: radicale
Summary: Radicale
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: python3 >= 3.6
AutoReqProv: no
%description radicale
Radicale
%package doceditor
Summary: doceditor
Summary: Doceditor
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nodejs >= 16.0
AutoReqProv: no
%description doceditor
Doceditor
%package migration-runner
Summary: migration-runner
Summary: Migration-runner
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-6.0
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description migration-runner
Migration-runner
%package login
Summary: login
Summary: Login
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: nodejs >= 16.0
AutoReqProv: no
%description login
Login
%package healthchecks
Summary: Healthchecks
Group: Applications/Internet
Requires: %name-common = %version-%release
Requires: dotnet-sdk-7.0
AutoReqProv: no
%description healthchecks
Healthchecks

View File

@ -1,27 +1,31 @@
%define _build_id_links none
%global product docspace
%global buildpath %{_var}/www/%{product}
%global sourcename DocSpace-%GIT_BRANCH
Name: onlyoffice-docspace
Summary: Business productivity tools.
Name: %{product}
Summary: Business productivity tools
Group: Applications/Internet
Version: %version
Release: %release
ExclusiveArch: x86_64
Version: %{version}
Release: %{release}
AutoReqProv: no
URL: http://onlyoffice.com
Vendor: Ascensio System SIA
Packager: Ascensio System SIA <support@onlyoffice.com>
License: AGPLv3
Source0: https://github.com/ONLYOFFICE/%{product}/archive/%GIT_BRANCH.tar.gz#/%{sourcename}.tar.gz
Source1: https://github.com/ONLYOFFICE/document-templates/archive/main/community-server.tar.gz#/document-templates-main-community-server.tar.gz
Source2: https://github.com/ONLYOFFICE/dictionaries/archive/master.tar.gz#/dictionaries-master.tar.gz
Source3: %{product}.rpmlintrc
BuildRequires: nodejs >= 18.0
BuildRequires: yarn
BuildRequires: dotnet-sdk-6.0
BuildRequires: dotnet-sdk-7.0
BuildRoot: %_tmppath/%name-%version-%release.%arch
Requires: %name-api = %version-%release
Requires: %name-backup = %version-%release
@ -30,6 +34,7 @@ Requires: %name-clear-events = %version-%release
Requires: %name-doceditor = %version-%release
Requires: %name-files = %version-%release
Requires: %name-files-services = %version-%release
Requires: %name-healthchecks = %version-%release
Requires: %name-login = %version-%release
Requires: %name-migration-runner = %version-%release
Requires: %name-notify = %version-%release
@ -42,14 +47,16 @@ Requires: %name-studio = %version-%release
Requires: %name-studio-notify = %version-%release
%description
App Server is a platform for building your own online office by connecting ONLYOFFICE modules packed as separate apps.
ONLYOFFICE DocSpace is a new way to collaborate on documents with teams,
clients, partners, etc., based on the concept of rooms - special spaces with
predefined permissions.
%include package.spec
%prep
rm -rf %{_rpmdir}/%{_arch}/%{name}-*
%setup -b1 -b2 -n %{sourcename}
%setup -b1 -b2 -n %{sourcename} -q
mv -f %{_builddir}/document-templates-main-community-server/* %{_builddir}/%{sourcename}/products/ASC.Files/Server/DocStore/
mv -f %{_builddir}/dictionaries-master/* %{_builddir}/%{sourcename}/common/Tests/Frontend.Translations.Tests/dictionaries/
@ -68,8 +75,6 @@ getent passwd onlyoffice >/dev/null || useradd -r -g onlyoffice -s /sbin/nologin
%post
chmod +x %{_bindir}/%{product}-configuration.sh
%preun
%postun
@ -79,13 +84,15 @@ chmod +x %{_bindir}/%{product}-configuration.sh
rm -rf %{_builddir} %{buildroot}
%changelog
*Mon Jan 16 2023 %{packager} - %{version}-%{release}
- Initial build.
%triggerin radicale -- python3, python36
if ! which python3; then
if rpm -q python36; then
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
fi
if rpm -q python36; then
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
fi
fi
python3 -m pip install --upgrade pip

View File

@ -104,6 +104,8 @@ public class SuccessApiResponse : CommonApiResponse
}
}
public List<Link> Links { get; set; }
public SuccessApiResponse()
{
@ -114,6 +116,15 @@ public class SuccessApiResponse : CommonApiResponse
Status = 0;
_httpContext = httpContext;
Response = response;
Links = new List<Link>(1)
{
new Link()
{
Href = httpContext.Request.GetUrlRewriter().ToString(),
Action = httpContext.Request.Method
}
};
}
}
@ -141,3 +152,9 @@ public class CommonApiError
return result;
}
}
public class Link
{
public string Href { get; set; }
public string Action { get; set; }
}

View File

@ -59,7 +59,7 @@ public static class DbQuotaExtension
Tenant = -1,
Name = "trial",
Description = null,
Features = "trial,audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:100,manager:1",
Features = "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1",
Price = 0,
ProductId = null,
Visible = false
@ -69,7 +69,7 @@ public static class DbQuotaExtension
Tenant = -2,
Name = "admin",
Description = null,
Features = "audit,ldap,sso,whitelabel,thirdparty,audit,restore,total_size:107374182400,file_size:1024,manager:1",
Features = "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1",
Price = 30,
ProductId = "1002",
Visible = true

View File

@ -29,24 +29,17 @@ 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 bool Removed { get; set; }
public override object[] GetKeys()
{
@ -149,6 +142,11 @@ public static class BackupRecordExtension
.HasColumnType("varchar(64)")
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
entity.Property(e => e.Removed)
.HasColumnName("removed")
.HasColumnType("tinyint(1)")
.IsRequired();
});
}
public static void PgSqlAddBackupRecord(this ModelBuilder modelBuilder)
@ -238,6 +236,12 @@ public static class BackupRecordExtension
.HasMaxLength(64)
.HasCharSet("utf8")
.UseCollation("utf8_general_ci");
entity.Property(e => e.Removed)
.HasColumnName("removed")
.HasColumnType("int")
.HasMaxLength(10)
.IsRequired();
});
}
}

View File

@ -165,7 +165,8 @@ public class BackupProgressItem : BaseBackupProgressItem
CreatedOn = DateTime.UtcNow,
ExpiresOn = _storageType == BackupStorageType.DataStore ? DateTime.UtcNow.AddDays(1) : DateTime.MinValue,
StorageParams = JsonConvert.SerializeObject(StorageParams),
Hash = BackupWorker.GetBackupHash(tempFile)
Hash = BackupWorker.GetBackupHash(tempFile),
Removed = false
});
Percentage = 100;

View File

@ -30,10 +30,12 @@ namespace ASC.Data.Backup.Storage;
public class BackupRepository : IBackupRepository
{
private readonly IDbContextFactory<BackupsContext> _dbContextFactory;
private readonly DbFactory _dbFactory;
public BackupRepository(IDbContextFactory<BackupsContext> dbContextFactory)
public BackupRepository(IDbContextFactory<BackupsContext> dbContextFactory, DbFactory dbFactory)
{
_dbContextFactory = dbContextFactory;
_dbFactory = dbFactory;
}
public void SaveBackupRecord(BackupRecord backup)
@ -64,13 +66,30 @@ public class BackupRepository : IBackupRepository
public List<BackupRecord> GetScheduledBackupRecords()
{
using var backupContext = _dbContextFactory.CreateDbContext();
return backupContext.Backups.AsNoTracking().AsQueryable().Where(b => b.IsScheduled == true).ToList();
return backupContext.Backups.AsNoTracking().AsQueryable().Where(b => b.IsScheduled == true && b.Removed == false).ToList();
}
public List<BackupRecord> GetBackupRecordsByTenantId(int tenantId)
{
using var backupContext = _dbContextFactory.CreateDbContext();
return backupContext.Backups.AsNoTracking().AsQueryable().Where(b => b.TenantId == tenantId).ToList();
return backupContext.Backups.AsNoTracking().AsQueryable().Where(b => b.TenantId == tenantId && b.Removed == false).ToList();
}
public void MigrationBackupRecords(int tenantId, int newTenantId, string region)
{
using var backupContext = _dbContextFactory.CreateDbContext();
var backups = backupContext.Backups.AsNoTracking().AsQueryable().Where(b => b.TenantId == tenantId).ToList();
backups.ForEach(backup =>
{
backup.TenantId = newTenantId;
backup.Id = Guid.NewGuid();
});
var backupContextByNewTenant = _dbFactory.CreateDbContext<BackupsContext>(region);
backupContextByNewTenant.Backups.AddRange(backups);
backupContextByNewTenant.SaveChanges();
}
public void DeleteBackupRecord(Guid id)
@ -80,7 +99,8 @@ public class BackupRepository : IBackupRepository
if (backup != null)
{
backupContext.Backups.Remove(backup);
backup.Removed = true;
backupContext.Backups.Update(backup);
backupContext.SaveChanges();
}
}

View File

@ -53,7 +53,6 @@ public class CoreModuleSpecifics : ModuleSpecificsBase
DateColumns = new Dictionary<string, bool> {{"timestamp", false}}
},
new TableInfo("feed_users") {InsertMethod = InsertMethod.None},
new TableInfo("backup_backup", "tenant_id", "id", IdType.Guid),
new TableInfo("backup_schedule", "tenant_id"),
new TableInfo("core_settings", "tenant")
};
@ -74,12 +73,6 @@ public class CoreModuleSpecifics : ModuleSpecificsBase
new RelationInfo("core_user", "id", "feed_users", "user_id", typeof(CoreModuleSpecifics)),
new RelationInfo("files_folder", "id", "backup_backup", "storage_base_path", typeof(FilesModuleSpecifics),
x => IsDocumentsStorageType(Convert.ToString(x["storage_type"]))),
new RelationInfo("files_file", "id", "backup_backup", "storage_path", typeof(FilesModuleSpecifics),
x => IsDocumentsStorageType(Convert.ToString(x["storage_type"]))),
new RelationInfo("files_folder", "id", "backup_schedule", "storage_base_path", typeof(FilesModuleSpecifics),
x => IsDocumentsStorageType(Convert.ToString(x["storage_type"]))),
};

View File

@ -39,7 +39,8 @@ public class RestorePortalTask : PortalTaskBase
private readonly CoreBaseSettings _coreBaseSettings;
private readonly LicenseReader _licenseReader;
private readonly TenantManager _tenantManager;
private readonly AscCacheNotify _ascCacheNotify;
private readonly AscCacheNotify _ascCacheNotify;
private readonly BackupRepository _backupRepository;
private readonly ILogger<RestorePortalTask> _options;
private readonly ILogger<RestoreDbModuleTask> _logger;
private string _region;
@ -54,7 +55,8 @@ public class RestorePortalTask : PortalTaskBase
LicenseReader licenseReader,
TenantManager tenantManager,
AscCacheNotify ascCacheNotify,
ModuleProvider moduleProvider)
ModuleProvider moduleProvider,
BackupRepository backupRepository)
: base(dbFactory, options, storageFactory, storageFactoryConfig, moduleProvider)
{
_coreBaseSettings = coreBaseSettings;
@ -63,6 +65,7 @@ public class RestorePortalTask : PortalTaskBase
_ascCacheNotify = ascCacheNotify;
_options = options;
_logger = logger;
_backupRepository = backupRepository;
}
public void Init(string region, string fromFilePath, int tenantId = -1, ColumnMapper columnMapper = null, string upgradesPath = null)
@ -114,7 +117,8 @@ public class RestorePortalTask : PortalTaskBase
}
await restoreTask.RunJob();
}
}
_backupRepository.MigrationBackupRecords(TenantId, _columnMapper.GetTenantMapping(), _region);
}
_options.DebugEndRestoreData();

View File

@ -50,19 +50,18 @@ public class StorageHandler
public Task Invoke(HttpContext context, TenantManager tenantManager, SecurityContext securityContext, StorageFactory storageFactory, EmailValidationKeyProvider emailValidationKeyProvider)
{
if (_checkAuth && !securityContext.IsAuthenticated)
{
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
return Task.CompletedTask;
}
var storage = storageFactory.GetStorage(tenantManager.GetCurrentTenant().Id, _module);
var path = CrossPlatform.PathCombine(_path, GetRouteValue("pathInfo", context).Replace('/', Path.DirectorySeparatorChar));
var header = context.Request.Query[Constants.QueryHeader].FirstOrDefault() ?? "";
var auth = context.Request.Query[Constants.QueryAuth].FirstOrDefault() ?? "";
var storageExpire = storage.GetExpire(_domain);
if (_checkAuth && !securityContext.IsAuthenticated && String.IsNullOrEmpty(auth))
{
context.Response.StatusCode = (int)HttpStatusCode.Forbidden;
return Task.CompletedTask;
}
if (storageExpire != TimeSpan.Zero && storageExpire != TimeSpan.MinValue && storageExpire != TimeSpan.MaxValue || !string.IsNullOrEmpty(auth))
{
var expire = context.Request.Query[Constants.QueryExpire];

View File

@ -210,34 +210,4 @@ public class BackupController : ControllerBase
{
return _backupHandler.GetTmpFolder();
}
///<visible>false</visible>
[HttpGet("enablerestore")]
public bool EnableRestore()
{
try
{
_backupHandler.DemandPermissionsRestore();
return true;
}
catch
{
return false;
}
}
///<visible>false</visible>
[HttpGet("enableAutoBackup")]
public bool EnableAutoBackup()
{
try
{
_backupHandler.DemandPermissionsAutoBackup();
return true;
}
catch
{
return false;
}
}
}

View File

@ -23,12 +23,10 @@ map $request_uri $header_x_frame_options {
}
map $request_uri $cache_control {
default "no-cache, no-store, must-revalidate";
~*\/(storage\/room_logos\/root\/|storage\/userPhotos\/root\/) "public, max-age=3153600";
~*\/(images|favicon.ico.*) "public, max-age=3153600";
~*\/(api\/2\.0.*|storage|login\.ashx|products\/.+\/httphandlers\/filehandler\.ashx|ChunkedUploader.ashx|ThirdPartyAppHandler|apisystem|sh|remoteEntry\.js|debuginfo\.md) "no-cache, no-store, must-revalidate";
~*\/(locales.*\.json) "public, no-transform";
~*\.(ogg|ogv|svg|svgz|eot|otf|woff|woff2|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|md|css|js)$ "public, no-transform, max-age=0, s-maxage=3153600";
default "no-cache, no-store, no-transform";
~*\/(filehandler\.ashx\?action=thumb)|\/(storage\/room_logos\/root\/|storage\/userPhotos\/root\/) "must-revalidate, no-transform, immutable, max-age=31536000";
~*\/(api\/2\.0.*|storage|login\.ashx|filehandler\.ashx|ChunkedUploader.ashx|ThirdPartyAppHandler|apisystem|sh|remoteEntry\.js|debuginfo\.md|static\/scripts.*) "no-cache, no-store, no-transform";
~*\/(images|favicon.ico.*)|\.(js|woff|woff2|css)|(locales.*\.json) "must-revalidate, no-transform, immutable, max-age=31536000";
}
include /etc/nginx/includes/onlyoffice-*.conf;
@ -115,6 +113,10 @@ server {
try_files /plugins/$basename /index.html =404;
}
location ~* /static/images/(.*)$ {
try_files /images/$1 /index.html =404;
}
}
location /doceditor {
@ -129,6 +131,14 @@ server {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
location ~* /static/images/(.*)$ {
try_files /images/$1 /index.html =404;
}
location ~* /static/fonts/ {
try_files /fonts/$basename /index.html =404;
}
}
location /login {
@ -143,6 +153,14 @@ server {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
location ~* /static/images/(.*)$ {
try_files /images/$1 /index.html =404;
}
location ~* /static/fonts/ {
try_files /fonts/$basename /index.html =404;
}
}
location /sockjs-node {

View File

@ -8,17 +8,18 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Migrations.MySql.Migrations
namespace ASC.Migrations.MySql.Migrations.Backups
{
[DbContext(typeof(BackupsContext))]
[Migration("20221019144340_BackupsContextMigrate")]
[Migration("20230130103901_BackupsContextMigrate")]
partial class BackupsContextMigrate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
@ -207,6 +208,10 @@ namespace ASC.Migrations.MySql.Migrations
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Removed")
.HasColumnType("tinyint(1)")
.HasColumnName("removed");
b.Property<string>("StorageBasePath")
.ValueGeneratedOnAdd()
.HasColumnType("varchar(255)")

View File

@ -4,10 +4,12 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.Migrations.MySql.Migrations
namespace ASC.Migrations.MySql.Migrations.Backups
{
/// <inheritdoc />
public partial class BackupsContextMigrate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
@ -19,21 +21,22 @@ namespace ASC.Migrations.MySql.Migrations
{
id = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
tenant_id = table.Column<int>(type: "int(10)", nullable: false),
is_scheduled = table.Column<bool>(type: "tinyint(1)", nullable: false),
tenantid = table.Column<int>(name: "tenant_id", type: "int(10)", nullable: false),
isscheduled = table.Column<bool>(name: "is_scheduled", type: "tinyint(1)", nullable: false),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
hash = table.Column<string>(type: "varchar(64)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
storage_type = table.Column<int>(type: "int(10)", nullable: false),
storage_base_path = table.Column<string>(type: "varchar(255)", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
storagetype = table.Column<int>(name: "storage_type", type: "int(10)", nullable: false),
storagebasepath = table.Column<string>(name: "storage_base_path", type: "varchar(255)", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
storage_path = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
storagepath = table.Column<string>(name: "storage_path", type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
created_on = table.Column<DateTime>(type: "datetime", nullable: false),
expires_on = table.Column<DateTime>(type: "datetime", nullable: false, defaultValueSql: "'0001-01-01 00:00:00'"),
storage_params = table.Column<string>(type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
createdon = table.Column<DateTime>(name: "created_on", type: "datetime", nullable: false),
expireson = table.Column<DateTime>(name: "expires_on", type: "datetime", nullable: false, defaultValueSql: "'0001-01-01 00:00:00'"),
storageparams = table.Column<string>(name: "storage_params", type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
removed = table.Column<bool>(type: "tinyint(1)", nullable: false)
},
constraints: table =>
{
@ -45,20 +48,20 @@ namespace ASC.Migrations.MySql.Migrations
name: "backup_schedule",
columns: table => new
{
tenant_id = table.Column<int>(type: "int(10)", nullable: false),
tenantid = table.Column<int>(name: "tenant_id", type: "int(10)", nullable: false),
cron = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
backups_stored = table.Column<int>(type: "int(10)", nullable: false),
storage_type = table.Column<int>(type: "int(10)", nullable: false),
storage_base_path = table.Column<string>(type: "varchar(255)", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
backupsstored = table.Column<int>(name: "backups_stored", type: "int(10)", nullable: false),
storagetype = table.Column<int>(name: "storage_type", type: "int(10)", nullable: false),
storagebasepath = table.Column<string>(name: "storage_base_path", type: "varchar(255)", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
last_backup_time = table.Column<DateTime>(type: "datetime", nullable: false),
storage_params = table.Column<string>(type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
lastbackuptime = table.Column<DateTime>(name: "last_backup_time", type: "datetime", nullable: false),
storageparams = table.Column<string>(name: "storage_params", type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.tenant_id);
table.PrimaryKey("PRIMARY", x => x.tenantid);
})
.Annotation("MySql:CharSet", "utf8");
@ -75,7 +78,7 @@ namespace ASC.Migrations.MySql.Migrations
mappeddomain = table.Column<string>(type: "varchar(100)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
version = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'2'"),
version_changed = table.Column<DateTime>(type: "datetime", nullable: true),
versionchanged = table.Column<DateTime>(name: "version_changed", type: "datetime", nullable: true),
language = table.Column<string>(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
timezone = table.Column<string>(type: "varchar(50)", nullable: true, collation: "utf8_general_ci")
@ -86,12 +89,12 @@ namespace ASC.Migrations.MySql.Migrations
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
ownerid = table.Column<string>(name: "owner_id", type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
paymentid = table.Column<string>(name: "payment_id", type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false),
lastmodified = table.Column<DateTime>(name: "last_modified", type: "timestamp", nullable: false),
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'")
},
@ -143,6 +146,7 @@ namespace ASC.Migrations.MySql.Migrations
column: "version");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(

View File

@ -7,7 +7,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Migrations.MySql.Migrations
namespace ASC.Migrations.MySql.Migrations.Backups
{
[DbContext(typeof(BackupsContext))]
partial class BackupsContextModelSnapshot : ModelSnapshot
@ -16,7 +16,7 @@ namespace ASC.Migrations.MySql.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
@ -205,6 +205,10 @@ namespace ASC.Migrations.MySql.Migrations
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<bool>("Removed")
.HasColumnType("tinyint(1)")
.HasColumnName("removed");
b.Property<string>("StorageBasePath")
.ValueGeneratedOnAdd()
.HasColumnType("varchar(255)")

View File

@ -8,17 +8,18 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Migrations.MySql.Migrations
namespace ASC.Migrations.MySql.Migrations.CoreDb
{
[DbContext(typeof(CoreDbContext))]
[Migration("20221019144347_CoreDbContextMigrate")]
[Migration("20230130103905_CoreDbContextMigrate")]
partial class CoreDbContextMigrate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b =>
@ -72,7 +73,7 @@ namespace ASC.Migrations.MySql.Migrations
new
{
Tenant = -1,
Features = "trial,audit,ldap,sso,whitelabel,restore,thirdparty,audit,total_size:107374182400,file_size:100,manager:1",
Features = "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1",
Name = "trial",
Price = 0m,
Visible = false
@ -80,7 +81,7 @@ namespace ASC.Migrations.MySql.Migrations
new
{
Tenant = -2,
Features = "audit,ldap,sso,whitelabel,restore,thirdparty,audit,total_size:107374182400,file_size:1024,manager:1",
Features = "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1",
Name = "admin",
Price = 30m,
ProductId = "1002",

View File

@ -29,10 +29,12 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.Migrations.MySql.Migrations;
namespace ASC.Migrations.MySql.Migrations.CoreDb;
/// <inheritdoc />
public partial class CoreDbContextMigrate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
@ -50,7 +52,7 @@ public partial class CoreDbContextMigrate : Migration
features = table.Column<string>(type: "text", nullable: true)
.Annotation("MySql:CharSet", "utf8"),
price = table.Column<decimal>(type: "decimal(10,2)", nullable: false, defaultValueSql: "'0.00'"),
product_id = table.Column<string>(type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
productid = table.Column<string>(name: "product_id", type: "varchar(128)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
visible = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'")
},
@ -67,16 +69,16 @@ public partial class CoreDbContextMigrate : Migration
tenant = table.Column<int>(type: "int", nullable: false),
path = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
user_id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "utf8_general_ci")
userid = table.Column<Guid>(name: "user_id", type: "char(36)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
counter = table.Column<long>(type: "bigint", nullable: false, defaultValueSql: "'0'"),
tag = table.Column<string>(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false)
lastmodified = table.Column<DateTime>(name: "last_modified", type: "timestamp", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenant, x.user_id, x.path });
table.PrimaryKey("PRIMARY", x => new { x.tenant, x.userid, x.path });
})
.Annotation("MySql:CharSet", "utf8");
@ -88,11 +90,11 @@ public partial class CoreDbContextMigrate : Migration
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
tenant = table.Column<int>(type: "int", nullable: false),
stamp = table.Column<DateTime>(type: "datetime", nullable: false),
customer_id = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
customerid = table.Column<string>(name: "customer_id", type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
comment = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
create_on = table.Column<DateTime>(type: "timestamp", nullable: false)
createon = table.Column<DateTime>(name: "create_on", type: "timestamp", nullable: false)
},
constraints: table =>
{
@ -104,14 +106,14 @@ public partial class CoreDbContextMigrate : Migration
name: "tenants_tariffrow",
columns: table => new
{
tariff_id = table.Column<int>(type: "int", nullable: false),
tariffid = table.Column<int>(name: "tariff_id", type: "int", nullable: false),
quota = table.Column<int>(type: "int", nullable: false),
tenant = table.Column<int>(type: "int", nullable: false),
quantity = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenant, x.tariff_id, x.quota });
table.PrimaryKey("PRIMARY", x => new { x.tenant, x.tariffid, x.quota });
})
.Annotation("MySql:CharSet", "utf8mb4");
@ -123,12 +125,12 @@ public partial class CoreDbContextMigrate : Migration
migrationBuilder.InsertData(
table: "tenants_quota",
columns: new[] { "tenant", "description", "features", "name", "price", "product_id", "visible" },
values: new object[] { -2, null, "audit,ldap,sso,whitelabel,restore,thirdparty,audit,total_size:107374182400,file_size:1024,manager:1", "admin", 30m, "1002", true });
values: new object[] { -2, null, "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1", "admin", 30m, "1002", true });
migrationBuilder.InsertData(
table: "tenants_quota",
columns: new[] { "tenant", "description", "features", "name", "product_id" },
values: new object[] { -1, null, "trial,audit,ldap,sso,whitelabel,restore,thirdparty,audit,total_size:107374182400,file_size:100,manager:1", "trial", null });
values: new object[] { -1, null, "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1", "trial", null });
migrationBuilder.CreateIndex(
name: "last_modified",
@ -141,6 +143,7 @@ public partial class CoreDbContextMigrate : Migration
column: "tenant");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(

View File

@ -7,7 +7,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Migrations.MySql.Migrations
namespace ASC.Migrations.MySql.Migrations.CoreDb
{
[DbContext(typeof(CoreDbContext))]
partial class CoreDbContextModelSnapshot : ModelSnapshot
@ -16,7 +16,7 @@ namespace ASC.Migrations.MySql.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b =>
@ -70,7 +70,7 @@ namespace ASC.Migrations.MySql.Migrations
new
{
Tenant = -1,
Features = "trial,audit,ldap,sso,whitelabel,restore,thirdparty,audit,total_size:107374182400,file_size:100,manager:1",
Features = "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1",
Name = "trial",
Price = 0m,
Visible = false
@ -78,7 +78,7 @@ namespace ASC.Migrations.MySql.Migrations
new
{
Tenant = -2,
Features = "audit,ldap,sso,whitelabel,restore,thirdparty,audit,total_size:107374182400,file_size:1024,manager:1",
Features = "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1",
Name = "admin",
Price = 30m,
ProductId = "1002",

View File

@ -1,832 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.Migrations.MySql.Migrations
{
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<int>(type: "int", nullable: false),
right_node = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
left_node = table.Column<string>(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<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
output = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.input, x.output });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_file",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false),
version = table.Column<int>(type: "int", nullable: false),
tenant_id = table.Column<int>(type: "int", nullable: false),
version_group = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
current_version = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
folder_id = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
title = table.Column<string>(type: "varchar(400)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
content_length = table.Column<long>(type: "bigint", nullable: false, defaultValueSql: "'0'"),
file_status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
category = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
create_by = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
create_on = table.Column<DateTime>(type: "datetime", nullable: false),
modified_by = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
modified_on = table.Column<DateTime>(type: "datetime", nullable: false),
converted_type = table.Column<string>(type: "varchar(10)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
comment = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
changes = table.Column<string>(type: "mediumtext", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
encrypted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
forcesave = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
thumb = table.Column<int>(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<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
parent_id = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
title = table.Column<string>(type: "varchar(400)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
folder_type = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
create_by = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
create_on = table.Column<DateTime>(type: "datetime", nullable: false),
modified_by = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
modified_on = table.Column<DateTime>(type: "datetime", nullable: false),
tenant_id = table.Column<int>(type: "int", nullable: false),
foldersCount = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
filesCount = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
@private = table.Column<bool>(name: "private", type: "tinyint(1)", nullable: false)
},
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<int>(type: "int", nullable: false),
parent_id = table.Column<int>(type: "int", nullable: false),
level = table.Column<int>(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<int>(type: "int", nullable: false),
source_id = table.Column<string>(type: "varchar(32)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
linked_id = table.Column<string>(type: "varchar(32)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
linked_for = table.Column<string>(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<int>(type: "int", nullable: false),
entry_id = table.Column<string>(type: "varchar(32)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
data = table.Column<string>(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<int>(type: "int", nullable: false),
entry_id = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
entry_type = table.Column<int>(type: "int", nullable: false),
subject = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
subject_type = table.Column<int>(type: "int", nullable: false),
owner = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
security = table.Column<int>(type: "int", nullable: false),
timestamp = table.Column<DateTime>(type: "timestamp", nullable: false),
options = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
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<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
tenant_id = table.Column<int>(type: "int", nullable: false),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
owner = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
flag = table.Column<int>(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<int>(type: "int", nullable: false),
tag_id = table.Column<int>(type: "int", nullable: false),
entry_type = table.Column<int>(type: "int", nullable: false),
entry_id = table.Column<string>(type: "varchar(32)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
create_by = table.Column<string>(type: "char(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
create_on = table.Column<DateTime>(type: "datetime", nullable: true),
tag_count = table.Column<int>(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<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
provider = table.Column<string>(type: "varchar(50)", nullable: false, defaultValueSql: "'0'", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
customer_title = table.Column<string>(type: "varchar(400)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
user_name = table.Column<string>(type: "varchar(100)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
password = table.Column<string>(type: "varchar(512)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
token = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
user_id = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
folder_type = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
room_type = table.Column<int>(type: "int", nullable: false),
create_on = table.Column<DateTime>(type: "datetime", nullable: false),
url = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
tenant_id = table.Column<int>(type: "int", nullable: false),
folder_id = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
@private = table.Column<bool>(name: "private", type: "tinyint(1)", nullable: false)
},
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<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
app = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
token = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
tenant_id = table.Column<int>(type: "int", nullable: false),
modified_on = table.Column<DateTime>(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<string>(type: "char(32)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
tenant_id = table.Column<int>(type: "int", nullable: false),
id = table.Column<string>(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_tenants",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
alias = table.Column<string>(type: "varchar(100)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
mappeddomain = table.Column<string>(type: "varchar(100)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
version = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'2'"),
version_changed = table.Column<DateTime>(type: "datetime", nullable: true),
language = table.Column<string>(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
timezone = table.Column<string>(type: "varchar(50)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomains = table.Column<string>(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomainsenabled = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
owner_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
payment_id = table.Column<string>(type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp", nullable: false),
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(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_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: "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_tenants");
}
}
}

View File

@ -1,37 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.Migrations.MySql.Migrations.FilesDb
{
public partial class FilesDbContext_Upgrade1 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "has_logo",
table: "files_thirdparty_account",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "has_logo",
table: "files_folder",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "has_logo",
table: "files_thirdparty_account");
migrationBuilder.DropColumn(
name: "has_logo",
table: "files_folder");
}
}
}

View File

@ -1,33 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.Migrations.MySql.Migrations.FilesDb
{
public partial class FilesDbContext_Upgrade2 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<bool>(
name: "private",
table: "files_folder",
type: "tinyint(1)",
nullable: false,
defaultValueSql: "'0'",
oldClrType: typeof(bool),
oldType: "tinyint(1)");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<bool>(
name: "private",
table: "files_folder",
type: "tinyint(1)",
nullable: false,
oldClrType: typeof(bool),
oldType: "tinyint(1)",
oldDefaultValueSql: "'0'");
}
}
}

View File

@ -11,14 +11,15 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace ASC.Migrations.MySql.Migrations.FilesDb
{
[DbContext(typeof(FilesDbContext))]
[Migration("20221229073009_FilesDbContext_Upgrade2")]
partial class FilesDbContext_Upgrade2
[Migration("20230130103904_FilesDbContextMigrate")]
partial class FilesDbContextMigrate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>

View File

@ -0,0 +1,863 @@
// (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 Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace ASC.Migrations.MySql.Migrations.FilesDb;
/// <inheritdoc />
public partial class FilesDbContextMigrate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "files_bunch_objects",
columns: table => new
{
tenantid = table.Column<int>(name: "tenant_id", type: "int", nullable: false),
rightnode = table.Column<string>(name: "right_node", type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
leftnode = table.Column<string>(name: "left_node", type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.rightnode });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_converts",
columns: table => new
{
input = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
output = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.input, x.output });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_file",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false),
version = table.Column<int>(type: "int", nullable: false),
tenantid = table.Column<int>(name: "tenant_id", type: "int", nullable: false),
versiongroup = table.Column<int>(name: "version_group", type: "int", nullable: false, defaultValueSql: "'1'"),
currentversion = table.Column<bool>(name: "current_version", type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
folderid = table.Column<int>(name: "folder_id", type: "int", nullable: false, defaultValueSql: "'0'"),
title = table.Column<string>(type: "varchar(400)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
contentlength = table.Column<long>(name: "content_length", type: "bigint", nullable: false, defaultValueSql: "'0'"),
filestatus = table.Column<int>(name: "file_status", type: "int", nullable: false, defaultValueSql: "'0'"),
category = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
createby = table.Column<string>(name: "create_by", type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
createon = table.Column<DateTime>(name: "create_on", type: "datetime", nullable: false),
modifiedby = table.Column<string>(name: "modified_by", type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
modifiedon = table.Column<DateTime>(name: "modified_on", type: "datetime", nullable: false),
convertedtype = table.Column<string>(name: "converted_type", type: "varchar(10)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
comment = table.Column<string>(type: "varchar(255)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
changes = table.Column<string>(type: "mediumtext", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
encrypted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
forcesave = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
thumb = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.id, x.version });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_folder",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
parentid = table.Column<int>(name: "parent_id", type: "int", nullable: false, defaultValueSql: "'0'"),
title = table.Column<string>(type: "varchar(400)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
foldertype = table.Column<int>(name: "folder_type", type: "int", nullable: false, defaultValueSql: "'0'"),
createby = table.Column<string>(name: "create_by", type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
createon = table.Column<DateTime>(name: "create_on", type: "datetime", nullable: false),
modifiedby = table.Column<string>(name: "modified_by", type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
modifiedon = table.Column<DateTime>(name: "modified_on", type: "datetime", nullable: false),
tenantid = table.Column<int>(name: "tenant_id", type: "int", nullable: false),
foldersCount = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
filesCount = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
@private = table.Column<bool>(name: "private", type: "tinyint(1)", nullable: false, defaultValueSql: "'0'"),
haslogo = table.Column<bool>(name: "has_logo", type: "tinyint(1)", nullable: false, defaultValue: false)
},
constraints: table =>
{
table.PrimaryKey("PK_files_folder", x => x.id);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_folder_tree",
columns: table => new
{
folderid = table.Column<int>(name: "folder_id", type: "int", nullable: false),
parentid = table.Column<int>(name: "parent_id", type: "int", nullable: false),
level = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.parentid, x.folderid });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_link",
columns: table => new
{
tenantid = table.Column<int>(name: "tenant_id", type: "int", nullable: false),
sourceid = table.Column<string>(name: "source_id", type: "varchar(32)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
linkedid = table.Column<string>(name: "linked_id", type: "varchar(32)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
linkedfor = table.Column<string>(name: "linked_for", type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.sourceid, x.linkedid });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_properties",
columns: table => new
{
tenantid = table.Column<int>(name: "tenant_id", type: "int", nullable: false),
entryid = table.Column<string>(name: "entry_id", type: "varchar(32)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
data = table.Column<string>(type: "mediumtext", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.entryid });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "files_security",
columns: table => new
{
tenantid = table.Column<int>(name: "tenant_id", type: "int", nullable: false),
entryid = table.Column<string>(name: "entry_id", type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
entrytype = table.Column<int>(name: "entry_type", type: "int", nullable: false),
subject = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
subjecttype = table.Column<int>(name: "subject_type", type: "int", nullable: false),
owner = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
security = table.Column<int>(type: "int", nullable: false),
timestamp = table.Column<DateTime>(type: "timestamp", nullable: false),
options = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.entryid, x.entrytype, x.subject });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_tag",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
tenantid = table.Column<int>(name: "tenant_id", type: "int", nullable: false),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
owner = table.Column<string>(type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
flag = table.Column<int>(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
{
tenantid = table.Column<int>(name: "tenant_id", type: "int", nullable: false),
tagid = table.Column<int>(name: "tag_id", type: "int", nullable: false),
entrytype = table.Column<int>(name: "entry_type", type: "int", nullable: false),
entryid = table.Column<string>(name: "entry_id", type: "varchar(32)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
createby = table.Column<string>(name: "create_by", type: "char(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
createon = table.Column<DateTime>(name: "create_on", type: "datetime", nullable: true),
tagcount = table.Column<int>(name: "tag_count", type: "int", nullable: false, defaultValueSql: "'0'")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenantid, x.tagid, x.entryid, x.entrytype });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_thirdparty_account",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
provider = table.Column<string>(type: "varchar(50)", nullable: false, defaultValueSql: "'0'", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
customertitle = table.Column<string>(name: "customer_title", type: "varchar(400)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
username = table.Column<string>(name: "user_name", type: "varchar(100)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
password = table.Column<string>(type: "varchar(512)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
token = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
userid = table.Column<string>(name: "user_id", type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
foldertype = table.Column<int>(name: "folder_type", type: "int", nullable: false, defaultValueSql: "'0'"),
roomtype = table.Column<int>(name: "room_type", type: "int", nullable: false),
createon = table.Column<DateTime>(name: "create_on", type: "datetime", nullable: false),
url = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
tenantid = table.Column<int>(name: "tenant_id", type: "int", nullable: false),
folderid = table.Column<string>(name: "folder_id", type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
@private = table.Column<bool>(name: "private", type: "tinyint(1)", nullable: false),
haslogo = table.Column<bool>(name: "has_logo", type: "tinyint(1)", nullable: false, defaultValue: false)
},
constraints: table =>
{
table.PrimaryKey("PK_files_thirdparty_account", x => x.id);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_thirdparty_app",
columns: table => new
{
userid = table.Column<string>(name: "user_id", type: "varchar(38)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
app = table.Column<string>(type: "varchar(50)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
token = table.Column<string>(type: "text", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
tenantid = table.Column<int>(name: "tenant_id", type: "int", nullable: false),
modifiedon = table.Column<DateTime>(name: "modified_on", type: "timestamp", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.userid, x.app });
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "files_thirdparty_id_mapping",
columns: table => new
{
hashid = table.Column<string>(name: "hash_id", type: "char(32)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
tenantid = table.Column<int>(name: "tenant_id", type: "int", nullable: false),
id = table.Column<string>(type: "text", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.hashid);
})
.Annotation("MySql:CharSet", "utf8");
migrationBuilder.CreateTable(
name: "tenants_tenants",
columns: table => new
{
id = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
alias = table.Column<string>(type: "varchar(100)", nullable: false, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
mappeddomain = table.Column<string>(type: "varchar(100)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
version = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'2'"),
versionchanged = table.Column<DateTime>(name: "version_changed", type: "datetime", nullable: true),
language = table.Column<string>(type: "char(10)", nullable: false, defaultValueSql: "'en-US'", collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
timezone = table.Column<string>(type: "varchar(50)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomains = table.Column<string>(type: "varchar(1024)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
trusteddomainsenabled = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'1'"),
status = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
statuschanged = table.Column<DateTime>(type: "datetime", nullable: true),
creationdatetime = table.Column<DateTime>(type: "datetime", nullable: false),
ownerid = table.Column<string>(name: "owner_id", type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
paymentid = table.Column<string>(name: "payment_id", type: "varchar(38)", nullable: true, collation: "utf8_general_ci")
.Annotation("MySql:CharSet", "utf8"),
industry = table.Column<int>(type: "int", nullable: false, defaultValueSql: "'0'"),
lastmodified = table.Column<DateTime>(name: "last_modified", type: "timestamp", nullable: false),
spam = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValueSql: "'1'"),
calls = table.Column<bool>(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_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: "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");
}
/// <inheritdoc />
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_tenants");
}
}

View File

@ -7,7 +7,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ASC.Migrations.MySql.Migrations
namespace ASC.Migrations.MySql.Migrations.FilesDb
{
[DbContext(typeof(FilesDbContext))]
partial class FilesDbContextModelSnapshot : ModelSnapshot
@ -16,7 +16,7 @@ namespace ASC.Migrations.MySql.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>

View File

@ -9,18 +9,19 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace ASC.Migrations.PostgreSql.Migrations
namespace ASC.Migrations.PostgreSql.Migrations.Backups
{
[DbContext(typeof(BackupsContext))]
[Migration("20221019144341_BackupsContextMigrate")]
[Migration("20230130103902_BackupsContextMigrate")]
partial class BackupsContextMigrate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
@ -213,6 +214,11 @@ namespace ASC.Migrations.PostgreSql.Migrations
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
.HasMaxLength(10)
.HasColumnType("int")
.HasColumnName("removed");
b.Property<string>("StorageBasePath")
.ValueGeneratedOnAdd()
.HasMaxLength(255)

View File

@ -4,10 +4,12 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace ASC.Migrations.PostgreSql.Migrations
namespace ASC.Migrations.PostgreSql.Migrations.Backups
{
/// <inheritdoc />
public partial class BackupsContextMigrate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
@ -18,16 +20,17 @@ namespace ASC.Migrations.PostgreSql.Migrations
columns: table => new
{
id = table.Column<Guid>(type: "char", maxLength: 38, nullable: false, collation: "utf8_general_ci"),
tenant_id = table.Column<int>(type: "int", maxLength: 10, nullable: false),
is_scheduled = table.Column<int>(type: "int", maxLength: 10, nullable: false),
tenantid = table.Column<int>(name: "tenant_id", type: "int", maxLength: 10, nullable: false),
isscheduled = table.Column<int>(name: "is_scheduled", type: "int", maxLength: 10, nullable: false),
name = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, collation: "utf8_general_ci"),
hash = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false, collation: "utf8_general_ci"),
storage_type = table.Column<int>(type: "int", maxLength: 10, nullable: false),
storage_base_path = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci"),
storage_path = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, collation: "utf8_general_ci"),
created_on = table.Column<DateTime>(type: "datetime", nullable: false),
expires_on = table.Column<DateTime>(type: "datetime", nullable: false, defaultValueSql: "'0001-01-01 00:00:00'"),
storage_params = table.Column<string>(type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
storagetype = table.Column<int>(name: "storage_type", type: "int", maxLength: 10, nullable: false),
storagebasepath = table.Column<string>(name: "storage_base_path", type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci"),
storagepath = table.Column<string>(name: "storage_path", type: "character varying(255)", maxLength: 255, nullable: false, collation: "utf8_general_ci"),
createdon = table.Column<DateTime>(name: "created_on", type: "datetime", nullable: false),
expireson = table.Column<DateTime>(name: "expires_on", type: "datetime", nullable: false, defaultValueSql: "'0001-01-01 00:00:00'"),
storageparams = table.Column<string>(name: "storage_params", type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci"),
removed = table.Column<int>(type: "int", maxLength: 10, nullable: false)
},
constraints: table =>
{
@ -38,18 +41,18 @@ namespace ASC.Migrations.PostgreSql.Migrations
name: "backup_schedule",
columns: table => new
{
tenant_id = table.Column<int>(type: "integer", maxLength: 10, nullable: false)
tenantid = table.Column<int>(name: "tenant_id", type: "integer", maxLength: 10, nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
cron = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, collation: "utf8_general_ci"),
backups_stored = table.Column<int>(type: "integer", maxLength: 10, nullable: false),
storage_type = table.Column<int>(type: "integer", maxLength: 10, nullable: false),
storage_base_path = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci"),
last_backup_time = table.Column<DateTime>(type: "datetime", nullable: false),
storage_params = table.Column<string>(type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
backupsstored = table.Column<int>(name: "backups_stored", type: "integer", maxLength: 10, nullable: false),
storagetype = table.Column<int>(name: "storage_type", type: "integer", maxLength: 10, nullable: false),
storagebasepath = table.Column<string>(name: "storage_base_path", type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci"),
lastbackuptime = table.Column<DateTime>(name: "last_backup_time", type: "datetime", nullable: false),
storageparams = table.Column<string>(name: "storage_params", type: "text", nullable: true, defaultValueSql: "NULL", collation: "utf8_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => x.tenant_id);
table.PrimaryKey("PRIMARY", x => x.tenantid);
});
migrationBuilder.CreateTable(
@ -63,7 +66,7 @@ namespace ASC.Migrations.PostgreSql.Migrations
alias = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
mappeddomain = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true, defaultValueSql: "NULL"),
version = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "2"),
version_changed = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
versionchanged = table.Column<DateTime>(name: "version_changed", type: "timestamp with time zone", nullable: true),
language = table.Column<string>(type: "character(10)", fixedLength: true, maxLength: 10, nullable: false, defaultValueSql: "'en-US'"),
timezone = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL"),
trusteddomains = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"),
@ -71,10 +74,10 @@ namespace ASC.Migrations.PostgreSql.Migrations
status = table.Column<int>(type: "integer", nullable: false),
statuschanged = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
creationdatetime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
owner_id = table.Column<Guid>(type: "uuid", maxLength: 38, nullable: true, defaultValueSql: "NULL"),
payment_id = table.Column<string>(type: "character varying(38)", maxLength: 38, nullable: true, defaultValueSql: "NULL"),
ownerid = table.Column<Guid>(name: "owner_id", type: "uuid", maxLength: 38, nullable: true, defaultValueSql: "NULL"),
paymentid = table.Column<string>(name: "payment_id", type: "character varying(38)", maxLength: 38, nullable: true, defaultValueSql: "NULL"),
industry = table.Column<int>(type: "integer", nullable: false),
last_modified = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
lastmodified = table.Column<DateTime>(name: "last_modified", type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
spam = table.Column<bool>(type: "boolean", nullable: false, defaultValueSql: "true"),
calls = table.Column<bool>(type: "boolean", nullable: false, defaultValueSql: "true")
},
@ -130,6 +133,7 @@ namespace ASC.Migrations.PostgreSql.Migrations
column: "version");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(

View File

@ -8,7 +8,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace ASC.Migrations.PostgreSql.Migrations
namespace ASC.Migrations.PostgreSql.Migrations.Backups
{
[DbContext(typeof(BackupsContext))]
partial class BackupsContextModelSnapshot : ModelSnapshot
@ -18,7 +18,7 @@ namespace ASC.Migrations.PostgreSql.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>
@ -211,6 +211,11 @@ namespace ASC.Migrations.PostgreSql.Migrations
.UseCollation("utf8_general_ci")
.HasAnnotation("MySql:CharSet", "utf8");
b.Property<int>("Removed")
.HasMaxLength(10)
.HasColumnType("int")
.HasColumnName("removed");
b.Property<string>("StorageBasePath")
.ValueGeneratedOnAdd()
.HasMaxLength(255)

View File

@ -9,18 +9,19 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace ASC.Migrations.PostgreSql.Migrations
namespace ASC.Migrations.PostgreSql.Migrations.CoreDb
{
[DbContext(typeof(CoreDbContext))]
[Migration("20221019144348_CoreDbContextMigrate")]
[Migration("20230130103905_CoreDbContextMigrate")]
partial class CoreDbContextMigrate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b =>
@ -67,7 +68,7 @@ namespace ASC.Migrations.PostgreSql.Migrations
new
{
Tenant = -1,
Features = "trial,audit,ldap,sso,whitelabel,restore,thirdparty,audit,total_size:107374182400,file_size:100,manager:1",
Features = "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1",
Name = "trial",
Price = 0m,
Visible = false
@ -75,7 +76,7 @@ namespace ASC.Migrations.PostgreSql.Migrations
new
{
Tenant = -2,
Features = "audit,ldap,sso,whitelabel,restore,thirdparty,audit,total_size:107374182400,file_size:1024,manager:1",
Features = "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1",
Name = "admin",
Price = 30m,
ProductId = "1002",

View File

@ -30,10 +30,12 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace ASC.Migrations.PostgreSql.Migrations;
namespace ASC.Migrations.PostgreSql.Migrations.CoreDb;
/// <inheritdoc />
public partial class CoreDbContextMigrate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
@ -49,7 +51,7 @@ public partial class CoreDbContextMigrate : Migration
description = table.Column<string>(type: "character varying", nullable: true),
features = table.Column<string>(type: "text", nullable: true),
price = table.Column<decimal>(type: "numeric(10,2)", nullable: false, defaultValueSql: "0.00"),
product_id = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: true, defaultValueSql: "NULL"),
productid = table.Column<string>(name: "product_id", type: "character varying(128)", maxLength: 128, nullable: true, defaultValueSql: "NULL"),
visible = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
@ -66,8 +68,8 @@ public partial class CoreDbContextMigrate : Migration
path = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
counter = table.Column<long>(type: "bigint", nullable: false, defaultValueSql: "'0'"),
tag = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "'0'"),
last_modified = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
user_id = table.Column<Guid>(type: "uuid", maxLength: 36, nullable: false, defaultValueSql: "NULL")
lastmodified = table.Column<DateTime>(name: "last_modified", type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
userid = table.Column<Guid>(name: "user_id", type: "uuid", maxLength: 36, nullable: false, defaultValueSql: "NULL")
},
constraints: table =>
{
@ -83,9 +85,9 @@ public partial class CoreDbContextMigrate : Migration
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
tenant = table.Column<int>(type: "integer", nullable: false),
stamp = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
customer_id = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false, defaultValueSql: "NULL"),
customerid = table.Column<string>(name: "customer_id", type: "character varying(255)", maxLength: 255, nullable: false, defaultValueSql: "NULL"),
comment = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL"),
create_on = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP")
createon = table.Column<DateTime>(name: "create_on", type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP")
},
constraints: table =>
{
@ -97,14 +99,14 @@ public partial class CoreDbContextMigrate : Migration
schema: "onlyoffice",
columns: table => new
{
tariff_id = table.Column<int>(type: "int", nullable: false),
tariffid = table.Column<int>(name: "tariff_id", type: "int", nullable: false),
quota = table.Column<int>(type: "int", nullable: false),
tenant = table.Column<int>(type: "int", nullable: false),
quantity = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PRIMARY", x => new { x.tenant, x.tariff_id, x.quota });
table.PrimaryKey("PRIMARY", x => new { x.tenant, x.tariffid, x.quota });
});
migrationBuilder.InsertData(
@ -117,13 +119,13 @@ public partial class CoreDbContextMigrate : Migration
schema: "onlyoffice",
table: "tenants_quota",
columns: new[] { "tenant", "description", "features", "name", "price", "product_id", "visible" },
values: new object[] { -2, null, "audit,ldap,sso,whitelabel,restore,thirdparty,audit,total_size:107374182400,file_size:1024,manager:1", "admin", 30m, "1002", true });
values: new object[] { -2, null, "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1", "admin", 30m, "1002", true });
migrationBuilder.InsertData(
schema: "onlyoffice",
table: "tenants_quota",
columns: new[] { "tenant", "description", "features", "name", "visible" },
values: new object[] { -1, null, "trial,audit,ldap,sso,whitelabel,restore,thirdparty,audit,total_size:107374182400,file_size:100,manager:1", "trial", false });
values: new object[] { -1, null, "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1", "trial", false });
migrationBuilder.CreateIndex(
name: "last_modified_tenants_quotarow",
@ -138,6 +140,7 @@ public partial class CoreDbContextMigrate : Migration
column: "tenant");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(

View File

@ -8,7 +8,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace ASC.Migrations.PostgreSql.Migrations
namespace ASC.Migrations.PostgreSql.Migrations.CoreDb
{
[DbContext(typeof(CoreDbContext))]
partial class CoreDbContextModelSnapshot : ModelSnapshot
@ -18,7 +18,7 @@ namespace ASC.Migrations.PostgreSql.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("ASC.Core.Common.EF.DbQuota", b =>
@ -65,7 +65,7 @@ namespace ASC.Migrations.PostgreSql.Migrations
new
{
Tenant = -1,
Features = "trial,audit,ldap,sso,whitelabel,restore,thirdparty,audit,total_size:107374182400,file_size:100,manager:1",
Features = "trial,audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:100,manager:1",
Name = "trial",
Price = 0m,
Visible = false
@ -73,7 +73,7 @@ namespace ASC.Migrations.PostgreSql.Migrations
new
{
Tenant = -2,
Features = "audit,ldap,sso,whitelabel,restore,thirdparty,audit,total_size:107374182400,file_size:1024,manager:1",
Features = "audit,ldap,sso,whitelabel,thirdparty,restore,total_size:107374182400,file_size:1024,manager:1",
Name = "admin",
Price = 30m,
ProductId = "1002",

View File

@ -1,820 +0,0 @@
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<int>(type: "integer", nullable: false),
right_node = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
left_node = table.Column<string>(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<string>(type: "character varying(50)", maxLength: 50, nullable: false),
output = table.Column<string>(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<int>(type: "integer", nullable: false),
version = table.Column<int>(type: "integer", nullable: false),
tenant_id = table.Column<int>(type: "integer", nullable: false),
version_group = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "1"),
current_version = table.Column<bool>(type: "boolean", nullable: false),
folder_id = table.Column<int>(type: "integer", nullable: false),
title = table.Column<string>(type: "character varying(400)", maxLength: 400, nullable: false),
content_length = table.Column<long>(type: "bigint", nullable: false, defaultValueSql: "'0'::bigint"),
file_status = table.Column<int>(type: "integer", nullable: false),
category = table.Column<int>(type: "integer", nullable: false),
create_by = table.Column<Guid>(type: "uuid", fixedLength: true, maxLength: 38, nullable: false),
create_on = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
modified_by = table.Column<Guid>(type: "uuid", fixedLength: true, maxLength: 38, nullable: false),
modified_on = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
converted_type = table.Column<string>(type: "character varying(10)", maxLength: 10, nullable: true, defaultValueSql: "NULL::character varying"),
comment = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL::character varying"),
changes = table.Column<string>(type: "text", nullable: true),
encrypted = table.Column<bool>(type: "boolean", nullable: false),
forcesave = table.Column<int>(type: "integer", nullable: false),
thumb = table.Column<int>(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<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
parent_id = table.Column<int>(type: "integer", nullable: false),
title = table.Column<string>(type: "character varying(400)", maxLength: 400, nullable: false),
folder_type = table.Column<int>(type: "integer", nullable: false),
create_by = table.Column<Guid>(type: "uuid", fixedLength: true, maxLength: 38, nullable: false),
create_on = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
modified_by = table.Column<Guid>(type: "uuid", fixedLength: true, maxLength: 38, nullable: false),
modified_on = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
tenant_id = table.Column<int>(type: "integer", nullable: false),
foldersCount = table.Column<int>(type: "integer", nullable: false),
filesCount = table.Column<int>(type: "integer", nullable: false),
@private = table.Column<bool>(name: "private", type: "boolean", 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<int>(type: "integer", nullable: false),
parent_id = table.Column<int>(type: "integer", nullable: false),
level = table.Column<int>(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<int>(type: "integer", nullable: false),
source_id = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false),
linked_id = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false),
linked_for = table.Column<Guid>(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<int>(type: "integer", nullable: false),
entry_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
data = table.Column<string>(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<int>(type: "integer", nullable: false),
entry_id = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
entry_type = table.Column<int>(type: "integer", nullable: false),
subject = table.Column<Guid>(type: "uuid", fixedLength: true, maxLength: 38, nullable: false),
subject_type = table.Column<int>(type: "integer", nullable: false),
owner = table.Column<Guid>(type: "uuid", fixedLength: true, maxLength: 38, nullable: false),
security = table.Column<int>(type: "integer", nullable: false),
timestamp = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
options = table.Column<string>(type: "text", nullable: true)
},
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<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
tenant_id = table.Column<int>(type: "integer", nullable: false),
name = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
owner = table.Column<Guid>(type: "uuid", maxLength: 38, nullable: false),
flag = table.Column<int>(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<int>(type: "integer", nullable: false),
tag_id = table.Column<int>(type: "integer", nullable: false),
entry_type = table.Column<int>(type: "integer", nullable: false),
entry_id = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false),
create_by = table.Column<Guid>(type: "uuid", fixedLength: true, maxLength: 38, nullable: true, defaultValueSql: "NULL::bpchar"),
create_on = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
tag_count = table.Column<int>(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<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
provider = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, defaultValueSql: "'0'::character varying"),
customer_title = table.Column<string>(type: "character varying(400)", maxLength: 400, nullable: false),
user_name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
password = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
token = table.Column<string>(type: "text", nullable: true),
user_id = table.Column<Guid>(type: "uuid", maxLength: 38, nullable: false),
folder_type = table.Column<int>(type: "integer", nullable: false),
room_type = table.Column<int>(type: "integer", nullable: false),
create_on = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
url = table.Column<string>(type: "text", nullable: true),
tenant_id = table.Column<int>(type: "integer", nullable: false),
folder_id = table.Column<string>(type: "text", nullable: true),
@private = table.Column<bool>(name: "private", type: "boolean", nullable: false)
},
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<Guid>(type: "uuid", maxLength: 38, nullable: false),
app = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
token = table.Column<string>(type: "text", nullable: true),
tenant_id = table.Column<int>(type: "integer", nullable: false),
modified_on = table.Column<DateTime>(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<string>(type: "character(32)", fixedLength: true, maxLength: 32, nullable: false),
tenant_id = table.Column<int>(type: "integer", nullable: false),
id = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("files_thirdparty_id_mapping_pkey", x => x.hash_id);
});
migrationBuilder.CreateTable(
name: "tenants_tenants",
schema: "onlyoffice",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
name = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
alias = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
mappeddomain = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true, defaultValueSql: "NULL"),
version = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "2"),
version_changed = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
language = table.Column<string>(type: "character(10)", fixedLength: true, maxLength: 10, nullable: false, defaultValueSql: "'en-US'"),
timezone = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL"),
trusteddomains = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"),
trusteddomainsenabled = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "1"),
status = table.Column<int>(type: "integer", nullable: false),
statuschanged = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
creationdatetime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
owner_id = table.Column<Guid>(type: "uuid", maxLength: 38, nullable: true, defaultValueSql: "NULL"),
payment_id = table.Column<string>(type: "character varying(38)", maxLength: 38, nullable: true, defaultValueSql: "NULL"),
industry = table.Column<int>(type: "integer", nullable: false),
last_modified = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
spam = table.Column<bool>(type: "boolean", nullable: false, defaultValueSql: "true"),
calls = table.Column<bool>(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_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: "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_tenants",
schema: "onlyoffice");
}
}
}

View File

@ -1,41 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ASC.Migrations.PostgreSql.Migrations.FilesDb
{
public partial class FilesDbContext_Upgrade1 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "has_logo",
schema: "onlyoffice",
table: "files_thirdparty_account",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "has_logo",
schema: "onlyoffice",
table: "files_folder",
type: "boolean",
nullable: false,
defaultValue: false);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "has_logo",
schema: "onlyoffice",
table: "files_thirdparty_account");
migrationBuilder.DropColumn(
name: "has_logo",
schema: "onlyoffice",
table: "files_folder");
}
}
}

View File

@ -12,15 +12,16 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace ASC.Migrations.PostgreSql.Migrations.FilesDb
{
[DbContext(typeof(FilesDbContext))]
[Migration("20221215125741_FilesDbContext_Upgrade1")]
partial class FilesDbContext_Upgrade1
[Migration("20230130103904_FilesDbContextMigrate")]
partial class FilesDbContextMigrate
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>

View File

@ -0,0 +1,852 @@
// (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 Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace ASC.Migrations.PostgreSql.Migrations.FilesDb;
/// <inheritdoc />
public partial class FilesDbContextMigrate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
name: "onlyoffice");
migrationBuilder.CreateTable(
name: "files_bunch_objects",
schema: "onlyoffice",
columns: table => new
{
tenantid = table.Column<int>(name: "tenant_id", type: "integer", nullable: false),
rightnode = table.Column<string>(name: "right_node", type: "character varying(255)", maxLength: 255, nullable: false),
leftnode = table.Column<string>(name: "left_node", type: "character varying(255)", maxLength: 255, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("files_bunch_objects_pkey", x => new { x.tenantid, x.rightnode });
});
migrationBuilder.CreateTable(
name: "files_converts",
schema: "onlyoffice",
columns: table => new
{
input = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
output = table.Column<string>(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<int>(type: "integer", nullable: false),
version = table.Column<int>(type: "integer", nullable: false),
tenantid = table.Column<int>(name: "tenant_id", type: "integer", nullable: false),
versiongroup = table.Column<int>(name: "version_group", type: "integer", nullable: false, defaultValueSql: "1"),
currentversion = table.Column<bool>(name: "current_version", type: "boolean", nullable: false),
folderid = table.Column<int>(name: "folder_id", type: "integer", nullable: false),
title = table.Column<string>(type: "character varying(400)", maxLength: 400, nullable: false),
contentlength = table.Column<long>(name: "content_length", type: "bigint", nullable: false, defaultValueSql: "'0'::bigint"),
filestatus = table.Column<int>(name: "file_status", type: "integer", nullable: false),
category = table.Column<int>(type: "integer", nullable: false),
createby = table.Column<Guid>(name: "create_by", type: "uuid", fixedLength: true, maxLength: 38, nullable: false),
createon = table.Column<DateTime>(name: "create_on", type: "timestamp with time zone", nullable: false),
modifiedby = table.Column<Guid>(name: "modified_by", type: "uuid", fixedLength: true, maxLength: 38, nullable: false),
modifiedon = table.Column<DateTime>(name: "modified_on", type: "timestamp with time zone", nullable: false),
convertedtype = table.Column<string>(name: "converted_type", type: "character varying(10)", maxLength: 10, nullable: true, defaultValueSql: "NULL::character varying"),
comment = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: true, defaultValueSql: "NULL::character varying"),
changes = table.Column<string>(type: "text", nullable: true),
encrypted = table.Column<bool>(type: "boolean", nullable: false),
forcesave = table.Column<int>(type: "integer", nullable: false),
thumb = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("files_file_pkey", x => new { x.id, x.tenantid, x.version });
});
migrationBuilder.CreateTable(
name: "files_folder",
schema: "onlyoffice",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
parentid = table.Column<int>(name: "parent_id", type: "integer", nullable: false),
title = table.Column<string>(type: "character varying(400)", maxLength: 400, nullable: false),
foldertype = table.Column<int>(name: "folder_type", type: "integer", nullable: false),
createby = table.Column<Guid>(name: "create_by", type: "uuid", fixedLength: true, maxLength: 38, nullable: false),
createon = table.Column<DateTime>(name: "create_on", type: "timestamp with time zone", nullable: false),
modifiedby = table.Column<Guid>(name: "modified_by", type: "uuid", fixedLength: true, maxLength: 38, nullable: false),
modifiedon = table.Column<DateTime>(name: "modified_on", type: "timestamp with time zone", nullable: false),
tenantid = table.Column<int>(name: "tenant_id", type: "integer", nullable: false),
foldersCount = table.Column<int>(type: "integer", nullable: false),
filesCount = table.Column<int>(type: "integer", nullable: false),
@private = table.Column<bool>(name: "private", type: "boolean", nullable: false),
haslogo = table.Column<bool>(name: "has_logo", type: "boolean", nullable: false, defaultValue: false)
},
constraints: table =>
{
table.PrimaryKey("PK_files_folder", x => x.id);
});
migrationBuilder.CreateTable(
name: "files_folder_tree",
schema: "onlyoffice",
columns: table => new
{
folderid = table.Column<int>(name: "folder_id", type: "integer", nullable: false),
parentid = table.Column<int>(name: "parent_id", type: "integer", nullable: false),
level = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("files_folder_tree_pkey", x => new { x.parentid, x.folderid });
});
migrationBuilder.CreateTable(
name: "files_link",
schema: "onlyoffice",
columns: table => new
{
tenantid = table.Column<int>(name: "tenant_id", type: "integer", nullable: false),
sourceid = table.Column<string>(name: "source_id", type: "character varying(32)", maxLength: 32, nullable: false),
linkedid = table.Column<string>(name: "linked_id", type: "character varying(32)", maxLength: 32, nullable: false),
linkedfor = table.Column<Guid>(name: "linked_for", type: "uuid", fixedLength: true, maxLength: 38, nullable: false, defaultValueSql: "NULL::bpchar")
},
constraints: table =>
{
table.PrimaryKey("files_link_pkey", x => new { x.tenantid, x.sourceid, x.linkedid });
});
migrationBuilder.CreateTable(
name: "files_properties",
schema: "onlyoffice",
columns: table => new
{
tenantid = table.Column<int>(name: "tenant_id", type: "integer", nullable: false),
entryid = table.Column<string>(name: "entry_id", type: "character varying(50)", maxLength: 50, nullable: false),
data = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("files_properties_pkey", x => new { x.tenantid, x.entryid });
});
migrationBuilder.CreateTable(
name: "files_security",
schema: "onlyoffice",
columns: table => new
{
tenantid = table.Column<int>(name: "tenant_id", type: "integer", nullable: false),
entryid = table.Column<string>(name: "entry_id", type: "character varying(50)", maxLength: 50, nullable: false),
entrytype = table.Column<int>(name: "entry_type", type: "integer", nullable: false),
subject = table.Column<Guid>(type: "uuid", fixedLength: true, maxLength: 38, nullable: false),
subjecttype = table.Column<int>(name: "subject_type", type: "integer", nullable: false),
owner = table.Column<Guid>(type: "uuid", fixedLength: true, maxLength: 38, nullable: false),
security = table.Column<int>(type: "integer", nullable: false),
timestamp = table.Column<DateTime>(type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
options = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("files_security_pkey", x => new { x.tenantid, x.entryid, x.entrytype, x.subject });
});
migrationBuilder.CreateTable(
name: "files_tag",
schema: "onlyoffice",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
tenantid = table.Column<int>(name: "tenant_id", type: "integer", nullable: false),
name = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
owner = table.Column<Guid>(type: "uuid", maxLength: 38, nullable: false),
flag = table.Column<int>(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
{
tenantid = table.Column<int>(name: "tenant_id", type: "integer", nullable: false),
tagid = table.Column<int>(name: "tag_id", type: "integer", nullable: false),
entrytype = table.Column<int>(name: "entry_type", type: "integer", nullable: false),
entryid = table.Column<string>(name: "entry_id", type: "character varying(32)", maxLength: 32, nullable: false),
createby = table.Column<Guid>(name: "create_by", type: "uuid", fixedLength: true, maxLength: 38, nullable: true, defaultValueSql: "NULL::bpchar"),
createon = table.Column<DateTime>(name: "create_on", type: "timestamp with time zone", nullable: true),
tagcount = table.Column<int>(name: "tag_count", type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("files_tag_link_pkey", x => new { x.tenantid, x.tagid, x.entrytype, x.entryid });
});
migrationBuilder.CreateTable(
name: "files_thirdparty_account",
schema: "onlyoffice",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
provider = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, defaultValueSql: "'0'::character varying"),
customertitle = table.Column<string>(name: "customer_title", type: "character varying(400)", maxLength: 400, nullable: false),
username = table.Column<string>(name: "user_name", type: "character varying(100)", maxLength: 100, nullable: false),
password = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
token = table.Column<string>(type: "text", nullable: true),
userid = table.Column<Guid>(name: "user_id", type: "uuid", maxLength: 38, nullable: false),
foldertype = table.Column<int>(name: "folder_type", type: "integer", nullable: false),
roomtype = table.Column<int>(name: "room_type", type: "integer", nullable: false),
createon = table.Column<DateTime>(name: "create_on", type: "timestamp with time zone", nullable: false),
url = table.Column<string>(type: "text", nullable: true),
tenantid = table.Column<int>(name: "tenant_id", type: "integer", nullable: false),
folderid = table.Column<string>(name: "folder_id", type: "text", nullable: true),
@private = table.Column<bool>(name: "private", type: "boolean", nullable: false),
haslogo = table.Column<bool>(name: "has_logo", type: "boolean", nullable: false, defaultValue: false)
},
constraints: table =>
{
table.PrimaryKey("PK_files_thirdparty_account", x => x.id);
});
migrationBuilder.CreateTable(
name: "files_thirdparty_app",
schema: "onlyoffice",
columns: table => new
{
userid = table.Column<Guid>(name: "user_id", type: "uuid", maxLength: 38, nullable: false),
app = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false),
token = table.Column<string>(type: "text", nullable: true),
tenantid = table.Column<int>(name: "tenant_id", type: "integer", nullable: false),
modifiedon = table.Column<DateTime>(name: "modified_on", type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP")
},
constraints: table =>
{
table.PrimaryKey("files_thirdparty_app_pkey", x => new { x.userid, x.app });
});
migrationBuilder.CreateTable(
name: "files_thirdparty_id_mapping",
schema: "onlyoffice",
columns: table => new
{
hashid = table.Column<string>(name: "hash_id", type: "character(32)", fixedLength: true, maxLength: 32, nullable: false),
tenantid = table.Column<int>(name: "tenant_id", type: "integer", nullable: false),
id = table.Column<string>(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("files_thirdparty_id_mapping_pkey", x => x.hashid);
});
migrationBuilder.CreateTable(
name: "tenants_tenants",
schema: "onlyoffice",
columns: table => new
{
id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
name = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
alias = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false),
mappeddomain = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true, defaultValueSql: "NULL"),
version = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "2"),
versionchanged = table.Column<DateTime>(name: "version_changed", type: "timestamp with time zone", nullable: true),
language = table.Column<string>(type: "character(10)", fixedLength: true, maxLength: 10, nullable: false, defaultValueSql: "'en-US'"),
timezone = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: true, defaultValueSql: "NULL"),
trusteddomains = table.Column<string>(type: "character varying(1024)", maxLength: 1024, nullable: true, defaultValueSql: "NULL"),
trusteddomainsenabled = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "1"),
status = table.Column<int>(type: "integer", nullable: false),
statuschanged = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
creationdatetime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
ownerid = table.Column<Guid>(name: "owner_id", type: "uuid", maxLength: 38, nullable: true, defaultValueSql: "NULL"),
paymentid = table.Column<string>(name: "payment_id", type: "character varying(38)", maxLength: 38, nullable: true, defaultValueSql: "NULL"),
industry = table.Column<int>(type: "integer", nullable: false),
lastmodified = table.Column<DateTime>(name: "last_modified", type: "timestamp with time zone", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"),
spam = table.Column<bool>(type: "boolean", nullable: false, defaultValueSql: "true"),
calls = table.Column<bool>(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_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: "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");
}
/// <inheritdoc />
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_tenants",
schema: "onlyoffice");
}
}

View File

@ -8,7 +8,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace ASC.Migrations.PostgreSql.Migrations
namespace ASC.Migrations.PostgreSql.Migrations.FilesDb
{
[DbContext(typeof(FilesDbContext))]
partial class FilesDbContextModelSnapshot : ModelSnapshot
@ -18,7 +18,7 @@ namespace ASC.Migrations.PostgreSql.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
.HasAnnotation("ProductVersion", "6.0.7")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("ASC.Core.Common.EF.Model.DbTenant", b =>

View File

@ -71,6 +71,7 @@
"html-webpack-plugin": "5.3.2",
"json-loader": "^0.5.7",
"playwright": "^1.18.1",
"prebuild-webpack-plugin": "^1.1.1",
"sass": "^1.39.2",
"sass-loader": "^12.1.0",
"serve": "14.1.1",

View File

@ -11,12 +11,8 @@
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link
id="favicon"
rel="shortcut icon"
sizes="any"
href="<%=htmlWebpackPlugin.files.favicon%>"
/>
<link id="favicon" rel="shortcut icon" sizes="any" href="favicon.ico" />
<link id="favicon-icon" rel="icon" href="favicon.ico" />
<link rel="manifest" href="/manifest.json" />
<!-- Tell the browser it's a PWA -->
@ -41,11 +37,8 @@
content="app-id=com.onlyoffice.documents"
/>
<link rel="apple-touch-icon" href="<%=htmlWebpackPlugin.files.favicon%>" />
<link
rel="android-touch-icon"
href="<%=htmlWebpackPlugin.files.favicon%>"
/>
<link rel="apple-touch-icon" href="favicon.ico" />
<link rel="android-touch-icon" href="favicon.ico" />
<!-- <%= htmlWebpackPlugin.options.custom %> -->

View File

@ -73,6 +73,7 @@
"DeleteTheme": "Delete theme",
"DeleteThemeForever": "Delete theme forever?",
"DeleteThemeNotice": "The theme will be deleted permanently. You will not be able to undo this action.",
"DeveloperTools": "Developer",
"Disabled": "Disabled",
"DownloadCopy": "Download the copy",
"DownloadReportBtnText": "Download report",
@ -121,16 +122,16 @@
"NewColorScheme": "New color scheme",
"PasswordMinLenght": "Minimal password length",
"Path": "Path",
"Payments": "Plans & payments",
"Payments": "Payments",
"PleaseNote": "Please note",
"PleaseNoteDescription": "<0>{{pleaseNote}}</0>: your old space address will become available to new users once you click the <2>{{save}}</2> button.",
"Plugins": "Plugins",
"PortalAccess": "Space access",
"PortalAccess": "Portal access",
"PortalAccessSubTitle": "This section allows you to provide users with safe and convenient ways to access the space.",
"PortalDeactivation": "Deactivate DocSpace",
"PortalDeactivationDescription": "Use this option to deactivate your space temporarily.",
"PortalDeactivationHelper": "If you wish to deactivate this DocSpace, your space and all information associated with it will be blocked so that no one has access to it for a particular period. To do that, click the Deactivate button. A link to confirm the operation will be sent to the email address of the space owner.\nIn case you want to come back to the space and continue using it, you will need to use the second link provided in the confirmation email. So, please, keep this email in a safe place.",
"PortalDeletion": "Space Deletion",
"PortalDeletion": "Portal Deletion",
"PortalDeletionDescription": "Use this option to delete your space permanently.",
"PortalDeletionEmailSended": "A link to confirm the operation has been sent to {{ownerEmail}} (the email address of the space owner).",
"PortalDeletionHelper": "If you do not think you will use the space and would like to delete your space permanently, submit your request using the Delete button. Please, keep in mind that you will not be able to reactivate your space or recover any information associated with it.",

View File

@ -6,7 +6,7 @@
"ArchiveEmptyScreen": "Вы можете заархивировать комнаты, которые не используете, и в любой момент восстановить их в своем DocSpace или удалить навсегда. Эти комнаты появятся здесь.",
"ArchiveEmptyScreenHeader": "Здесь пока нет заархивированных комнат",
"ArchiveEmptyScreenUser": "Здесь появятся комнаты, которые были заархивированы.",
"Archived": "Архивировано",
"Archived": "Архивировать",
"ArchivedRoomAction": "Комната '{{name}}' заархивирована",
"ArchivedRoomsAction": "Номера в архиве",
"Archives": "Архивы",

View File

@ -73,6 +73,7 @@
"DeleteTheme": "Удалить тему",
"DeleteThemeForever": "Удалить тему навсегда?",
"DeleteThemeNotice": "Тема будет удалена навсегда. Вы не сможете отменить это действие.",
"DeveloperTools": "Разработчик",
"Disabled": "Отключено",
"DownloadCopy": "Скачать копию",
"DownloadReportBtn": "Скачать и открыть отчет",
@ -120,7 +121,7 @@
"NewColorScheme": "Новая цветовая схема",
"PasswordMinLenght": "Минимальная длина пароля",
"Path": "Путь",
"Payments": "Планы и Платежи",
"Payments": "Платежи",
"PleaseNote": "Пожалуйста, обратите внимание",
"PleaseNoteDescription": "<0>{{pleaseNote}}</0>: ваш старый адрес портала станет доступен для новых пользователей, как только вы нажмете кнопку <2>{{save}}</2>.",
"Plugins": "Плагины",

View File

@ -11,19 +11,26 @@ export default function withContent(WrappedContent) {
const {
item,
selectGroup,
fetchProfile,
history,
checked,
selectUser,
deselectUser,
setBufferSelection,
theme,
getModel,
} = props;
const { userName, mobilePhone, email, role, displayName, avatar } = item;
const onContentRowSelect = (checked, user) =>
const { mobilePhone, email, role, displayName, avatar } = item;
const onContentRowSelect = (checked, user) => {
checked ? selectUser(user) : deselectUser(user);
};
const onContentRowClick = (checked, user, addToSelection = true) => {
checked
? setBufferSelection(user, addToSelection)
: setBufferSelection(null);
};
const checkedProps = { checked };
@ -88,35 +95,6 @@ export default function withContent(WrappedContent) {
const groups = getFormattedGroups();
/*const redirectToProfile = () => {
history.push(
combineUrl(
window.DocSpaceConfig?.proxy?.url,
config.homepage,
`/accounts/view/${userName}`
)
);
};*/
/*const onUserNameClick = useCallback(
(e) => {
const timer = setTimeout(() => redirectToProfile(), 500);
e.preventDefault();
fetchProfile(userName).finally(() => {
clearTimeout(timer);
if (
combineUrl(
window.DocSpaceConfig?.proxy?.url,
config.homepage,
`/accounts/view/${userName}`
) !== window.location.pathname
)
redirectToProfile();
});
},
[history, userName]
);*/
const onPhoneClick = () => window.open(`sms:${mobilePhone}`);
const onEmailClick = () => window.open(`mailto:${email}`);
@ -137,9 +115,9 @@ export default function withContent(WrappedContent) {
return (
<WrappedContent
onContentRowSelect={onContentRowSelect}
onContentRowClick={onContentRowClick}
onPhoneClick={onPhoneClick}
onEmailClick={onEmailClick}
//onUserNameClick={onUserNameClick}
groups={groups}
checkedProps={checkedProps}
element={element}

View File

@ -171,12 +171,9 @@ const Shell = ({ items = [], page = "home", ...rest }) => {
if (!whiteLabelLogoUrls) return;
const favicon = getLogoFromPath(whiteLabelLogoUrls[2]?.path?.light);
let link = document.querySelector("link[rel~='icon']");
if (!link) {
link = document.createElement("link");
link.rel = "icon";
document.getElementsByTagName("head")[0].appendChild(link);
}
if (!favicon) return;
const link = document.querySelector("#favicon-icon");
link.href = favicon;
const shortcutIconLink = document.querySelector("#favicon");

View File

@ -23,6 +23,7 @@ import {
CreateRoomDialog,
InviteUsersWarningDialog,
CreateRoomConfirmDialog,
ChangeUserTypeDialog,
} from "../dialogs";
import ConvertPasswordDialog from "../dialogs/ConvertPasswordDialog";
import ArchiveDialog from "../dialogs/ArchiveDialog";
@ -58,6 +59,7 @@ const Panels = (props) => {
archiveDialogVisible,
inviteUsersWarningDialogVisible,
preparationPortalDialogVisible,
changeUserTypeDialogVisible,
} = props;
const { t } = useTranslation(["Translations", "Common"]);
@ -98,6 +100,9 @@ const Panels = (props) => {
<ConflictResolveDialog key="conflict-resolve-dialog" />
),
convertDialogVisible && <ConvertDialog key="convert-dialog" />,
changeUserTypeDialogVisible && (
<ChangeUserTypeDialog key="change-user-type-dialog" />
),
createRoomDialogVisible && <CreateRoomDialog key="create-room-dialog" />,
(createRoomConfirmDialogVisible || confirmDialogIsLoading) && (
<CreateRoomConfirmDialog key="create-room-confirm-dialog" />
@ -168,6 +173,7 @@ export default inject(
setSelectFileDialogVisible,
invitePanelOptions,
inviteUsersWarningDialogVisible,
changeUserTypeDialogVisible,
} = dialogsStore;
const { preparationPortalDialogVisible } = backup;
@ -206,6 +212,7 @@ export default inject(
archiveDialogVisible,
inviteUsersWarningDialogVisible,
confirmDialogIsLoading,
changeUserTypeDialogVisible,
};
}
)(observer(Panels));

View File

@ -0,0 +1,106 @@
import React, { useState, useEffect } from "react";
import { inject, observer } from "mobx-react";
import { useTranslation } from "react-i18next";
import { ChangeUserTypeDialog } from "../dialogs";
import toastr from "@docspace/components/toast/toastr";
const ChangeUserTypeEvent = ({
setVisible,
visible,
peopleDialogData,
peopleFilter,
updateUserType,
getUsersList,
}) => {
const {
toType,
fromType,
userIDs,
successCallback,
abortCallback,
} = peopleDialogData;
const { t } = useTranslation(["ChangeUserTypeDialog", "Common"]);
useEffect(() => {
if (!peopleDialogData.toType) return;
setVisible(true);
return () => {
setVisible(false);
};
}, [peopleDialogData.toType]);
const onChangeUserType = () => {
onClose();
updateUserType(toType, userIDs, peopleFilter, fromType)
.then(() => {
toastr.success(t("SuccessChangeUserType"));
successCallback && successCallback();
})
.catch((err) => {
abortCallback && abortCallback();
toastr.error(err);
});
};
const onClose = () => {
setVisible(false);
};
const onCloseAction = async () => {
await getUsersList(peopleFilter);
abortCallback && abortCallback();
onClose();
};
const getType = (type) => {
switch (type) {
case "admin":
return t("Common:DocSpaceAdmin");
case "manager":
return t("Common:RoomAdmin");
case "user":
default:
return t("Common:User");
}
};
const firstType =
fromType?.length === 1 && fromType[0] ? getType(fromType[0]) : null;
const secondType = getType(toType);
return (
<ChangeUserTypeDialog
visible={visible}
firstType={firstType}
secondType={secondType}
onCloseAction={onCloseAction}
onChangeUserType={onChangeUserType}
/>
);
};
export default inject(({ dialogsStore, peopleStore }) => {
const {
changeUserTypeDialogVisible: visible,
setChangeUserTypeDialogVisible: setVisible,
} = dialogsStore;
const { dialogStore, filterStore, usersStore } = peopleStore;
const { data: peopleDialogData } = dialogStore;
const { filter: peopleFilter } = filterStore;
const { updateUserType, getUsersList } = usersStore;
return {
visible,
setVisible,
peopleDialogData,
peopleFilter,
updateUserType,
getUsersList,
};
})(observer(ChangeUserTypeEvent));

View File

@ -75,6 +75,8 @@ const CreateEvent = ({
setHeaderTitle(defaultName);
if (!extension) return setEventDialogVisible(true);
if (!createWithoutDialog) {
setEventDialogVisible(true);
} else {
@ -272,6 +274,7 @@ const CreateEvent = ({
onCancel={onCancel}
onClose={onCloseAction}
isCreateDialog={true}
extension={extension}
/>
);
};

View File

@ -7,6 +7,7 @@ import CreateEvent from "./CreateEvent";
import RenameEvent from "./RenameEvent";
import CreateRoomEvent from "./CreateRoomEvent";
import EditRoomEvent from "./EditRoomEvent";
import ChangeUserTypeEvent from "./ChangeUserTypeEvent";
const GlobalEvents = () => {
const [createDialogProps, setCreateDialogProps] = useState({
@ -37,6 +38,11 @@ const GlobalEvents = () => {
onClose: null,
});
const [changeUserTypeDialog, setChangeUserTypeDialogProps] = useState({
visible: false,
onClose: null,
});
const onCreate = useCallback((e) => {
const { payload } = e;
@ -106,19 +112,29 @@ const GlobalEvents = () => {
});
}, []);
const onChangeUserType = useCallback((e) => {
setChangeUserTypeDialogProps({
visible: true,
onClose: () =>
setChangeUserTypeDialogProps({ visible: false, onClose: null }),
});
}, []);
useEffect(() => {
window.addEventListener(Events.CREATE, onCreate);
window.addEventListener(Events.RENAME, onRename);
window.addEventListener(Events.ROOM_CREATE, onCreateRoom);
window.addEventListener(Events.ROOM_EDIT, onEditRoom);
window.addEventListener(Events.CHANGE_USER_TYPE, onChangeUserType);
return () => {
window.removeEventListener(Events.CREATE, onCreate);
window.removeEventListener(Events.RENAME, onRename);
window.removeEventListener(Events.ROOM_CREATE, onCreateRoom);
window.removeEventListener(Events.ROOM_EDIT, onEditRoom);
window.removeEventListener(Events.CHANGE_USER_TYPE, onChangeUserType);
};
}, [onRename, onCreate, onCreateRoom, onEditRoom]);
}, [onRename, onCreate, onCreateRoom, onEditRoom, onChangeUserType]);
return [
createDialogProps.visible && (
@ -133,6 +149,12 @@ const GlobalEvents = () => {
editRoomDialogProps.visible && (
<EditRoomEvent key={Events.ROOM_EDIT} {...editRoomDialogProps} />
),
changeUserTypeDialog.visible && (
<ChangeUserTypeEvent
key={Events.CHANGE_USER_TYPE}
{...changeUserTypeDialog}
/>
),
];
};

View File

@ -24,6 +24,7 @@ const Dialog = ({
isCreateDialog,
createWithoutDialog,
setCreateWithoutDialog,
extension,
}) => {
const [value, setValue] = useState("");
const [isDisabled, setIsDisabled] = useState(false);
@ -86,16 +87,18 @@ const Dialog = ({
);
const onCancelAction = useCallback((e) => {
if (isChecked) {
setCreateWithoutDialog(false);
}
onCancel && onCancel(e);
setCreateWithoutDialog(false);
}, []);
const onCloseAction = useCallback(
(e) => {
if (!isDisabled) {
onClose && onClose(e);
if (!isDisabled && isChecked) {
setCreateWithoutDialog(false);
}
onClose && onClose(e);
},
[isDisabled]
);
@ -125,7 +128,7 @@ const Dialog = ({
onFocus={onFocus}
isDisabled={isDisabled}
/>
{isCreateDialog && (
{isCreateDialog && extension && (
<Box displayProp="flex" alignItems="center" paddingProp="16px 0 0">
<Checkbox
label={t("Common:DontAskAgain")}

View File

@ -3,7 +3,9 @@ import { initReactI18next } from "react-i18next";
import Backend from "@docspace/common/utils/i18next-http-backend";
import { LANGUAGE } from "@docspace/common/constants";
import config from "PACKAGE_FILE";
import { loadLanguagePath, getCookie } from "@docspace/common/utils";
import { getCookie } from "@docspace/common/utils";
import { loadLanguagePath } from "SRC_DIR/helpers/utils";
const newInstance = i18n.createInstance();

View File

@ -3,8 +3,8 @@ import { initReactI18next } from "react-i18next";
import Backend from "@docspace/common/utils/i18next-http-backend";
import { LANGUAGE } from "@docspace/common/constants";
import config from "PACKAGE_FILE";
import { loadLanguagePath, getCookie } from "@docspace/common/utils";
import { getCookie } from "@docspace/common/utils";
import { loadLanguagePath } from "SRC_DIR/helpers/utils";
const newInstance = i18n.createInstance();
newInstance

View File

@ -1,155 +1,74 @@
import React, { memo } from "react";
import { withRouter } from "react-router";
import PropTypes from "prop-types";
import React from "react";
import Text from "@docspace/components/text";
import Button from "@docspace/components/button";
import ModalDialog from "@docspace/components/modal-dialog";
import Text from "@docspace/components/text";
import { withTranslation, Trans } from "react-i18next";
import toastr from "@docspace/components/toast/toastr";
import ModalDialogContainer from "../ModalDialogContainer";
import { inject, observer } from "mobx-react";
class ChangeUserTypeDialogComponent extends React.Component {
constructor(props) {
super(props);
const { userIDs } = props;
this.state = { isRequestRunning: false, userIDs };
}
onChangeUserType = () => {
const {
onClose,
t,
toType,
fromType,
updateUserType,
filter,
} = this.props;
const { userIDs } = this.state;
this.setState({ isRequestRunning: true }, () => {
updateUserType(toType, userIDs, filter, fromType)
.then(() => toastr.success(t("SuccessChangeUserType")))
.catch((error) => toastr.error(error))
.finally(() => {
this.setState({ isRequestRunning: false }, () => {
onClose();
});
});
});
};
onCloseAction = async () => {
const { isRequestRunning } = this.state;
const { onClose, getUsersList, filter } = this.props;
if (!isRequestRunning) {
await getUsersList(filter);
onClose();
}
};
getType = (type) => {
const { t } = this.props;
switch (type) {
case "admin":
return t("Common:DocSpaceAdmin");
case "manager":
return t("Common:RoomAdmin");
case "user":
default:
return t("Common:User");
}
};
render() {
const { visible, t, tReady, toType, fromType } = this.props;
const { isRequestRunning, userIDs } = this.state;
const firstType = fromType.length === 1 ? this.getType(fromType[0]) : null;
const secondType = this.getType(toType);
const changeUserTypeMessage = firstType ? (
<Trans i18nKey="ChangeUserTypeMessage" ns="ChangeUserTypeDialog" t={t}>
Users with the <b>'{{ firstType }}'</b> type will be moved to{" "}
<b>'{{ secondType }}'</b> type.
</Trans>
) : (
<Trans
i18nKey="ChangeUserTypeMessageMulti"
ns="ChangeUserTypeDialog"
t={t}
>
The selected users will be moved to <b>'{{ secondType }}'</b> type.
</Trans>
);
return (
<ModalDialogContainer
isLoading={!tReady}
visible={visible}
onClose={this.onCloseAction}
autoMaxHeight
>
<ModalDialog.Header>{t("ChangeUserTypeHeader")}</ModalDialog.Header>
<ModalDialog.Body>
<Text fontWeight={600}>
{changeUserTypeMessage} {t("ChangeUserTypeMessageWarning")}
</Text>
</ModalDialog.Body>
<ModalDialog.Footer>
<Button
id="change-user-type-modal_submit"
label={t("ChangeUserTypeButton")}
size="normal"
scale
primary
onClick={this.onChangeUserType}
isLoading={isRequestRunning}
isDisabled={!userIDs.length}
/>
<Button
id="change-user-type-modal_cancel"
label={t("Common:CancelButton")}
size="normal"
scale
onClick={this.onCloseAction}
isDisabled={isRequestRunning}
/>
</ModalDialog.Footer>
</ModalDialogContainer>
);
}
}
const ChangeUserTypeDialog = withTranslation([
"ChangeUserTypeDialog",
"People",
"Common",
])(ChangeUserTypeDialogComponent);
ChangeUserTypeDialog.propTypes = {
visible: PropTypes.bool.isRequired,
onClose: PropTypes.func.isRequired,
userIDs: PropTypes.arrayOf(PropTypes.string).isRequired,
const ChangeUserTypeDialog = ({
t,
visible,
firstType,
secondType,
onCloseAction,
onChangeUserType,
isRequestRunning,
}) => {
return (
<ModalDialog
visible={visible}
onClose={onCloseAction}
displayType="modal"
autoMaxHeight
>
<ModalDialog.Header>{t("ChangeUserTypeHeader")}</ModalDialog.Header>
<ModalDialog.Body>
<Text>
{firstType ? (
<Trans
i18nKey="ChangeUserTypeMessage"
ns="ChangeUserTypeDialog"
t={t}
>
Users with the <b>'{{ firstType }}'</b> type will be moved to{" "}
<b>'{{ secondType }}'</b> type.
</Trans>
) : (
<Trans
i18nKey="ChangeUserTypeMessageMulti"
ns="ChangeUserTypeDialog"
t={t}
>
The selected users will be moved to <b>'{{ secondType }}'</b>{" "}
type.
</Trans>
)}{" "}
{t("ChangeUserTypeMessageWarning")}
</Text>
</ModalDialog.Body>
<ModalDialog.Footer>
<Button
id="change-user-type-modal_submit"
label={t("ChangeUserTypeButton")}
size="normal"
scale
primary
onClick={onChangeUserType}
isLoading={isRequestRunning}
//isDisabled={!userIDs.length}
/>
<Button
id="change-user-type-modal_cancel"
label={t("Common:CancelButton")}
size="normal"
scale
onClick={onCloseAction}
isDisabled={isRequestRunning}
/>
</ModalDialog.Footer>
</ModalDialog>
);
};
export default withRouter(
inject(({ peopleStore }) => {
return {
filter: peopleStore.filterStore.filter,
updateUserType: peopleStore.usersStore.updateUserType,
getUsersList: peopleStore.usersStore.getUsersList,
};
})(observer(ChangeUserTypeDialog))
export default withTranslation(["ChangeUserTypeDialog", "People", "Common"])(
ChangeUserTypeDialog
);

View File

@ -92,13 +92,14 @@ const ThirdPartyStorage = ({
return (
<StyledThirdPartyStorage>
{/* //TODO: Uncomment when third-party storages will be stable
<ToggleParam
id="shared_third-party-storage-toggle"
title={t("ThirdPartyStorageTitle")}
description={t("ThirdPartyStorageDescription")}
isChecked={storageLocation.isThirdparty}
onCheckedChange={onChangeIsThirdparty}
/>
/> */}
{storageLocation.isThirdparty && (
<ThirdPartyComboBox

View File

@ -3,7 +3,8 @@ import { initReactI18next } from "react-i18next";
import Backend from "@docspace/common/utils/i18next-http-backend";
import { LANGUAGE } from "@docspace/common/constants";
import config from "PACKAGE_FILE";
import { loadLanguagePath, getCookie } from "@docspace/common/utils";
import { getCookie } from "@docspace/common/utils";
import { loadLanguagePath } from "SRC_DIR/helpers/utils";
const newInstance = i18n.createInstance();

View File

@ -3,8 +3,8 @@ import { initReactI18next } from "react-i18next";
import Backend from "@docspace/common/utils/i18next-http-backend";
import { LANGUAGE } from "@docspace/common/constants";
import config from "PACKAGE_FILE";
import { loadLanguagePath, getCookie } from "@docspace/common/utils";
import { getCookie } from "@docspace/common/utils";
import { loadLanguagePath } from "SRC_DIR/helpers/utils";
const newInstance = i18n.createInstance();
newInstance

View File

@ -46,6 +46,7 @@ const InvitePanel = ({
const [hasErrors, setHasErrors] = useState(false);
const [shareLinks, setShareLinks] = useState([]);
const [roomUsers, setRoomUsers] = useState([]);
const [isLoading, setIsLoading] = useState(false);
const selectRoom = () => {
const room = folders.find((folder) => folder.id === roomId);
@ -72,7 +73,7 @@ const InvitePanel = ({
title,
shareLink,
expirationDate,
access: defaultAccess,
access: user.access || defaultAccess,
});
}
});
@ -161,16 +162,22 @@ const InvitePanel = ({
}
try {
setIsLoading(true);
roomId === -1
? await inviteUsers(data)
: await setRoomSecurity(roomId, data);
if (roomsView === "info_members") setUpdateRoomMembers(true);
setIsLoading(false);
if (roomsView === "info_members") {
setUpdateRoomMembers(true);
}
onClose();
toastr.success(t("Common:UsersInvited"));
reloadSelectionParentRoom();
} catch (err) {
toastr.error(err);
setIsLoading(false);
}
};
@ -197,7 +204,12 @@ const InvitePanel = ({
</StyledHeading>
</StyledBlock>
<ExternalLinks t={t} shareLinks={shareLinks} roomType={roomType} />
<ExternalLinks
t={t}
shareLinks={shareLinks}
getInfo={getInfo}
roomType={roomType}
/>
<InviteInput
t={t}
@ -217,12 +229,14 @@ const InvitePanel = ({
primary
onClick={onClickSend}
label={t("SendInvitation")}
isLoading={isLoading}
/>
<Button
scale={true}
size={"normal"}
onClick={onClose}
label={t("Common:CancelButton")}
isDisabled={isLoading}
/>
</StyledButtons>
</>

View File

@ -1,6 +1,6 @@
import MediaDownloadReactSvgUrl from "PUBLIC_DIR/images/media.download.react.svg?url";
import CopyReactSvgUrl from "PUBLIC_DIR/images/copy.react.svg?url";
import React, { useState, useEffect, useRef, memo, useCallback } from "react";
import React, { useState, useEffect, useRef, useCallback } from "react";
import { inject, observer } from "mobx-react";
import copy from "copy-to-clipboard";
@ -30,6 +30,7 @@ const ExternalLinks = ({
shareLinks,
setInvitationLinks,
isOwner,
getInfo,
}) => {
const [linksVisible, setLinksVisible] = useState(false);
const [actionLinksVisible, setActionLinksVisible] = useState(false);
@ -37,18 +38,22 @@ const ExternalLinks = ({
const inputsRef = useRef();
useEffect(() => {
if (shareLinks[0]?.expirationDate) toggleLinks();
}, [shareLinks]);
const toggleLinks = (e) => {
let link = null;
if (!shareLinks.length) return;
if (roomId === -1) {
link = shareLinks.find((l) => l.access === +defaultAccess);
setActiveLink(link);
} else {
setInvitationLinks(roomId, shareLinks[0].id, "Invite", +defaultAccess);
link = shareLinks[0];
setActiveLink(shareLinks[0]);
!linksVisible ? editLink() : disableLink();
}
setLinksVisible(!linksVisible);
@ -56,6 +61,23 @@ const ExternalLinks = ({
if (!linksVisible) copyLink(link?.shareLink);
};
const disableLink = () => {
setInvitationLinks(roomId, shareLinks[0].id, "Invite", 0);
setTimeout(() => getInfo(), 100);
};
const editLink = () => {
if (!shareLinks[0].expirationDate) {
setInvitationLinks(
roomId,
shareLinks[0].id,
"Invite",
shareLinks[0].access
);
}
setActiveLink(shareLinks[0]);
};
const onSelectAccess = (access) => {
let link = null;
if (roomId === -1) {
@ -84,6 +106,8 @@ const ExternalLinks = ({
}
};
const onCopyLink = () => copyLink(activeLink.shareLink);
const toggleActionLinks = () => {
setActionLinksVisible(!actionLinksVisible);
};
@ -151,11 +175,11 @@ const ExternalLinks = ({
>
<DropDownItem
label={`${t("SharingPanel:ShareVia")} e-mail`}
onClick={() => shareEmail(links[0])}
onClick={() => shareEmail(activeLink[0])}
/>
<DropDownItem
label={`${t("SharingPanel:ShareVia")} Twitter`}
onClick={() => shareTwitter(links[0])}
onClick={() => shareTwitter(activeLink[0])}
/>
</DropDown>
</div>
@ -171,7 +195,7 @@ const ExternalLinks = ({
value={activeLink.shareLink}
isReadOnly
iconName={CopyReactSvgUrl}
onIconClick={() => copyLink(activeLink.shareLink)}
onIconClick={onCopyLink}
hoverColor="#333333"
iconColor="#A3A9AE"
/>

View File

@ -3,8 +3,8 @@ import { initReactI18next } from "react-i18next";
import Backend from "@docspace/common/utils/i18next-http-backend";
import { LANGUAGE } from "@docspace/common/constants";
import config from "PACKAGE_FILE";
import { loadLanguagePath, getCookie } from "@docspace/common/utils";
import { getCookie } from "@docspace/common/utils";
import { loadLanguagePath } from "SRC_DIR/helpers/utils";
const newInstance = i18n.createInstance();
newInstance

View File

@ -3,8 +3,8 @@ import { initReactI18next } from "react-i18next";
import Backend from "@docspace/common/utils/i18next-http-backend";
import { LANGUAGE } from "@docspace/common/constants";
import config from "PACKAGE_FILE";
import { loadLanguagePath, getCookie } from "@docspace/common/utils";
import { getCookie } from "@docspace/common/utils";
import { loadLanguagePath } from "SRC_DIR/helpers/utils";
const newInstance = i18n.createInstance();
newInstance

View File

@ -3,8 +3,8 @@ import { initReactI18next } from "react-i18next";
import Backend from "@docspace/common/utils/i18next-http-backend";
import { LANGUAGE } from "@docspace/common/constants";
import config from "PACKAGE_FILE";
import { loadLanguagePath, getCookie } from "@docspace/common/utils";
import { getCookie } from "@docspace/common/utils";
import { loadLanguagePath } from "SRC_DIR/helpers/utils";
const newInstance = i18n.createInstance();
newInstance

View File

@ -3,8 +3,8 @@ import { initReactI18next } from "react-i18next";
import Backend from "@docspace/common/utils/i18next-http-backend";
import { LANGUAGE } from "@docspace/common/constants";
import config from "PACKAGE_FILE";
import { loadLanguagePath, getCookie } from "@docspace/common/utils";
import { getCookie } from "@docspace/common/utils";
import { loadLanguagePath } from "SRC_DIR/helpers/utils";
const newInstance = i18n.createInstance();
newInstance

View File

@ -3,8 +3,8 @@ import { initReactI18next } from "react-i18next";
import Backend from "@docspace/common/utils/i18next-http-backend";
import { LANGUAGE } from "@docspace/common/constants";
import config from "PACKAGE_FILE";
import { loadLanguagePath, getCookie } from "@docspace/common/utils";
import { getCookie } from "@docspace/common/utils";
import { loadLanguagePath } from "SRC_DIR/helpers/utils";
const newInstance = i18n.createInstance();
newInstance

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,9 @@ import { initReactI18next } from "react-i18next";
import Backend from "@docspace/common/utils/i18next-http-backend";
import { LANGUAGE } from "@docspace/common/constants";
import config from "PACKAGE_FILE";
import { loadLanguagePath, getCookie } from "@docspace/common/utils";
import { getCookie } from "@docspace/common/utils";
import { loadLanguagePath } from "./utils";
const newInstance = i18n.createInstance();

View File

@ -1,8 +1,9 @@
import authStore from "@docspace/common/store/AuthStore";
import { toCommunityHostname } from "@docspace/common/utils";
import { toCommunityHostname, getLanguage } from "@docspace/common/utils";
import history from "@docspace/common/history";
import { CategoryType } from "./constants";
import { FolderType } from "@docspace/common/constants";
import { translations } from "./autoGeneratedTranslations";
export const setDocumentTitle = (subTitle = null) => {
const { isAuthenticated, settingsStore, product: currentModule } = authStore;
@ -24,6 +25,31 @@ export const setDocumentTitle = (subTitle = null) => {
document.title = title;
};
export function loadLanguagePath(homepage, fixedNS = null) {
return (lng, ns) => {
const language = getLanguage(lng instanceof Array ? lng[0] : lng);
const lngCollection = translations.get(language);
const data = lngCollection?.get(`${fixedNS || ns}`);
if (!data) return `/locales/${language}/${fixedNS || ns}.json`;
let path = data?.split("/");
const length = path?.length;
const isCommonPath = path[length - 1].indexOf("Common") > -1;
path = `/${path[length - 3]}/${path[length - 2]}/${path[length - 1]}`;
if (ns.length > 0 && ns[0] === "Common" && isCommonPath) {
return `/static${path}`;
}
return path;
};
}
export const checkIfModuleOld = (link) => {
if (
!link ||

View File

@ -3,11 +3,19 @@ import { initReactI18next } from "react-i18next";
import Backend from "@docspace/common/utils/i18next-http-backend";
import config from "PACKAGE_FILE";
import { LANGUAGE } from "@docspace/common/constants";
import { loadLanguagePath, getCookie } from "@docspace/common/utils";
import { getCookie } from "@docspace/common/utils";
import { loadLanguagePath } from "./helpers/utils";
const newInstance = i18n.createInstance();
const lng = getCookie(LANGUAGE) || "en";
const userLng = window.navigator
? window.navigator.language ||
window.navigator.systemLanguage ||
window.navigator.userLanguage
: "en";
const lng = getCookie(LANGUAGE) || userLng;
newInstance
.use(Backend)

View File

@ -3,8 +3,8 @@ import { initReactI18next } from "react-i18next";
import Backend from "@docspace/common/utils/i18next-http-backend";
import { LANGUAGE } from "@docspace/common/constants";
import config from "PACKAGE_FILE";
import { loadLanguagePath, getCookie } from "@docspace/common/utils";
import { getCookie } from "@docspace/common/utils";
import { loadLanguagePath } from "SRC_DIR/helpers/utils";
const newInstance = i18n.createInstance();
newInstance

View File

@ -99,20 +99,22 @@ const SimpleUserRow = (props) => {
contextOptionsProps,
checkedProps,
onContentRowSelect,
onContentRowClick,
element,
setBufferSelection,
//setBufferSelection,
isActive,
isSeveralSelection,
//isSeveralSelection,
} = props;
const isChecked = checkedProps.checked;
const userContextClick = React.useCallback(() => {
if (isSeveralSelection && isChecked) {
return;
}
setBufferSelection(item);
}, [isChecked, isSeveralSelection, item, setBufferSelection]);
const onRowClick = React.useCallback(() => {
onContentRowClick && onContentRowClick(!isChecked, item);
}, [isChecked, item, onContentRowClick]);
const onRowContextClick = React.useCallback(() => {
onContentRowClick && onContentRowClick(!isChecked, item, false);
}, [isChecked, item, onContentRowClick]);
return (
<StyledWrapper
@ -130,7 +132,8 @@ const SimpleUserRow = (props) => {
sectionWidth={sectionWidth}
mode={"modern"}
className={"user-row"}
rowContextClick={userContextClick}
onRowClick={onRowClick}
rowContextClick={onRowContextClick}
>
<UserContent {...props} />
</StyledSimpleUserRow>

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