DB updates

Achtung migration notwendig!
This commit is contained in:
Thomas Blazek
2013-07-25 16:55:37 +02:00
parent fcbe330ea4
commit bfb46e05e5
2 changed files with 6 additions and 13 deletions

View File

@@ -5,16 +5,12 @@ class CreateBeispiele < ActiveRecord::Migration
t.text :desc t.text :desc
t.integer :lva_id t.integer :lva_id
t.timestamps t.timestamps
t.string :beispieldatei
end end
add_attachment :beispiele, :file
Beispiel.create_translation_table!({
:desc => :text,
})
add_column :beispiel_translations, :beispiele_id, :integer
remove_column :beispiel_translations, :beispiel_id
end end
def down def down
Beispiel.drop_translation_table! #:migrate_data => true # Beispiel.drop_translation_table! #:migrate_data => true
drop_table :beispiele drop_table :beispiele
end end

View File

@@ -27,12 +27,9 @@ ActiveRecord::Schema.define(:version => 20130214233723) do
t.string "name" t.string "name"
t.text "desc" t.text "desc"
t.integer "lva_id" t.integer "lva_id"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.string "file_file_name" t.string "beispieldatei"
t.string "file_content_type"
t.integer "file_file_size"
t.datetime "file_updated_at"
end end
create_table "lva_translations", :force => true do |t| create_table "lva_translations", :force => true do |t|