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 @
07fa7781
...
@@ -101,13 +101,14 @@ Select distinct cdli_db_old.revhistories.mod_date, cdli_db_old.revhistories.auth
...
@@ -101,13 +101,14 @@ Select distinct cdli_db_old.revhistories.mod_date, cdli_db_old.revhistories.auth
```
sql
```
sql
UPDATE
cdli_db
.
update_events
UPDATE
cdli_db
.
update_events
join
cdli_db_tmp
.
authors_view
on
cdli_db_tmp
.
authors_view
.
mod_date
=
cdli_db
.
update_events
.
created
SET
cdli_db
.
update_events
.
created_by
=
SET
cdli_db
.
update_events
.
created_by
=
(
(
SELECT
cdli_db
.
authors
.
id
FROM
cdli_db
.
authors
SELECT
author_id
FROM
cdli_db_tmp
.
authors_view
join
cdli_db_tmp
.
authors_view
on
cdli_db_tmp
.
authors_view
.
author_id
=
cdli_db
.
authors
.
id
WHERE
cdli_db_tmp
.
authors_view
.
mod_date
=
cdli_db
.
update_events
.
created
join
cdli_db
.
update_events
on
cdli_db_tmp
.
authors_view
.
mod_date
=
cdli_db
.
update_events
.
created
AND
cdli_db
.
update_events
.
update_type
=
"atf"
LIMIT
1
WHERE
cdli_db_tmp
.
authors_view
.
mod_date
=
cdli_db
.
update_events
.
created
AND
cdli_db
.
update_events
.
update_type
=
"atf"
LIMIT
1
);
);
```
```
...
...
...
...