diff --git a/app/models/course_attachment.rb b/app/models/course_attachment.rb new file mode 100644 index 000000000..eccaacdb9 --- /dev/null +++ b/app/models/course_attachment.rb @@ -0,0 +1,3 @@ +class CourseAttachment < ActiveRecord::Base + attr_accessible :attachtype, :author_id, :content_type, :description, :digest, :disk_directory, :disk_filename, :downloads, :filename, :filesize, :integer, :is_public +end diff --git a/db/migrate/20140812032957_create_course_attachments.rb b/db/migrate/20140812032957_create_course_attachments.rb new file mode 100644 index 000000000..057837e68 --- /dev/null +++ b/db/migrate/20140812032957_create_course_attachments.rb @@ -0,0 +1,20 @@ +class CreateCourseAttachments < ActiveRecord::Migration + def change + create_table :course_attachments do |t| + t.string :filename + t.string :disk_filename + t.integer :filesize + t.string :content_type + t.string :digest + t.integer :downloads + t.string :author_id + t.string :integer + t.string :description + t.string :disk_directory + t.integer :attachtype + t.integer :is_public + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 292ca9d05..f087206ee 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20140801034242) do +ActiveRecord::Schema.define(:version => 20140812032957) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -291,6 +291,23 @@ ActiveRecord::Schema.define(:version => 20140801034242) do t.datetime "updated_on", :null => false end + create_table "course_attachments", :force => true do |t| + t.string "filename" + t.string "disk_filename" + t.integer "filesize" + t.string "content_type" + t.string "digest" + t.integer "downloads" + t.string "author_id" + t.string "integer" + t.string "description" + t.string "disk_directory" + t.integer "attachtype" + t.integer "is_public" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "course_infos", :force => true do |t| t.integer "course_id" t.integer "user_id"