mirror of
https://github.com/YunoHost-Apps/penpot_ynh.git
synced 2024-09-03 19:56:56 +02:00
Merge pull request #11 from YunoHost-Apps/upgrade-v2.0.0
Upgrade to v2.0.0 and add auto-updater
This commit is contained in:
commit
75970cbd8d
10 changed files with 209 additions and 113 deletions
|
@ -18,7 +18,7 @@ It shall NOT be edited by hand.
|
||||||
|
|
||||||
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
||||||
|
|
||||||
**Shipped version:** 1.19.3~ynh3
|
**Shipped version:** 2.0.0~ynh3
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ EZ editatu eskuz.
|
||||||
|
|
||||||
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
||||||
|
|
||||||
**Paketatutako bertsioa:** 1.19.3~ynh3
|
**Paketatutako bertsioa:** 2.0.0~ynh3
|
||||||
|
|
||||||
## Pantaila-argazkiak
|
## Pantaila-argazkiak
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main.
|
||||||
|
|
||||||
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
||||||
|
|
||||||
**Version incluse :** 1.19.3~ynh3
|
**Version incluse :** 2.0.0~ynh3
|
||||||
|
|
||||||
## Captures d’écran
|
## Captures d’écran
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ NON debe editarse manualmente.
|
||||||
|
|
||||||
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
||||||
|
|
||||||
**Versión proporcionada:** 1.19.3~ynh3
|
**Versión proporcionada:** 2.0.0~ynh3
|
||||||
|
|
||||||
## Capturas de pantalla
|
## Capturas de pantalla
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
Design and prototyping platform meant for cross-domain teams. Non dependent on operating systems, web based and works with open standards (SVG). Penpot invites designers all over the world to fall in love with open source while getting developers excited about the design process in return.
|
||||||
|
|
||||||
**分发版本:** 1.19.3~ynh3
|
**分发版本:** 2.0.0~ynh3
|
||||||
|
|
||||||
## 截图
|
## 截图
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ name = "Penpot"
|
||||||
description.en = "Design and prototyping platform"
|
description.en = "Design and prototyping platform"
|
||||||
description.fr = "Plateforme de conception et de prototypage"
|
description.fr = "Plateforme de conception et de prototypage"
|
||||||
|
|
||||||
version = "1.19.3~ynh3"
|
version = "2.0.0~ynh3"
|
||||||
|
|
||||||
maintainers = ["orhtej2"]
|
maintainers = ["orhtej2"]
|
||||||
|
|
||||||
|
@ -42,8 +42,9 @@ ram.runtime = "50M"
|
||||||
[resources.sources]
|
[resources.sources]
|
||||||
|
|
||||||
[resources.sources.main]
|
[resources.sources.main]
|
||||||
url = "https://github.com/penpot/penpot/archive/refs/tags/1.19.3.tar.gz"
|
url = "https://github.com/penpot/penpot/archive/refs/tags/2.0.0.tar.gz"
|
||||||
sha256 = "2649db3bd8742540f76f33547095b227e86c5bda74908a900011b8516d4bb3ce"
|
sha256 = "133fc088b2e194ffdd3a9816c7fabcf9630699157ce28a242c81cb6283de6af6"
|
||||||
|
autoupdate.strategy = "latest_github_tag"
|
||||||
|
|
||||||
[resources.sources.jdk]
|
[resources.sources.jdk]
|
||||||
amd64.url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz"
|
amd64.url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz"
|
||||||
|
@ -134,11 +135,9 @@ ram.runtime = "50M"
|
||||||
"woff2",
|
"woff2",
|
||||||
"python3",
|
"python3",
|
||||||
"python3-tabulate",
|
"python3-tabulate",
|
||||||
"fontforge"
|
"fontforge",
|
||||||
|
"rsync"
|
||||||
]
|
]
|
||||||
extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main"
|
|
||||||
extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg"
|
|
||||||
extras.yarn.packages = "yarn"
|
|
||||||
|
|
||||||
[resources.database]
|
[resources.database]
|
||||||
type = "postgresql"
|
type = "postgresql"
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
nodejs_version=20
|
nodejs_version=20
|
||||||
current_hash="1eaf7b2b4"
|
current_hash="41cdd245"
|
||||||
version="1.19.3-10698-g1eaf7b2b4"
|
version="2.0.0-10698-g41cdd245"
|
||||||
build_date="Mon, 18 Sep 2023 09:14:03 +0000"
|
build_date="Mon, 18 Sep 2023 09:14:03 +0000"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -64,21 +64,23 @@ chmod -R o-rwx "$install_dir"
|
||||||
ynh_script_progression --message="Building frontend..." --weight=5
|
ynh_script_progression --message="Building frontend..." --weight=5
|
||||||
|
|
||||||
pushd $install_dir/build/frontend
|
pushd $install_dir/build/frontend
|
||||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile
|
ynh_exec_warn_less env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable
|
||||||
|
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare --activate
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 yarn install --immutable
|
||||||
|
|
||||||
# ynh_exec_warn_less
|
# ynh_exec_warn_less
|
||||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}"
|
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}"
|
||||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp build
|
|
||||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp dist:clean
|
|
||||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp dist:copy
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/target/dist/index.html"
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run compile
|
||||||
ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/target/dist/index.html"
|
|
||||||
echo "$version" > target/version.txt;
|
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/resources/public/index.html"
|
||||||
|
ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/resources/public/index.html"
|
||||||
|
#echo "$version" > target/version.txt;
|
||||||
popd
|
popd
|
||||||
|
|
||||||
mkdir -p $install_dir/frontend
|
mkdir -p $install_dir/frontend
|
||||||
mv $install_dir/build/frontend/target/dist/* $install_dir/frontend
|
mv $install_dir/build/frontend/resources/public/* $install_dir/frontend
|
||||||
chown -R $app:www-data $install_dir/frontend
|
chown -R $app:www-data $install_dir/frontend
|
||||||
chmod -R 750 $install_dir/frontend
|
chmod -R 750 $install_dir/frontend
|
||||||
|
|
||||||
|
@ -88,6 +90,7 @@ pushd $install_dir/build/backend
|
||||||
mkdir -p target/classes;
|
mkdir -p target/classes;
|
||||||
mkdir -p target/dist;
|
mkdir -p target/dist;
|
||||||
echo "$version" > target/classes/version.txt;
|
echo "$version" > target/classes/version.txt;
|
||||||
|
cp ../CHANGES.md target/classes/changelog.md;
|
||||||
chown -R $app:$app target
|
chown -R $app:$app target
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -T:build jar;
|
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -T:build jar;
|
||||||
|
@ -110,6 +113,9 @@ chmod -R 700 $install_dir/backend
|
||||||
ynh_script_progression --message="Building exporter..." --weight=5
|
ynh_script_progression --message="Building exporter..." --weight=5
|
||||||
|
|
||||||
pushd $install_dir/build/exporter
|
pushd $install_dir/build/exporter
|
||||||
|
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --immutable
|
||||||
|
ynh_secure_remove --file="target"
|
||||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main
|
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main
|
||||||
cp yarn.lock target/
|
cp yarn.lock target/
|
||||||
cp package.json target/
|
cp package.json target/
|
||||||
|
@ -119,14 +125,16 @@ popd
|
||||||
|
|
||||||
mkdir -p $install_dir/exporter
|
mkdir -p $install_dir/exporter
|
||||||
mv $install_dir/build/exporter/target/* $install_dir/exporter
|
mv $install_dir/build/exporter/target/* $install_dir/exporter
|
||||||
|
cp $install_dir/build/.yarnrc.yml $install_dir/exporter
|
||||||
chown -R $app:$app $install_dir/exporter
|
chown -R $app:$app $install_dir/exporter
|
||||||
chmod -R 700 $install_dir/exporter
|
chmod -R 700 $install_dir/exporter
|
||||||
|
|
||||||
ynh_secure_remove --file=$install_dir/.cache
|
ynh_secure_remove --file=$install_dir/.cache
|
||||||
|
|
||||||
pushd $install_dir/exporter
|
pushd $install_dir/exporter
|
||||||
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --pure-lockfile
|
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate
|
||||||
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn --network-timeout 1000000 run playwright install chromium
|
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --immutable
|
||||||
|
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run playwright install chromium
|
||||||
popd
|
popd
|
||||||
|
|
||||||
ynh_script_progression --message="Cleaning up..." --weight=1
|
ynh_script_progression --message="Cleaning up..." --weight=1
|
||||||
|
|
|
@ -64,22 +64,23 @@ then
|
||||||
ynh_script_progression --message="Building frontend..." --weight=5
|
ynh_script_progression --message="Building frontend..." --weight=5
|
||||||
|
|
||||||
pushd $install_dir/build/frontend
|
pushd $install_dir/build/frontend
|
||||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile
|
ynh_exec_warn_less env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack enable
|
||||||
|
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare --activate
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production COREPACK_ENABLE_DOWNLOAD_PROMPT=0 yarn install --immutable
|
||||||
|
|
||||||
# ynh_exec_warn_less
|
# ynh_exec_warn_less
|
||||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}"
|
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -J-Xms100M -J-Xmx800M -J-XX:+UseSerialGC -M:dev:shadow-cljs release main --config-merge "{:release-version \"${current_hash}\"}"
|
||||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp build
|
|
||||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp dist:clean
|
|
||||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm exec gulp dist:copy
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/target/dist/index.html"
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run compile
|
||||||
ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/target/dist/index.html"
|
|
||||||
echo "$version" > target/version.txt;
|
ynh_replace_string --match_string="%version%" --replace_string="$version" --target_file="$install_dir/build/frontend/resources/public/index.html"
|
||||||
|
ynh_replace_string --match_string="%buildDate%" --replace_string="$build_date" --target_file="$install_dir/build/frontend/resources/public/index.html"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
ynh_secure_remove --file=$install_dir/frontend
|
ynh_secure_remove --file=$install_dir/frontend
|
||||||
mkdir -p $install_dir/frontend
|
mkdir -p $install_dir/frontend
|
||||||
mv $install_dir/build/frontend/target/dist/* $install_dir/frontend
|
mv $install_dir/build/frontend/resources/public/* $install_dir/frontend
|
||||||
chown -R $app:www-data $install_dir/frontend
|
chown -R $app:www-data $install_dir/frontend
|
||||||
chmod -R 755 $install_dir/frontend
|
chmod -R 755 $install_dir/frontend
|
||||||
|
|
||||||
|
@ -89,6 +90,7 @@ then
|
||||||
mkdir -p target/classes;
|
mkdir -p target/classes;
|
||||||
mkdir -p target/dist;
|
mkdir -p target/dist;
|
||||||
echo "$version" > target/classes/version.txt;
|
echo "$version" > target/classes/version.txt;
|
||||||
|
cp ../CHANGES.md target/classes/changelog.md;
|
||||||
chown -R $app:$app target
|
chown -R $app:$app target
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -T:build jar;
|
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME clojure -T:build jar;
|
||||||
|
@ -112,6 +114,9 @@ then
|
||||||
ynh_script_progression --message="Building exporter..." --weight=5
|
ynh_script_progression --message="Building exporter..." --weight=5
|
||||||
|
|
||||||
pushd $install_dir/build/exporter
|
pushd $install_dir/build/exporter
|
||||||
|
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate
|
||||||
|
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --immutable
|
||||||
|
ynh_secure_remove --file="target"
|
||||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main
|
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH JAVA_HOME=$JAVA_HOME NODE_ENV=production clojure -M:dev:shadow-cljs release main
|
||||||
cp yarn.lock target/
|
cp yarn.lock target/
|
||||||
cp package.json target/
|
cp package.json target/
|
||||||
|
@ -122,14 +127,16 @@ then
|
||||||
ynh_secure_remove --file=$install_dir/exporter
|
ynh_secure_remove --file=$install_dir/exporter
|
||||||
mkdir -p $install_dir/exporter
|
mkdir -p $install_dir/exporter
|
||||||
mv $install_dir/build/exporter/target/* $install_dir/exporter
|
mv $install_dir/build/exporter/target/* $install_dir/exporter
|
||||||
|
cp $install_dir/build/.yarnrc.yml $install_dir/exporter
|
||||||
chown -R $app:$app $install_dir/exporter
|
chown -R $app:$app $install_dir/exporter
|
||||||
chmod -R 700 $install_dir/exporter
|
chmod -R 700 $install_dir/exporter
|
||||||
|
|
||||||
ynh_secure_remove --file=$install_dir/.cache
|
ynh_secure_remove --file=$install_dir/.cache
|
||||||
|
|
||||||
pushd $install_dir/exporter
|
pushd $install_dir/exporter
|
||||||
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --pure-lockfile
|
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate
|
||||||
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn --network-timeout 1000000 run playwright install chromium
|
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn install --immutable
|
||||||
|
ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn run playwright install chromium
|
||||||
popd
|
popd
|
||||||
|
|
||||||
ynh_script_progression --message="Cleaning up..." --weight=1
|
ynh_script_progression --message="Cleaning up..." --weight=1
|
||||||
|
|
82
sources/patches/main-002.patch
Normal file
82
sources/patches/main-002.patch
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
diff --git a/backend/src/app/migrations/sql/0108-mod-file-thumbnail-table.sql b/backend/src/app/migrations/sql/0108-mod-file-thumbnail-table.sql
|
||||||
|
index b7d05bdc7..57dc229ca 100645
|
||||||
|
--- a/backend/src/app/migrations/sql/0108-mod-file-thumbnail-table.sql
|
||||||
|
+++ b/backend/src/app/migrations/sql/0108-mod-file-thumbnail-table.sql
|
||||||
|
@@ -18,7 +18,8 @@ ALTER TABLE file_thumbnail
|
||||||
|
ADD FOREIGN KEY (media_id) REFERENCES storage_object(id) DEFERRABLE;
|
||||||
|
|
||||||
|
--- Add deletion protection
|
||||||
|
-CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
+DROP TRIGGER IF EXISTS deletion_protection__tgr on file_thumbnail;
|
||||||
|
+CREATE TRIGGER deletion_protection__tgr
|
||||||
|
BEFORE DELETE ON file_thumbnail FOR EACH STATEMENT
|
||||||
|
WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
|
||||||
|
(current_setting('rules.deletion_protection', true) IS NULL))
|
||||||
|
diff --git a/backend/src/app/migrations/sql/0109-mod-file-tagged-object-thumbnail-table.sql b/backend/src/app/migrations/sql/0109-mod-file-tagged-object-thumbnail-table.sql
|
||||||
|
index 3184a6576..37e77d3e1 100644
|
||||||
|
--- a/backend/src/app/migrations/sql/0109-mod-file-tagged-object-thumbnail-table.sql
|
||||||
|
+++ b/backend/src/app/migrations/sql/0109-mod-file-tagged-object-thumbnail-table.sql
|
||||||
|
@@ -19,7 +19,8 @@ ALTER TABLE file_tagged_object_thumbnail
|
||||||
|
ADD FOREIGN KEY (file_id) REFERENCES file(id) DEFERRABLE;
|
||||||
|
|
||||||
|
--- Add deletion protection
|
||||||
|
-CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
+DROP TRIGGER IF EXISTS deletion_protection__tgr on file_tagged_object_thumbnail;
|
||||||
|
+CREATE TRIGGER deletion_protection__tgr
|
||||||
|
BEFORE DELETE ON file_tagged_object_thumbnail FOR EACH STATEMENT
|
||||||
|
WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
|
||||||
|
(current_setting('rules.deletion_protection', true) IS NULL))
|
||||||
|
diff --git a/backend/src/app/migrations/sql/0110-mod-file-media-object-table.sql b/backend/src/app/migrations/sql/0110-mod-file-media-object-table.sql
|
||||||
|
index 49cbebc96..cbf480079 100644
|
||||||
|
--- a/backend/src/app/migrations/sql/0110-mod-file-media-object-table.sql
|
||||||
|
+++ b/backend/src/app/migrations/sql/0110-mod-file-media-object-table.sql
|
||||||
|
@@ -20,7 +20,8 @@ ALTER TABLE file_media_object
|
||||||
|
ADD FOREIGN KEY (file_id) REFERENCES file(id) DEFERRABLE;
|
||||||
|
|
||||||
|
--- Add deletion protection
|
||||||
|
-CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
+DROP TRIGGER IF EXISTS deletion_protection__tgr on file_media_object;
|
||||||
|
+CREATE TRIGGER deletion_protection__tgr
|
||||||
|
BEFORE DELETE ON file_media_object FOR EACH STATEMENT
|
||||||
|
WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
|
||||||
|
(current_setting('rules.deletion_protection', true) IS NULL))
|
||||||
|
diff --git a/backend/src/app/migrations/sql/0112-mod-profile-table.sql b/backend/src/app/migrations/sql/0112-mod-profile-table.sql
|
||||||
|
index 2db8d75b0..ae2f1c8fe 100644
|
||||||
|
--- a/backend/src/app/migrations/sql/0112-mod-profile-table.sql
|
||||||
|
+++ b/backend/src/app/migrations/sql/0112-mod-profile-table.sql
|
||||||
|
@@ -7,7 +7,8 @@ ALTER TABLE profile
|
||||||
|
ADD FOREIGN KEY (default_team_id) REFERENCES team(id) DEFERRABLE;
|
||||||
|
|
||||||
|
--- Add deletion protection
|
||||||
|
-CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
+DROP TRIGGER IF EXISTS deletion_protection__tgr on profile;
|
||||||
|
+CREATE TRIGGER deletion_protection__tgr
|
||||||
|
BEFORE DELETE ON profile FOR EACH STATEMENT
|
||||||
|
WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
|
||||||
|
(current_setting('rules.deletion_protection', true) IS NULL))
|
||||||
|
diff --git a/backend/src/app/migrations/sql/0113-mod-team-font-variant-table.sql b/backend/src/app/migrations/sql/0113-mod-team-font-variant-table.sql
|
||||||
|
index b9caa08f6..b80806fb1 100644
|
||||||
|
--- a/backend/src/app/migrations/sql/0113-mod-team-font-variant-table.sql
|
||||||
|
+++ b/backend/src/app/migrations/sql/0113-mod-team-font-variant-table.sql
|
||||||
|
@@ -13,7 +13,8 @@ ALTER TABLE team_font_variant
|
||||||
|
ADD FOREIGN KEY (team_id) REFERENCES team(id) DEFERRABLE;
|
||||||
|
|
||||||
|
--- Add deletion protection
|
||||||
|
-CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
+DROP TRIGGER IF EXISTS deletion_protection__tgr on team_font_variant;
|
||||||
|
+CREATE TRIGGER deletion_protection__tgr
|
||||||
|
BEFORE DELETE ON team_font_variant FOR EACH STATEMENT
|
||||||
|
WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
|
||||||
|
(current_setting('rules.deletion_protection', true) IS NULL))
|
||||||
|
diff --git a/backend/src/app/migrations/sql/0114-mod-team-table.sql b/backend/src/app/migrations/sql/0114-mod-team-table.sql
|
||||||
|
index 8c7675643..df6c17016 100644
|
||||||
|
--- a/backend/src/app/migrations/sql/0114-mod-team-table.sql
|
||||||
|
+++ b/backend/src/app/migrations/sql/0114-mod-team-table.sql
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
--- Add deletion protection
|
||||||
|
-CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
+DROP TRIGGER IF EXISTS deletion_protection__tgr on team;
|
||||||
|
+CREATE TRIGGER deletion_protection__tgr
|
||||||
|
CREATE OR REPLACE TRIGGER deletion_protection__tgr
|
||||||
|
BEFORE DELETE ON team FOR EACH STATEMENT
|
||||||
|
WHEN ((current_setting('rules.deletion_protection', true) IN ('on', '')) OR
|
Loading…
Add table
Reference in a new issue