added image url for categories

This commit is contained in:
Edin Dazdarevic
2015-01-31 14:49:27 +01:00
parent 819cee9391
commit 646fbbcf4e
3 changed files with 22 additions and 7 deletions

View File

@@ -0,0 +1,5 @@
class AddImageToCategories < ActiveRecord::Migration
def change
add_column :categories, :image_url, :string
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150130041842) do
ActiveRecord::Schema.define(version: 20150131134330) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -19,6 +19,7 @@ ActiveRecord::Schema.define(version: 20150130041842) do
create_table "categories", force: :cascade do |t|
t.string "name"
t.integer "section_id"
t.string "image_url"
end
create_table "items", force: :cascade do |t|
@@ -54,10 +55,8 @@ ActiveRecord::Schema.define(version: 20150130041842) do
end
create_table "sub_categories", force: :cascade do |t|
t.string "name"
t.integer "category_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "name"
t.integer "category_id"
end
create_table "units", force: :cascade do |t|