Browse Source

Make sure some columns are never null.

denney-disable-on-select
Jason Denney 12 years ago
parent
commit
34c13a7717
  1. 2
      db/migrate/20121204220661_acts_as_loggable_bike_actions_migration.rb
  2. 2
      db/migrate/20121204220662_acts_as_loggable_user_actions_migration.rb
  3. 2
      db/migrate/20121204220663_acts_as_loggable_transaction_actions_migration.rb
  4. 10
      db/migrate/20121204221242_create_bike.rb
  5. 2
      db/migrate/20121204223403_create_user_profile.rb
  6. 2
      db/migrate/20121205024701_create_bike_statuses.rb
  7. 4
      db/migrate/20121205040602_create_bike_models.rb
  8. 2
      db/migrate/20121205040829_create_bike_styles.rb
  9. 2
      db/migrate/20121205041000_create_bike_conditions.rb

2
db/migrate/20121204220661_acts_as_loggable_bike_actions_migration.rb

@ -2,7 +2,7 @@ class ActsAsLoggableBikeActionsMigration < ActiveRecord::Migration
def self.up def self.up
create_table :bike_actions do |t| create_table :bike_actions do |t|
t.string :action, :limit => 128 t.string :action, :limit => 128, :null => false
t.timestamps t.timestamps
end end
end end

2
db/migrate/20121204220662_acts_as_loggable_user_actions_migration.rb

@ -2,7 +2,7 @@ class ActsAsLoggableUserActionsMigration < ActiveRecord::Migration
def self.up def self.up
create_table :user_actions do |t| create_table :user_actions do |t|
t.string :action, :limit => 128 t.string :action, :limit => 128, :null => false
t.timestamps t.timestamps
end end
end end

2
db/migrate/20121204220663_acts_as_loggable_transaction_actions_migration.rb

@ -2,7 +2,7 @@ class ActsAsLoggableTransactionActionsMigration < ActiveRecord::Migration
def self.up def self.up
create_table :transaction_actions do |t| create_table :transaction_actions do |t|
t.string :action, :limit => 128 t.string :action, :limit => 128, :null => false
t.timestamps t.timestamps
end end
end end

10
db/migrate/20121204221242_create_bike.rb

@ -2,16 +2,16 @@ class CreateBike < ActiveRecord::Migration
def change def change
create_table :bikes do |t| create_table :bikes do |t|
t.string "serial_number" t.string "serial_number"
t.integer "bike_brand_id" t.integer "bike_brand_id", :null => false
t.integer "bike_model_id" t.integer "bike_model_id", :null => false
t.string "color" t.string "color"
t.integer "bike_style_id" t.integer "bike_style_id", :null => false
t.float "seat_tube_height" t.float "seat_tube_height"
t.float "top_tube_length" t.float "top_tube_length"
t.integer "wheel_size" t.integer "wheel_size"
t.float "value" t.float "value"
t.string "bike_condition_id" t.string "bike_condition_id", :null => false
t.integer "bike_status_id" t.integer "bike_status_id", :null => false
t.timestamps t.timestamps
end end
end end

2
db/migrate/20121204223403_create_user_profile.rb

@ -1,7 +1,7 @@
class CreateUserProfile < ActiveRecord::Migration class CreateUserProfile < ActiveRecord::Migration
def change def change
create_table :user_profiles do |t| create_table :user_profiles do |t|
t.integer "user_id" t.integer "user_id", :null => false
t.string "first_name" t.string "first_name"
t.string "last_name" t.string "last_name"
t.string "addrStreet1" t.string "addrStreet1"

2
db/migrate/20121205024701_create_bike_statuses.rb

@ -1,7 +1,7 @@
class CreateBikeStatuses < ActiveRecord::Migration class CreateBikeStatuses < ActiveRecord::Migration
def change def change
create_table :bike_statuses do |t| create_table :bike_statuses do |t|
t.string "status" t.string "status", :null => false
t.timestamps t.timestamps
end end
end end

4
db/migrate/20121205040602_create_bike_models.rb

@ -1,8 +1,8 @@
class CreateBikeModels < ActiveRecord::Migration class CreateBikeModels < ActiveRecord::Migration
def change def change
create_table :bike_models do |t| create_table :bike_models do |t|
t.integer "bike_brand_id" t.integer "bike_brand_id", :null => false
t.string "model" t.string "model", :null => false
t.timestamps t.timestamps
end end
end end

2
db/migrate/20121205040829_create_bike_styles.rb

@ -1,7 +1,7 @@
class CreateBikeStyles < ActiveRecord::Migration class CreateBikeStyles < ActiveRecord::Migration
def change def change
create_table :bike_styles do |t| create_table :bike_styles do |t|
t.string "style" t.string "style", :null => false
t.timestamps t.timestamps
end end
end end

2
db/migrate/20121205041000_create_bike_conditions.rb

@ -1,7 +1,7 @@
class CreateBikeConditions < ActiveRecord::Migration class CreateBikeConditions < ActiveRecord::Migration
def change def change
create_table :bike_conditions do |t| create_table :bike_conditions do |t|
t.string "condition" t.string "condition", :null => false
t.timestamps t.timestamps
end end
end end

Loading…
Cancel
Save