You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
35 lines
1.1 KiB
10 months ago
|
#/bin/sh
|
||
|
|
||
|
DOQUERY "create table tmp_captions
|
||
|
(
|
||
|
id CHAR(200) ,
|
||
|
table_name CHAR(200) ,
|
||
|
field_name CHAR(200) ,
|
||
|
record_no INTEGER ,
|
||
|
locale CHAR(10) ,
|
||
|
contents_short CHAR(255) ,
|
||
|
contents_long text ,
|
||
|
equalitystatus SMALLINT ,
|
||
|
sachgebiete_id INTEGER,
|
||
|
doku_link character varying(255),
|
||
|
export_to_glossar integer DEFAULT 1
|
||
|
)"
|
||
|
|
||
|
sx_auto_upload_table.x tmp_captions "./lm_captions.unl"
|
||
|
|
||
|
DOQUERY "delete from tmp_captions where (id is not null
|
||
|
and id in (select id from sx_captions where id is not null))
|
||
|
or (id is null and field_name is not null and field_name in (select field_name from sx_captions where field_name is not null));"
|
||
|
|
||
|
if [ "$DATABASE" = "POSTGRES" ]
|
||
|
then
|
||
|
DOQUERY "select sp_update_sequence('sx_captions');"
|
||
|
fi
|
||
|
|
||
|
DOQUERY "insert into sx_captions ( id,table_name,field_name,record_no,locale,contents_short,contents_long, equalitystatus,sachgebiete_id,doku_link,export_to_glossar)
|
||
|
select id,table_name,field_name,record_no,locale,contents_short,contents_long, equalitystatus,sachgebiete_id,doku_link,export_to_glossar from tmp_captions;"
|
||
|
|
||
|
DOQUERY "drop table tmp_captions;"
|
||
|
|
||
|
|