mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-30 20:28:26 +00:00
@ -0,0 +1,14 @@
|
||||
ALTER TABLE `attachmentmeta`
|
||||
ADD COLUMN (`language` varchar(254));
|
||||
|
||||
update `attachmentmeta` `m`
|
||||
inner join (
|
||||
select `m`.`attachid`, `c`.`doclang`
|
||||
from `attachmentmeta` m
|
||||
inner join `attachment` a on `a`.`attachid` = `m`.`attachid`
|
||||
inner join `item` i on `a`.`itemid` = `i`.`itemid`
|
||||
inner join `collective` c on `c`.`cid` = `i`.`cid`
|
||||
) as `c`
|
||||
set `m`.`language` = `c`.`doclang`
|
||||
where `m`.`attachid` = `c`.`attachid` and `m`.`language` is null;
|
||||
|
Reference in New Issue
Block a user