Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-mysqlbackend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-mysqlbackend
Commits
14649e1d
Commit
14649e1d
authored
6 months ago
by
Florian Spreckelsen
Browse files
Options
Downloads
Plain Diff
Merge branch 'f-fix-dump-upgrade' into 'dev'
Dump fix script can be applied twice See merge request
!32
parents
ba3d8e95
f3d56b51
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!32
Dump fix script can be applied twice
Pipeline
#60660
passed
3 months ago
Stage: setup
Stage: test
Stage: deploy
Changes
3
Pipelines
92
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
dump_updates/2024-10-02.dump_fix_mariadb_10_6.sh
+2
-2
2 additions, 2 deletions
dump_updates/2024-10-02.dump_fix_mariadb_10_6.sh
dump_updates/test/test_all.py
+15
-0
15 additions, 0 deletions
dump_updates/test/test_all.py
with
19 additions
and
2 deletions
CHANGELOG.md
+
2
−
0
View file @
14649e1d
...
...
@@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
-
[
SQL dump migration can now be applied twice
](
https://gitlab.indiscale.com/caosdb/src/caosdb-mysqlbackend/-/issues/60
)
: Fixed an error in the regex.
### Security
## [8.0.0] - 2024-10-24 ##
...
...
This diff is collapsed.
Click to expand it.
dump_updates/2024-10-02.dump_fix_mariadb_10_6.sh
+
2
−
2
View file @
14649e1d
...
...
@@ -35,10 +35,10 @@ set -euo pipefail
IFS
=
$'
\n\t
'
script
=
'
s/Offset INT UNSIGNED) RETURNS varbinary(255)/HeadOffset INT UNSIGNED) RETURNS varbinary(255)/
/^[[:blank:]]+Offset INT UNSIGNED/
s/Offset INT UNSIGNED
\
) RETURNS varbinary
\
(255
\
)/HeadOffset INT UNSIGNED
\
) RETURNS varbinary(255)/
s/LIMIT 1 OFFSET Offset/LIMIT 1 OFFSET HeadOffset/
'
sed
-e
"
$script
"
sed
-E
-e
"
$script
"
unset
script
This diff is collapsed.
Click to expand it.
dump_updates/test/test_all.py
+
15
−
0
View file @
14649e1d
...
...
@@ -19,6 +19,11 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Testing the dump update scripts
As a general rule, dump updaters should be idempotent, so tests should run the update again after
the first checks are successlful.
TODO: Reduce the boilerplate for the tests.
"""
import
filecmp
...
...
@@ -68,3 +73,13 @@ def test_2024_10_02(tmpdir):
check
=
True
)
assert
filecmp
.
cmp
(
output
.
name
,
expectedfile
),
"
Output does not match expected output.
"
with
(
NamedTemporaryFile
(
dir
=
tmpdir
,
suffix
=
"
.sql
"
,
delete
=
True
)
as
output2
,
open
(
output
.
name
,
mode
=
"
rb
"
)
as
infile_stream
):
run
([
script_fullname
],
stdin
=
infile_stream
,
stdout
=
output2
,
check
=
True
)
assert
filecmp
.
cmp
(
output2
.
name
,
expectedfile
),
(
"
Run 2: Output does not match expected output.
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment