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
create_table :bike_actions do |t|
t.string :action, :limit => 128
t.string :action, :limit => 128, :null => false
t.timestamps
end
end

2
db/migrate/20121204220662_acts_as_loggable_user_actions_migration.rb

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

2
db/migrate/20121204220663_acts_as_loggable_transaction_actions_migration.rb

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

10
db/migrate/20121204221242_create_bike.rb

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

2
db/migrate/20121204223403_create_user_profile.rb

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

2
db/migrate/20121205024701_create_bike_statuses.rb

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

4
db/migrate/20121205040602_create_bike_models.rb

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

2
db/migrate/20121205040829_create_bike_styles.rb

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

2
db/migrate/20121205041000_create_bike_conditions.rb

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

Loading…
Cancel
Save