Skip to content

Commit

Permalink
Migrate to add content columns in Description and Example models
Browse files Browse the repository at this point in the history
* Description#content_zh
* Description#content_en
* Description#content_fr

* Example#content_amis
* Example#content_en
* Example#content_fr
  • Loading branch information
wildjcrt committed Sep 30, 2024
1 parent 6bfc26a commit 983d9e5
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/models/description.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# glossary_serial :string(10)
# glossary_level :string(10)
# customized_text :string(500)
# content_zh :string
# content_en :string
# content_fr :string
#

class Description < ApplicationRecord
Expand Down
3 changes: 3 additions & 0 deletions app/models/example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
# content_zh :string
# created_at :datetime not null
# updated_at :datetime not null
# content_amis :string
# content_en :string
# content_fr :string
#

class Example < ApplicationRecord
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class AddContentAmisEnFrToExampleAndDescription < ActiveRecord::Migration[7.2]
def change
change_table :descriptions, bulk: true do |t|
t.string :content_zh
t.string :content_en
t.string :content_fr
end

change_table :examples, bulk: true do |t|
t.string :content_amis
t.string :content_en
t.string :content_fr
end
end
end
8 changes: 7 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified storage/amis-moedict.sqlite3
Binary file not shown.

0 comments on commit 983d9e5

Please sign in to comment.