summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20150226024550_create_downloads.rb15
1 files changed, 15 insertions, 0 deletions
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