Skip to content
Snippets Groups Projects
Commit c56d62f4 authored by Timothee Gosselin's avatar Timothee Gosselin
Browse files

Merge branch 'feature-fix-polls' into 'master'

fix: patch polls and pg migrator

See merge request !26
parents d56e509f 6e32ac2b
No related branches found
No related tags found
1 merge request!26fix: patch polls and pg migrator
Pipeline #1625 passed with stages
in 5 minutes and 38 seconds
......@@ -25,6 +25,12 @@ COPY ./img/logo /usr/src/nextcloud/core/img/logo
COPY ./img/favicon.ico /usr/src/nextcloud/core/img/favicon.ico
COPY install.sh /install.sh
COPY refresh_config.sh /refresh_config.sh
COPY patches /usr/src/nextcloud/patches
RUN for patch in /usr/src/nextcloud/patches/*.diff; \
do \
patch -p0 < $patch; \
done; \
rm -r /usr/src/nextcloud/patches/;
RUN for app in $(cat /usr/src/nextcloud/apps/remove-list);do \
echo "removing app $app"; \
rm -R /usr/src/nextcloud/apps/$app; \
......
--- apps/polls/lib/Db/TableManager.php 2023-06-21 12:38:02.300193982 +0200
+++ apps/polls/lib/Db/TableManager-patched.php 2023-06-21 12:48:45.144957659 +0200
@@ -312,12 +312,18 @@
if ($this->schema->hasTable($this->dbPrefix . $table)) {
// identify duplicates
$selection = $qb->selectDistinct('t1.id')
- ->from($table, 't1')
- ->innerJoin('t1', $table, 't2')
- ->where($qb->expr()->lt('t1.id', 't2.id'));
+ ->from($table, 't1')
+ ->innerJoin('t1', $table, 't2', $qb->expr()->lt('t1.id', 't2.id'));
+
+ $i = 0;
foreach ($columns as $column) {
- $selection->andWhere($qb->expr()->eq('t1.' . $column, 't2.' . $column));
+ if ($i > 0) {
+ $selection->andWhere($qb->expr()->eq('t1.' . $column, 't2.' . $column));
+ } else {
+ $selection->where($qb->expr()->eq('t1.' . $column, 't2.' . $column));
+ }
+ $i++;
}
$duplicates = $qb->executeQuery()->fetchAll(PDO::FETCH_COLUMN);
--- lib/private/DB/PostgreSqlMigrator.php 2023-06-21 12:07:32.451928839 +0200
+++ ../PostgreSqlMigrator.php 2023-06-21 12:07:28.165261718 +0200
@@ -42,7 +42,7 @@
}
$fromDefault = $column->fromColumn->getDefault();
$toDefault = $column->column->getDefault();
- $fromDefault = trim($fromDefault, "()");
+ $fromDefault = trim((string) $fromDefault, '()');
// by intention usage of !=
return $fromDefault != $toDefault;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment