diff --git a/app/models/legacy/file.rb b/app/models/legacy/file.rb new file mode 100644 index 000000000..f28a966c4 --- /dev/null +++ b/app/models/legacy/file.rb @@ -0,0 +1,14 @@ +module Legacy + class File < Db + self.table_name = :files + + def self.for_history history_id + sql = %Q{select history.id, files.path, files.name, files.crdate + from history + join action ON action.id=history.action + join files on action.servertrid=files.servertrid + where history.id =#{history_id};} + find_by_sql(sql).to_a + end + end +end \ No newline at end of file