Merged source db migration
Added Quantity 'displayed' column
This commit is contained in:
parent
0b549b909a
commit
e58952b0e7
@ -11,12 +11,19 @@ class CreateUnits < ActiveRecord::Migration
|
||||
t.string :name
|
||||
t.string :description
|
||||
t.integer :domain
|
||||
t.boolean :displayed
|
||||
# fields for awesome_nested_set
|
||||
t.references :parent
|
||||
t.integer :lft, :null => false, :index => true
|
||||
t.integer :rgt, :null => false, :index => true
|
||||
end
|
||||
|
||||
create_table :sources do |t|
|
||||
t.references :project
|
||||
t.string :name
|
||||
t.text :description
|
||||
end
|
||||
|
||||
create_table :ingredients do |t|
|
||||
t.references :project
|
||||
t.string :name
|
||||
@ -24,6 +31,7 @@ class CreateUnits < ActiveRecord::Migration
|
||||
t.references :ref_unit
|
||||
t.integer :group
|
||||
t.references :source
|
||||
t.string :source_ident
|
||||
t.boolean :hidden
|
||||
end
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
class CreateSources < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :sources do |t|
|
||||
t.references :project, index: true, foreign_key: true
|
||||
t.string :name
|
||||
t.text :description
|
||||
end
|
||||
add_index :sources, :project_id
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user