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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-mysqlbackend
Commits
e549964b
Verified
Commit
e549964b
authored
4 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP
parent
740552ae
No related branches found
No related tags found
1 merge request
!12
DRAFT: ENH: file system: core
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
patches/patch20210122-4.0.0-rc3/patch.sql
+5
-3
5 additions, 3 deletions
patches/patch20210122-4.0.0-rc3/patch.sql
procedures/retrieveEntity.sql
+7
-4
7 additions, 4 deletions
procedures/retrieveEntity.sql
with
12 additions
and
7 deletions
patches/patch20210122-4.0.0-rc3/patch.sql
+
5
−
3
View file @
e549964b
...
...
@@ -11,14 +11,16 @@ ALTER TABLE files ADD UNIQUE (`path`);
ALTER
TABLE
files
ADD
COLUMN
IF
NOT
EXISTS
(
mimetype
VARBINARY
(
255
)
DEFAULT
NULL
,
file_storage_id
VARBINARY
(
255
)
NOT
NULL
DEFAULT
"DEFAULT"
,
file_key
VARBINARY
(
255
)
DEFAULT
NULL
file_key
VARBINARY
(
255
)
DEFAULT
NULL
,
hash_algorithm
VARBINARY
(
255
)
DEFAULT
NULL
);
ALTER
TABLE
archive_files
ADD
COLUMN
IF
NOT
EXISTS
(
mimetype
VARBINARY
(
255
)
DEFAULT
NULL
,
file_storage_id
VARBINARY
(
255
)
NOT
NULL
DEFAULT
"DEFAULT"
,
file_key
VARBINARY
(
255
)
DEFAULT
NULL
,
checked_timestamp
BIGINT
DEFAULT
NULL
file_key
VARBINARY
(
255
)
NOT
NULL
DEFAULT
NULL
,
checked_timestamp
BIGINT
NOT
NULL
DEFAULT
0
,
hash_algorithm
VARBINARY
(
255
)
DEFAULT
NULL
);
...
...
This diff is collapsed.
Click to expand it.
procedures/retrieveEntity.sql
+
7
−
4
View file @
e549964b
...
...
@@ -55,6 +55,7 @@ retrieveEntityBody: BEGIN
DECLARE
FilePath
VARCHAR
(
255
)
DEFAULT
NULL
;
DECLARE
FileSize
VARCHAR
(
255
)
DEFAULT
NULL
;
DECLARE
FileHash
VARCHAR
(
255
)
DEFAULT
NULL
;
DECLARE
FileHashChecked
BIGINT
DEFAULT
NULL
;
DECLARE
FileMimetype
VARBINARY
(
255
)
DEFAULT
NULL
;
DECLARE
FileStorageId
VARBINARY
(
255
)
DEFAULT
NULL
;
DECLARE
FileKey
VARBINARY
(
65525
)
DEFAULT
NULL
;
...
...
@@ -84,8 +85,8 @@ retrieveEntityBody: BEGIN
LEAVE
retrieveEntityBody
;
END
IF
;
SELECT
path
,
size
,
hex
(
hash
),
mimetype
,
file_storage_id
,
file_key
INTO
FilePath
,
FileSize
,
FileHash
,
FileMimetype
,
FileStorageId
,
FileKey
SELECT
path
,
size
,
hex
(
hash
),
checked_timestamp
,
mimetype
,
file_storage_id
,
file_key
INTO
FilePath
,
FileSize
,
FileHash
,
FileHashChecked
,
FileMimetype
,
FileStorageId
,
FileKey
FROM
archive_files
WHERE
file_id
=
EntityID
AND
_iversion
=
IVersion
...
...
@@ -132,6 +133,7 @@ retrieveEntityBody: BEGIN
FileSize
AS
FileSize
,
FilePath
AS
FilePath
,
FileHash
AS
FileHash
,
FileHashChecked
AS
FileHashChecked
,
FileMimetype
as
FileMimetype
,
FileStorageId
as
FileStorageId
,
FileKey
as
FileKey
,
...
...
@@ -148,8 +150,8 @@ retrieveEntityBody: BEGIN
END
IF
;
END
IF
;
SELECT
path
,
size
,
hex
(
hash
),
mimetype
,
file_storage_id
,
file_key
INTO
FilePath
,
FileSize
,
FileHash
,
FileMimetype
,
FileStorageId
,
FileKey
SELECT
path
,
size
,
hex
(
hash
),
checked_timestamp
,
mimetype
,
file_storage_id
,
file_key
INTO
FilePath
,
FileSize
,
FileHash
,
FileHashChecked
,
FileMimetype
,
FileStorageId
,
FileKey
FROM
files
WHERE
file_id
=
EntityID
LIMIT
1
;
...
...
@@ -184,6 +186,7 @@ retrieveEntityBody: BEGIN
FileSize
AS
FileSize
,
FilePath
AS
FilePath
,
FileHash
AS
FileHash
,
FileHashChecked
AS
FileHashChecked
,
FileMimetype
as
FileMimetype
,
FileStorageId
as
FileStorageId
,
FileKey
as
FileKey
,
...
...
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