diff --git a/app/models/bacula_file.rb b/app/models/bacula_file.rb new file mode 100644 index 0000000..f636a99 --- /dev/null +++ b/app/models/bacula_file.rb @@ -0,0 +1,4 @@ +class BaculaFile < ActiveRecord::Base + self.table_name = :File + self.primary_key = :FileId +end diff --git a/app/models/base_file.rb b/app/models/base_file.rb new file mode 100644 index 0000000..c6600ac --- /dev/null +++ b/app/models/base_file.rb @@ -0,0 +1,7 @@ +# The BaseFiles table contains all the File references for a particular JobId that point +# to a Base file - i.e. they were previously saved and hence were not saved in the current +# JobId but in BaseJobId under FileId. +class BaseFile < ActiveRecord::Base + self.table_name = :BaseFiles + self.primary_key = :BaseId +end diff --git a/app/models/cd_image.rb b/app/models/cd_image.rb new file mode 100644 index 0000000..6dcd673 --- /dev/null +++ b/app/models/cd_image.rb @@ -0,0 +1,4 @@ +class CdImage < ActiveRecord::Base + self.table_name = :CDImages + self.primary_key = :MediaId +end diff --git a/app/models/client.rb b/app/models/client.rb new file mode 100644 index 0000000..4607629 --- /dev/null +++ b/app/models/client.rb @@ -0,0 +1,4 @@ +class Client < ActiveRecord::Base + self.table_name = :Client + self.primary_key = :ClientId +end diff --git a/app/models/counter.rb b/app/models/counter.rb new file mode 100644 index 0000000..658dd84 --- /dev/null +++ b/app/models/counter.rb @@ -0,0 +1,4 @@ +class Counter < ActiveRecord::Base + self.table_name = :Counters + self.primary_key = :Counter +end diff --git a/app/models/device.rb b/app/models/device.rb new file mode 100644 index 0000000..d4e3316 --- /dev/null +++ b/app/models/device.rb @@ -0,0 +1,4 @@ +class Device < ActiveRecord::Base + self.table_name = :Device + self.primary_key = :DeviceId +end diff --git a/app/models/file_set.rb b/app/models/file_set.rb new file mode 100644 index 0000000..735db48 --- /dev/null +++ b/app/models/file_set.rb @@ -0,0 +1,4 @@ +class FileSet < ActiveRecord::Base + self.table_name = :FileSet + self.primary_key = :FileSetId +end diff --git a/app/models/filename.rb b/app/models/filename.rb new file mode 100644 index 0000000..5cb0cf2 --- /dev/null +++ b/app/models/filename.rb @@ -0,0 +1,4 @@ +class Filename < ActiveRecord::Base + self.table_name = :Filename + self.primary_key = :FilenameId +end diff --git a/app/models/job.rb b/app/models/job.rb new file mode 100644 index 0000000..e3cab1c --- /dev/null +++ b/app/models/job.rb @@ -0,0 +1,4 @@ +class Job < ActiveRecord::Base + self.table_name = :Job + self.primary_key = :JobId +end diff --git a/app/models/job_histo.rb b/app/models/job_histo.rb new file mode 100644 index 0000000..3f2fc30 --- /dev/null +++ b/app/models/job_histo.rb @@ -0,0 +1,3 @@ +class JobHisto < ActiveRecord::Base + self.table_name = :JobHisto +end diff --git a/app/models/job_media.rb b/app/models/job_media.rb new file mode 100644 index 0000000..6156a03 --- /dev/null +++ b/app/models/job_media.rb @@ -0,0 +1,4 @@ +class JobMedia < ActiveRecord::Base + self.table_name = :JobMedia + self.primary_key = :JobMediaId +end diff --git a/app/models/location.rb b/app/models/location.rb new file mode 100644 index 0000000..d9ecbce --- /dev/null +++ b/app/models/location.rb @@ -0,0 +1,4 @@ +class Location < ActiveRecord::Base + self.table_name = :Location + self.primary_key = :LocationId +end diff --git a/app/models/location_log.rb b/app/models/location_log.rb new file mode 100644 index 0000000..571e89b --- /dev/null +++ b/app/models/location_log.rb @@ -0,0 +1,4 @@ +class LocationLog < ActiveRecord::Base + self.table_name = :LocationLog + self.primary_key = :LocLogId +end diff --git a/app/models/log.rb b/app/models/log.rb new file mode 100644 index 0000000..71369e6 --- /dev/null +++ b/app/models/log.rb @@ -0,0 +1,4 @@ +class Log < ActiveRecord::Base + self.table_name = :Log + self.primary_key = :LogId +end diff --git a/app/models/media.rb b/app/models/media.rb new file mode 100644 index 0000000..090132c --- /dev/null +++ b/app/models/media.rb @@ -0,0 +1,4 @@ +class Media < ActiveRecord::Base + self.table_name = :Media + self.primary_key = :MediaId +end diff --git a/app/models/media_type.rb b/app/models/media_type.rb new file mode 100644 index 0000000..90e2a2b --- /dev/null +++ b/app/models/media_type.rb @@ -0,0 +1,4 @@ +class MediaType < ActiveRecord::Base + self.table_name = :MediaType + self.primary_key = :MediaTypeId +end diff --git a/app/models/path.rb b/app/models/path.rb new file mode 100644 index 0000000..3992f78 --- /dev/null +++ b/app/models/path.rb @@ -0,0 +1,4 @@ +class Path < ActiveRecord::Base + self.table_name = :Path + self.primary_key = :PathId +end diff --git a/app/models/path_hierarchy.rb b/app/models/path_hierarchy.rb new file mode 100644 index 0000000..e388362 --- /dev/null +++ b/app/models/path_hierarchy.rb @@ -0,0 +1,4 @@ +class PathHierarchy < ActiveRecord::Base + self.table_name = :PathHierarchy + self.primary_key = :PathId +end diff --git a/app/models/path_visibility.rb b/app/models/path_visibility.rb new file mode 100644 index 0000000..b64bbac --- /dev/null +++ b/app/models/path_visibility.rb @@ -0,0 +1,4 @@ +class PathVisibility < ActiveRecord::Base + self.table_name = :PathVisibility + self.primary_key = [:JobId, :PathId] +end diff --git a/app/models/pool.rb b/app/models/pool.rb new file mode 100644 index 0000000..b825c43 --- /dev/null +++ b/app/models/pool.rb @@ -0,0 +1,4 @@ +class Pool < ActiveRecord::Base + self.table_name = :Pool + self.primary_key = :PoolId +end diff --git a/app/models/restore_object.rb b/app/models/restore_object.rb new file mode 100644 index 0000000..b3af9b9 --- /dev/null +++ b/app/models/restore_object.rb @@ -0,0 +1,4 @@ +class RestoreObject < ActiveRecord::Base + self.table_name = :RestoreObject + self.primary_key = :RestoreObjectId +end diff --git a/app/models/status.rb b/app/models/status.rb new file mode 100644 index 0000000..b8bdc43 --- /dev/null +++ b/app/models/status.rb @@ -0,0 +1,4 @@ +class Status < ActiveRecord::Base + self.table_name = :Status + self.primary_key = :JobStatus +end diff --git a/app/models/storage.rb b/app/models/storage.rb new file mode 100644 index 0000000..e6d8890 --- /dev/null +++ b/app/models/storage.rb @@ -0,0 +1,4 @@ +class Storage < ActiveRecord::Base + self.table_name = :Storage + self.primary_key = :StorageId +end diff --git a/app/models/unsaved_file.rb b/app/models/unsaved_file.rb new file mode 100644 index 0000000..6ca6203 --- /dev/null +++ b/app/models/unsaved_file.rb @@ -0,0 +1,4 @@ +class UnsavedFile < ActiveRecord::Base + self.table_name = :UnsavedFiles + self.primary_key = :UnsavedId +end diff --git a/app/models/version.rb b/app/models/version.rb new file mode 100644 index 0000000..791ceca --- /dev/null +++ b/app/models/version.rb @@ -0,0 +1,3 @@ +class Version < ActiveRecord::Base + self.table_name = :Version +end