From 4e94e31aa0acda54ae962840b57ae42ca6e71185 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Wed, 25 Feb 2015 18:47:09 -0800 Subject: rails generate scaffold Download --- db/migrate/20150226024550_create_downloads.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 db/migrate/20150226024550_create_downloads.rb (limited to 'db') diff --git a/db/migrate/20150226024550_create_downloads.rb b/db/migrate/20150226024550_create_downloads.rb new file mode 100644 index 0000000..4033e0c --- /dev/null +++ b/db/migrate/20150226024550_create_downloads.rb @@ -0,0 +1,15 @@ +class CreateDownloads < ActiveRecord::Migration + def change + create_table :downloads do |t| + t.string :name + t.string :filename + t.string :type + t.text :description + t.integer :hits + + t.timestamps null: false + end + add_index :downloads, :filename, unique: true + add_index :downloads, :hits + end +end -- cgit v1.2.3