mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-02-28 16:53:23 -05:00
Make sure some columns are never null.
This commit is contained in:
parent
312fa7d787
commit
34c13a7717
@ -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,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,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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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…
x
Reference in New Issue
Block a user