Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move everything to one migration

  • Loading branch information...
commit b4456e20f475e8f01a669e55e32319e6b16916e0 1 parent 6b52dc1
@drogus drogus authored
View
13 db/migrate/20081029121155_create_phrases.rb
@@ -1,13 +0,0 @@
-class CreatePhrases < ActiveRecord::Migration
- def self.up
- create_table :phrases do |t|
- t.text :key
-
- t.timestamps
- end
- end
-
- def self.down
- drop_table :phrases
- end
-end
View
13 db/migrate/20081029121239_create_locales.rb
@@ -1,13 +0,0 @@
-class CreateLocales < ActiveRecord::Migration
- def self.up
- create_table :locales do |t|
- t.string :name
-
- t.timestamps
- end
- end
-
- def self.down
- drop_table :locales
- end
-end
View
15 db/migrate/20081029121331_create_translations.rb
@@ -1,15 +0,0 @@
-class CreateTranslations < ActiveRecord::Migration
- def self.up
- create_table :translations do |t|
- t.references :phrase
- t.references :locale
- t.text :text
-
- t.timestamps
- end
- end
-
- def self.down
- drop_table :translations
- end
-end
View
14 db/migrate/20081029150440_create_systems.rb
@@ -1,14 +0,0 @@
-class CreateSystems < ActiveRecord::Migration
- def self.up
- create_table :systems do |t|
- t.string :name
- t.text :location
-
- t.timestamps
- end
- end
-
- def self.down
- drop_table :systems
- end
-end
View
9 db/migrate/20081029150556_add_system_to_locale.rb
@@ -1,9 +0,0 @@
-class AddSystemToLocale < ActiveRecord::Migration
- def self.up
- add_column :locales, :system_id, :integer
- end
-
- def self.down
- remove_column :locales, :system
- end
-end
View
11 db/migrate/20081029154007_rename_systems_to_applications.rb
@@ -1,11 +0,0 @@
-class RenameSystemsToApplications < ActiveRecord::Migration
- def self.up
- rename_table :systems, :applications
- rename_column :locales, :system_id, :application_id
- end
-
- def self.down
- rename_table :applications, :systems
- rename_column :locales, :application_id, :system_id
- end
-end
View
9 db/migrate/20081030171726_add_application_id_to_phrases.rb
@@ -1,9 +0,0 @@
-class AddApplicationIdToPhrases < ActiveRecord::Migration
- def self.up
- add_column :phrases, :application_id, :integer
- end
-
- def self.down
- remove_column :phrases, :application_id
- end
-end
View
19 db/migrate/20081124140539_drop_applications.rb
@@ -1,19 +0,0 @@
-class DropApplications < ActiveRecord::Migration
- def self.up
- drop_table :applications
- remove_column :locales, :application_id
- remove_column :phrases, :application_id
- end
-
- def self.down
- create_table :applications do |t|
- t.string :name
- t.text :location
-
- t.timestamps
- end
-
- add_column :locales, :application_id, :integer
- add_column :phrases, :application_id, :integer
- end
-end
View
11 db/migrate/20100408173138_add_updated_stuff.rb
@@ -1,11 +0,0 @@
-class AddUpdatedStuff < ActiveRecord::Migration
- def self.up
- add_column :translations, :primary_updated, :boolean, :default => false
- add_column :translations, :previous_text, :text
- end
-
- def self.down
- remove_column :translations, :previous_text
- remove_column :translations, :primary_updated
- end
-end
View
13 db/migrate/20100408174805_rename_tables.rb
@@ -1,13 +0,0 @@
-class RenameTables < ActiveRecord::Migration
- def self.up
- rename_table :locales, :tolk_locales
- rename_table :phrases, :tolk_phrases
- rename_table :translations, :tolk_translations
- end
-
- def self.down
- rename_table :tolk_locales, :locales
- rename_table :tolk_phrases, :phrases
- rename_table :tolk_translations, :translations
- end
-end
View
11 db/migrate/20100409194926_add_missing_indices.rb
@@ -1,11 +0,0 @@
-class AddMissingIndices < ActiveRecord::Migration
- def self.up
- add_index :tolk_locales, :name, :unique => true
- add_index :tolk_translations, [:phrase_id, :locale_id], :unique => true
- end
-
- def self.down
- remove_index :tolk_translations, :column => [:phrase_id, :locale_id]
- remove_index :tolk_locales, :column => :name
- end
-end
View
37 db/migrate/20110824135256_migrate_tolk.rb
@@ -0,0 +1,37 @@
+class MigrateTolk < ActiveRecord::Migration
+ def self.up
+ create_table "tolk_locales", :force => true do |t|
+ t.string "name"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "tolk_locales", ["name"], :name => "index_tolk_locales_on_name", :unique => true
+
+ create_table "tolk_phrases", :force => true do |t|
+ t.text "key"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "tolk_phrases", ["key"], :name => "index_tolk_phrases_on_key", :unique => true
+
+ create_table "tolk_translations", :force => true do |t|
+ t.integer "phrase_id"
+ t.integer "locale_id"
+ t.text "text"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "primary_updated", :default => false
+ t.text "previous_text"
+ end
+
+ add_index "tolk_translations", ["phrase_id", "locale_id"], :name => "index_tolk_translations_on_phrase_id_and_locale_id", :unique => true
+ end
+
+ def self.down
+ drop_table :tolk_translations
+ drop_table :tolk_phrases
+ drop_table :tolk_locales
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.