1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-02-28 08:43:23 -05:00

Make sure some columns are never null.

This commit is contained in:
Jason Denney 2012-12-04 23:36:50 -05:00
parent 312fa7d787
commit 34c13a7717
9 changed files with 14 additions and 14 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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