diff --git a/db/migrate/001_create_units.rb b/db/migrate/001_create_units.rb index 1d7da34..076963e 100644 --- a/db/migrate/001_create_units.rb +++ b/db/migrate/001_create_units.rb @@ -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 diff --git a/db/migrate/002_create_sources.rb b/db/migrate/002_create_sources.rb deleted file mode 100644 index df5ba93..0000000 --- a/db/migrate/002_create_sources.rb +++ /dev/null @@ -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