Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add columns to translations table for storing update information

  • Loading branch information...
commit 6d5b445d9712f8cdba36af97b005020d7a32e968 1 parent c0c6fe2
Pratik lifo authored
11 db/migrate/20100408173138_add_updated_stuff.rb
View
@@ -0,0 +1,11 @@
+class AddUpdatedStuff < ActiveRecord::Migration
+ def self.up
+ add_column :translations, :updated, :boolean, :default => false
+ add_column :translations, :previous_text, :text
+ end
+
+ def self.down
+ remove_column :translations, :previous_text
+ remove_column :translations, :updated
+ end
+end
4 db/schema.rb
View
@@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20081124140539) do
+ActiveRecord::Schema.define(:version => 20100408173138) do
create_table "locales", :force => true do |t|
t.string "name"
@@ -29,6 +29,8 @@
t.text "text"
t.datetime "created_at"
t.datetime "updated_at"
+ t.boolean "updated", :default => false
+ t.text "previous_text"
end
end
2  generators/tolk_migration/templates/migrate/create_tolk_tables.rb
View
@@ -16,6 +16,8 @@ def self.up
t.integer :phrase_id
t.integer :locale_id
t.text :text
+ t.text :previous_text
+ t.boolean :updated, :default => false
t.datetime :created_at
t.datetime :updated_at
end
Please sign in to comment.
Something went wrong with that request. Please try again.