2015-09-20 19:21:18 +00:00
|
|
|
class AddBarcodeToProducts < ActiveRecord::Migration
|
|
|
|
def change
|
2015-09-23 09:09:24 +00:00
|
|
|
create_table :barcodes do |t|
|
|
|
|
t.references :product
|
|
|
|
t.string :code, index: true, null: false, default: ""
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
2015-09-20 19:21:18 +00:00
|
|
|
end
|
|
|
|
end
|