mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
Story#112054829 - fetch file
This commit is contained in:
parent
e3e01fcd51
commit
82caac3a17
1 changed files with 14 additions and 0 deletions
14
app/models/legacy/file.rb
Normal file
14
app/models/legacy/file.rb
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue