Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Changes
Page history
Update Database conversion
authored
Aug 26, 2022
by
Émilie Pagé-Perron
Show whitespace changes
Inline
Side-by-side
Database-conversion.md
View page @
67893f62
...
@@ -48,7 +48,6 @@ select revhistories.id, revhistories.object_id, revhistories.new_text from revhi
...
@@ -48,7 +48,6 @@ select revhistories.id, revhistories.object_id, revhistories.new_text from revhi
Update inscriptions with fulltrans data
Update inscriptions with fulltrans data
```
sql
```
sql
update
cdli_db
.
inscriptions
update
cdli_db
.
inscriptions
join
cdli_db_old
.
fulltrans
on
cdli_db_old
.
fulltrans
.
object_id
=
cdli_db
.
inscriptions
.
artifact_id
join
cdli_db_old
.
fulltrans
on
cdli_db_old
.
fulltrans
.
object_id
=
cdli_db
.
inscriptions
.
artifact_id
...
@@ -62,7 +61,20 @@ and
...
@@ -62,7 +61,20 @@ and
cdli_db_old
.
fulltrans
.
wholetext
=
cdli_db
.
inscriptions
.
atf
cdli_db_old
.
fulltrans
.
wholetext
=
cdli_db
.
inscriptions
.
atf
```
```
update is_latest
```
sql
update
cdli_db
.
inscriptions
join
cdli_db_old
.
revhistories
on
cdli_db_old
.
revhistories
.
id
=
cdli_db
.
inscriptions
.
id
set
cdli_db
.
inscriptions
.
is_latest
=
1
where
cdli_db
.
inscriptions
.
id
=
(
SELECT
t1
.
id
FROM
cdli_db_old
.
revhistories
t1
WHERE
t1
.
mod_date
=
(
SELECT
MAX
(
t2
.
mod_date
)
FROM
cdli_db_old
.
revhistories
t2
WHERE
t2
.
object_id
=
t1
.
object_id
));
```
Prepare or update tmp author and credits table:
Prepare or update tmp author and credits table:
...
...
...
...