From 36a2f1f3c085dd81171cf7d8220770d4ff921ab3 Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 7 Feb 2009 15:50:40 +0100 Subject: added globalize2 plugin as well as some modifications which use the new translation facilities. backend mostly. --- vendor/plugins/globalize2/generators/db_backend.rb | 0 .../generators/templates/db_backend_migration.rb | 25 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 vendor/plugins/globalize2/generators/db_backend.rb create mode 100644 vendor/plugins/globalize2/generators/templates/db_backend_migration.rb (limited to 'vendor/plugins/globalize2/generators') diff --git a/vendor/plugins/globalize2/generators/db_backend.rb b/vendor/plugins/globalize2/generators/db_backend.rb new file mode 100644 index 00000000..e69de29b diff --git a/vendor/plugins/globalize2/generators/templates/db_backend_migration.rb b/vendor/plugins/globalize2/generators/templates/db_backend_migration.rb new file mode 100644 index 00000000..d4513a5c --- /dev/null +++ b/vendor/plugins/globalize2/generators/templates/db_backend_migration.rb @@ -0,0 +1,25 @@ +class ActsAsTaggableMigration < ActiveRecord::Migration + def self.up + create_table :globalize_translations do |t| + t.string :locale, :null => false + t.string :key, :null => false + t.string :translation + t.timestamps + end + +# TODO: FINISH DOING MIGRATION -- stopped in the middle + + create_table :globalize_translations_map do |t| + t.string :key, :null => false + t.integer :translation_id, :null => false + end + + add_index :taggings, :tag_id + add_index :taggings, [:taggable_id, :taggable_type] + end + + def self.down + drop_table :globalize_translations + drop_table :tags + end +end -- cgit v1.3