summaryrefslogtreecommitdiff
path: root/vendor/plugins/globalize2/generators
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/plugins/globalize2/generators')
-rw-r--r--vendor/plugins/globalize2/generators/db_backend.rb0
-rw-r--r--vendor/plugins/globalize2/generators/templates/db_backend_migration.rb25
2 files changed, 25 insertions, 0 deletions
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
--- /dev/null
+++ b/vendor/plugins/globalize2/generators/db_backend.rb
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 @@
1class ActsAsTaggableMigration < ActiveRecord::Migration
2 def self.up
3 create_table :globalize_translations do |t|
4 t.string :locale, :null => false
5 t.string :key, :null => false
6 t.string :translation
7 t.timestamps
8 end
9
10# TODO: FINISH DOING MIGRATION -- stopped in the middle
11
12 create_table :globalize_translations_map do |t|
13 t.string :key, :null => false
14 t.integer :translation_id, :null => false
15 end
16
17 add_index :taggings, :tag_id
18 add_index :taggings, [:taggable_id, :taggable_type]
19 end
20
21 def self.down
22 drop_table :globalize_translations
23 drop_table :tags
24 end
25end