@@ -52,6 +52,28 @@ create table amnesia_multilingual.event_translation (
52
52
foreign key (content_id) references event(content_id)
53
53
);
54
54
55
+ create table amnesia_multilingual .data_translation (
56
+ language_id char (2 ) not null ,
57
+ content_id integer not null ,
58
+ mime_id integer not null ,
59
+ original_name text not null ,
60
+ file_size real not null ,
61
+ path_name serial not null ,
62
+
63
+ constraint pk_data_translation
64
+ primary key (language_id, content_id),
65
+
66
+ constraint fk_data_translation_content_translation
67
+ foreign key (language_id, content_id)
68
+ references amnesia_multilingual .content_translation (language_id, content_id),
69
+
70
+ constraint fk_data_translation_data
71
+ foreign key (content_id) references data(content_id),
72
+
73
+ constraint fk_data_translation_mime
74
+ foreign key (mime_id) references mime(id) deferrable initially deferred
75
+ );
76
+
55
77
insert into amnesia_multilingual .content_translation (language_id, content_id, title, description)
56
78
select ' en' , id as content_id, title, description from content;
57
79
@@ -64,3 +86,9 @@ alter table document drop column body;
64
86
65
87
insert into amnesia_multilingual .event_translation select ' en' , content_id, body from event;
66
88
alter table event drop column body;
89
+
90
+ insert into amnesia_multilingual .data_translation select ' en' , content_id, mime_id, original_name, file_size, path_name from data;
91
+ alter table data drop column original_name;
92
+ alter table data drop column file_size;
93
+ alter table data drop column path_name;
94
+ alter table data drop column mime_id;
0 commit comments