-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1717c51
commit f50904c
Showing
2 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
class CreateLocaleLanguages < ActiveRecord::Migration[7.0] | ||
def change | ||
ActiveRecord::Base.connection.execute("CREATE TABLE locale_languages LIKE languages;") | ||
|
||
ActiveRecord::Base.connection.execute("INSERT INTO locale_languages SELECT * FROM languages;") | ||
|
||
# Only if you care about the name of the index being consistent | ||
# remove_index :locale_languages, column: [:short], name: "index_languages_on_short" | ||
# remove_index :locale_languages, column: [:sortable_name], name: "index_languages_on_sortable_name" | ||
|
||
# change_table :locale_languages do |t| | ||
# t.index :short | ||
# t.index :sortable_name | ||
# end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters