1
0

Merged source db migration

Added Quantity 'displayed' column
This commit is contained in:
cryptogopher 2019-09-23 14:55:20 +02:00
parent 0b549b909a
commit e58952b0e7
2 changed files with 8 additions and 10 deletions

View File

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

View File

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