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
58e97cb0
Verified
Commit
58e97cb0
authored
1 year ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: String IDs
parent
fce61eca
No related branches found
No related tags found
3 merge requests
!17
Release 6.0
,
!15
External String IDs
,
!11
DRAFT: file system cleanup
Pipeline
#42255
passed with warnings
1 year ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/patch20221122-6.0-SNAPSHOT/create_entity_ids_table.sql
+6
-1
6 additions, 1 deletion
...es/patch20221122-6.0-SNAPSHOT/create_entity_ids_table.sql
with
6 additions
and
1 deletion
patches/patch20221122-6.0-SNAPSHOT/create_entity_ids_table.sql
+
6
−
1
View file @
58e97cb0
...
...
@@ -33,9 +33,14 @@ DELETE FROM entities WHERE id=99;
-- this simply is the more appropriate name
ALTER
TABLE
entities
MODIFY
COLUMN
`role`
enum
(
'RECORDTYPE'
,
'RECORD'
,
'FILE'
,
'DOMAIN'
,
'PROPERTY'
,
'DATATYPE'
,
'ROLE'
,
'QUERYTEMPLATE'
,
'_REPLACEMENT'
)
COLLATE
utf8_unicode_ci
NOT
NULL
;
ALTER
TABLE
archive_entities
MODIFY
COLUMN
`role`
enum
(
'RECORDTYPE'
,
'RECORD'
,
'FILE'
,
'DOMAIN'
,
'PROPERTY'
,
'DATATYPE'
,
'ROLE'
,
'QUERYTEMPLATE'
,
'_REPLACEMENT'
)
COLLATE
utf8_unicode_ci
NOT
NULL
;
UPDATE
entities
SET
role
=
"_REPLACEMENT"
WHERE
role
=
"DOMAIN"
;
UPDATE
archive_entities
SET
role
=
"_REPLACEMENT"
WHERE
role
=
"DOMAIN"
;
ALTER
TABLE
entities
MODIFY
COLUMN
`role`
enum
(
'RECORDTYPE'
,
'RECORD'
,
'FILE'
,
'_REPLACEMENT'
,
'PROPERTY'
,
'DATATYPE'
,
'ROLE'
,
'QUERYTEMPLATE'
)
COLLATE
utf8_unicode_ci
NOT
NULL
;
ALTER
TABLE
archive_entities
MODIFY
COLUMN
`role`
enum
(
'RECORDTYPE'
,
'RECORD'
,
'FILE'
,
'_REPLACEMENT'
,
'PROPERTY'
,
'DATATYPE'
,
'ROLE'
,
'QUERYTEMPLATE'
)
COLLATE
utf8_unicode_ci
NOT
NULL
;
...
...
@@ -49,7 +54,7 @@ CREATE TABLE `entity_ids` (
)
ENGINE
=
InnoDB
COLLATE
utf8mb4_bin
;
-- fill all existing entities into the new entity_ids table.
INSERT
INTO
entity_ids
(
id
,
internal_id
)
SELECT
id
,
id
FROM
entities
WHERE
id
>
0
AND
role
!=
"
DOMAIN
"
;
INSERT
INTO
entity_ids
(
id
,
internal_id
)
SELECT
id
,
id
FROM
entities
WHERE
id
>
0
AND
role
!=
"
_REPLACEMENT
"
;
ALTER
TABLE
transaction_log
MODIFY
COLUMN
`entity_id`
VARCHAR
(
255
)
COLLATE
utf8mb4_bin
NOT
NULL
;
...
...
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