2015-07-31 14:11:13 +02:00
|
|
|
DROP TABLE IF EXISTS tm;
|
|
|
|
CREATE TABLE tm (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
source_lang_id integer,
|
|
|
|
target_lang_id integer,
|
2017-03-10 14:52:01 +01:00
|
|
|
name varchar(40),
|
|
|
|
lemmatized bool DEFAULT false
|
2015-07-31 14:11:13 +02:00
|
|
|
);
|
|
|
|
|
2017-06-25 23:16:43 +02:00
|
|
|
DROP TABLE IF EXISTS request;
|
|
|
|
CREATE TABLE request (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
source_file_path varchar(100),
|
|
|
|
target_file_path varchar(100),
|
|
|
|
source_lang_id integer,
|
|
|
|
target_lang_id integer,
|
|
|
|
name varchar(40),
|
|
|
|
status integer,
|
|
|
|
type integer,
|
|
|
|
tm_id integer,
|
|
|
|
created timestamp default now()
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2015-07-31 14:11:13 +02:00
|
|
|
DROP TABLE IF EXISTS language;
|
|
|
|
CREATE TABLE language (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
code varchar(10),
|
|
|
|
name varchar(30)
|
|
|
|
);
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS unit;
|
|
|
|
CREATE TABLE unit (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
tm_id integer,
|
|
|
|
source_segment text,
|
2015-08-06 13:29:28 +02:00
|
|
|
target_segment text,
|
2015-12-13 19:38:08 +01:00
|
|
|
source_tokens integer[],
|
2019-01-17 14:58:22 +01:00
|
|
|
target_tokens integer[],
|
|
|
|
alignments text
|
2015-12-29 22:13:21 +01:00
|
|
|
);
|
|
|
|
|
2017-06-26 13:45:10 +02:00
|
|
|
CREATE INDEX ON unit(tm_id);
|