mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
Changing bike_status to bike_purporse
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class BikeStatusToPurpose < ActiveRecord::Migration
|
||||
def change
|
||||
rename_column :bikes, :bike_status_id, :bike_purpose_id
|
||||
rename_column :bike_statuses, :status, :purpose
|
||||
rename_table :bike_statuses, :bike_purposes
|
||||
end
|
||||
end
|
||||
+4
-4
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20130816015219) do
|
||||
ActiveRecord::Schema.define(:version => 20130902164600) do
|
||||
|
||||
create_table "bike_actions", :force => true do |t|
|
||||
t.string "action", :limit => 128, :null => false
|
||||
@@ -34,8 +34,8 @@ ActiveRecord::Schema.define(:version => 20130816015219) do
|
||||
t.integer "bike_brand_id", :null => false
|
||||
end
|
||||
|
||||
create_table "bike_statuses", :force => true do |t|
|
||||
t.string "status", :null => false
|
||||
create_table "bike_purposes", :force => true do |t|
|
||||
t.string "purpose", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
@@ -57,7 +57,7 @@ ActiveRecord::Schema.define(:version => 20130816015219) do
|
||||
t.integer "wheel_size"
|
||||
t.float "value"
|
||||
t.integer "bike_condition_id", :null => false
|
||||
t.integer "bike_status_id", :null => false
|
||||
t.integer "bike_purpose_id", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "shop_id"
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
undetermined:
|
||||
id: 1
|
||||
purpose: UNDETERMINED
|
||||
scrap:
|
||||
id: 2
|
||||
purpose: SCRAP
|
||||
parts:
|
||||
id: 3
|
||||
purpose: PARTS
|
||||
storage:
|
||||
id: 4
|
||||
purpose: STORAGE
|
||||
buildbike:
|
||||
id: 5
|
||||
purpose: BUILDBIKE
|
||||
sale:
|
||||
id: 6
|
||||
purpose: SALE
|
||||
@@ -1,18 +0,0 @@
|
||||
undetermined:
|
||||
id: 1
|
||||
status: UNDETERMINED
|
||||
scrap:
|
||||
id: 2
|
||||
status: SCRAP
|
||||
parts:
|
||||
id: 3
|
||||
status: PARTS
|
||||
storage:
|
||||
id: 4
|
||||
status: STORAGE
|
||||
buildbike:
|
||||
id: 5
|
||||
status: BUILDBIKE
|
||||
sale:
|
||||
id: 6
|
||||
status: SALE
|
||||
Reference in New Issue
Block a user